diff --git a/selfdrive/test/process_replay/migration.py b/selfdrive/test/process_replay/migration.py index 02cd9b6d71..33b363cfd9 100644 --- a/selfdrive/test/process_replay/migration.py +++ b/selfdrive/test/process_replay/migration.py @@ -22,12 +22,12 @@ MigrationOps = tuple[list[tuple[int, capnp.lib.capnp._DynamicStructReader]], lis MigrationFunc = Callable[[list[MessageWithIndex]], MigrationOps] -## rules for migration functions -## 1. must use the decorator @migration(inputs=[...], product="...") and MigrationFunc signature -## 2. it only gets the messages that are in the inputs list -## 3. product is the message type created by the migration function, and the function will be skipped if product type already exists in lr -## 4. it must return a list of operations to be applied to the logreader (replace, add, delete) -## 5. all migration functions must be independent of each other +# rules for migration functions +# 1. must use the decorator @migration(inputs=[...], product="...") and MigrationFunc signature +# 2. it only gets the messages that are in the inputs list +# 3. product is the message type created by the migration function, and the function will be skipped if product type already exists in lr +# 4. it must return a list of operations to be applied to the logreader (replace, add, delete) +# 5. all migration functions must be independent of each other def migrate_all(lr: LogIterable, manager_states: bool = False, panda_states: bool = False, camera_states: bool = False): migrations = [ migrate_sensorEvents, @@ -306,6 +306,8 @@ def migrate_pandaStates(msgs): elif msg.which() == 'pandaStates': new_msg = msg.as_builder() new_msg.pandaStates[-1].safetyParam = safety_param + # Clear DISABLE_DISENGAGE_ON_GAS bit to fix controls mismatch + new_msg.pandaStates[-1].alternativeExperience &= ~1 ops.append((index, new_msg.as_reader())) return ops, [], [] diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index c97f9a6bde..c8e879e58a 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -bc0a2e6eac422e574b6c670fe493d368df10ef42 \ No newline at end of file +6602b004aa91decf3a1a4ab7ddaf77a99d7ebfc3 \ No newline at end of file