32 #ifndef PREFLIGHT_CHECK_MAX_MSGBUF
33 #define PREFLIGHT_CHECK_MAX_MSGBUF 1024
37 #ifndef PREFLIGHT_CHECK_SEPERATOR
38 #define PREFLIGHT_CHECK_SEPERATOR ';'
42 #ifndef PREFLIGHT_CHECK_INFO_TIMEOUT
43 #define PREFLIGHT_CHECK_INFO_TIMEOUT 5
72 static float last_info_time = 0;
84 while (check != NULL) {
97 rc = snprintf(result.
message, result.
max_len,
"*Preflight fail [fail:%d warn:%d tot:%d]*", result.
fail_cnt,
#define PREFLIGHT_CHECK_INFO_TIMEOUT
Only send messages down every xx amount of seconds.
void preflight_error(struct preflight_result_t *result, const char *fmt,...)
Register a preflight error used inside the preflight checking functions.
void preflight_success(struct preflight_result_t *result, const char *fmt,...)
Register a preflight success used inside the preflight checking functions.
static struct preflight_check_t * preflight_head
#define PREFLIGHT_CHECK_SEPERATOR
Seperating character for storing the errors.
void preflight_warning(struct preflight_result_t *result, const char *fmt,...)
Register a preflight error used inside the preflight checking functions.
bool preflight_check(void)
Perform all the preflight checks.
void preflight_check_register(struct preflight_check_t *check, preflight_check_f func)
Register a preflight check and add it to the linked list.
#define PREFLIGHT_CHECK_MAX_MSGBUF
Maximum combined message size for storing the errors.
void(* preflight_check_f)(struct preflight_result_t *result)
struct preflight_check_t * next
static float get_sys_time_float(void)
Get the time in seconds since startup.
Periodic telemetry system header (includes downlink utility and generated code).
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.