@ -14,6 +14,7 @@ from cereal import car, log
from cereal . services import service_list
from cereal . services import service_list
from common . params import Params
from common . params import Params
from common . timeout import Timeout
from common . timeout import Timeout
from panda . python import ALTERNATIVE_EXPERIENCE
from selfdrive . car . fingerprints import FW_VERSIONS
from selfdrive . car . fingerprints import FW_VERSIONS
from selfdrive . car . car_helpers import get_car , interfaces
from selfdrive . car . car_helpers import get_car , interfaces
from selfdrive . test . process_replay . helpers import OpenpilotPrefix
from selfdrive . test . process_replay . helpers import OpenpilotPrefix
@ -368,6 +369,9 @@ def setup_env(simulation=False, CP=None):
# Regen or python process
# Regen or python process
if CP is not None :
if CP is not None :
if CP . alternativeExperience == ALTERNATIVE_EXPERIENCE . DISABLE_DISENGAGE_ON_GAS :
params . put_bool ( " DisengageOnAccelerator " , False )
if CP . fingerprintSource == " fw " and CP . carFingerprint in FW_VERSIONS :
if CP . fingerprintSource == " fw " and CP . carFingerprint in FW_VERSIONS :
params . put ( " CarParamsCache " , CP . as_builder ( ) . to_bytes ( ) )
params . put ( " CarParamsCache " , CP . as_builder ( ) . to_bytes ( ) )
else :
else :