New feature: end bind

This new feature is available:
- in serial mode and when binding from the GUI. As soon as the Bind
window is closed = serial bind bit was set and cleared, the current bind
operation will be terminated.
- if the bind was initiated from the Bind on channel feature (bind
channel goes high) then as soon as the bind channel goes low the current
bind operation will be terminated.
Tested on ersky9x which does open a bind window, not sure about
OpenTX...

Some protocols (Hubsan, Assan, FY326, Shenqi...) which are waiting for
model/RX to reply will stay in bind mode.
This commit is contained in:
pascallanger
2017-02-06 18:46:34 +01:00
parent 8d87bfb4a3
commit c02f273d57
9 changed files with 50 additions and 25 deletions

View File

@@ -183,7 +183,10 @@ uint16_t ReadFrSkyX()
frskyX_build_bind_packet();
CC2500_Strobe(CC2500_SIDLE);
CC2500_WriteData(packet, packet[0]+1);
state++;
if(IS_BIND_DONE_on)
state = FRSKY_BIND_DONE;
else
state++;
return 9000;
case FRSKY_BIND_DONE:
initialize_data(0);