X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_aprs.c;h=826985c6e06e2f0b004a05c36a2b6976cd6a49ba;hb=a6baf04bae3fe6a6b3da2f456419732ffeb4d056;hp=a8016673a0fde1b4450a3ed2431fb91c05d0ca60;hpb=643c2fb03833d658320f476ef731bbb06fe3cc31;p=fw%2Faltos diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c index a8016673..826985c6 100644 --- a/src/drivers/ao_aprs.c +++ b/src/drivers/ao_aprs.c @@ -234,7 +234,7 @@ static void timeInit() #define TNC_TX_DELAY 45 /// The size of the TNC output buffer. -#define TNC_BUFFER_SIZE 40 +#define TNC_BUFFER_SIZE 48 /// States that define the current mode of the 1200 bps (A-FSK) state machine. typedef enum @@ -527,7 +527,7 @@ static int tncComment(uint8_t *buf) int16_t apogee = ao_ignite_decivolt(AO_SENSE_DROGUE(&packet)); #endif #ifdef AO_SENSE_MAIN - int16_t main = ao_ignite_decivolt(AO_SENSE_MAIN(&packet)); + int16_t main_value = ao_ignite_decivolt(AO_SENSE_MAIN(&packet)); #endif return sprintf((char *) buf, @@ -548,8 +548,8 @@ static int tncComment(uint8_t *buf) apogee%10 #endif #ifdef AO_SENSE_MAIN - , main/10, - main%10 + , main_value/10, + main_value%10 #endif , ao_serial_number ); @@ -804,10 +804,10 @@ static int tncPositionPacket(void) /* Convert from meters to feet */ alt = (alt * 328 + 50) / 100; - buf += sprintf((char *) tncBuffer, "!%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06u ", + buf += sprintf((char *) tncBuffer, "!%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06lu ", lat_deg, lat_min, lat_frac, lat_sign, lon_deg, lon_min, lon_frac, lon_sign, - alt); + (long) alt); break; } }