Use the symbolic constants for ACK/NAK bytes.
This commit is contained in:
parent
f477defbf8
commit
5a1658d30e
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user