Skip to content

Commit db0f10b

Browse files
committed
simple_repeater: Extend active interval on serial CLI activity
When a CLI command is issued through the serial interface, extend the timeout for going to sleep to give the user more time for issuing more commands. Signed-off-by: Frieder Schrempf <frieder@fris.de>
1 parent d6ab446 commit db0f10b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

examples/simple_repeater/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ void loop() {
128128
Serial.print('\n');
129129
command[len - 1] = 0; // replace newline with C string null terminator
130130
char reply[160];
131+
lastActive = millis();
132+
nextSleepinSecs = ACTIVE_TIME_SEC_INUSE;
131133
the_mesh.handleCommand(0, command, reply); // NOTE: there is no sender_timestamp via serial!
132134
if (reply[0]) {
133135
Serial.print(" -> "); Serial.println(reply);

0 commit comments

Comments
 (0)