Process beginning of buffer only if pos > 0
@@ -106,8 +106,10 @@ usart_ll_thread(void const * arg) {
esp_input_process(&usart_mem[old_pos], pos - old_pos);
} else {
esp_input_process(&usart_mem[old_pos], sizeof(usart_mem) - old_pos);
+ if (pos) {
esp_input_process(&usart_mem[0], pos);
}
+ }
old_pos = pos;
if (old_pos == sizeof(usart_mem)) {
old_pos = 0;
