mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 18:36:09 +01:00 
			
		
		
		
	buildcommands: Make sure to not use 96 or more message ids
The mcu code assumes the encoder and parser id is always one byte. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
		| @@ -168,6 +168,9 @@ class HandleCommandGeneration: | |||||||
|             if msg not in self.msg_to_id: |             if msg not in self.msg_to_id: | ||||||
|                 msgid += 1 |                 msgid += 1 | ||||||
|                 self.msg_to_id[msg] = msgid |                 self.msg_to_id[msg] = msgid | ||||||
|  |         if msgid >= 96: | ||||||
|  |             # The mcu currently assumes all message ids encode to one byte | ||||||
|  |             error("Too many message ids") | ||||||
|     def update_data_dictionary(self, data): |     def update_data_dictionary(self, data): | ||||||
|         messages = { msgid: msg for msg, msgid in self.msg_to_id.items() } |         messages = { msgid: msg for msg, msgid in self.msg_to_id.items() } | ||||||
|         data['messages'] = messages |         data['messages'] = messages | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user