CTS-SAT-1-OBC-Firmware
|
#include "rtos_tasks/rtos_bootup_operation_fsm_task.h"
#include "rtos_tasks/rtos_tasks_rx_telecommands.h"
#include "obc_systems/external_led_and_rbf.h"
#include "littlefs/littlefs_helper.h"
#include "eps_drivers/eps_channel_control.h"
#include "antenna_deploy_drivers/ant_commands.h"
#include "timekeeping/timekeeping.h"
#include "log/log.h"
Functions | |
static void | set_operation_state_and_log_if_changed (CTS1_operation_state_enum_t new_state, const char *reason_str) |
static uint8_t | does_filesystem_have_bypass_deployment_and_enable_radio_file (void) |
Check if the filesystem has the file "/bypass_deployment_and_enable_radio.txt". | |
static uint8_t | have_all_antennas_deployed (enum ANT_i2c_bus_mcu ant_bus) |
Power on EPS channel, check if all antennas have been deployed. | |
static void | SUBTASK_bootup_operation_state_check_for_state_transitions (void) |
State machine for the bootup operation state. | |
static void | SUBTASK_deployment_state_execute (void) |
static void | pulse_external_led_blocking (uint32_t pulse_duration_ms) |
static void | SUBTASK_bootup_operation_state_do_led_indication_action (void) |
void | TASK_bootup_operation_fsm (void *argument) |
FreeRTOS task - FSM which handles the bootup and operation state/state. | |
char * | CTS1_operation_state_enum_TO_str (CTS1_operation_state_enum_t state) |
Variables | |
uint32_t | COMMS_uptime_to_start_ant_deployment_sec = 30 * 60 |
The uptime, as defined in the Launch Provider ICD, at which the antennas should be deployed. | |
CTS1_operation_state_enum_t | CTS1_operation_state = CTS1_OPERATION_STATE_BOOTED_AND_WAITING |
char * CTS1_operation_state_enum_TO_str | ( | CTS1_operation_state_enum_t | state | ) |
|
static |
Check if the filesystem has the file "/bypass_deployment_and_enable_radio.txt".
|
static |
Power on EPS channel, check if all antennas have been deployed.
|
static |
|
static |
|
inlinestatic |
State machine for the bootup operation state.
|
inlinestatic |
|
inlinestatic |
void TASK_bootup_operation_fsm | ( | void * | argument | ) |
FreeRTOS task - FSM which handles the bootup and operation state/state.
During LEOPS (launch and early operations), it deploys the comms antennas and permits radio TX. During the rest of the mission, it bypasses the 30 minute deployment wait time, and also blinks the LED to indicate the current state.
uint32_t COMMS_uptime_to_start_ant_deployment_sec = 30 * 60 |
The uptime, as defined in the Launch Provider ICD, at which the antennas should be deployed.
CTS1_operation_state_enum_t CTS1_operation_state = CTS1_OPERATION_STATE_BOOTED_AND_WAITING |