@@ -25,46 +25,28 @@ class sfeNLCommands
25
25
// ---------------------------------------------------------------------
26
26
// Command Callbacks
27
27
// ---------------------------------------------------------------------
28
- // bool factoryResetDevice(sfeIoTNodeLoRaWAN *theApp)
29
- // {
30
- // if (!theApp)
31
- // return false;
32
28
33
- // return theApp->_sysUpdate.factoryResetDevice();
34
- // }
29
+ // ---------------------------------------------------------------------
30
+ bool resetDevice (sfeIoTNodeLoRaWAN *theApp)
31
+ {
32
+ if (!theApp)
33
+ return false ;
35
34
36
- // //---------------------------------------------------------------------
37
- // bool resetDevice(sfeIoTNodeLoRaWAN *theApp)
38
- // {
39
- // if (!theApp)
40
- // return false;
41
-
42
- // // Need to prompt for an a-okay ...
43
- // Serial.printf("\n\rClear and Restart Device? [Y/n]? ");
44
- // uint8_t selected = theApp->_serialSettings.getMenuSelectionYN();
45
- // flxLog_N("");
46
-
47
- // if (selected != 'y' || selected == kReadBufferTimeoutExpired || selected == kReadBufferExit)
48
- // {
49
- // flxLog_I(F("Aborting..."));
50
- // return false;
51
- // }
52
-
53
- // return resetDeviceForced(theApp);
54
- // }
55
- // //---------------------------------------------------------------------
56
- // bool resetDeviceForced(sfeIoTNodeLoRaWAN *theApp)
57
- // {
58
- // if (!theApp)
59
- // return false;
35
+ theApp->_sysSystem .resetDevicePrompt ();
60
36
61
- // theApp->_sysStorage.resetStorage();
62
- // flxLog_I(F("Settings Cleared"));
37
+ // should never get here
38
+ return true ;
39
+ }
40
+ // ---------------------------------------------------------------------
41
+ bool resetDeviceForced (sfeIoTNodeLoRaWAN *theApp)
42
+ {
43
+ if (!theApp)
44
+ return false ;
63
45
64
- // theApp->_sysUpdate.restartDevice ();
46
+ theApp->_sysSystem . resetDevice ();
65
47
66
- // return true;
67
- // }
48
+ return true ;
49
+ }
68
50
// ---------------------------------------------------------------------
69
51
bool clearDeviceSettings (sfeIoTNodeLoRaWAN *theApp)
70
52
{
@@ -100,17 +82,17 @@ class sfeNLCommands
100
82
// //---------------------------------------------------------------------
101
83
bool restartDevice (sfeIoTNodeLoRaWAN *theApp)
102
84
{
103
- // if (theApp)
104
- // theApp->_sysUpdate .restartDevicePrompt();
85
+ if (theApp)
86
+ theApp->_sysSystem .restartDevicePrompt ();
105
87
106
88
return true ;
107
89
}
108
90
// ---------------------------------------------------------------------
109
91
bool restartDeviceForced (sfeIoTNodeLoRaWAN *theApp)
110
92
{
111
93
112
- // if (theApp)
113
- // theApp->_sysUpdate .restartDevice();
94
+ if (theApp)
95
+ theApp->_sysSystem .restartDevice ();
114
96
115
97
return true ;
116
98
}
@@ -406,9 +388,8 @@ class sfeNLCommands
406
388
// ---------------------------------------------------------------------
407
389
// our command map - command name to callback method
408
390
commandMap_t _commandMap = {
409
- // {"factory-reset", &sfeNLCommands::factoryResetDevice},
410
- // {"reset-device", &sfeNLCommands::resetDevice},
411
- // {"reset-device-forced", &sfeNLCommands::resetDeviceForced},
391
+ {" reset-device" , &sfeNLCommands::resetDevice},
392
+ {" reset-device-forced" , &sfeNLCommands::resetDeviceForced},
412
393
{" clear-settings" , &sfeNLCommands::clearDeviceSettings},
413
394
{" clear-settings-forced" , &sfeNLCommands::clearDeviceSettingsForced},
414
395
{" restart" , &sfeNLCommands::restartDevice},
0 commit comments