From 3200feaa26cf7c425ad9f75cfd35b442bdd8473a Mon Sep 17 00:00:00 2001 From: Lennart Eriksson Date: Mon, 28 Nov 2016 08:54:46 +0100 Subject: [PATCH] Temp checkin --- UAV-ControlSystem/inc/drivers/arduino_com.h | 6 +++--- UAV-ControlSystem/inc/drivers/compass.h | 11 +++++++++++ UAV-ControlSystem/src/drivers/compass.c | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 UAV-ControlSystem/inc/drivers/compass.h create mode 100644 UAV-ControlSystem/src/drivers/compass.c diff --git a/UAV-ControlSystem/inc/drivers/arduino_com.h b/UAV-ControlSystem/inc/drivers/arduino_com.h index 09d3518..ff196a4 100644 --- a/UAV-ControlSystem/inc/drivers/arduino_com.h +++ b/UAV-ControlSystem/inc/drivers/arduino_com.h @@ -42,9 +42,9 @@ typedef struct gps_data_t { * INFORMATION: Contains the whole ping sensor data message * ***********************************************************************/ typedef struct ping_data_t { - uint8_t header; - uint16_t distance_mm; - uint8_t crc; + uint8_t header __attribute__((packed)); + uint16_t distance_mm __attribute__((packed)); + uint8_t crc __attribute__((packed)); }ping_data_t; /* An instance of the GPS data read from Arduino Com */ diff --git a/UAV-ControlSystem/inc/drivers/compass.h b/UAV-ControlSystem/inc/drivers/compass.h new file mode 100644 index 0000000..69b1141 --- /dev/null +++ b/UAV-ControlSystem/inc/drivers/compass.h @@ -0,0 +1,11 @@ +#ifndef DRIVERS_COMPASS_H +#define DRIVERS_COMPASS_H + + + +bool initialize_compass(); + +void calibrate_compass(); + + +#endif //DRIVERS_COMPASS_H diff --git a/UAV-ControlSystem/src/drivers/compass.c b/UAV-ControlSystem/src/drivers/compass.c new file mode 100644 index 0000000..79f196c --- /dev/null +++ b/UAV-ControlSystem/src/drivers/compass.c @@ -0,0 +1,14 @@ +#include "drivers/compass.h" + +#include "drivers/arduino_com.h" + + +bool initialize_compass() +{ + +} + +void calibrate_compass() +{ + +}