migration: remove disengage on gas alternative experience (#35267)

* fix

* done

* test

* update refs
pull/35235/head
Shane Smiskol 3 months ago committed by GitHub
parent 8427bf76cf
commit 66c0971a0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      selfdrive/test/process_replay/migration.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -22,12 +22,12 @@ MigrationOps = tuple[list[tuple[int, capnp.lib.capnp._DynamicStructReader]], lis
MigrationFunc = Callable[[list[MessageWithIndex]], MigrationOps] MigrationFunc = Callable[[list[MessageWithIndex]], MigrationOps]
## rules for migration functions # rules for migration functions
## 1. must use the decorator @migration(inputs=[...], product="...") and MigrationFunc signature # 1. must use the decorator @migration(inputs=[...], product="...") and MigrationFunc signature
## 2. it only gets the messages that are in the inputs list # 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 # 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) # 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 # 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): def migrate_all(lr: LogIterable, manager_states: bool = False, panda_states: bool = False, camera_states: bool = False):
migrations = [ migrations = [
migrate_sensorEvents, migrate_sensorEvents,
@ -306,6 +306,8 @@ def migrate_pandaStates(msgs):
elif msg.which() == 'pandaStates': elif msg.which() == 'pandaStates':
new_msg = msg.as_builder() new_msg = msg.as_builder()
new_msg.pandaStates[-1].safetyParam = safety_param 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())) ops.append((index, new_msg.as_reader()))
return ops, [], [] return ops, [], []

@ -1 +1 @@
bc0a2e6eac422e574b6c670fe493d368df10ef42 6602b004aa91decf3a1a4ab7ddaf77a99d7ebfc3
Loading…
Cancel
Save