Show a warning instead of an empty canvas if the ionosonde station has no data, and also show a warning if we have data but it's old.

This commit is contained in:
Ian Renton
2026-05-16 11:26:23 +01:00
parent a7a45190cb
commit d655354d05
12 changed files with 54 additions and 31 deletions

View File

@@ -35,6 +35,16 @@ class GIROIonosonde(SolarConditionsProvider):
stations.append({"ursi": row[0].strip(), "name": row[1].strip()})
return stations
def setup(self, solar_conditions, solar_conditions_cache):
"""Prepopulate the ionosonde_data map with known URSI and station names, so that the API exposes this structure
even before we actually have any data in it."""
super().setup(solar_conditions, solar_conditions_cache)
self.update_data({"ionosonde_data": {
s["ursi"]: {"ursi": s["ursi"], "name": s["name"], "fof2": None, "muf": None}
for s in self._stations
}})
def start(self):
logging.info(f"Set up query of GIRO ionosonde data API every {POLL_INTERVAL} seconds.")
self._thread = Thread(target=self._run, daemon=True)