|  |  |  | @ -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, [], [] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |