Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
/**
 * @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);
}

...

Timer Interrupt 2 (High priority transmission)

Code Block
languagecpp
/**
 * @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);
}