From 92b7a98260b7d9235e9732777bac9cda701890eb Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Wed, 26 Nov 2008 10:11:20 +0000 Subject: [PATCH] Use a symbolic constant for the location of the pointers. --- src/oceanic_atom2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index 9173992..bd5de66 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -45,6 +45,8 @@ #define ACK 0x5A #define NAK 0xA5 +#define CF_POINTERS 0x0040 + #define RB_LOGBOOK_EMPTY 0x0230 #define RB_LOGBOOK_BEGIN 0x0240 #define RB_LOGBOOK_END 0x0A40 @@ -444,7 +446,7 @@ oceanic_atom2_device_foreach (device_t *abstract, dive_callback_t callback, void // Read the pointer data. unsigned char pointers[OCEANIC_ATOM2_PACKET_SIZE] = {0}; - device_status_t rc = oceanic_atom2_device_read (abstract, 0x0040, pointers, OCEANIC_ATOM2_PACKET_SIZE); + device_status_t rc = oceanic_atom2_device_read (abstract, CF_POINTERS, pointers, OCEANIC_ATOM2_PACKET_SIZE); if (rc != DEVICE_STATUS_SUCCESS) { WARNING ("Cannot read pointers."); return rc;