diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index af5e6e8..584b253 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -217,7 +217,7 @@ oceanic_atom2_quit (oceanic_atom2_device_t *device) } // Verify the answer. - if (answer[0] != 0xA5) { + if (answer[0] != NAK) { WARNING ("Unexpected answer byte(s)."); return DEVICE_STATUS_PROTOCOL; } diff --git a/src/oceanic_vtpro.c b/src/oceanic_vtpro.c index 1e3e2dd..6402af3 100644 --- a/src/oceanic_vtpro.c +++ b/src/oceanic_vtpro.c @@ -347,7 +347,7 @@ oceanic_vtpro_device_keepalive (device_t *abstract) } // Verify the answer. - if (answer[0] != 0x5A || answer[1] != 0x51) { + if (answer[0] != ACK || answer[1] != 0x51) { WARNING ("Unexpected answer byte(s)."); return DEVICE_STATUS_PROTOCOL; } @@ -388,7 +388,7 @@ oceanic_vtpro_device_calibrate (device_t *abstract, unsigned char data[], unsign } // Verify the answer. - if (answer[0] != 0x5A || answer[2] != 0x00) { + if (answer[0] != ACK || answer[2] != 0x00) { WARNING ("Unexpected answer byte(s)."); return DEVICE_STATUS_PROTOCOL; }