MRAS
Multi Rocket Avionics System
|
A subsystem for sending and receiving telemetry data using the LoRa radio. More...
#include <TelemetrySystem.h>
Public Member Functions | |
TelemetrySystem (uint8_t id) | |
int16_t | get_radio_state () const |
Public Member Functions inherited from Subsystem | |
virtual const char * | get_name ()=0 |
virtual int8_t | setup ()=0 |
virtual int8_t | loop ()=0 |
uint8_t | get_id () const |
int8_t | get_status () const |
int8_t | self_test () const |
bool | add_subscriber (Subsystem *subscriber) |
Subsystem (uint8_t id) | |
Protected Types | |
enum | TelemetrySystemState { IDLE , TX , RX } |
Protected Member Functions | |
int8_t | setup () override |
virtual TelemetryMessageQueueMsg * | get_default_message ()=0 |
void | transmit_next_message () |
void | start_receiving_next_message (uint32_t timeout=0xFFFFFF) |
bool | read_new_message_from_buffer (TelemetryMessageReceivedMsg *output, bool receive_again=true) |
Protected Member Functions inherited from Subsystem | |
void | log (const char fmt[],...) |
virtual void | on_message (SystemMessage *msg)=0 |
void | publish (SystemMessage *msg) |
Protected Attributes | |
SX1262 | radio |
enum TelemetrySystem::TelemetrySystemState | telemetry_system_state = IDLE |
int16_t | radio_state = 0 |
Protected Attributes inherited from Subsystem | |
int8_t | status = 0 |
int8_t | self_test_result = -1 |
Additional Inherited Members | |
Static Protected Member Functions inherited from Subsystem | |
static void | buzzer (uint16_t frequency, uint32_t duration, bool block=false) |
A subsystem for sending and receiving telemetry data using the LoRa radio.
This subsystem is responsible for sending and receiving telemetry data from the rocket.
This subsystem uses the RadioLib library to communicate with the radio chip.
|
protected |
After the radio is done receiving a new message, read this message from the radio buffer and output the result into the provided ReceivedTelemetryMessageMsg.
output | A reference to a ReceivedTelemetryMessageMsg where the output message is stored |
receive_again | Whether to immediately start receiving data with the radio after reading from the radio buffer. |
|
overrideprotectedvirtual |
Implements Subsystem.
|
protected |
Start receiving a new message from the radio.
timeout | The timeout for the radio to wait for a message before giving up |
|
protected |