feat: complete dual-seat whole-vehicle orchestration
This commit is contained in:
@@ -11,7 +11,7 @@ from cognitive_agent.application.native_can_runtime import (
|
||||
NativeCanRuntime,
|
||||
)
|
||||
from cognitive_agent.application.seat_service import REPOSITORY_ROOT, SeatDemoService
|
||||
from cognitive_agent.infrastructure.can.gateway import CanFrame
|
||||
from cognitive_agent.infrastructure.can.gateway import CanFrame, ZlgChannelConfig
|
||||
from cognitive_agent.infrastructure.can.hardware import VehicleCanSettings
|
||||
|
||||
|
||||
@@ -253,6 +253,27 @@ class NativeCanIntegrationTests(unittest.TestCase):
|
||||
|
||||
self.assertFalse(settings.enabled)
|
||||
|
||||
def test_dual_channel_formats_are_explicit_and_independent(self) -> None:
|
||||
seat = ZlgChannelConfig(
|
||||
channel=0,
|
||||
frame_format="classic_can",
|
||||
arbitration_bitrate=500_000,
|
||||
data_bitrate=2_000_000,
|
||||
termination_enabled=True,
|
||||
)
|
||||
vehicle = ZlgChannelConfig(
|
||||
channel=1,
|
||||
frame_format="can_fd",
|
||||
arbitration_bitrate=500_000,
|
||||
data_bitrate=2_000_000,
|
||||
termination_enabled=False,
|
||||
)
|
||||
|
||||
self.assertEqual(seat.public()["frame_format"], "classic_can")
|
||||
self.assertEqual(vehicle.public()["frame_format"], "can_fd")
|
||||
self.assertNotEqual(seat.channel, vehicle.channel)
|
||||
self.assertNotEqual(seat.termination_enabled, vehicle.termination_enabled)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user