Don't Log Live Torque params

This commit is contained in:
MoreTore
2025-06-15 09:53:02 -05:00
parent f08acb9eb7
commit 946167fdf2
3 changed files with 15 additions and 11 deletions
+9 -9
View File
@@ -375,7 +375,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"LongPitch", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VEHICLES},
{"LosAngelesCalibrationParams", PERSISTENT},
{"LosAngelesDrives", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"LosAngelesLiveTorqueParameters", PERSISTENT},
{"LosAngelesLiveTorqueParameters", PERSISTENT | DONT_LOG},
{"LosAngelesScore", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"LoudBlindspotAlert", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"LowVoltageShutdown", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
@@ -414,15 +414,15 @@ std::unordered_map<std::string, uint32_t> keys = {
{"NoLogging", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NorthDakotaCalibrationParams", PERSISTENT},
{"NorthDakotaDrives", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NorthDakotaLiveTorqueParameters", PERSISTENT},
{"NorthDakotaLiveTorqueParameters", PERSISTENT | DONT_LOG},
{"NorthDakotaScore", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NorthDakotaV2CalibrationParams", PERSISTENT},
{"NorthDakotaV2Drives", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NorthDakotaV2LiveTorqueParameters", PERSISTENT},
{"NorthDakotaV2LiveTorqueParameters", PERSISTENT | DONT_LOG},
{"NorthDakotaV2Score", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NotreDameCalibrationParams", PERSISTENT},
{"NotreDameCalibrationParams", PERSISTENT | DONT_LOG},
{"NotreDameDrives", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NotreDameLiveTorqueParameters", PERSISTENT},
{"NotreDameLiveTorqueParameters", PERSISTENT | DONT_LOG},
{"NotreDameScore", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NoUploads", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"NudgelessLaneChange", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
@@ -454,12 +454,12 @@ std::unordered_map<std::string, uint32_t> keys = {
{"RadarlessModels", PERSISTENT},
{"RadicalTurtleCalibrationParams", PERSISTENT},
{"RadicalTurtleDrives", PERSISTENT | FROGPILOT_CONTROLS},
{"RadicalTurtleLiveTorqueParameters", PERSISTENT},
{"RadicalTurtleLiveTorqueParameters", PERSISTENT | DONT_LOG},
{"RadicalTurtleScore", PERSISTENT | FROGPILOT_CONTROLS},
{"RandomEvents", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"RecertifiedHerbalistCalibrationParams", PERSISTENT},
{"RecertifiedHerbalistDrives", PERSISTENT | FROGPILOT_CONTROLS},
{"RecertifiedHerbalistLiveTorqueParameters", PERSISTENT},
{"RecertifiedHerbalistLiveTorqueParameters", PERSISTENT | DONT_LOG},
{"RecertifiedHerbalistScore", PERSISTENT | FROGPILOT_CONTROLS},
{"RefuseVolume", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"RelaxedFollow", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
@@ -482,7 +482,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"SearchInput", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_OTHER},
{"SecretGoodOpenpilotCalibrationParams", PERSISTENT},
{"SecretGoodOpenpilotDrives", PERSISTENT | FROGPILOT_CONTROLS},
{"SecretGoodOpenpilotLiveTorqueParameters", PERSISTENT},
{"SecretGoodOpenpilotLiveTorqueParameters", PERSISTENT | DONT_LOG},
{"SecretGoodOpenpilotScore", PERSISTENT | FROGPILOT_CONTROLS},
{"SetSpeedLimit", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
{"SetSpeedOffset", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_CONTROLS},
@@ -559,7 +559,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"WarningSoftVolume", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"WD40CalibrationParams", PERSISTENT},
{"WD40Drives", PERSISTENT | FROGPILOT_CONTROLS},
{"WD40LiveTorqueParameters", PERSISTENT},
{"WD40LiveTorqueParameters", PERSISTENT | DONT_LOG},
{"WD40Score", PERSISTENT | FROGPILOT_CONTROLS},
{"WheelIcon", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
{"WheelSpeed", PERSISTENT | FROGPILOT_STORAGE | FROGPILOT_VISUALS},
+5 -1
View File
@@ -5,6 +5,7 @@ from opendbc.can.can_define import CANDefine
from opendbc.can.parser import CANParser
from openpilot.selfdrive.car.interfaces import CarStateBase
from openpilot.selfdrive.car.mazda.values import DBC, LKAS_LIMITS, MazdaFlags, TI_STATE, CarControllerParams
from openpilot.common.realtime import DT_CTRL
class CarState(CarStateBase):
def __init__(self, CP):
@@ -35,6 +36,7 @@ class CarState(CarStateBase):
self.shifting = False
self.torque_converter_lock = True
self._prev_steering_angle = 0.0
self.update = self.update_gen1
if CP.flags & MazdaFlags.GEN1:
@@ -183,6 +185,8 @@ class CarState(CarStateBase):
#self.torque_converter_lock = cp_cam.vl["GEAR"]["TORQUE_CONVERTER_LOCK"]
ret.steeringAngleDeg = cp_cam.vl["STEER"]["STEER_ANGLE"]
ret.steeringRateDeg = (ret.steeringAngleDeg - self._prev_steering_angle) / DT_CTRL
self._prev_steering_angle = ret.steeringAngleDeg
ret.steeringTorque = cp_body.vl["EPS_FEEDBACK"]["STEER_TORQUE_SENSOR"]
ret.gas = cp_cam.vl["ENGINE_DATA"]["PEDAL_GAS"]
@@ -207,7 +211,7 @@ class CarState(CarStateBase):
ret.cruiseState.speed = cp.vl["CRUZE_STATE"]["CRZ_SPEED"] * unit_conversion
ret.cruiseState.enabled = (cp.vl["CRUZE_STATE"]["CRZ_STATE"] >= 2)
ret.cruiseState.available = (cp.vl["CRUZE_STATE"]["CRZ_STATE"] != 0)
ret.cruiseState.standstill = ret.standstill
ret.cruiseState.standstill = ret.standstill if not self.CP.openpilotLongitudinalControl else False
self.cp = cp
self.cp_cam = cp_cam
+1 -1
View File
@@ -226,7 +226,7 @@ def manager_init() -> None:
("NewLongAPI", "0"),
("NewLongAPIGM", "1"),
("NNFF", "1"),
("NNFFLite", "1"),
("NNFFLite", "0"),
("NoLogging", "0"),
("NorthDakotaCalibrationParams", ""),
("NorthDakotaDrives", "0"),