Decimate "Torque Estimator" if not previously calibrated

This commit is contained in:
James
2025-12-01 12:00:00 -07:00
parent 583680d871
commit c08c17ce66
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -241,7 +241,9 @@ class FrogPilotVariables:
msg_bytes = self.params.get("LiveTorqueParameters")
if msg_bytes:
LTP = messaging.log_from_bytes(msg_bytes, log.LiveTorqueParametersData)
toggle.liveValid = LTP.liveValid
else:
toggle.liveValid = False
toggle.debug_mode = self.params.get_bool("DebugMode")
+3
View File
@@ -258,6 +258,9 @@ def main(demo=False):
frogpilot_toggles = get_frogpilot_toggles()
if not frogpilot_toggles.liveValid:
estimator = TorqueEstimator(messaging.log_from_bytes(params.get("CarParams", block=True), car.CarParams), decimated=True)
estimator.frogpilot_toggles = frogpilot_toggles
while True: