mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 10:25:57 +01:00 
			
		
		
		
	buildcommands: Detect duplicate strings when generating static string ids
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
		| @@ -69,9 +69,12 @@ STATIC_STRING_MIN = 2 | ||||
| class HandleStaticStrings: | ||||
|     def __init__(self): | ||||
|         self.static_strings = [] | ||||
|         self.found_strings = {} | ||||
|         self.ctr_dispatch = { '_DECL_STATIC_STR': self.decl_static_str } | ||||
|     def decl_static_str(self, req): | ||||
|         msg = req.split(None, 1)[1] | ||||
|         if msg not in self.found_strings: | ||||
|             self.found_strings[msg] = 1 | ||||
|             self.static_strings.append(msg) | ||||
|     def update_data_dictionary(self, data): | ||||
|         data['static_strings'] = { i + STATIC_STRING_MIN: s | ||||
|   | ||||
		Reference in New Issue
	
	Block a user