...
If the received buffer has space dump bytes into it otherwise disregard the received data
Timer Based Interrupt
Timer Interrupt 1 (Low priority transmission)
Code Block | ||
---|---|---|
| ||
/** * @brief This interrupt service routine is called every 500ms. It is responsible for * sending non routine data to the ground station. Such as arm disarmed message status, * fufilling data requests from the ground station etc. This is the lowest priority data * in the GSC.lowPriorityTransmitBuffer. */ void TimerISR500ms() { // transmit low priority the data via GSC.sendToGroundStation(); function GSC.sendToGroundStation(GSC.lowPriorityTransmitBuffer); } |
Time Interrupt 2 (High priority transmission)
Code Block | ||
---|---|---|
| ||
/** * @brief This interrupt service routine is called every 1000ms. It is responsible for * sending the highest priority drone "state" data to the ground station. Data such as * heartbeat message, altitude, attitude, latitude, longitude... And anything else deemed * important enough to be transmitted at a regular interval. This is the highest priority * data in the GSC.highPriorityTransmitBuffer. * */ void TimerISR1000ms() { // START: ingest drone state data and pack bytes into GSC.highPriorityTransmitBuffer // END: ingest drone state data and pack bytes into GSC.highPriorityTransmitBuffer // transmit the data via GSC.sendToGroundStation(); function GSC.sendToGroundStation(GSC.highPriorityTransmitBuffer); } |
Every 1000 ms encode Heartbeat, GPS, Time, Attitude (most important data), and send it off via RFD 900