优化无线/有线CAN,以及控制指令解析
This commit is contained in:
@@ -231,11 +231,12 @@ def test_left_sidebar_exposes_collapsed_parsed_can_command_panel() -> None:
|
||||
"light ambient brightness ${level}",
|
||||
"shade position ${position}",
|
||||
"seat passenger ${axis[1]} position ${position}",
|
||||
"seat passenger dynamic ${dynamic.name}",
|
||||
"seat passenger dynamic ${dynamic}",
|
||||
"seat passenger dynamic stop",
|
||||
"otaCan0Frame(0x64, axis[2], targetPermille)",
|
||||
"otaCan0Frame(0x66, dynamic.selector, 300)",
|
||||
"otaCan0Frame(0x63, 0xFF, 0)",
|
||||
"nativeCan0Frame(0x01, axis[2], 0, position * 100, 30000)",
|
||||
"nativeCan0Frame(0x0B, axis[2], 0, 0x4B52, 120)",
|
||||
"nativeCan0Frame(0x0E, 0, 0, mode, 0)",
|
||||
"nativeCan0Frame(0x0F, 0, 0, 0, 0)",
|
||||
):
|
||||
assert command_contract in console
|
||||
|
||||
@@ -303,7 +304,7 @@ def test_parsed_can_command_panel_combines_can0_seat_and_can1_vehicle_commands()
|
||||
"channel": "CAN0",
|
||||
"category": "副驾座椅靠背调节",
|
||||
"command": "seat passenger backrest position 36",
|
||||
"frame": "0x6A0 · C7 <SEQ> 64 02 68 01 00 00",
|
||||
"frame": "0x300 · 01 12 <SEQ_LO> <SEQ_HI> 10 0E 30 75",
|
||||
"parseSource": "local_rule",
|
||||
},
|
||||
{
|
||||
@@ -532,3 +533,19 @@ def test_twin_device_hotspots_use_responsive_hover_and_leader_labels() -> None:
|
||||
assert "--v2-hotspot-line-angle: -150deg" in styles
|
||||
assert '.v2-twin-device-popover[data-pinned="false"]' in styles
|
||||
assert "pointer-events: none;" in styles
|
||||
|
||||
|
||||
def test_validated_can_commands_survive_same_task_running_poll_and_keep_error_detail() -> None:
|
||||
console = source("console-v2.js")
|
||||
app = source("app.js")
|
||||
|
||||
assert "function validatedCommandsBelongToTask(task = {})" in console
|
||||
assert "if (!validatedCommandsBelongToTask(task))" in console
|
||||
assert "A stale" in console
|
||||
assert "must not erase those commands" in console
|
||||
assert "rememberValidatedCommandContext(result);" in console
|
||||
assert "resetValidatedCommandContext();" in console
|
||||
assert "error.detail || error.message" in console
|
||||
assert "failed_or_blocked: \"失败或已阻止\"" in console
|
||||
assert "requestError.outcome = phaseEvent.outcome;" in app
|
||||
assert "requestError.detail = phaseEvent.detail;" in app
|
||||
|
||||
Reference in New Issue
Block a user