Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
CT921 committed May 1, 2023
1 parent 58f838f commit 1d91b7e
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 20 deletions.
2 changes: 1 addition & 1 deletion opendbc
Submodule opendbc updated 1 files
+6 −2 can/dbc.cc
10 changes: 5 additions & 5 deletions selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ def update_events(self, CS):

# Alert if fan isn't spinning for 5 seconds
if self.sm['peripheralState'].pandaType != log.PandaState.PandaType.unknown:
if self.sm['peripheralState'].fanSpeedRpm < 500 and self.sm['deviceState'].fanSpeedPercentDesired > 50:
# if self.sm['peripheralState'].fanSpeedRpm < 500 and self.sm['deviceState'].fanSpeedPercentDesired > 50:
# allow enough time for the fan controller in the panda to recover from stalls
if (self.sm.frame - self.last_functional_fan_frame) * DT_CTRL > 15.0:
self.events.add(EventName.fanMalfunction)
else:
self.last_functional_fan_frame = self.sm.frame
# if (self.sm.frame - self.last_functional_fan_frame) * DT_CTRL > 15.0:
# self.events.add(EventName.fanMalfunction)
# else:
self.last_functional_fan_frame = self.sm.frame

# Handle calibration status
cal_status = self.sm['liveCalibration'].calStatus
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/longitudinal_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
A_CRUISE_MIN_BP_TOYOTA = [0., 8.3, 14, 20., 30., 55.]
A_CRUISE_MAX_VALS = [1.6, 1.2, 0.8, 0.6]
A_CRUISE_MAX_BP = [0., 10.0, 25., 40.]
A_CRUISE_MAX_VALS_TOYOTA = [2.0, 1.7, 1.3, 1.0, 0.89, 0.81, 0.63, 0.4, 0.31, 0.11] # Sets the limits of the planner accel, PID may exceed
A_CRUISE_MAX_VALS_TOYOTA = [2.2, 1.8, 1.4, 1.0, 0.89, 0.81, 0.63, 0.4, 0.31, 0.11] # Sets the limits of the planner accel, PID may exceed
A_CRUISE_MAX_BP_TOYOTA = [0., 3., 6., 8., 11., 15., 20., 25., 30., 55.]

# Lookup table for turns
Expand Down
Loading

0 comments on commit 1d91b7e

Please sign in to comment.