mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 10:25:57 +01:00 
			
		
		
		
	gcode_macro: Add support "x in printer" to templates
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
		| @@ -28,6 +28,12 @@ class GetStatusWrapper: | ||||
|             self.eventtime = self.printer.get_reactor().monotonic() | ||||
|         self.cache[sval] = res = dict(po.get_status(self.eventtime)) | ||||
|         return res | ||||
|     def __contains__(self, val): | ||||
|         try: | ||||
|             self.__getitem__(val) | ||||
|         except KeyError as e: | ||||
|             return False | ||||
|         return True | ||||
|  | ||||
| # Wrapper around a Jinja2 template | ||||
| class TemplateWrapper: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user