Search Results
APIs for controlling Hardware Sync. More...
#include <dji_hardware_sync.hpp>
Public Member Functions | |
HardwareSync (Vehicle *vehiclePtr=0) | |
void setSyncFreq (uint32_t freqInHz, uint16_t tag=0) | |
Call this API to start sending a hardware pulse and set up a software packet to accompany it. More... | |
void startSync (SyncSettings &data) | |
Internal setter function that is called by setSyncFreq function. More... | |
void subscribeNMEAMsgs (VehicleCallBack cb, void *userData) | |
Subscribe to NMEA messages with a callback function. More... | |
void unsubscribeNMEAMsgs () | |
Unsubscribe to NMEA messages. More... | |
bool getGNRMCMsg (NMEAData &nmea) | |
Poll NMEA messages. More... | |
bool getGNGSAMsg (GNGSAPackage &GNGSA) | |
Poll NMEA messages. More... | |
void subscribeUTCTime (VehicleCallBack cb, void *userData) | |
Subscribe to UTC Time tag with a callback function. More... | |
void unsubscribeUTCTime () | |
Unsubscribe to UTC time tag. More... | |
bool getUTCTime (NMEAData &utc) | |
Poll UTC time tag. More... | |
void subscribeFCTimeInUTCRef (VehicleCallBack cb, void *userData) | |
Subscribe to FC Time in UTC referece with a callback function. More... | |
void unsubscribeFCTimeInUTCRef () | |
Unsubscribe to FC Time in UTC referece. | |
bool getFCTimeInUTCRef (DJI::OSDK::ACK::FCTimeInUTC &fcTimeInUTC) | |
Poll FC Time in UTC referece. More... | |
void subscribePPSSource (VehicleCallBack cb, void *userData) | |
Subscribe to PPS source info with a callback function. More... | |
void unsubscribePPSSource () | |
Unsubscribe to PPS source info. More... | |
bool getPPSSource (PPSSource &source) | |
Poll PPS source info. More... | |
void writeData (const uint8_t cmdID, const RecvContainer *recvContainer) | |
Write data when received from UART. More... | |
Public Attributes | |
VehicleCallBackHandler ppsNMEAHandler | |
VehicleCallBackHandler ppsUTCTimeHandler | |
VehicleCallBackHandler ppsUTCFCTimeHandler | |
VehicleCallBackHandler ppsSourceHandler | |
Detailed Description
APIs for controlling Hardware Sync.
These APIs enable you to output a pulse/pulse train along with a software packet with synchronized timestamps and sensor data.
Member Function Documentation
◆ getFCTimeInUTCRef()
bool HardwareSync::getFCTimeInUTCRef | ( | DJI::OSDK::ACK::FCTimeInUTC & | fcTimeInUTC | ) |
Poll FC Time in UTC referece.
- Supported Platforms : M210V2, M300
- Parameters
-
data struct to fill
◆ getGNGSAMsg()
bool HardwareSync::getGNGSAMsg | ( | GNGSAPackage & | GNGSA | ) |
Poll NMEA messages.
- Supported Platforms : M210V2, M300
- Parameters
-
which NMEA message to poll data struct to fill
◆ getGNRMCMsg()
bool HardwareSync::getGNRMCMsg | ( | NMEAData & | nmea | ) |
Poll NMEA messages.
- Supported Platforms : M210V2, M300
- Parameters
-
which NMEA message to poll data struct to fill
◆ getPPSSource()
bool HardwareSync::getPPSSource | ( | PPSSource & | source | ) |
Poll PPS source info.
- Supported Platforms : M210V2, M300
- Parameters
-
data struct to fill
◆ getUTCTime()
bool HardwareSync::getUTCTime | ( | NMEAData & | utc | ) |
Poll UTC time tag.
- Supported Platforms : M210V2, M300
- Parameters
-
data struct to fill
◆ setSyncFreq()
void HardwareSync::setSyncFreq | ( | uint32_t | freqInHz, |
uint16_t | tag = 0 |
||
) |
Call this API to start sending a hardware pulse and set up a software packet to accompany it.
You need to select a pin on DJI Assistant 2 that will output this hardware pulse. To receive the software packet that accompanies this pulse, you will need to subscribe to TOPIC_HARD_SYNC.
- Supported Platforms : M210V2, M300
- Parameters
-
freqInHz The frequency at which you want this pulse to be output. tag Identification to match pulse with the corresponding software packet
◆ startSync()
void HardwareSync::startSync | ( | SyncSettings & | data | ) |
Internal setter function that is called by setSyncFreq function.
Use setSyncFreq instead of this direct interface.
- Supported Platforms : M210V2, M300
- Parameters
-
data Struct of type SyncCmdData.
◆ subscribeFCTimeInUTCRef()
void HardwareSync::subscribeFCTimeInUTCRef | ( | VehicleCallBack | cb, |
void * | userData | ||
) |
Subscribe to FC Time in UTC referece with a callback function.
- Supported Platforms : M210V2, M300
- Parameters
-
callback callback function userData user data (void ptr)
◆ subscribeNMEAMsgs()
void HardwareSync::subscribeNMEAMsgs | ( | VehicleCallBack | cb, |
void * | userData | ||
) |
Subscribe to NMEA messages with a callback function.
- Supported Platforms : M210V2, M300
- Parameters
-
callback callback function userData user data (void ptr)
◆ subscribePPSSource()
void HardwareSync::subscribePPSSource | ( | VehicleCallBack | cb, |
void * | userData | ||
) |
Subscribe to PPS source info with a callback function.
- Supported Platforms : M210V2, M300
- Parameters
-
callback callback function userData user data (void ptr)
◆ subscribeUTCTime()
void HardwareSync::subscribeUTCTime | ( | VehicleCallBack | cb, |
void * | userData | ||
) |
Subscribe to UTC Time tag with a callback function.
- Supported Platforms : M210V2, M300
- Parameters
-
callback callback function userData user data (void ptr)
◆ unsubscribeNMEAMsgs()
void HardwareSync::unsubscribeNMEAMsgs | ( | ) |
Unsubscribe to NMEA messages.
- Supported Platforms : M210V2, M300
◆ unsubscribePPSSource()
void HardwareSync::unsubscribePPSSource | ( | ) |
Unsubscribe to PPS source info.
- Supported Platforms : M210V2, M300
◆ unsubscribeUTCTime()
void HardwareSync::unsubscribeUTCTime | ( | ) |
Unsubscribe to UTC time tag.
- Supported Platforms : M210V2, M300
◆ writeData()
void HardwareSync::writeData | ( | const uint8_t | cmdID, |
const RecvContainer * | recvContainer | ||
) |
Write data when received from UART.
- Supported Platforms : M210V2, M300
- Parameters
-
cmd id received data
The documentation for this class was generated from the following files:
- osdk-core/api/inc/dji_hardware_sync.hpp
- osdk-core/api/src/dji_hardware_sync.cpp