|
|
|
@ -9,7 +9,7 @@ from openpilot.common.realtime import config_realtime_process, DT_MDL |
|
|
|
|
from openpilot.common.filter_simple import FirstOrderFilter |
|
|
|
|
from openpilot.common.swaglog import cloudlog |
|
|
|
|
from openpilot.selfdrive.controls.lib.vehicle_model import ACCELERATION_DUE_TO_GRAVITY |
|
|
|
|
from openpilot.selfdrive.locationd.helpers import PointBuckets, ParameterEstimator, cache_points |
|
|
|
|
from openpilot.selfdrive.locationd.helpers import PointBuckets, ParameterEstimator |
|
|
|
|
|
|
|
|
|
HISTORY = 5 # secs |
|
|
|
|
POINTS_PER_BUCKET = 1500 |
|
|
|
@ -238,8 +238,8 @@ def main(): |
|
|
|
|
|
|
|
|
|
# Cache points every 60 seconds while onroad |
|
|
|
|
if sm.frame % 240 == 0: |
|
|
|
|
cache_points("LiveTorqueParameters", estimator, sm.all_checks()) |
|
|
|
|
|
|
|
|
|
msg = estimator.get_msg(valid=sm.all_checks(), with_points=True) |
|
|
|
|
params.put_nonblocking("LiveTorqueParameters", msg.to_bytes()) |
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
main() |
|
|
|
|