...
Code Block | ||
---|---|---|
| ||
/** * @brief This thread is responsible for taking data from other managers and converting * them to mavlink bytes, then putting them into GSC.lowPriorityTransmitBuffer. */ void mavlinkToBytesThread() { while (true) { // START: fill GSC.lowPriorityTransmitBuffer with data to transmit // END: fill GSC.lowPriorityTransmitBuffer with data to transmit vTaskDelay(pdMS_TO_TICKS(10)); // Adjust the delay as necessary } } |
DMA
...
Code Block |
---|
void GroundStationComms::sendToGroundStation(CircularBuffer &transmissionBuffer)
{
// Send the bytes in transmissionBuffer to the ground station via RFD900
}
void GroundStationComms::receiveFromGroundStationISR()
{
// if GSC.DMAReceiveBuffer has enough space for the new data add it
//otherwise discard the data
//end of ISR
} |
Timer Based Interrupt
Timer Interrupt 1 (Low priority transmission)
...