gcode_apis: Add configparser support
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
98b3c990e0
commit
5853f3f447
|
@ -7,8 +7,8 @@
|
||||||
GCODE_ENDPOINT = "gcode/script"
|
GCODE_ENDPOINT = "gcode/script"
|
||||||
|
|
||||||
class GCodeAPIs:
|
class GCodeAPIs:
|
||||||
def __init__(self, server):
|
def __init__(self, config):
|
||||||
self.server = server
|
self.server = config.get_server()
|
||||||
|
|
||||||
# Register GCode Endpoints
|
# Register GCode Endpoints
|
||||||
self.server.register_endpoint(
|
self.server.register_endpoint(
|
||||||
|
@ -63,5 +63,5 @@ class GCodeAPIs:
|
||||||
async def gcode_firmware_restart(self, path, method, args):
|
async def gcode_firmware_restart(self, path, method, args):
|
||||||
return await self._send_gcode("FIRMWARE_RESTART")
|
return await self._send_gcode("FIRMWARE_RESTART")
|
||||||
|
|
||||||
def load_plugin(server):
|
def load_plugin(config):
|
||||||
return GCodeAPIs(server)
|
return GCodeAPIs(config)
|
||||||
|
|
Loading…
Reference in New Issue