When using a --interactive-ttl of more than 99, the alignment
didn't work out.
This commit is contained in:
parent
4cde98e063
commit
c06c697e26
|
|
@ -336,6 +336,7 @@ struct _Modes { // Internal state
|
||||||
uint32_t show_only; // Only show messages from this ICAO
|
uint32_t show_only; // Only show messages from this ICAO
|
||||||
int interactive; // Interactive mode
|
int interactive; // Interactive mode
|
||||||
uint64_t interactive_display_ttl;// Interactive mode: TTL display
|
uint64_t interactive_display_ttl;// Interactive mode: TTL display
|
||||||
|
int interactive_display_size; // Size of TTL display
|
||||||
uint64_t stats; // Interval (millis) between stats dumps,
|
uint64_t stats; // Interval (millis) between stats dumps,
|
||||||
int stats_range_histo; // Collect/show a range histogram?
|
int stats_range_histo; // Collect/show a range histogram?
|
||||||
int onlyaddr; // Print only ICAO addresses
|
int onlyaddr; // Print only ICAO addresses
|
||||||
|
|
|
||||||
|
|
@ -180,10 +180,11 @@ void interactiveShowData(void) {
|
||||||
snprintf(strFl, 7, "%5d ", convert_altitude(a->altitude_baro));
|
snprintf(strFl, 7, "%5d ", convert_altitude(a->altitude_baro));
|
||||||
}
|
}
|
||||||
|
|
||||||
mvprintw(row, 0, "%s%06X %-4s %-4s %-8s %6s %3s %3s %7s %8s %5.1f %5d %2.0f",
|
mvprintw(row, 0, "%s%06X %-4s %-4s %-8s %6s %3s %3s %7s %8s %5.1f %5d %*.0f",
|
||||||
(a->addr & MODES_NON_ICAO_ADDRESS) ? "~" : " ", (a->addr & 0xffffff),
|
(a->addr & MODES_NON_ICAO_ADDRESS) ? "~" : " ", (a->addr & 0xffffff),
|
||||||
strMode, strSquawk, a->callsign, strFl, strGs, strTt,
|
strMode, strSquawk, a->callsign, strFl, strGs, strTt,
|
||||||
strLat, strLon, 10 * log10(signalAverage), msgs, (now - a->seen)/1000.0);
|
strLat, strLon, 10 * log10(signalAverage), msgs,
|
||||||
|
Modes.interactive_display_size, (now - a->seen)/1000.0);
|
||||||
++row;
|
++row;
|
||||||
}
|
}
|
||||||
a = a->next;
|
a = a->next;
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@ int main(int argc, char **argv) {
|
||||||
Modes.interactive = 0;
|
Modes.interactive = 0;
|
||||||
} else if (!strcmp(argv[j],"--interactive-ttl") && more) {
|
} else if (!strcmp(argv[j],"--interactive-ttl") && more) {
|
||||||
Modes.interactive_display_ttl = (uint64_t)(1000 * atof(argv[++j]));
|
Modes.interactive_display_ttl = (uint64_t)(1000 * atof(argv[++j]));
|
||||||
|
Modes.interactive_display_size = strlen(argv[j]);
|
||||||
} else if (!strcmp(argv[j],"--lat") && more) {
|
} else if (!strcmp(argv[j],"--lat") && more) {
|
||||||
Modes.fUserLat = atof(argv[++j]);
|
Modes.fUserLat = atof(argv[++j]);
|
||||||
} else if (!strcmp(argv[j],"--lon") && more) {
|
} else if (!strcmp(argv[j],"--lon") && more) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue