File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,22 @@ void CAtHandler::add_cmds_esp_generic() {
14
14
switch (parser.cmd_mode ) {
15
15
case chAT::CommandMode::Run: {
16
16
ESP.restart ();
17
- break ;
17
+ return chAT::CommandStatus::OK ;
18
18
}
19
- case chAT::CommandMode::Write: {
19
+ }
20
+ return chAT::CommandStatus::ERROR;
21
+ };
22
+
23
+ /* ....................................................................... */
24
+ command_table[_RESTART_BOOTLOADER] = [this ](auto & srv, auto & parser) {
25
+ /* ....................................................................... */
26
+ switch (parser.cmd_mode ) {
27
+ case chAT::CommandMode::Run: {
20
28
usb_persist_restart (RESTART_BOOTLOADER);
21
- break ;
29
+ return chAT::CommandStatus::OK ;
22
30
}
23
31
}
24
- return chAT::CommandStatus::OK ;
32
+ return chAT::CommandStatus::ERROR ;
25
33
};
26
34
27
35
/* ....................................................................... */
Original file line number Diff line number Diff line change 21
21
#define _WIFISCAN "+WIFISCAN"
22
22
23
23
#define _RESET "+RESET"
24
+ #define _RESTART_BOOTLOADER "+RESTARTBOOTLOADER"
24
25
#define _GMR "+GMR"
25
26
#define _GENERIC_CMD "+CMD"
26
27
#define _FILESYSTEM "+FS"
You can’t perform that action at this time.
0 commit comments