diff --git a/Dockerfile b/Dockerfile index a5b9510d..9989ee0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN pip3 install --break-system-packages --no-cache-dir $PYTHONPATH/panda/[dev] # TODO: this should be a "pip install" or not even in this repo at all RUN git config --global --add safe.directory $PYTHONPATH/panda -ENV OPENDBC_REF="624b2de8ea572fef1eae4be98a37d24aefa91dce" +ENV OPENDBC_REF="108513ae6329d7e533e4de00dccd5d585592aab3" RUN cd /tmp/ && \ git clone --depth 1 https://github.com/sunnypilot/opendbc opendbc_repo && \ cd opendbc_repo && git fetch origin $OPENDBC_REF && git checkout FETCH_HEAD && rm -rf .git/ && \ diff --git a/board/main_comms.h b/board/main_comms.h index 195891eb..4ed04961 100644 --- a/board/main_comms.h +++ b/board/main_comms.h @@ -247,6 +247,7 @@ int comms_control_handler(ControlPacket_t *req, uint8_t *resp) { // you can only set this if you are in a non car safety mode if (!is_car_safety_mode(current_safety_mode)) { alternative_experience = req->param1; + current_safety_param_sp = req->param2; mads_set_alternative_experience(&alternative_experience); } break; diff --git a/python/__init__.py b/python/__init__.py index 1639e07f..091ff3bb 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -710,8 +710,8 @@ class Panda: # ******************* configuration ******************* - def set_alternative_experience(self, alternative_experience): - self._handle.controlWrite(Panda.REQUEST_OUT, 0xdf, int(alternative_experience), 0, b'') + def set_alternative_experience(self, alternative_experience, safety_param_sp=0): + self._handle.controlWrite(Panda.REQUEST_OUT, 0xdf, int(alternative_experience), int(safety_param_sp), b'') def set_power_save(self, power_save_enabled=0): self._handle.controlWrite(Panda.REQUEST_OUT, 0xe7, int(power_save_enabled), 0, b'')