mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 13:51:36 +08:00
fix fmuv1 compile error
This commit is contained in:
committed by
Lorenz Meier
parent
426903c617
commit
beb9707933
@@ -445,6 +445,7 @@ PX4FMU::init()
|
|||||||
void
|
void
|
||||||
PX4FMU:: safety_check_button(void)
|
PX4FMU:: safety_check_button(void)
|
||||||
{
|
{
|
||||||
|
#ifdef GPIO_BTN_SAFETY
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
/*
|
/*
|
||||||
* Debounce the safety button, change state if it has been held for long enough.
|
* 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) {
|
if (blink_counter > 15) {
|
||||||
blink_counter = 0;
|
blink_counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -1051,6 +1054,8 @@ PX4FMU::cycle()
|
|||||||
/* read safety switch input at 10Hz */
|
/* read safety switch input at 10Hz */
|
||||||
_cycle_timestamp = hrt_absolute_time();
|
_cycle_timestamp = hrt_absolute_time();
|
||||||
|
|
||||||
|
#ifdef GPIO_BTN_SAFETY
|
||||||
|
|
||||||
if (_cycle_timestamp - _last_safety_check >= (unsigned int)1e5) {
|
if (_cycle_timestamp - _last_safety_check >= (unsigned int)1e5) {
|
||||||
_last_safety_check = _cycle_timestamp;
|
_last_safety_check = _cycle_timestamp;
|
||||||
|
|
||||||
@@ -1081,6 +1086,7 @@ PX4FMU::cycle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
/* check arming state */
|
/* check arming state */
|
||||||
bool updated = false;
|
bool updated = false;
|
||||||
orb_check(_armed_sub, &updated);
|
orb_check(_armed_sub, &updated);
|
||||||
|
|||||||
Reference in New Issue
Block a user