Skip to content

Commit fcdf42b

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 26782c0 commit fcdf42b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/simple_repeater/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ void loop() {
123123
Serial.print('\n');
124124
command[len - 1] = 0; // replace newline with C string null terminator
125125
char reply[160];
126+
lastActive = millis();
127+
nextSleepinSecs = ACTIVE_TIME_SEC_INUSE;
126128
the_mesh.handleCommand(0, command, reply); // NOTE: there is no sender_timestamp via serial!
127129
if (reply[0]) {
128130
Serial.print(" -> "); Serial.println(reply);

0 commit comments

Comments
 (0)