mirror of https://github.com/g4klx/MMDVMHost
Improve the serial port parsing.
This commit is contained in:
parent
496078928c
commit
9238d74082
|
|
@ -73,7 +73,7 @@ bool m_started = false;
|
|||
uint32_t m_count = 0U;
|
||||
bool m_led = false;
|
||||
|
||||
uint8_t m_buffer[255U];
|
||||
uint8_t m_buffer[256U];
|
||||
uint8_t m_offset = 0U;
|
||||
uint8_t m_length = 0U;
|
||||
|
||||
|
|
@ -95,7 +95,6 @@ void loop()
|
|||
} else {
|
||||
m_buffer[m_offset] = c;
|
||||
m_offset++;
|
||||
}
|
||||
|
||||
if (m_length == m_offset) {
|
||||
switch (m_buffer[2U]) {
|
||||
|
|
@ -124,6 +123,7 @@ void loop()
|
|||
m_offset = 0U;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool lockout = digitalRead(PIN_LOCKOUT) == HIGH;
|
||||
if (lockout != m_lockout) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue