|
CTS-SAT-1-OBC-Firmware
|
#include "eps_drivers/eps_commands.h"#include "eps_drivers/eps_time.h"#include "rtos_tasks/rtos_eps_tasks.h"#include "rtos_tasks/rtos_task_helpers.h"#include "log/log.h"#include "timekeeping/timekeeping.h"#include "cmsis_os.h"#include <inttypes.h>#include <stdint.h>
Functions | |
| void | TASK_service_eps_watchdog (void *argument) |
| periodically sends a command to the eps to reset the watchdog timer | |
| void | TASK_time_sync (void *argument) |
Variables | |
| uint32_t | EPS_time_sync_period_ms = 5000 |
| void TASK_service_eps_watchdog | ( | void * | argument | ) |
periodically sends a command to the eps to reset the watchdog timer


| void TASK_time_sync | ( | void * | argument | ) |
On boot, this thread sets the OBC time to the value of the EPS time. After that, it periodically checks the OBC time against the EPS time and logs when they diverge by more than 10 seconds.


| uint32_t EPS_time_sync_period_ms = 5000 |
How frequently to check the OBC time vs. the EPS time and log a warning during operation. Run on boot after 5000ms, but only run every 45 seconds in normal operation. This configuration variable is automatically set to 10 minutes after a successful sync.