Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
|
#include <pdu.h>
Classes | |
struct | pdu_packet |
The PDU packet structure. More... | |
struct | pdu_telem |
The PDU telemetry packet structure. More... | |
Public Types | |
enum class | PDU_Type : uint8_t { NOP , CommandPing , CommandSetSwitch , CommandGetSwitchStatus , DataPong , DataSwitchStatus , DataSwitchTelem } |
Enumeration of PDU packet types. | |
enum class | PDU_SW : uint8_t { None , All , SW_3V3_1 , SW_3V3_2 , SW_5V_1 , SW_5V_2 , SW_5V_3 , SW_5V_4 , SW_12V , VBATT , WDT , HBRIDGE1 , HBRIDGE2 , BURN , BURN1 , BURN2 , RPI } |
Enumeration of PDU switches. | |
enum class | PDU_SW_State : bool { SWITCH_OFF , SWITCH_ON } |
Enumeration of PDU switch state. | |
Public Member Functions | |
PDU (HardwareSerial *hw_serial, int baud_rate) | |
Construct a new PDU object. More... | |
bool | ping () |
Ping the PDU. More... | |
bool | set_switch (PDU_SW sw, PDU_SW_State state) |
Set a switch on the PDU. More... | |
bool | set_heater (PDU_SW_State state) |
Wrapper function to set the heater switch. More... | |
bool | set_burn_wire (PDU_SW_State state) |
Wrapper function to set the burn wire switch. More... | |
bool | refresh_switch_states () |
Refresh the internal PDU class's switch states. More... | |
Public Attributes | |
std::map< std::string, PDU_SW > | PDU_SW_Type |
Mapping between PDU switches and their string names. More... | |
PDU_SW_State | switch_states [NUMBER_OF_SWITCHES] |
The status of each switch on the PDU. More... | |
The PDU class.
Artemis::Devices::PDU::PDU | ( | HardwareSerial * | hw_serial, |
int | baud_rate | ||
) |
bool Artemis::Devices::PDU::ping | ( | ) |
bool Artemis::Devices::PDU::refresh_switch_states | ( | ) |
Refresh the internal PDU class's switch states.
bool Artemis::Devices::PDU::set_burn_wire | ( | PDU_SW_State | state | ) |
Wrapper function to set the burn wire switch.
state | The desired state of the burn wire. |
bool Artemis::Devices::PDU::set_heater | ( | PDU_SW_State | state | ) |
Wrapper function to set the heater switch.
state | The desired state of the heater. |
bool Artemis::Devices::PDU::set_switch | ( | PDU_SW | sw, |
PDU_SW_State | state | ||
) |
std::map<std::string, PDU_SW> Artemis::Devices::PDU::PDU_SW_Type |
Mapping between PDU switches and their string names.
PDU_SW_State Artemis::Devices::PDU::switch_states[NUMBER_OF_SWITCHES] |