fix cycle offroad alerts (#36302)

* fix: use parse_release_notes in cycle_offroad_alerts

* fix: set update available param true

* Update selfdrive/ui/tests/cycle_offroad_alerts.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
This commit is contained in:
David
2025-10-13 16:07:11 -05:00
committed by GitHub
parent 692f5fdd72
commit 41fa0cdf82

View File

@@ -7,6 +7,7 @@ import json
from openpilot.common.basedir import BASEDIR
from openpilot.common.params import Params
from openpilot.selfdrive.selfdrived.alertmanager import set_offroad_alert
from openpilot.system.updated.updated import parse_release_notes
if __name__ == "__main__":
params = Params()
@@ -18,9 +19,7 @@ if __name__ == "__main__":
while True:
print("setting alert update")
params.put_bool("UpdateAvailable", True)
r = open(os.path.join(BASEDIR, "RELEASES.md")).read()
r = r[:r.find('\n\n')] # Slice latest release notes
params.put("UpdaterNewReleaseNotes", r + "\n")
params.put("UpdaterNewReleaseNotes", parse_release_notes(BASEDIR))
time.sleep(t)
params.put_bool("UpdateAvailable", False)