From 3da4c74de37a249c8208c9751ccc578b89f07cc5 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 14 Aug 2024 07:16:52 +0200 Subject: [PATCH] add --devel=legacy_history --- readsb.c | 5 ++++- readsb.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/readsb.c b/readsb.c index d5703ba0..a4aca6c4 100644 --- a/readsb.c +++ b/readsb.c @@ -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); @@ -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; } diff --git a/readsb.h b/readsb.h index 33039b4c..06064c11 100644 --- a/readsb.h +++ b/readsb.h @@ -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;