mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
Decimate "Torque Estimator" if not previously calibrated
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user