Skip to content

Commit

Permalink
add --devel=legacy_history
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Aug 14, 2024
1 parent d2f12d9 commit 3da4c74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion readsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static void *jsonEntryPoint(void *arg) {
}
writeJsonToFile(Modes.json_dir, "aircraft.json", cb);

if ((ALL_JSON) && Modes.onlyBin < 2 && now >= next_history) {
if ((Modes.legacy_history || ((ALL_JSON) && Modes.onlyBin < 2)) && now >= next_history) {
char filebuf[PATH_MAX];

snprintf(filebuf, PATH_MAX, "history_%d.json", Modes.json_aircraft_history_next);
Expand Down Expand Up @@ -1896,6 +1896,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
Modes.apiThreadCount = atoi(token[1]);
}
}
if (strcasecmp(token[0], "legacy_history") == 0) {
Modes.legacy_history = 1;
}
if (strcasecmp(token[0], "beast_forward_noforward") == 0) {
Modes.beast_forward_noforward = 1;
}
Expand Down
1 change: 1 addition & 0 deletions readsb.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ struct _Modes
int8_t debug_gps;
int8_t debug_planefinder;
int8_t debug_zstd;
int8_t legacy_history;
int8_t enable_zstd;
int8_t incrementId;
int8_t omitGlobeFiles;
Expand Down

0 comments on commit 3da4c74

Please sign in to comment.