mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
Move safety constants to opendbc (#2145)
* move to opendbc * all passing * do the rest * fix * and another * order * and update ref to master
This commit is contained in:
@@ -5,6 +5,7 @@ import contextlib
|
||||
import random
|
||||
from termcolor import cprint
|
||||
|
||||
from opendbc.safety import Safety
|
||||
from panda import Panda, PandaJungle
|
||||
|
||||
NUM_PANDAS_PER_TEST = 1
|
||||
@@ -88,7 +89,7 @@ def can_loopback(sender):
|
||||
def test_loopback():
|
||||
# disable safety modes
|
||||
for panda in pandas:
|
||||
panda.set_safety_mode(Panda.SAFETY_ELM327 if FOR_RELEASE_BUILDS else Panda.SAFETY_ALLOUTPUT)
|
||||
panda.set_safety_mode(Safety.SAFETY_ELM327 if FOR_RELEASE_BUILDS else Safety.SAFETY_ALLOUTPUT)
|
||||
|
||||
# perform loopback with jungle as a sender
|
||||
can_loopback(jungle)
|
||||
@@ -99,7 +100,7 @@ def test_loopback():
|
||||
|
||||
# enable safety modes
|
||||
for panda in pandas:
|
||||
panda.set_safety_mode(Panda.SAFETY_SILENT)
|
||||
panda.set_safety_mode(Safety.SAFETY_SILENT)
|
||||
|
||||
#################################################################
|
||||
############################# MAIN ##############################
|
||||
|
||||
Reference in New Issue
Block a user