Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
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
40
41typedef void (*preflight_check_f)(struct preflight_result_t *result);
42
47
48extern bool preflight_bypass;
49extern bool preflight_ground_done;
51extern bool preflight_check(void);
52extern void preflight_error(struct preflight_result_t *result, const char *fmt, ...);
53extern void preflight_warning(struct preflight_result_t *result, const char *fmt, ...);
54extern void preflight_success(struct preflight_result_t *result, const char *fmt, ...);
55extern void preflight_checks_log_bypass(bool bypass);
56
57#endif /* PREFLIGHT_CHECKS_H */
uint16_t foo
Definition main_demo5.c:58
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
bool preflight_ground_done
void preflight_checks_log_bypass(bool bypass)
void(* preflight_check_f)(struct preflight_result_t *result)
void preflight_warning(struct preflight_result_t *result, const char *fmt,...)
Register a preflight warning 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.