Skip to content

Commit

Permalink
Remove all debugging code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jefdriesen committed May 6, 2010
1 parent bec8c55 commit 4e5c9ad
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 110 deletions.
25 changes: 0 additions & 25 deletions src/oceanic_atom2.c
Expand Up @@ -378,11 +378,6 @@ oceanic_atom2_device_version (device_t *abstract, unsigned char data[], unsigned

memcpy (data, answer, PAGESIZE);

#ifndef NDEBUG
answer[PAGESIZE] = 0;
message ("ATOM2ReadVersion()=\"%s\"\n", answer);
#endif

return DEVICE_STATUS_SUCCESS;
}

Expand Down Expand Up @@ -416,14 +411,6 @@ oceanic_atom2_device_read (device_t *abstract, unsigned int address, unsigned ch

memcpy (data, answer, PAGESIZE);

#ifndef NDEBUG
message ("ATOM2Read(0x%04x,%d)=\"", address, PAGESIZE);
for (unsigned int i = 0; i < PAGESIZE; ++i) {
message("%02x", data[i]);
}
message("\"\n");
#endif

nbytes += PAGESIZE;
address += PAGESIZE;
data += PAGESIZE;
Expand Down Expand Up @@ -459,10 +446,6 @@ oceanic_atom2_device_write (device_t *abstract, unsigned int address, const unsi
if (rc != DEVICE_STATUS_SUCCESS)
return rc;

#ifndef NDEBUG
message ("ATOM2PrepareWrite(0x%04x,%d)\n", address, PAGESIZE);
#endif

// Write the package.
unsigned char command[PAGESIZE + 2] = {0};
memcpy (command, data, PAGESIZE);
Expand All @@ -471,14 +454,6 @@ oceanic_atom2_device_write (device_t *abstract, unsigned int address, const unsi
if (rc != DEVICE_STATUS_SUCCESS)
return rc;

#ifndef NDEBUG
message ("ATOM2Write(0x%04x,%d)=\"", address, PAGESIZE);
for (unsigned int i = 0; i < PAGESIZE; ++i) {
message("%02x", data[i]);
}
message("\"\n");
#endif

nbytes += PAGESIZE;
address += PAGESIZE;
data += PAGESIZE;
Expand Down
13 changes: 0 additions & 13 deletions src/oceanic_veo250.c
Expand Up @@ -380,11 +380,6 @@ oceanic_veo250_device_version (device_t *abstract, unsigned char data[], unsigne

memcpy (data, answer, PAGESIZE);

#ifndef NDEBUG
answer[PAGESIZE] = 0;
message ("VEO250ReadVersion()=\"%s\"\n", answer);
#endif

return DEVICE_STATUS_SUCCESS;
}

Expand Down Expand Up @@ -438,14 +433,6 @@ oceanic_veo250_device_read (device_t *abstract, unsigned int address, unsigned c

memcpy (data, answer + offset, PAGESIZE);

#ifndef NDEBUG
message ("VEO250Read(0x%04x,%d)=\"", address, PAGESIZE);
for (unsigned int i = 0; i < PAGESIZE; ++i) {
message("%02x", data[i]);
}
message("\"\n");
#endif

offset += PAGESIZE + 1;
nbytes += PAGESIZE;
address += PAGESIZE;
Expand Down
18 changes: 0 additions & 18 deletions src/oceanic_vtpro.c
Expand Up @@ -422,11 +422,6 @@ oceanic_vtpro_device_version (device_t *abstract, unsigned char data[], unsigned
return DEVICE_STATUS_PROTOCOL;
}

#ifndef NDEBUG
ans[PAGESIZE / 2] = 0;
message ("VTPROVersion(init)=\"%s\"\n", ans);
#endif

// Obtain the device identification string. This string is
// split over two packets, but we join both parts again.

Expand All @@ -453,11 +448,6 @@ oceanic_vtpro_device_version (device_t *abstract, unsigned char data[], unsigned

// Append the answer to the output buffer.
memcpy (data + i * PAGESIZE / 2, answer, PAGESIZE / 2);

#ifndef NDEBUG
answer[PAGESIZE / 2] = 0;
message ("VTPROVersion(%u)=\"%s\"\n", i, answer);
#endif
}

return DEVICE_STATUS_SUCCESS;
Expand Down Expand Up @@ -511,14 +501,6 @@ oceanic_vtpro_device_read (device_t *abstract, unsigned int address, unsigned ch

memcpy (data, answer + offset, PAGESIZE);

#ifndef NDEBUG
message ("VTPRORead(0x%04x,%d)=\"", address, PAGESIZE);
for (unsigned int i = 0; i < PAGESIZE; ++i) {
message("%02x", data[i]);
}
message("\"\n");
#endif

offset += PAGESIZE + 1;
nbytes += PAGESIZE;
address += PAGESIZE;
Expand Down
16 changes: 0 additions & 16 deletions src/reefnet_sensus.c
Expand Up @@ -254,22 +254,6 @@ reefnet_sensus_handshake (reefnet_sensus_device_t *device)
// The device is now waiting for a data request.
device->waiting = 1;

#ifndef NDEBUG
message (
"Response Header: %c%c\n"
"Product Code: %d\n"
"Product Version: %d\n"
"Battery: %d\n"
"Interval: %d\n"
"Device ID: %d\n"
"Current Time: %d\n",
handshake[0], handshake[1],
handshake[2], handshake[3],
handshake[4], handshake[5],
array_uint16_le (handshake + 6),
array_uint32_le (handshake + 8));
#endif

// Store the clock calibration values.
device->systime = dc_datetime_now ();
device->devtime = array_uint32_le (handshake + 8);
Expand Down
14 changes: 0 additions & 14 deletions src/reefnet_sensuspro.c
Expand Up @@ -225,20 +225,6 @@ reefnet_sensuspro_handshake (reefnet_sensuspro_device_t *device)
return DEVICE_STATUS_PROTOCOL;
}

#ifndef NDEBUG
message (
"Product Code: %u\n"
"Version Code: %u\n"
"Battery Voltage: %u\n"
"Sample Interval: %u\n"
"Device ID: %u\n"
"Current Time: %u\n",
handshake[0], handshake[1],
handshake[2], handshake[3],
array_uint16_le (handshake + 4),
array_uint32_le (handshake + 6));
#endif

// Store the clock calibration values.
device->systime = dc_datetime_now ();
device->devtime = array_uint32_le (handshake + 6);
Expand Down
24 changes: 0 additions & 24 deletions src/reefnet_sensusultra.c
Expand Up @@ -325,30 +325,6 @@ reefnet_sensusultra_handshake (reefnet_sensusultra_device_t *device)
serial_flush (device->port, SERIAL_QUEUE_BOTH);
}

#ifndef NDEBUG
message (
"Version: %u\n"
"Serial: %u\n"
"Time: %u\n"
"Boot Count: %u\n"
"Boot Time: %u\n"
"Dive Count: %u\n"
"Interval: %u\n"
"Threshold: %u\n"
"End Count: %u\n"
"Averaging: %u\n",
array_uint16_le (handshake + 0),
array_uint16_le (handshake + 2),
array_uint32_le (handshake + 4),
array_uint16_le (handshake + 8),
array_uint32_le (handshake + 10),
array_uint16_le (handshake + 14),
array_uint16_le (handshake + 16),
array_uint16_le (handshake + 18),
array_uint16_le (handshake + 20),
array_uint16_le (handshake + 22));
#endif

// Store the clock calibration values.
device->systime = dc_datetime_now ();
device->devtime = array_uint32_le (handshake + 4);
Expand Down

0 comments on commit 4e5c9ad

Please sign in to comment.