feat: update CAN integration and T2G seat firmware
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -42,7 +42,7 @@ class ModeProfileRegistryTests(unittest.TestCase):
|
||||
self.assertEqual(
|
||||
by_capability["seat.set_legrest_height"]["parameters"],
|
||||
[
|
||||
{"name": "position_pct", "value": 87},
|
||||
{"name": "position_pct", "value": 94},
|
||||
{"name": "angle_deg", "value": 163},
|
||||
],
|
||||
)
|
||||
@@ -91,17 +91,17 @@ class ModeProfileRegistryTests(unittest.TestCase):
|
||||
def test_denza_mode_positions_use_corrected_n7_zero_points(self) -> None:
|
||||
registry = ModeProfileRegistry(REPOSITORY_ROOT / "config" / "modes")
|
||||
expected_positions = {
|
||||
"baby_nap": (81, 30),
|
||||
"calf_decompression_float": (51, 75),
|
||||
"cruise_sofa": (51, 30),
|
||||
"easy_entry_exit": (100, 0),
|
||||
"electric_beach_chair": (100, 0),
|
||||
"leisure_lounger": (51, 30),
|
||||
"meditation_space": (100, 44),
|
||||
"nap": (0, 0),
|
||||
"office": (72, 22),
|
||||
"queen_passenger_driving": (72, 38),
|
||||
"zero_gravity": (100, 100),
|
||||
"baby_nap": (81, 30, 41, 0),
|
||||
"calf_decompression_float": (51, 75, 0, 100),
|
||||
"cruise_sofa": (51, 30, 44, 53),
|
||||
"easy_entry_exit": (100, 0, 0, 0),
|
||||
"electric_beach_chair": (100, 0, 100, 60),
|
||||
"leisure_lounger": (51, 30, 66, 76),
|
||||
"meditation_space": (100, 44, 44, 58),
|
||||
"nap": (100, 100, 81, 94),
|
||||
"office": (72, 22, 22, 21),
|
||||
"queen_passenger_driving": (72, 38, 44, 31),
|
||||
"zero_gravity": (100, 100, 81, 94),
|
||||
}
|
||||
|
||||
profiles = {
|
||||
@@ -124,6 +124,8 @@ class ModeProfileRegistryTests(unittest.TestCase):
|
||||
for capability in (
|
||||
"seat.set_longitudinal_position",
|
||||
"seat.set_cushion_tilt",
|
||||
"seat.set_backrest_recline",
|
||||
"seat.set_legrest_height",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -15,17 +15,17 @@ INTENT = {
|
||||
{
|
||||
"domain": "seat",
|
||||
"capability": "seat.set_ventilation",
|
||||
"target_scope": "driver",
|
||||
"target_scope": "passenger",
|
||||
"operation": "activate",
|
||||
"parameters": [
|
||||
{"name": "state", "value": "on"},
|
||||
{"name": "level", "value": 1},
|
||||
],
|
||||
"reason": "Driver requested seat ventilation.",
|
||||
"reason": "Passenger requested seat ventilation.",
|
||||
}
|
||||
],
|
||||
"ambiguities": [],
|
||||
"decision_summary": ["打开主驾座椅通风"],
|
||||
"decision_summary": ["打开副驾座椅通风"],
|
||||
"confidence": 0.99,
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ class OpenAIResponsesTests(unittest.TestCase):
|
||||
return_value=FakeResponse(response_body),
|
||||
) as urlopen:
|
||||
result = interpreter.interpret(
|
||||
"主驾还有点闷",
|
||||
"副驾还有点闷",
|
||||
{
|
||||
"last_target": "driver",
|
||||
"last_target": "passenger",
|
||||
"devices": {
|
||||
"driver": {
|
||||
"passenger": {
|
||||
"ventilation": {"state": "on", "level": 1}
|
||||
}
|
||||
},
|
||||
@@ -100,7 +100,7 @@ class OpenAIResponsesTests(unittest.TestCase):
|
||||
"cognitive_agent.infrastructure.llm.openai_responses.urllib.request.urlopen",
|
||||
return_value=FakeResponse(stream_body),
|
||||
) as urlopen:
|
||||
result = interpreter.interpret("打开主驾座椅通风")
|
||||
result = interpreter.interpret("打开副驾座椅通风")
|
||||
|
||||
request_payload = json.loads(urlopen.call_args.args[0].data.decode("utf-8"))
|
||||
self.assertEqual(result, INTENT)
|
||||
@@ -122,7 +122,7 @@ class OpenAIResponsesTests(unittest.TestCase):
|
||||
) as urlopen, patch(
|
||||
"cognitive_agent.infrastructure.llm.openai_responses.time.sleep"
|
||||
) as sleep:
|
||||
result = interpreter.interpret("打开主驾座椅通风")
|
||||
result = interpreter.interpret("打开副驾座椅通风")
|
||||
|
||||
self.assertEqual(result, INTENT)
|
||||
self.assertEqual(urlopen.call_count, 2)
|
||||
@@ -158,7 +158,7 @@ class OpenAIResponsesTests(unittest.TestCase):
|
||||
) as urlopen, patch(
|
||||
"cognitive_agent.infrastructure.llm.openai_responses.time.sleep"
|
||||
) as sleep:
|
||||
result = interpreter.interpret("打开主驾座椅通风")
|
||||
result = interpreter.interpret("打开副驾座椅通风")
|
||||
|
||||
self.assertEqual(result, INTENT)
|
||||
self.assertEqual(urlopen.call_count, 2)
|
||||
|
||||
@@ -32,7 +32,7 @@ class VehicleProfileTests(unittest.TestCase):
|
||||
self.assertEqual(profile.seat_motors["cushion_tilt"].positive_direction, "down")
|
||||
self.assertEqual(profile.seat_motors["backrest_recline"].range, 68)
|
||||
self.assertEqual(profile.seat_motors["backrest_recline"].hall_total_pulses, 917)
|
||||
self.assertEqual(profile.seat_motors["legrest_height"].range, 78)
|
||||
self.assertEqual(profile.seat_motors["legrest_height"].range, 72)
|
||||
self.assertEqual(profile.seat_motors["legrest_height"].hall_total_pulses, 647)
|
||||
|
||||
def test_converts_relative_physical_delta_to_absolute_percent(self) -> None:
|
||||
@@ -61,13 +61,13 @@ class VehicleProfileTests(unittest.TestCase):
|
||||
"kind": "included_angle",
|
||||
"zero_deg": 95,
|
||||
"max_deg": 163,
|
||||
"provisional": True,
|
||||
"provisional": False,
|
||||
})
|
||||
self.assertEqual(legrest["display_angle"], {
|
||||
"kind": "included_angle",
|
||||
"zero_deg": 95,
|
||||
"max_deg": 173,
|
||||
"provisional": True,
|
||||
"max_deg": 167,
|
||||
"provisional": False,
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user