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

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;