mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 16:51:12 -07:00
forgetest: record the actuator's radio signal and uptime with every run
The bench actuator is an ESP32 on wifi and it reports its own signal strength, which reads -83 dBm here, close to where an association starts dropping. It has vanished twice tonight and taken a live test with it, and neither time did the record say anything a reader could use: only that it was gone. Both numbers now go into the run's evidence, so the next drop says whether the link faded or the box restarted.
This commit is contained in:
@@ -346,10 +346,16 @@ class Fixture:
|
||||
return [c for c, s in ch.items() if s in ("open", "pressed")]
|
||||
|
||||
def summary(self):
|
||||
# The radio signal and the uptime go in the record: this actuator
|
||||
# is on wifi, and a run that lost it wants both numbers to say
|
||||
# whether the link faded or the box restarted. Without them a
|
||||
# drop is only ever "it was gone".
|
||||
st = self.last_state or {}
|
||||
wifi = st.get("wifi") or {}
|
||||
return {"hostname": self.hostname, "ip": self._ip, "channels": list(self.channels),
|
||||
"button_enabled": bool(st.get("button_enabled")), "arm_press": self.arm_press,
|
||||
"version": st.get("version"), "uptime_s": st.get("uptime_s")}
|
||||
"version": st.get("version"), "uptime_s": st.get("uptime_s"),
|
||||
"rssi": wifi.get("rssi")}
|
||||
|
||||
|
||||
def probe(log, path=None, resolver=resolve_mdns):
|
||||
|
||||
Reference in New Issue
Block a user