diff --git a/docs/CARS.md b/docs/CARS.md
index e10d9e355c..52235a0647 100644
--- a/docs/CARS.md
+++ b/docs/CARS.md
@@ -18,6 +18,7 @@ Supported Cars
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | e 2020 | All | Stock | 0mph | 3mph |
| Honda | Fit 2018-19 | Honda Sensing | openpilot | 25mph1 | 12mph |
+| Honda | Freed 2020 | Honda Sensing | openpilot | 25mph1 | 12mph |
| Honda | HR-V 2019-20 | Honda Sensing | openpilot | 25mph1 | 12mph |
| Honda | Insight 2019-21 | All | Stock | 0mph | 3mph |
| Honda | Inspire 2018 | All | Stock | 0mph | 3mph |
diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py
index aff8964b47..d1bfb1eaa6 100644
--- a/selfdrive/car/honda/carstate.py
+++ b/selfdrive/car/honda/carstate.py
@@ -109,7 +109,7 @@ def get_can_signals(CP, gearbox_msg, main_on_sig_msg):
signals += [("DRIVERS_DOOR_OPEN", "SCM_FEEDBACK", 1)]
elif CP.carFingerprint == CAR.ODYSSEY_CHN:
signals += [("DRIVERS_DOOR_OPEN", "SCM_BUTTONS", 1)]
- elif CP.carFingerprint == CAR.HRV:
+ elif CP.carFingerprint in (CAR.FREED, CAR.HRV):
signals += [("DRIVERS_DOOR_OPEN", "SCM_BUTTONS", 1),
("WHEELS_MOVING", "STANDSTILL", 1)]
else:
@@ -159,7 +159,7 @@ class CarState(CarStateBase):
self.gearbox_msg = "GEARBOX_15T"
self.main_on_sig_msg = "SCM_FEEDBACK"
- if CP.carFingerprint in (CAR.ACURA_ILX, CAR.ACURA_RDX, CAR.CRV, CAR.CRV_EU, CAR.FIT, CAR.HRV,
+ if CP.carFingerprint in (CAR.ACURA_ILX, CAR.ACURA_RDX, CAR.CRV, CAR.CRV_EU, CAR.FIT, CAR.FREED, CAR.HRV,
CAR.ODYSSEY_CHN, CAR.PILOT, CAR.PILOT_2019, CAR.RIDGELINE):
self.main_on_sig_msg = "SCM_BUTTONS"
@@ -190,7 +190,7 @@ class CarState(CarStateBase):
elif self.CP.carFingerprint == CAR.ODYSSEY_CHN:
ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 0.1
ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"])
- elif self.CP.carFingerprint == CAR.HRV:
+ elif self.CP.carFingerprint in (CAR.FREED, CAR.HRV):
ret.standstill = not cp.vl["STANDSTILL"]["WHEELS_MOVING"]
ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"])
else:
diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py
index a295159639..d881e2c87f 100755
--- a/selfdrive/car/honda/interface.py
+++ b/selfdrive/car/honda/interface.py
@@ -177,6 +177,17 @@ class CarInterface(CarInterfaceBase):
tire_stiffness_factor = 0.75
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.05]]
+ elif candidate == CAR.FREED:
+ stop_and_go = False
+ ret.mass = 3086. * CV.LB_TO_KG + STD_CARGO_KG
+ ret.wheelbase = 2.74
+ # the remaining parameters were copied from FIT
+ ret.centerToFront = ret.wheelbase * 0.39
+ ret.steerRatio = 13.06
+ ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]]
+ tire_stiffness_factor = 0.75
+ ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.05]]
+
elif candidate == CAR.HRV:
stop_and_go = False
ret.mass = 3125 * CV.LB_TO_KG + STD_CARGO_KG
diff --git a/selfdrive/car/honda/values.py b/selfdrive/car/honda/values.py
index cd71a6046f..f4685940bc 100644
--- a/selfdrive/car/honda/values.py
+++ b/selfdrive/car/honda/values.py
@@ -66,6 +66,7 @@ class CAR:
CRV_EU = "HONDA CR-V EU 2016"
CRV_HYBRID = "HONDA CR-V HYBRID 2019"
FIT = "HONDA FIT 2018"
+ FREED = "HONDA FREED 2020"
HRV = "HONDA HRV 2019"
ODYSSEY = "HONDA ODYSSEY 2018"
ODYSSEY_CHN = "HONDA ODYSSEY CHN 2019"
@@ -838,6 +839,29 @@ FW_VERSIONS = {
b'77959-T5R-A230\x00\x00',
],
},
+ CAR.FREED: {
+ (Ecu.gateway, 0x18daeff1, None): [
+ b'38897-TDK-J010\x00\x00',
+ ],
+ (Ecu.eps, 0x18da30f1, None): [
+ b'39990-TDK-J050\x00\x00',
+ b'39990-TDK-N020\x00\x00',
+ ],
+ # TODO: vsa is "essential" for fpv2 but doesn't appear on some models
+ (Ecu.vsa, 0x18da28f1, None): [
+ b'57114-TDK-J120\x00\x00',
+ b'57114-TDK-J330\x00\x00',
+ ],
+ (Ecu.combinationMeter, 0x18da60f1, None): [
+ b'78109-TDK-J310\x00\x00',
+ b'78109-TDK-J320\x00\x00',
+ ],
+ (Ecu.fwdRadar, 0x18dab0f1, None): [
+ b'36161-TDK-J070\x00\x00',
+ b'36161-TDK-J080\x00\x00',
+ b'36161-TDK-J530\x00\x00',
+ ],
+ },
CAR.ODYSSEY: {
(Ecu.gateway, 0x18daeff1, None): [
b'38897-THR-A010\x00\x00',
@@ -1275,6 +1299,7 @@ DBC = {
CAR.CRV_EU: dbc_dict('honda_crv_executive_2016_can_generated', 'acura_ilx_2016_nidec'),
CAR.CRV_HYBRID: dbc_dict('honda_crv_hybrid_2019_can_generated', None),
CAR.FIT: dbc_dict('honda_fit_ex_2018_can_generated', 'acura_ilx_2016_nidec'),
+ CAR.FREED: dbc_dict('honda_fit_ex_2018_can_generated', 'acura_ilx_2016_nidec'),
CAR.HRV: dbc_dict('honda_fit_ex_2018_can_generated', 'acura_ilx_2016_nidec'),
CAR.ODYSSEY: dbc_dict('honda_odyssey_exl_2018_generated', 'acura_ilx_2016_nidec'),
CAR.ODYSSEY_CHN: dbc_dict('honda_odyssey_extreme_edition_2018_china_can_generated', 'acura_ilx_2016_nidec'),
diff --git a/selfdrive/test/test_routes.py b/selfdrive/test/test_routes.py
index 09f995f9a6..53bfbb5bfe 100755
--- a/selfdrive/test/test_routes.py
+++ b/selfdrive/test/test_routes.py
@@ -47,6 +47,7 @@ routes = [
TestRoute("68aac44ad69f838e|2021-05-18--20-40-52", HONDA.CRV),
TestRoute("14fed2e5fa0aa1a5|2021-05-25--14-59-42", HONDA.CRV_HYBRID),
TestRoute("52f3e9ae60c0d886|2021-05-23--15-59-43", HONDA.FIT),
+ TestRoute("2c4292a5cd10536c|2021-08-19--21-32-15", HONDA.FREED),
TestRoute("03be5f2fd5c508d1|2020-04-19--18-44-15", HONDA.HRV),
TestRoute("917b074700869333|2021-05-24--20-40-20", HONDA.ACURA_ILX),
TestRoute("81722949a62ea724|2019-04-06--15-19-25", HONDA.ODYSSEY_CHN),