* Handle a line being completed. For an empty line * keep sensor readings going and watchdog alive. */
| 394 | * keep sensor readings going and watchdog alive. |
| 395 | */ |
| 396 | inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind) { |
| 397 | sis = PS_NORMAL; // "Normal" Serial Input State |
| 398 | buff[ind] = '\0'; // Of course, I'm a Terminator. |
| 399 | const bool is_empty = (ind == 0); // An empty line? |
| 400 | if (is_empty) |
| 401 | thermalManager.task(); // Keep sensors satisfied |
| 402 | else |
| 403 | ind = 0; // Start a new line |
| 404 | return is_empty; // Inform the caller |
| 405 | } |
| 406 | |
| 407 | /** |
| 408 | * Get all commands waiting on the serial port and queue them. |
no test coverage detected