Skip to content

Commit 07a223e

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 7efc163 commit 07a223e

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
@@ -116,6 +116,8 @@ void loop() {
116116
Serial.print('\n');
117117
command[len - 1] = 0; // replace newline with C string null terminator
118118
char reply[160];
119+
lastActive = millis();
120+
nextSleepinSecs = ACTIVE_TIME_SEC_INUSE;
119121
the_mesh.handleCommand(0, command, reply); // NOTE: there is no sender_timestamp via serial!
120122
if (reply[0]) {
121123
Serial.print(" -> "); Serial.println(reply);

0 commit comments

Comments
 (0)