From 0159d8bd353e7e4cd473427d24a147b13348a6aa Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Wed, 31 Oct 2012 22:00:17 +0900 Subject: [PATCH] AP_Motors: bug fix to reached_limits so by default it returns true if any limits have been breached --- libraries/AP_Motors/AP_Motors.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Motors/AP_Motors.h b/libraries/AP_Motors/AP_Motors.h index d3e7cf4903..18e775410e 100644 --- a/libraries/AP_Motors/AP_Motors.h +++ b/libraries/AP_Motors/AP_Motors.h @@ -55,6 +55,7 @@ #define AP_MOTOR_ROLLPITCH_LIMIT 0x01 #define AP_MOTOR_YAW_LIMIT 0x02 #define AP_MOTOR_THROTTLE_LIMIT 0x04 +#define AP_MOTOR_ANY_LIMIT 0xFF /// @class AP_Motors class AP_Motors { @@ -127,7 +128,7 @@ public: }; // reached_limits - return whether we hit the limits of the motors - virtual uint8_t reached_limit( uint8_t which_limit = 0x00 ) { + virtual uint8_t reached_limit( uint8_t which_limit = AP_MOTOR_ANY_LIMIT ) { return _reached_limit & which_limit; }