2 ******************************************************************************
3 * @addtogroup OpenPilotSystem OpenPilot System
5 * @addtogroup OpenPilotLibraries OpenPilot System Libraries
8 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
9 * @brief Utilities to validate a flight configuration
10 * @see The GNU Public License (GPL) Version 3
12 *****************************************************************************/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 #include <systemalarms.h>
39 FRAME_TYPE_MULTIROTOR
,
41 FRAME_TYPE_FIXED_WING
,
46 typedef SystemAlarmsExtendedAlarmStatusOptions (SANITYCHECK_CustomHook_function
)();
48 #define SANITYCHECK_STATUS_ERROR_NONE SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE
49 #define SANITYCHECK_STATUS_ERROR_FLIGHTMODE SYSTEMALARMS_EXTENDEDALARMSTATUS_FLIGHTMODE
51 #define BOOTFAULT_STATUS_ERROR_NONE SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE
52 #define BOOTFAULT_STATUS_ERROR_REQUIRE_REBOOT SYSTEMALARMS_EXTENDEDALARMSTATUS_REBOOTREQUIRED
54 #if (SYSTEMALARMS_EXTENDEDALARMSTATUS_NUMELEM != SYSTEMALARMS_EXTENDEDALARMSUBSTATUS_NUMELEM) || \
55 (SYSTEMALARMS_EXTENDEDALARMSUBSTATUS_NUMELEM > SYSTEMALARMS_ALARM_NUMELEM)
56 #error Incongruent SystemAlarms. Please revise the UAVO definition in systemalarms.xml
59 extern int32_t configuration_check();
61 extern FrameType_t
GetCurrentFrameType();
64 * Attach a custom hook to the sanity check process
65 * @param hook a custom hook function
67 extern void SANITYCHECK_AttachHook(SANITYCHECK_CustomHook_function
*hook
);
70 * Detach a custom hook to the sanity check process
71 * @param hook a custom hook function
73 extern void SANITYCHECK_DetachHook(SANITYCHECK_CustomHook_function
*hook
);
75 #endif /* SANITYCHECK_H */