Skip to content

Commit

Permalink
process replay: fix branch name alert (commaai#23783)
Browse files Browse the repository at this point in the history
* env is modified after start

* update ref
  • Loading branch information
pd0wm authored and budney committed Mar 27, 2022
1 parent 25b75f7 commit b21d839
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
AudibleAlert = car.CarControl.HUDControl.AudibleAlert
EventName = car.CarEvent.EventName

REPLAY = "REPLAY" in os.environ

# Alert priorities
class Priority(IntEnum):
Expand Down Expand Up @@ -218,8 +217,9 @@ def func(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_

def startup_master_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
branch = get_short_branch("")
if REPLAY:
if "REPLAY" in os.environ:
branch = "replay"

return StartupAlert("WARNING: This branch is not tested", branch, alert_status=AlertStatus.userPrompt)

def below_engage_speed_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff965c772bd1bc85dec717d090cee4466033ce73
302258d8bdfea779c546f76c191ed451b18062f5

0 comments on commit b21d839

Please sign in to comment.