aboutsummaryrefslogtreecommitdiff
path: root/codegen/migrate.py
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-23 21:54:38 -0500
committermat <github@matdoes.dev>2022-06-23 21:54:38 -0500
commit8755f18c2b0c11a51a81f60b5501d9d57d0c370e (patch)
tree08594ab64576d439662ccb7786b11aa11cb1877c /codegen/migrate.py
parente44afb76f4d89ecd3763db83338268b9d9360a0c (diff)
downloadazalea-drasl-8755f18c2b0c11a51a81f60b5501d9d57d0c370e.tar.xz
Correctly detect updated packets
Diffstat (limited to 'codegen/migrate.py')
-rw-r--r--codegen/migrate.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/codegen/migrate.py b/codegen/migrate.py
index fa7b01a6..fad546e9 100644
--- a/codegen/migrate.py
+++ b/codegen/migrate.py
@@ -85,8 +85,9 @@ for packet, packet_name in new_packets.items():
if packet_name not in old_packets.values():
added_or_changed_packets.append(packet)
print('Added packet:', packet, packet_name)
- if new_packets_data[packet].get('instructions') != old_packets_data[packet].get('instructions'):
- print('hmm')
+ if not lib.code.packet.are_packet_instructions_identical(new_packets_data[packet].get('instructions'), old_packets_data[packet].get('instructions')):
+ added_or_changed_packets.append(packet)
+ print('Changed packet:', packet, packet_name)
for packet in added_or_changed_packets:
lib.code.packet.generate_packet(
new_burger_data[0]['packets']['packet'], new_mappings, packet.packet_id, packet.direction, packet.state)