mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-01 11:34:04 +08:00
GM test callback binding
This commit is contained in:
@@ -489,9 +489,9 @@ def exercise_bolt_cancel_recovery(self, identity, removed, *, critical=None, com
|
||||
if pedal_scene:
|
||||
if inventory_publish:
|
||||
published = []
|
||||
def capture_control(service, event):
|
||||
def capture_control(service, event, collector=published):
|
||||
if service == 'carControl':
|
||||
published.append(messaging.log_from_bytes(event.to_bytes()))
|
||||
collector.append(messaging.log_from_bytes(event.to_bytes()))
|
||||
with patch.object(controls.pm, 'send', side_effect=capture_control), \
|
||||
patch('openpilot.cereal.messaging.time.monotonic', return_value=now / 1e9):
|
||||
controls.publish(command, controller_log)
|
||||
|
||||
Reference in New Issue
Block a user