mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 10:25:57 +01:00 
			
		
		
		
	load_cell: Don't start sensor on startup
Also, don't report an empty status. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
		| @@ -11,11 +11,6 @@ class LoadCell: | ||||
|     def __init__(self, config, sensor): | ||||
|         self.printer = printer = config.get_printer() | ||||
|         self.sensor = sensor   # must implement BulkAdcSensor | ||||
|         # startup, when klippy is ready, start capturing data | ||||
|         printer.register_event_handler("klippy:ready", self._handle_ready) | ||||
|  | ||||
|     def _handle_ready(self): | ||||
|         self.sensor.add_client(self._on_sample) | ||||
|  | ||||
|     def _on_sample(self, msg): | ||||
|         return True | ||||
| @@ -23,9 +18,6 @@ class LoadCell: | ||||
|     def get_sensor(self): | ||||
|         return self.sensor | ||||
|  | ||||
|     def get_status(self, eventtime): | ||||
|         return {} | ||||
|  | ||||
| def load_config(config): | ||||
|     # Sensor types | ||||
|     sensors = {} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user