CTS-SAT-1-OBC-Firmware
|
#include "comms_drivers/rf_antenna_switch.h"
#include "log/log.h"
#include "adcs_drivers/adcs_types.h"
#include "adcs_drivers/adcs_commands.h"
#include "main.h"
Functions | |
void | COMMS_set_rf_switch_state (uint8_t antenna_num) |
Sets the state of the dipole switch on the OBC to either Antenna 1 or Antenna 2. | |
uint8_t | COMMS_find_optimal_antenna_using_adcs () |
Determines the optimal antenna to use based on the satellite's attitude angles. | |
void | COMMS_toggle_rf_switch_state () |
Toggles the active antenna (selected by RF switch), from 1 to 2 or from 2 to 1. | |
COMMS_rf_switch_control_mode_enum_t | COMMS_rf_switch_control_mode_enum_from_string (const char *str) |
const char * | COMMS_rf_switch_control_mode_enum_to_string (COMMS_rf_switch_control_mode_enum_t mode) |
Variables | |
uint8_t | COMMS_active_rf_switch_antenna = 1 |
COMMS_rf_switch_control_mode_enum_t | COMMS_rf_switch_control_mode = COMMS_RF_SWITCH_CONTROL_MODE_TOGGLE_BEFORE_EVERY_BEACON |
uint32_t | COMMS_max_duration_without_uplink_before_setting_default_rf_switch_mode_sec = 15 * 60 |
If the satellite goes this long without receiving an uplink, the COMMS_rf_switch_control_mode will be set back to TOGGLE_BEFORE_EVERY_BEACON . | |
uint8_t COMMS_find_optimal_antenna_using_adcs | ( | ) |
Determines the optimal antenna to use based on the satellite's attitude angles.
COMMS_rf_switch_control_mode_enum_t COMMS_rf_switch_control_mode_enum_from_string | ( | const char * | str | ) |
const char * COMMS_rf_switch_control_mode_enum_to_string | ( | COMMS_rf_switch_control_mode_enum_t | mode | ) |
void COMMS_set_rf_switch_state | ( | uint8_t | antenna_num | ) |
Sets the state of the dipole switch on the OBC to either Antenna 1 or Antenna 2.
antenna_num | Either 1 or 2. If not 1 or 2, then remains unchanged. |
void COMMS_toggle_rf_switch_state | ( | ) |
Toggles the active antenna (selected by RF switch), from 1 to 2 or from 2 to 1.
uint8_t COMMS_active_rf_switch_antenna = 1 |
uint32_t COMMS_max_duration_without_uplink_before_setting_default_rf_switch_mode_sec = 15 * 60 |
If the satellite goes this long without receiving an uplink, the COMMS_rf_switch_control_mode
will be set back to TOGGLE_BEFORE_EVERY_BEACON
.
COMMS_rf_switch_control_mode_enum_t COMMS_rf_switch_control_mode = COMMS_RF_SWITCH_CONTROL_MODE_TOGGLE_BEFORE_EVERY_BEACON |