mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 10:25:57 +01:00 
			
		
		
		
	mcu: Log the MCU configuration during connect phase
Log the constants reported by the MCU and log the number of move items allocated after configuration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
		| @@ -457,11 +457,11 @@ class MCU: | |||||||
|                 config_params = self.serial.send_with_response(msg, 'config') |                 config_params = self.serial.send_with_response(msg, 'config') | ||||||
|         if self._config_crc != config_params['crc']: |         if self._config_crc != config_params['crc']: | ||||||
|             raise error("Printer CRC does not match config") |             raise error("Printer CRC does not match config") | ||||||
|         logging.info("Configured") |         move_count = config_params['move_count'] | ||||||
|  |         logging.info("Configured (%d moves)" % (move_count,)) | ||||||
|         stepqueues = tuple(s._stepqueue for s in self._steppers) |         stepqueues = tuple(s._stepqueue for s in self._steppers) | ||||||
|         self._steppersync = self.ffi_lib.steppersync_alloc( |         self._steppersync = self.ffi_lib.steppersync_alloc( | ||||||
|             self.serial.serialqueue, stepqueues, len(stepqueues), |             self.serial.serialqueue, stepqueues, len(stepqueues), move_count) | ||||||
|             config_params['move_count']) |  | ||||||
|         for cb in self._init_callbacks: |         for cb in self._init_callbacks: | ||||||
|             cb() |             cb() | ||||||
|     # Config creation helpers |     # Config creation helpers | ||||||
|   | |||||||
| @@ -88,6 +88,8 @@ class SerialReader: | |||||||
|         self.register_callback(self.handle_unknown, '#unknown') |         self.register_callback(self.handle_unknown, '#unknown') | ||||||
|         logging.info("Loaded %d commands (%s)" % ( |         logging.info("Loaded %d commands (%s)" % ( | ||||||
|             len(msgparser.messages_by_id), msgparser.version)) |             len(msgparser.messages_by_id), msgparser.version)) | ||||||
|  |         logging.info("MCU config: %s" % (" ".join( | ||||||
|  |             ["%s=%s" % (k, v) for k, v in msgparser.config.items()]))) | ||||||
|         # Setup for runtime |         # Setup for runtime | ||||||
|         mcu_baud = float(msgparser.config.get('SERIAL_BAUD', 0.)) |         mcu_baud = float(msgparser.config.get('SERIAL_BAUD', 0.)) | ||||||
|         if mcu_baud: |         if mcu_baud: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user