Bind from channel: Cosmetic code change

This commit is contained in:
pascallanger 2017-01-03 12:00:25 +01:00
parent 6d0e4d5a38
commit 282b2a0a43

View File

@ -483,13 +483,13 @@ void Update_All()
}
#endif //ENABLE_PPM
#ifdef ENABLE_BIND_CH
if(IS_AUTOBIND_FLAG_on && IS_BIND_CH_PREV_off && Servo_data[BIND_CH-1]>PPM_MAX_COMMAND && Servo_data[THROTTLE]<(servo_min_100+25))
{ // Autobind is on and CH16 went up and Throttle is low
CHANGE_PROTOCOL_FLAG_on; //reload protocol to rebind
BIND_CH_PREV_on;
}
if(IS_BIND_CH_PREV_on && Servo_data[BIND_CH-1]<PPM_MIN_COMMAND)
BIND_CH_PREV_off;
if(IS_AUTOBIND_FLAG_on && IS_BIND_CH_PREV_off && Servo_data[BIND_CH-1]>PPM_MAX_COMMAND && Servo_data[THROTTLE]<(servo_min_100+25))
{ // Autobind is on and BIND_CH went up and Throttle is low
CHANGE_PROTOCOL_FLAG_on; //reload protocol to rebind
BIND_CH_PREV_on;
}
if(IS_BIND_CH_PREV_on && Servo_data[BIND_CH-1]<PPM_MIN_COMMAND)
BIND_CH_PREV_off;
#endif //ENABLE_BIND_CH
if(IS_CHANGE_PROTOCOL_FLAG_on)
{ // Protocol needs to be changed or relaunched for bind