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

Method _simulateGetPicAsync

src/astroprint/camera/mac.py:92–101  ·  view source on GitHub ↗
(self, done, text)

Source from the content-addressed store, hash-verified

90 return resolution == '640x480'
91
92 def _simulateGetPicAsync(self, done, text):
93 fileCount = len(self._files)
94 image = None
95
96 if fileCount:
97 imageFile = self._files[randrange(fileCount)]
98 with open(imageFile, "r") as f:
99 image = f.read()
100
101 done(image)
102
103 def reScan(self, broadcastChange = True):
104 return True

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected