mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 03:03:41 +08:00
Make the Park-to-Drive audio test use a deterministic clock
This commit is contained in:
@@ -95,7 +95,8 @@ def test_park_lkas_producer_wire_and_sound(audio):
|
||||
cs.gearShifter = gear
|
||||
cs.buttonEvents = [] if pressed is None else [car.CarState.ButtonEvent(type=car.CarState.ButtonEvent.Type.lkas, pressed=pressed)]
|
||||
owner.update(cs)
|
||||
Car.state_publish(card, cs, None)
|
||||
with patch.object(messaging.time, 'monotonic', return_value=(audio.now + 50_000_000) / 1e9):
|
||||
Car.state_publish(card, cs, None)
|
||||
decoded = decode_intent(published[INTENT_SERVICE].aolIntentWire)
|
||||
assert decoded is not None
|
||||
assert decoded.lateralArmed == owner.allowed_latch
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "7c9157e14e21e625c25f8fa89a1bd1df95616fefa888443c364853d8fb765f56", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "bbe7c779fc19df3fd9767340c8b26913636b33a687074e33f3f4a8cde4071627", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user