ao_gps, ao_log: Make conversions to 16-bit time log values explicit
[fw/altos] / src / kernel / ao_tracker.c
index f79bd18ae957d4e1d1516c6e1971a1a208e66be0..b7e634656285a2b823c9ff6cb088fbe4c81c5736 100644 (file)
@@ -30,7 +30,7 @@ static uint8_t                ao_tracker_force_telem;
 static inline uint8_t
 ao_usb_connected(void)
 {
-       return ao_gpio_get(AO_USB_CONNECT_PORT, AO_USB_CONNECT_PIN, AO_USB_CONNECT) != 0;
+       return ao_gpio_get(AO_USB_CONNECT_PORT, AO_USB_CONNECT_PIN) != 0;
 }
 #else
 #define ao_usb_connected()     1
@@ -63,7 +63,7 @@ ao_tracker(void)
        uint8_t new;
        int32_t ground_distance;
        int16_t height;
-       uint16_t gps_tick;
+       AO_TICK_TYPE gps_tick;
        uint8_t new_tracker_running;
 
 #if HAS_ADC
@@ -134,7 +134,7 @@ ao_tracker(void)
                                                height = -height;
 
                                        if (ao_tracker_force_telem > 1)
-                                               printf("head %d ring %d ground_distance %d height %d\n", gps_head, ring, ground_distance, height);
+                                               printf("head %d ring %d ground_distance %ld height %d\n", gps_head, ring, (long) ground_distance, height);
                                        if (ground_distance > ao_config.tracker_motion ||
                                            height > (ao_config.tracker_motion << 1))
                                        {