mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-09 22:28:12 +00:00
Bind from channel: Cosmetic code change
This commit is contained in:
parent
6d0e4d5a38
commit
282b2a0a43
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user