ArduCopterNG - fixed small bug in the throttle safety check. It was turning on the safety mechanism after the user had held down the throttle for a *cumulative* 1 second when it should turn on only when the user has held down the throttle for a complete second (i.e. all at once)

git-svn-id: https://arducopter.googlecode.com/svn/trunk@971 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
rmackay9@yahoo.com 2010-11-28 10:02:08 +00:00
parent 3a13180e97
commit 85dc8a2cc4

View File

@ -58,7 +58,7 @@ void read_radio()
// if throttle has increased suddenly, disarm motors
if( (tempThrottle - ch_throttle) > SAFETY_MAX_THROTTLE_INCREASE ) {
motorArmed = 0;
}else{ // if it hasn't increased too quickly not turn off the safety
}else{ // if it hasn't increased too quickly turn off the safety
motorSafety = 0;
}
}
@ -69,7 +69,9 @@ void read_radio()
motorSafety = 1;
Safety_counter = 0;
}
}
}else{ // throttle is over MIN so make sure to reset Safety_counter
Safety_counter = 0;
}
// normal throttle filtering. Note: Transmiter calibration not used on throttle
ch_throttle = channel_filter(tempThrottle, ch_throttle);