From: Keith Packard Date: Thu, 10 Nov 2022 00:28:21 +0000 (-0800) Subject: drivers/ublox: Clean up some debug mode code X-Git-Tag: 1.9.13~1^2~26^2~21 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=3b0e4fd74d6c6e5ca972d7341c7155663c230e86 drivers/ublox: Clean up some debug mode code Not used in production, so we didn't catch a couple of type errors. Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_gps_ublox.c b/src/drivers/ao_gps_ublox.c index 57cbf22a..607e9ea9 100644 --- a/src/drivers/ao_gps_ublox.c +++ b/src/drivers/ao_gps_ublox.c @@ -63,12 +63,13 @@ static uint16_t ao_ublox_len; #if AO_UBLOX_DEBUG -static uint8_t ao_gps_dbg_enable; #define DBG_PROTO 1 #define DBG_CHAR 2 #define DBG_INIT 4 +static uint8_t ao_gps_dbg_enable = DBG_PROTO|DBG_CHAR|DBG_INIT; + static void ao_gps_dbg(int level, char *format, ...) { va_list a; @@ -788,7 +789,7 @@ ao_gps(void) #if AO_UBLOX_DEBUG static void ao_gps_option(void) { - uint16_t r = ao_cmd_hex(); + uint8_t r = (uint8_t) ao_cmd_hex(); if (ao_cmd_status != ao_cmd_success) { ao_cmd_status = ao_cmd_success; ao_gps_show();