Revert "Simplify passive mode handling (#30593)"

old-commit-hash: 99d51bf02c5a13f3064b012da55634f8a319091e
This commit is contained in:
Adeeb Shihadeh
2023-12-04 15:05:05 -08:00
parent 688354c5ce
commit f3dec8658c
8 changed files with 99 additions and 99 deletions
+6 -2
View File
@@ -60,8 +60,12 @@ def manager_init() -> None:
if params.get(k) is None:
params.put(k, v)
# is this a dashcam build?
params.put_bool("Passive", bool(int(os.getenv("PASSIVE", "0"))))
# is this dashcam?
if os.getenv("PASSIVE") is not None:
params.put_bool("Passive", bool(int(os.getenv("PASSIVE", "0"))))
if params.get("Passive") is None:
raise Exception("Passive must be set to continue")
# Create folders needed for msgq
try:
+1
View File
@@ -21,6 +21,7 @@ BLACKLIST_PROCS = ['manage_athenad', 'pandad', 'pigeond']
@pytest.mark.tici
class TestManager(unittest.TestCase):
def setUp(self):
os.environ['PASSIVE'] = '0'
HARDWARE.set_power_save(False)
# ensure clean CarParams
+1
View File
@@ -11,6 +11,7 @@ from openpilot.system.version import training_version, terms_version
def set_params_enabled():
os.environ['PASSIVE'] = "0"
os.environ['REPLAY'] = "1"
os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019"
os.environ['LOGPRINT'] = "debug"
+1 -3
View File
@@ -1,6 +1,4 @@
#!/usr/bin/bash
export PASSIVE=1
cd /data/openpilot
exec ./launch_openpilot.sh
exec ./launch_chffrplus.sh