Use the symbolic constants for ACK/NAK bytes.

This commit is contained in:
Jef Driesen 2009-05-27 10:22:29 +00:00
parent f477defbf8
commit 5a1658d30e
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}