Dos fan fix (#1335)

* hitl fan test

* enable cooldown on dos as well

* small cleanup

* get expected RPM from panda class

* fix

* overshoot test

* fix max RPM getting

* fix percentage

* revert cooldown fix

* add cooldown for dos fan as well

* remove feedforward from the fan controller to eliminate overshoot

* update clip

* cleanup

* add that back

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
Robbe Derks
2023-04-18 14:15:06 -07:00
committed by GitHub
parent 1f8b03666d
commit 237ffedcb3
4 changed files with 42 additions and 8 deletions

View File

@@ -194,6 +194,12 @@ class Panda:
INTERNAL_DEVICES = (HW_TYPE_UNO, HW_TYPE_DOS, HW_TYPE_TRES)
HAS_OBD = (HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS, HW_TYPE_RED_PANDA, HW_TYPE_RED_PANDA_V2, HW_TYPE_TRES)
MAX_FAN_RPMs = {
HW_TYPE_UNO: 5100,
HW_TYPE_DOS: 6500,
HW_TYPE_TRES: 6600,
}
# first byte is for EPS scaling factor
FLAG_TOYOTA_ALT_BRAKE = (1 << 8)
FLAG_TOYOTA_STOCK_LONGITUDINAL = (2 << 8)