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
1 changed files with 1 additions and 0 deletions

View File

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