|
@@ -724,16 +724,20 @@ void get_command() {
|
724
|
724
|
|
725
|
725
|
if (drain_queued_commands_P()) return; // priority is given to non-serial commands
|
726
|
726
|
|
727
|
|
- static millis_t last_command_time = 0;
|
728
|
|
- millis_t ms = millis();
|
|
727
|
+ #ifdef NO_TIMEOUTS
|
|
728
|
+ static millis_t last_command_time = 0;
|
|
729
|
+ millis_t ms = millis();
|
729
|
730
|
|
730
|
|
- if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) {
|
731
|
|
- SERIAL_ECHOLNPGM(MSG_WAIT);
|
732
|
|
- last_command_time = ms;
|
733
|
|
- }
|
|
731
|
+ if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) {
|
|
732
|
+ SERIAL_ECHOLNPGM(MSG_WAIT);
|
|
733
|
+ last_command_time = ms;
|
|
734
|
+ }
|
|
735
|
+ #endif
|
734
|
736
|
|
735
|
737
|
while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) {
|
736
|
|
- last_command_time = ms;
|
|
738
|
+ #ifdef NO_TIMEOUTS
|
|
739
|
+ last_command_time = ms;
|
|
740
|
+ #endif
|
737
|
741
|
serial_char = MYSERIAL.read();
|
738
|
742
|
|
739
|
743
|
if (serial_char == '\n' || serial_char == '\r' ||
|