aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Wilks <sjwilks@gmail.com>2012-11-29 16:48:52 +0100
committerSimon Wilks <sjwilks@gmail.com>2012-11-29 16:48:52 +0100
commit2eccf5ff196d3c46f95cd4a5246e37d89555f5b4 (patch)
treeb7f39dcc8e9b5ebacc4af558cf6fe84dfbbbe07c
parentd82c62e95bd8d37ec2a8060f096ad4188f34bc49 (diff)
downloadpx4-firmware-2eccf5ff196d3c46f95cd4a5246e37d89555f5b4.tar.gz
px4-firmware-2eccf5ff196d3c46f95cd4a5246e37d89555f5b4.tar.bz2
px4-firmware-2eccf5ff196d3c46f95cd4a5246e37d89555f5b4.zip
Cleanup a bit.
-rw-r--r--apps/hott_telemetry/hott_telemetry_main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/hott_telemetry/hott_telemetry_main.c b/apps/hott_telemetry/hott_telemetry_main.c
index 455d25f88..ec2ca2b41 100644
--- a/apps/hott_telemetry/hott_telemetry_main.c
+++ b/apps/hott_telemetry/hott_telemetry_main.c
@@ -173,15 +173,13 @@ int read_data(int uart, int *id)
const int timeout = 1000;
struct pollfd fds[] = { { .fd = uart, .events = POLLIN } };
+ char mode;
if (poll(fds, 1, timeout) > 0) {
-
- /* get the mode: binary or text */
- char mode;
+ /* Get the mode: binary or text */
read(uart, &mode, 1);
-
+ /* Read the device ID being polled */
read(uart, id, 1);
- //printf("[%x %x]\n", mode, *id);
/* if we have a binary mode request */
if (mode != BINARY_MODE_REQUEST_ID) {
return ERROR;
@@ -266,10 +264,7 @@ int hott_telemetry_thread_main(int argc, char *argv[])
default:
continue; // Not a module we support.
}
- //printf("Write start\n");
send_data(uart, buffer, size);
- } else {
- printf("NOK: %x\n", id);
}
}