CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
complete_self_check.c File Reference
Include dependency graph for complete_self_check.c:

Functions

uint8_t CTS1_check_is_i2c_addr_alive (I2C_HandleTypeDef *hi2c, uint8_t i2c_addr)
 
uint8_t CTS1_check_is_adcs_alive ()
 
uint8_t CTS1_check_is_gnss_responsive ()
 
uint8_t CTS1_check_is_eps_responsive ()
 
uint8_t CTS1_check_is_eps_thriving ()
 
uint8_t CTS1_check_mpi_science_rx ()
 Check if the MPI is dumping science data by using the lazy blocking receive method.
 
uint8_t CTS1_check_mpi_cmd_works ()
 
uint8_t CTS1_check_is_camera_responsive ()
 
uint8_t CTS1_check_flash_alive (uint8_t flash_chip_number)
 
uint8_t CTS1_check_antenna_alive (enum ANT_i2c_bus_mcu antenna_number)
 
void CTS1_run_system_self_check (CTS1_system_self_check_result_struct_t *result)
 Perform the system self-check and store the results in the provided result struct.
 
void CTS1_self_check_struct_TO_json_list (CTS1_system_self_check_result_struct_t self_check_struct, char dest_json_str[], uint16_t dest_json_str_size, uint8_t show_passes)
 Convert the self-check struct to a JSON string.
 

Variables

static const uint16_t MPI_boot_duration_ms = 5000
 
const char * CTS1_system_self_check_result_struct_field_names []
 

Function Documentation

◆ CTS1_check_antenna_alive()

uint8_t CTS1_check_antenna_alive ( enum ANT_i2c_bus_mcu antenna_number)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_flash_alive()

uint8_t CTS1_check_flash_alive ( uint8_t flash_chip_number)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_is_adcs_alive()

uint8_t CTS1_check_is_adcs_alive ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_is_camera_responsive()

uint8_t CTS1_check_is_camera_responsive ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_is_eps_responsive()

uint8_t CTS1_check_is_eps_responsive ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_is_eps_thriving()

uint8_t CTS1_check_is_eps_thriving ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_is_gnss_responsive()

uint8_t CTS1_check_is_gnss_responsive ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_is_i2c_addr_alive()

uint8_t CTS1_check_is_i2c_addr_alive ( I2C_HandleTypeDef * hi2c,
uint8_t i2c_addr )
Here is the caller graph for this function:

◆ CTS1_check_mpi_cmd_works()

uint8_t CTS1_check_mpi_cmd_works ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_check_mpi_science_rx()

uint8_t CTS1_check_mpi_science_rx ( )

Check if the MPI is dumping science data by using the lazy blocking receive method.

Returns
1 if the MPI is dumping science data, 0 otherwise.
Here is the call graph for this function:

◆ CTS1_run_system_self_check()

void CTS1_run_system_self_check ( CTS1_system_self_check_result_struct_t * result)

Perform the system self-check and store the results in the provided result struct.

Parameters
resultPointer to the struct to store the results of the self-check.
Note
Powers off all systems that are tested after testing them. Powers on several systems.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CTS1_self_check_struct_TO_json_list()

void CTS1_self_check_struct_TO_json_list ( CTS1_system_self_check_result_struct_t self_check_struct,
char dest_json_str[],
uint16_t dest_json_str_size,
uint8_t show_passes )

Convert the self-check struct to a JSON string.

Parameters
self_check_structSelf-check struct to convert to JSON.
dest_json_strDestination string to write the JSON to.
dest_json_str_sizeSize of the destination string (max length to write).
show_passesIf 1, include the passed checks in the JSON.
Here is the caller graph for this function:

Variable Documentation

◆ CTS1_system_self_check_result_struct_field_names

const char* CTS1_system_self_check_result_struct_field_names[]
Initial value:
= {
"obc_temperature",
"is_adcs_i2c_addr",
"is_adcs_alive",
"is_ax100_i2c_addr",
"is_gnss_responsive",
"is_eps_responsive",
"is_eps_thriving",
"mpi_science_rx",
"mpi_cmd",
"is_camera_responsive",
"is_antenna_i2c_addr_a",
"is_antenna_i2c_addr_b",
"is_antenna_a_alive",
"is_antenna_b_alive",
"flash_0_alive",
"flash_1_alive",
"flash_2_alive",
"flash_3_alive",
"eps_no_overcurrent_faults"
}

◆ MPI_boot_duration_ms

const uint16_t MPI_boot_duration_ms = 5000
static