Keywords: telemetry subscription, frequency setting
The subscription frequency of OSDK telemetry data can only be set by the freq parameter in initPackageFromTopicList.
For example:
// Package 0: Subscribe to flight status at freq 1 Hz
int pkgIndex = 0;
int freq = 1;
TopicName topicList1Hz[] = { TOPIC_STATUS_FLIGHT, TOPIC_GPS_POSITION, TOPIC_GPS_DETAILS};
int numTopic = sizeof(topicList1Hz) / sizeof(topicList1Hz[0]);
bool enableTimestamp = false;
bool pkgStatus = vehicle->subscribe->initPackageFromTopicList(
pkgIndex, numTopic, topicList1Hz, enableTimestamp, freq);
Broadcast frequency setting:
// Re-set Broadcast frequencies to their default values
ACK::ErrorCode ack = vehicle->broadcast->setBroadcastFreqDefaults(TIMEOUT);
Note: This article is from Chinese and is translated by machine. If there is any suggestions, please point it out and we will correct it in time
Comments
0 comments
Please sign in to leave a comment.