Bind channel: configurable channel number

Bind channel can be configured between 5 and 16.
This commit is contained in:
pascallanger committed 2017-01-02 17:26:35 +01:00
1 parent 0d0acb9d10
commit 18e31b3821
3 files changed
+17 -5

No files matched your search

+3 -3
View File
@@ -482,15 +482,15 @@ void Update_All()
last_signal=millis();
}
#endif //ENABLE_PPM
#ifdef ENABLE_BIND_CH16
if(IS_AUTOBIND_FLAG_on && IS_CH16_PREV_off && Servo_data[15]>PPM_MAX_COMMAND && Servo_data[THROTTLE]<(servo_min_100+25))
#ifdef ENABLE_BIND_CH
if(IS_AUTOBIND_FLAG_on && IS_CH16_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
CH16_PREV_on;
}
if(IS_CH16_PREV_on && Servo_data[15]<PPM_MIN_COMMAND)
CH16_PREV_off;
#endif //ENABLE_BIND_CH16
#endif //ENABLE_BIND_CH
if(IS_CHANGE_PROTOCOL_FLAG_on)
{ // Protocol needs to be changed or relaunched for bind
LED_off; //led off during protocol init