From 292fa5f4137ca85fe6e9a593ea8abec0df8f58d2 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Thu, 13 Apr 2017 13:30:38 +0200 Subject: [PATCH] AP_GPS: example fix travis warning missing function declaration implicit cast some style fix --- .../AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp | 11 ++++++----- .../GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp b/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp index 892c3ecc429..07ad79bd3c3 100644 --- a/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp +++ b/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp @@ -32,6 +32,9 @@ #include #include +void setup(); +void loop(); + const AP_HAL::HAL& hal = AP_HAL::get_HAL(); // create board led object @@ -43,8 +46,6 @@ AP_GPS gps; // Serial manager is needed for UART comunications AP_SerialManager serial_manager; -#define T6 1000000 -#define T7 10000000 void setup() { @@ -84,12 +85,12 @@ void loop() hal.console->printf(" Lon: "); print_latlon(hal.console, loc.lng); hal.console->printf(" Alt: %.2fm GSP: %.2fm/s CoG: %d SAT: %d TIM: %u/%lu STATUS: %u\n", - loc.alt * 0.01f, - gps.ground_speed(), + (double)(loc.alt * 0.01f), + (double)gps.ground_speed(), (int)gps.ground_course_cd() / 100, gps.num_sats(), gps.time_week(), - (unsigned long)gps.time_week_ms(), + (long unsigned int)gps.time_week_ms(), gps.status()); } diff --git a/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp b/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp index 9ddd8cb6e50..419bdeb0878 100644 --- a/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp +++ b/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp @@ -29,6 +29,9 @@ #include #include +void setup(); +void loop(); + const AP_HAL::HAL& hal = AP_HAL::get_HAL(); void setup()