File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,22 @@ t_cliResult processCommand(char *cmdBuffer)
281281 commandSendExecuteOkResponse (tokens[0 ], tokens[1 ]);
282282 return (CLI_OK);
283283 }
284+ else if (strcmp (tokens[1 ], " PAIR" ) == 0 )
285+ {
286+ commandSendExecuteOkResponse (tokens[0 ], tokens[1 ]);
287+ espnowRequestPair = true ; // Start ESP-NOW pairing process
288+ // Force exit all config menus and/or command modes to allow OTA state machine to run
289+ btPrintEchoExit = true ;
290+ return (CLI_EXIT); // Exit the CLI to allow OTA state machine to run
291+ }
292+ else if (strcmp (tokens[1 ], " PAIRSTOP" ) == 0 )
293+ {
294+ commandSendExecuteOkResponse (tokens[0 ], tokens[1 ]);
295+ espnowRequestPair = false ; // Stop ESP-NOW pairing process
296+ // Force exit all config menus and/or command modes to allow OTA state machine to run
297+ btPrintEchoExit = true ;
298+ return (CLI_EXIT); // Exit the CLI to allow OTA state machine to run
299+ }
284300 else if (strcmp (tokens[1 ], " REBOOT" ) == 0 )
285301 {
286302 commandSendExecuteOkResponse (tokens[0 ], tokens[1 ]);
You can’t perform that action at this time.
0 commit comments