Adjust --interactive display

Allow 8 character Longitudes to cope with -179.999

Change the type of signalLevel to unsigned chae. Negative signal levels
make no sense.
This commit is contained in:
Malcolm Robb 2013-04-28 16:24:33 +01:00
parent 8ed0574ac8
commit 748f2f5e91

View file

@ -56,7 +56,7 @@
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
// DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
//
#define MODES_DUMP1090_VERSION "1.04.2704.13"
#define MODES_DUMP1090_VERSION "1.04.2804.13"
#define MODES_DEFAULT_RATE 2000000
#define MODES_DEFAULT_FREQ 1090000000
@ -141,7 +141,7 @@ struct client {
struct aircraft {
uint32_t addr; /* ICAO address */
char flight[9]; /* Flight number */
char signalLevel; /* Signal Amplitude */
unsigned char signalLevel; /* Signal Amplitude */
int altitude; /* Altitude */
int speed; /* Velocity computed from EW and NS components. */
int track; /* Angle of flight. */
@ -2695,7 +2695,7 @@ void interactiveShowData(void) {
if (flags & MODEAC_MSG_MODEA_HIT) {mode[2] = 'a';}
if (flags & MODEAC_MSG_MODEC_HIT) {mode[3] = 'c';}
printf("%06x %-4s %-4s %-8s %5d %4d %3d %-7.03f %-7.03f %3d %6d %2d\n",
printf("%06x %-4s %-4s %-8s %5d %3d %3d %7.03f %8.03f %3d %5d %2d\n",
a->addr, mode, squawk, a->flight, altitude, speed, a->track,
a->lat, a->lon, a->signalLevel, msgs, (int)(now - a->seen));
}