CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
rtos_mpi_tasks.c File Reference
#include "rtos_tasks/rtos_task_helpers.h"
#include "mpi/mpi_command_handling.h"
#include "littlefs/littlefs_helper.h"
#include "debug_tools/debug_uart.h"
#include "cmsis_os.h"
#include "log/log.h"
#include "uart_handler/uart_handler.h"
#include "timekeeping/timekeeping.h"
#include "transforms/arrays.h"
#include <stdio.h>
Include dependency graph for rtos_mpi_tasks.c:

Functions

static int8_t write_mpi_timestamp_to_file (uint32_t buffer_filled_uptime_ms)
static void write_mpi_data_to_memory (volatile uint8_t *large_buffer, uint32_t buffer_filled_uptime_ms)
int32_t read_avg_temperature_cC_from_mpi_data_buffer (volatile uint8_t *large_buffer)
 Scan an MPI data buffer, averaging all temperature reports in it.
void TASK_service_write_mpi_data (void *argument)

Variables

uint32_t MPI_max_temperature_shutoff_celcius = 60
 If the MPI exceeds this value during data recording, recording will be disabled.
uint32_t MPI_max_recording_duration_sec = 900
 Maximum duration for MPI data recording in seconds.

Function Documentation

◆ read_avg_temperature_cC_from_mpi_data_buffer()

int32_t read_avg_temperature_cC_from_mpi_data_buffer ( volatile uint8_t * large_buffer)

Scan an MPI data buffer, averaging all temperature reports in it.

Parameters
large_bufferMPI data buffer input.
Returns
Average temperature in 100ths of a degree Celsius (cC). Returns special value -9999 on error.
Here is the caller graph for this function:

◆ TASK_service_write_mpi_data()

void TASK_service_write_mpi_data ( void * argument)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_mpi_data_to_memory()

void write_mpi_data_to_memory ( volatile uint8_t * large_buffer,
uint32_t buffer_filled_uptime_ms )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_mpi_timestamp_to_file()

int8_t write_mpi_timestamp_to_file ( uint32_t buffer_filled_uptime_ms)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ MPI_max_recording_duration_sec

uint32_t MPI_max_recording_duration_sec = 900

Maximum duration for MPI data recording in seconds.

Note
Set this value to 0 (via configuration) to disable the duration limit.
This configuration variable is designed to prevent against an operator failing to schedule a stop telecommand for MPI data recording.

◆ MPI_max_temperature_shutoff_celcius

uint32_t MPI_max_temperature_shutoff_celcius = 60

If the MPI exceeds this value during data recording, recording will be disabled.

Note
Set this value to 0 (via configuration) to disable the temperature shutoff feature.