From 4d8e6db7edc2754d0f74174b13ee2ebce3111521 Mon Sep 17 00:00:00 2001 From: Lennart Eriksson Date: Mon, 5 Dec 2016 08:46:32 +0100 Subject: [PATCH] some small things for the radio controller --- UAV-ControlSystem/src/drivers/arduino_com.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UAV-ControlSystem/src/drivers/arduino_com.c b/UAV-ControlSystem/src/drivers/arduino_com.c index 3397236..c0f1c42 100644 --- a/UAV-ControlSystem/src/drivers/arduino_com.c +++ b/UAV-ControlSystem/src/drivers/arduino_com.c @@ -418,10 +418,10 @@ void update_sensor_values() sensors[WP_LAT_ID].crc = calculate_crc(&sensors[WP_LAT_ID], ARDUINO_SENSOR_SIZE - 1); #endif #ifdef USE_CURR_POS - sensors[CURR_LON_ID].value = 0; + sensors[CURR_LON_ID].value = gps_data.longitude; sensors[CURR_LON_ID].crc = calculate_crc(&sensors[CURR_LON_ID], ARDUINO_SENSOR_SIZE - 1); - sensors[CURR_LAT_ID].value = 0; + sensors[CURR_LAT_ID].value = gps_data.latitude; sensors[CURR_LAT_ID].crc = calculate_crc(&sensors[CURR_LAT_ID], ARDUINO_SENSOR_SIZE - 1); #endif #ifdef USE_CURR_HEADING @@ -437,7 +437,7 @@ void update_sensor_values() sensors[SPEED_ID].crc = calculate_crc(&sensors[SPEED_ID], ARDUINO_SENSOR_SIZE - 1); #endif #ifdef USE_CURRENT_ALTITUDE - sensors[ALTITUDE_ID].value = 0; + sensors[ALTITUDE_ID].value = ping_data.distance_mm / 100; sensors[ALTITUDE_ID].crc = calculate_crc(&sensors[ALTITUDE_ID], ARDUINO_SENSOR_SIZE - 1); #endif }