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:
parent
8a3efb3061
commit
e5167278ee
@ -268,7 +268,7 @@ int aqc_get_co2() {
|
|||||||
hwserial1.write(command, sizeof(command));
|
hwserial1.write(command, sizeof(command));
|
||||||
delay(50);
|
delay(50);
|
||||||
int c = hwserial1.readBytes(response, sizeof(response));
|
int c = hwserial1.readBytes(response, sizeof(response));
|
||||||
if (c != sizeof(response)) {
|
if (c != sizeof(response) || response[0] != 0xff || response[1] != 0x86) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
uint8_t checksum = 255;
|
uint8_t checksum = 255;
|
||||||
|
Loading…
Reference in New Issue
Block a user