From b8cbce5791a2009d0a74e1c4ae56ad9ceddd20dd Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Fri, 6 Jul 2012 15:49:49 +0200 Subject: [PATCH] [rotorcraft] fix KillThrottle --- sw/airborne/firmwares/rotorcraft/autopilot.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sw/airborne/firmwares/rotorcraft/autopilot.h b/sw/airborne/firmwares/rotorcraft/autopilot.h index 5d49a2e7bab..6c2f4cb13f5 100644 --- a/sw/airborne/firmwares/rotorcraft/autopilot.h +++ b/sw/airborne/firmwares/rotorcraft/autopilot.h @@ -90,8 +90,11 @@ extern uint16_t autopilot_flight_time; _mode = MODE_MANUAL; \ } -#define autopilot_KillThrottle(_v) { \ - autopilot_set_motors_on(_v); \ +#define autopilot_KillThrottle(_kill) { \ + if (_kill) \ + autopilot_set_motors_on(FALSE); \ + else \ + autopilot_set_motors_on(TRUE); \ } #ifdef POWER_SWITCH_LED