1
0
mirror of https://github.com/revspace/operame synced 2024-12-04 21:57:30 +00:00

Flush serial buffers before sending 0x87

This commit is contained in:
Juerd Waalboer 2021-03-13 19:04:19 +01:00
parent 2807ee2647
commit b84a6d8b19

View File

@ -262,6 +262,7 @@ int aqc_get_co2() {
void aqc_set_zero() { void aqc_set_zero() {
const uint8_t command[9] = { 0xff, 0x01, 0x87, 0, 0, 0, 0, 0, 0x78 }; const uint8_t command[9] = { 0xff, 0x01, 0x87, 0, 0, 0, 0, 0, 0x78 };
flush(hwserial1);
hwserial1.write(command, sizeof(command)); hwserial1.write(command, sizeof(command));
} }