pub enum Data {
BarometerCalibration(BarometerCalibration),
BarometerData(BarometerData),
TicksPerSecond(u32),
Heartbeat(u32),
}Variants§
BarometerCalibration(BarometerCalibration)
Calibration values from the barometer.
NOTE: Always sent before BarometerData messages
BarometerData(BarometerData)
Data sample from the barometer
TicksPerSecond(u32)
Indicates how many ticks are in a second. Ticks are the units used to convey time on the flight computer.
Before a TicksPerSecond message is recieved to indicate otherwise, there are 1024 ticks
in a second.
Each tick 1/current_ticks_per_second should be added to the reconstructed time, and new
TicksPerSecond messages must replace the current current_ticks_per_second, so that the
next tick becomes 1/current_ticks_per_second long.
Heartbeat(u32)
Sent when no other message is sent for a while.
NOTE: When this message is sent, more computation is needed to determine the actual number of ticks since the last message.
Add this value to the number of ticks in the message to determine the real number of ticks
since the last message. If this is not done, time will be lost during long periods of no
messages. This is done so that we have extra bits to store more ticks when no messages are
sent for a while, reducing the rate at which we must send messages to avoid overflowing the
small 16 bit number of ticks inside Message.