diff --git a/selfdrive/car/bmw/carstate.py b/selfdrive/car/bmw/carstate.py index 3b311eb61f8693..2bda71f4d4e068 100644 --- a/selfdrive/car/bmw/carstate.py +++ b/selfdrive/car/bmw/carstate.py @@ -112,7 +112,7 @@ def update(self, cp_PT, cp_F, cp_aux): ret.steeringAngleDeg = cp_PT.vl['SteeringWheelAngle']['SteeringPosition'] ret.cruiseState.speed = cp_PT.vl["CruiseControlStatus"]['CruiseControlSetpointSpeed'] * (CV.KPH_TO_MS if self.is_metric else CV.MPH_TO_MS) ret.cruiseState.enabled = cp_PT.vl["CruiseControlStatus"]['CruiseCoontrolActiveFlag'] != 0 - ret.cruiseState.speedCluster = ret.cruiseState.speed + CruiseSettings.CLUSTER_OFFSET * CV.KPH_TO_MS #For logging. Doesn't do anything with pcmCruise = False + ret.cruiseState.speedCluster = ret.cruiseState.speed + CruiseSettings.CLUSTER_OFFSET * CV.KPH_TO_MS if cruise_control_stal_msg['plus1'] != 0: self.cruise_stalk_speed = 1 elif cruise_control_stal_msg['minus1'] != 0: diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index 51758f86077687..9a49d6de864706 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -59,11 +59,10 @@ def update_v_cruise(self, CS, enabled, is_metric): if not self.CP.pcmCruise: # if stock cruise is completely disabled, then we can use our own set speed logic self._update_v_cruise_non_pcm(CS, enabled, is_metric) - self.v_cruise_cluster_kph = self.v_cruise_kph self.update_button_timers(CS, enabled) else: self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH - self.v_cruise_cluster_kph = CS.cruiseState.speedCluster * CV.MS_TO_KPH + self.v_cruise_cluster_kph = CS.cruiseState.speedCluster * CV.MS_TO_KPH else: self.v_cruise_kph = V_CRUISE_UNSET self.v_cruise_cluster_kph = V_CRUISE_UNSET