Skip to content

Commit 43d61f0

Browse files
modem.py: roaming is always allowed for prime (commaai#38065)
* modem.py: roaming is always allowed for prime * modem.py: add timestamp
1 parent 77017a9 commit 43d61f0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

system/hardware/tici/modem.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"user", '""', "password", '""',
5353
]
5454
INITIAL_STATE = {
55+
"seconds_since_boot": 0,
5556
"state": "INITIALIZING",
5657
"connected": False, "ip_address": "",
5758
"iccid": "", "mcc_mnc": "", "imei": "", "modem_version": "",
@@ -204,6 +205,7 @@ def _is_roaming_allowed(self) -> bool:
204205

205206
def _publish_state(self, **kwargs):
206207
self.S.update(kwargs)
208+
self.S["seconds_since_boot"] = time.monotonic()
207209
with tempfile.NamedTemporaryFile(mode="w", dir="/dev/shm", delete=False) as f:
208210
json.dump(self.S, f, indent=2)
209211
os.chmod(f.name, 0o644)

0 commit comments

Comments
 (0)