From 0d5d439ce1362a003db4fac39537947a9cbbcbc0 Mon Sep 17 00:00:00 2001 From: Rihards Skuja Date: Mon, 22 Jan 2018 21:34:02 +0200 Subject: [PATCH] Clean up temperature assignment when sending data --- robot/src/main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/robot/src/main.c b/robot/src/main.c index 75c3699..83048b7 100644 --- a/robot/src/main.c +++ b/robot/src/main.c @@ -62,16 +62,10 @@ int main(void) void send_sensor_data(const int32_t *distance_in_cm) { - double temp; - - temp = ds18b20_gettemp(); - /* if (temp >= 23) */ - - // Prepare the data to be sent memset(&tx_data, 0, sizeof(data_packet_t)); tx_data.distance = *distance_in_cm; - tx_data.temp = temp; + tx_data.temp = ds18b20_gettemp(); memcpy(tx_raw, &tx_data, sizeof(data_packet_t)); nrf24_send(tx_raw);