Browse Source

Force bind if no binding data found

Dustin Sallings 9 years ago
parent
commit
f54a6ff65a
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      frsky_arduino_rx_complete.ino

+ 5
- 0
frsky_arduino_rx_complete.ino View File

547
             for (i = 0; i < 2; i++) {
547
             for (i = 0; i < 2; i++) {
548
                 txid[i] = EEPROM.read(adr + i);
548
                 txid[i] = EEPROM.read(adr + i);
549
             }
549
             }
550
+            if (txid[0] == 0xff && txid[1] == 0xff) {
551
+                // No valid txid, forcing bind
552
+                jumper2 = 1;
553
+                continue;
554
+            }
550
             for (i = 0; i < sizeof(hopData); i++) {
555
             for (i = 0; i < sizeof(hopData); i++) {
551
                 hopData[i] = EEPROM.read(adr + 10 + i);
556
                 hopData[i] = EEPROM.read(adr + 10 + i);
552
             }
557
             }

Loading…
Cancel
Save