fix fmuv1 compile error

This commit is contained in:
Mark Whitehorn 2016-02-08 13:06:13 -07:00 committed by Lorenz Meier
parent 426903c617
commit beb9707933
1 changed files with 6 additions and 0 deletions

View File

@ -445,6 +445,7 @@ PX4FMU::init()
void
PX4FMU:: safety_check_button(void)
{
#ifdef GPIO_BTN_SAFETY
static int counter = 0;
/*
* Debounce the safety button, change state if it has been held for long enough.
@ -514,6 +515,8 @@ PX4FMU:: safety_check_button(void)
if (blink_counter > 15) {
blink_counter = 0;
}
#endif
}
int
@ -1051,6 +1054,8 @@ PX4FMU::cycle()
/* read safety switch input at 10Hz */
_cycle_timestamp = hrt_absolute_time();
#ifdef GPIO_BTN_SAFETY
if (_cycle_timestamp - _last_safety_check >= (unsigned int)1e5) {
_last_safety_check = _cycle_timestamp;
@ -1081,6 +1086,7 @@ PX4FMU::cycle()
}
}
#endif
/* check arming state */
bool updated = false;
orb_check(_armed_sub, &updated);