Update interfaces.py

This commit is contained in:
huifan 2024-11-04 23:01:42 +08:00
parent 11ab1ebe0b
commit 8d86e80367
1 changed files with 2 additions and 2 deletions

View File

@ -423,9 +423,9 @@ class CarInterfaceBase(ABC):
fp_ret.ecoGear |= ret.gearShifter == GearShifter.eco
fp_ret.sportGear |= ret.gearShifter == GearShifter.sport
####################################
# traffic_mode_speed = self.params.get_int("TrafficModespeed")
traffic_mode_speed = self.params.get_int("TrafficModespeed")
traffic_mode = self.params.get_bool("TrafficMode")
fp_ret.trafficModeActive = traffic_mode or self.traffic_mode_active #and (ret.vEgo * 3.6 < traffic_mode_speed)
fp_ret.trafficModeActive = traffic_mode and self.traffic_mode_active and (ret.vEgo * 3.6 < traffic_mode_speed)
####################################
# copy back for next iteration