mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-22 00:43:44 +08:00
events: Update startup event to support sunnypilot remote origin detection (#1092)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user