This commit is contained in:
firestar5683
2026-08-02 12:20:20 -05:00
parent 6d4089feb7
commit d89371c518
206 changed files with 5069 additions and 1790 deletions
@@ -1,4 +1,6 @@
import numpy as np
import platform
import pytest
from collections import defaultdict
from enum import Enum
@@ -96,6 +98,7 @@ def run_scenarios(scenario, logs):
return get_select_fields_data(logs), get_select_fields_data(replayed_logs)
@pytest.mark.skipif(platform.system() == "Darwin", reason="Fake socket events are unavailable on macOS")
class TestLocationdScenarios:
"""
Test locationd with different scenarios. In all these scenarios, we expect the following:
+2
View File
@@ -1,9 +1,11 @@
from cereal import car
from types import SimpleNamespace
from openpilot.selfdrive.locationd.torqued import TorqueEstimator
def test_cal_percent():
est = TorqueEstimator(car.CarParams())
est.starpilot_toggles = SimpleNamespace(use_custom_latAccelFactor=False, use_custom_friction=False)
msg = est.get_msg()
assert msg.liveTorqueParameters.calPerc == 0