MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / getConnection

Method getConnection

src/astroprint/plugin/services/printer.py:244–255  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

242 ##Printer connection
243
244 def getConnection(self):
245
246 pm = printerManager()
247
248 state, port, baudrate = pm.getCurrentConnection()
249 current = {
250 "state": state,
251 "port": port,
252 "baudrate": baudrate
253 }
254
255 return { 'current': current, 'option': pm.getConnectionOptions() }
256
257
258 ##Temperature

Callers

nothing calls this directly

Calls 3

printerManagerFunction · 0.90
getCurrentConnectionMethod · 0.45
getConnectionOptionsMethod · 0.45

Tested by

no test coverage detected