Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
preflight_checks.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Freek van Tienen <freek.v.tienen@gmail.com>
3  *
4  * This file is part of paparazzi
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
27 #ifndef PREFLIGHT_CHECKS_H
28 #define PREFLIGHT_CHECKS_H
29 
30 #include "std.h"
31 #include <stdarg.h>
32 
34  char *message;
39 };
40 
41 typedef void (*preflight_check_f)(struct preflight_result_t *result);
42 
46 };
47 
48 extern bool preflight_bypass;
50 extern bool preflight_check(void);
51 extern void preflight_error(struct preflight_result_t *result, const char *fmt, ...);
52 extern void preflight_warning(struct preflight_result_t *result, const char *fmt, ...);
53 extern void preflight_success(struct preflight_result_t *result, const char *fmt, ...);
54 
55 #endif /* PREFLIGHT_CHECKS_H */
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.
bool preflight_bypass
preflight_check_f func
void(* preflight_check_f)(struct preflight_result_t *result)
void preflight_warning(struct preflight_result_t *result, const char *fmt,...)
Register a preflight error used inside the preflight checking functions.
struct preflight_check_t * next
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.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88