mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user