Add clearOverride message to allow failsafe recovery from joystick control

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2540 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
deweibel@gmail.com 2011-06-11 23:59:35 +00:00
parent 505cee674a
commit 96cb7d2fc0
2 changed files with 9 additions and 0 deletions

View File

@ -214,6 +214,14 @@ bool APM_RC_Class::setHIL(int16_t v[NUM_CHANNELS])
radio_status = 1; radio_status = 1;
} }
void APM_RC_Class::clearOverride(void)
{
for (unsigned char i=0; i<NUM_CHANNELS; i++) {
_HIL_override[i] = 0;
}
}
// make one instance for the user to use // make one instance for the user to use
APM_RC_Class APM_RC; APM_RC_Class APM_RC;

View File

@ -20,6 +20,7 @@ class APM_RC_Class
void Force_Out2_Out3(void); void Force_Out2_Out3(void);
void Force_Out6_Out7(void); void Force_Out6_Out7(void);
bool setHIL(int16_t v[NUM_CHANNELS]); bool setHIL(int16_t v[NUM_CHANNELS]);
void clearOverride(void);
private: private:
int16_t _HIL_override[NUM_CHANNELS]; int16_t _HIL_override[NUM_CHANNELS];