From bb808c6c5209fe210f48229bd78bdc6ac0932abd Mon Sep 17 00:00:00 2001 From: geeksville Date: Mon, 24 Feb 2020 10:23:07 -0800 Subject: [PATCH] fix bluetooth pairing UX. enter full ON state when requested --- .vscode/settings.json | 3 ++- src/PowerFSM.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b797d0fe..c1f2c412 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,7 +41,8 @@ "utility": "cpp", "typeinfo": "cpp", "string": "cpp", - "*.xbm": "cpp" + "*.xbm": "cpp", + "list": "cpp" }, "cSpell.words": [ "Meshtastic", diff --git a/src/PowerFSM.cpp b/src/PowerFSM.cpp index 52bf9993..563d6b7d 100644 --- a/src/PowerFSM.cpp +++ b/src/PowerFSM.cpp @@ -120,8 +120,8 @@ void PowerFSM_setup() powerFSM.add_transition(&stateDARK, &stateON, EVENT_PRESS, NULL, "Press"); powerFSM.add_transition(&stateON, &stateON, EVENT_PRESS, screenPress, "Press"); // reenter On to restart our timers - powerFSM.add_transition(&stateNB, &stateON, EVENT_PRESS, NULL, "Bluetooth pairing"); - powerFSM.add_transition(&stateON, &stateON, EVENT_PRESS, NULL, "Bluetooth pairing"); + powerFSM.add_transition(&stateDARK, &stateON, EVENT_BLUETOOTH_PAIR, NULL, "Bluetooth pairing"); + powerFSM.add_transition(&stateON, &stateON, EVENT_BLUETOOTH_PAIR, NULL, "Bluetooth pairing"); powerFSM.add_transition(&stateNB, &stateON, EVENT_NODEDB_UPDATED, NULL, "NodeDB update"); powerFSM.add_transition(&stateDARK, &stateON, EVENT_NODEDB_UPDATED, NULL, "NodeDB update");