1
0
mirror of https://github.com/revspace/operame synced 2024-10-31 21:47:30 +00:00

Ignore unknown response from AQC

Haven't seen any non-0x86 responses yet, but who knows...
This commit is contained in:
Juerd Waalboer 2020-12-22 05:18:34 +01:00
parent 8a3efb3061
commit e5167278ee

View File

@ -268,7 +268,7 @@ int aqc_get_co2() {
hwserial1.write(command, sizeof(command));
delay(50);
int c = hwserial1.readBytes(response, sizeof(response));
if (c != sizeof(response)) {
if (c != sizeof(response) || response[0] != 0xff || response[1] != 0x86) {
continue;
}
uint8_t checksum = 255;