diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index 52fce61c1..c7ca7df19 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -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") diff --git a/selfdrive/locationd/torqued.py b/selfdrive/locationd/torqued.py index 22b101377..a020fc535 100755 --- a/selfdrive/locationd/torqued.py +++ b/selfdrive/locationd/torqued.py @@ -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: