Skip to content

Commit 55f9ea1

Browse files
committed
Update handling of settings during command mode and training
1 parent 55b805b commit 55f9ea1

File tree

1 file changed

+54
-25
lines changed

1 file changed

+54
-25
lines changed

Firmware/LoRaSerial/States.ino

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,33 +1483,43 @@ void updateRadioState()
14831483
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
14841484

14851485
/*
1486-
beginTrainingClient
1487-
|
1488-
| Save current settings
1489-
|
1490-
V
1491-
+<--------------------------------.
1492-
| |
1493-
| Send FIND_PARTNER |
1494-
| |
1495-
V |
1496-
RADIO_TRAIN_WAIT_TX_FIND_PARTNER_DONE |
1497-
| |
1498-
V | Timeout
1499-
RADIO_TRAIN_WAIT_RX_RADIO_PARAMETERS -----'
1500-
|
1501-
| Save settings
1502-
| Send ACK
1486+
1487+
2 Second Button Press ATT Command
1488+
| |
1489+
| |
1490+
+--------------------------------------------'
15031491
|
15041492
V
1505-
RADIO_TRAIN_WAIT_TX_ACK_DONE
1493+
commandSaveSettings
15061494
|
15071495
V
1508-
endTrainingClientServer
1509-
|
1510-
| Reboot
1496+
beginTrainingClient
15111497
|
15121498
V
1499+
+<--------------------------------------.
1500+
| |
1501+
| Send FIND_PARTNER |
1502+
| | Timeout
1503+
V |
1504+
RADIO_TRAIN_WAIT_TX_FIND_PARTNER_DONE |
1505+
| |
1506+
V |
1507+
RADIO_TRAIN_WAIT_RX_RADIO_PARAMETERS ---------->+
1508+
| |
1509+
| RX RADIO_PARAMETERS |
1510+
| ATO | or 2 Second
1511+
| Send ACK ATZ | Button Push
1512+
V | && (! Command Mode)
1513+
RADIO_TRAIN_WAIT_TX_ACK_DONE |
1514+
| V
1515+
V commandRestoreSettings(writeOnCommandExit)
1516+
endTrainingClientServer |
1517+
| |
1518+
| |
1519+
| commandRestoreSettings(true) |
1520+
V V
1521+
Reboot Return to
1522+
Previous mode
15131523
*/
15141524

15151525
//====================
@@ -1629,9 +1639,19 @@ void updateRadioState()
16291639
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
16301640

16311641
/*
1632-
beginTrainingServer
1642+
1643+
Command Mode 5 second button press
1644+
| |
1645+
| ATT |
1646+
| |
1647+
V |
1648+
+<---------------------'
1649+
|
1650+
V
1651+
commandSaveSettings
16331652
|
1634-
| Save current settings
1653+
V
1654+
beginTrainingServer
16351655
|
16361656
V
16371657
+<--------------------------------.
@@ -1645,12 +1665,21 @@ void updateRadioState()
16451665
| RADIO_TRAIN_WAIT_TX_RADIO_PARAMS_DONE -----'
16461666
|
16471667
|
1668+
| ATO, ATZ or (2 second training button press && ! command mode)
1669+
|
16481670
`---------------.
1649-
| ATZ command
16501671
|
1651-
| Reboot
1672+
V
1673+
commandRestoreSettings(writeOnCommandExit)
16521674
|
16531675
V
1676+
+----------------------------.
1677+
| |
1678+
| ATZ command | ATO command
1679+
| |
1680+
V V
1681+
Reboot Return to
1682+
Previous Mode
16541683
*/
16551684

16561685
//====================

0 commit comments

Comments
 (0)