Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
Artemis::Channels::PDU Namespace Reference

The PDU channel. More...

Functions

void pdu_channel ()
 The top-level channel definition. More...
 
void setup ()
 The PDU setup function. More...
 
void enableRFM23Radio ()
 Provides power to the RFM23 radio. More...
 
void deploy ()
 Deployment sequence. More...
 
void deploy_burn_wire ()
 Deploys the burn wire.
 
void loop ()
 The PDU loop function. More...
 
void handle_queue ()
 Helper function to handle packet queue. More...
 
void test_communicating_with_pdu ()
 Helper function to ping the PDU to test communications.
 
void set_switch_on_pdu ()
 Helper function to set a switch on the PDU.
 
void report_pdu_switch_status ()
 Helper function to report status of all switches on PDU.
 
void regulate_temperature ()
 Helper function to regulate the satellite's temperature.
 
void update_watchdog_timer ()
 Helper function to feed the PDU's watchdog.
 

Variables

PacketComm packet
 The packet used throughout the channel.
 
PDU pdu & Serial1
 The PDU object used throughout the channel.
 
unsigned long startTime
 The time at which an action has started.
 
elapsedMillis uptime
 The time in milliseconds since the channel was started.
 
elapsedMillis heaterinterval
 The time in milliseconds since the temperature was checked.
 

Detailed Description

The PDU channel.

Function Documentation

◆ deploy()

void Artemis::Channels::PDU::deploy ( )

Deployment sequence.

Todo:
SD is begun twice. is this needed?
Todo:
try storing burnwire complete and deployment separately. deployed.txt should only be written after DEPLOYMENT_LENGTH.

◆ enableRFM23Radio()

void Artemis::Channels::PDU::enableRFM23Radio ( )

Provides power to the RFM23 radio.

Todo:
The radio is connected to the 3V3_2 switch however it is still getting power from somewhere else. Uncommenting these two lines crashes the flight software. troubleshoot hardware & software.

◆ handle_queue()

void Artemis::Channels::PDU::handle_queue ( )

Helper function to handle packet queue.

This is a helper function called in loop() that checks for packets and routes them to the PDU.

◆ loop()

void Artemis::Channels::PDU::loop ( )

The PDU loop function.

This function runs in an infinite loop after setup() completes. It routes packets going to and coming from the PDU.

◆ pdu_channel()

void Artemis::Channels::PDU::pdu_channel ( )

The top-level channel definition.

This is the function that defines the PDU channel. Like an Arduino script, it has a setup() function that is run once, then loop() runs forever.

◆ setup()

void Artemis::Channels::PDU::setup ( )

The PDU setup function.

This function is run once, when the channel is started. It connects to the PDU over a serial connection, tests the connection, then sets the PDU's switch states.