events: Update startup event to support sunnypilot remote origin detection (#1092)

This commit is contained in:
Jason Wen
2025-07-29 23:09:58 -04:00
committed by GitHub
parent fd8cebf2c3
commit 24699f3e54
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -135,7 +135,8 @@ class SelfdriveD(CruiseHelper):
self.ignored_processes.update({'mapd'})
# Determine startup event
self.startup_event = EventName.startup if build_metadata.openpilot.comma_remote and build_metadata.tested_channel else EventName.startupMaster
is_remote = build_metadata.openpilot.comma_remote or build_metadata.openpilot.sunnypilot_remote
self.startup_event = EventName.startup if is_remote and build_metadata.tested_channel else EventName.startupMaster
if not car_recognized:
self.startup_event = EventName.startupNoCar
elif car_recognized and self.CP.passive:
+4
View File
@@ -83,6 +83,10 @@ class OpenpilotMetadata:
# touch this to get rid of the orange startup alert. there's better ways to do that
return self.git_normalized_origin == "github.com/commaai/openpilot"
@property
def sunnypilot_remote(self) -> bool:
return self.git_normalized_origin == "github.com/sunnypilot/sunnypilot"
@property
def git_normalized_origin(self) -> str:
return self.git_origin \