Correct and format the documentation example json

This commit is contained in:
fieldOfView 2016-09-23 16:50:57 +02:00
parent 64571bff0b
commit c0839bcfbb

View file

@ -49,25 +49,38 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
# This holds the full JSON file that was received from the last request. # This holds the full JSON file that was received from the last request.
# The JSON looks like: # The JSON looks like:
# {'led': {'saturation': 0.0, 'brightness': 100.0, 'hue': 0.0}, #{
# 'beep': {}, 'network': {'wifi_networks': [], # "led": {"saturation": 0.0, "brightness": 100.0, "hue": 0.0},
# 'ethernet': {'connected': True, 'enabled': True}, # "beep": {},
# 'wifi': {'ssid': 'xxxx', 'connected': False, 'enabled': False}}, # "network": {
# 'diagnostics': {}, # "wifi_networks": [],
# 'bed': {'temperature': {'target': 60.0, 'current': 44.4}}, # "ethernet": {"connected": true, "enabled": true},
# 'heads': [{'max_speed': {'z': 40.0, 'y': 300.0, 'x': 300.0}, # "wifi": {"ssid": "xxxx", "connected": False, "enabled": False}
# 'position': {'z': 20.0, 'y': 6.0, 'x': 180.0}, # },
# 'fan': 0.0, # "diagnostics": {},
# 'jerk': {'z': 0.4, 'y': 20.0, 'x': 20.0}, # "bed": {"temperature": {"target": 60.0, "current": 44.4}},
# 'extruders': [ # "heads": [{
# {'feeder': {'max_speed': 45.0, 'jerk': 5.0, 'acceleration': 3000.0}, # "max_speed": {"z": 40.0, "y": 300.0, "x": 300.0},
# 'active_material': {'GUID': 'xxxxxxx', 'length_remaining': -1.0}, # "position": {"z": 20.0, "y": 6.0, "x": 180.0},
# 'hotend': {'temperature': {'target': 0.0, 'current': 22.8}, 'id': 'AA 0.4'}}, # "fan": 0.0,
# {'feeder': {'max_speed': 45.0, 'jerk': 5.0, 'acceleration': 3000.0}, # "jerk": {"z": 0.4, "y": 20.0, "x": 20.0},
# 'active_material': {'GUID': 'xxxx', 'length_remaining': -1.0}, # "extruders": [
# 'hotend': {'temperature': {'target': 0.0, 'current': 22.8}, 'id': 'BB 0.4'}}], # {
# 'acceleration': 3000.0}], # "feeder": {"max_speed": 45.0, "jerk": 5.0, "acceleration": 3000.0},
# 'status': 'printing'} # "active_material": {"GUID": "xxxxxxx", "length_remaining": -1.0},
# "hotend": {"temperature": {"target": 0.0, "current": 22.8}, "id": "AA 0.4"}
# },
# {
# "feeder": {"max_speed": 45.0, "jerk": 5.0, "acceleration": 3000.0},
# "active_material": {"GUID": "xxxx", "length_remaining": -1.0},
# "hotend": {"temperature": {"target": 0.0, "current": 22.8}, "id": "BB 0.4"}
# }
# ],
# "acceleration": 3000.0
# }],
# "status": "printing"
#}
self._json_printer_state = {} self._json_printer_state = {}
## Todo: Hardcoded value now; we should probably read this from the machine file. ## Todo: Hardcoded value now; we should probably read this from the machine file.