|
25 | 25 |
|
26 | 26 | import os |
27 | 27 |
|
| 28 | +from version import __version__ |
| 29 | + |
28 | 30 | from lib.adafruit_drv2605 import DRV2605 ### This is Hacky V5a Devel Stuff### |
29 | 31 | from lib.adafruit_mcp230xx.mcp23017 import ( |
30 | 32 | MCP23017, ### This is Hacky V5a Devel Stuff### |
|
49 | 51 | from lib.pysquared.rtc.manager.microcontroller import MicrocontrollerManager |
50 | 52 | from lib.pysquared.sleep_helper import SleepHelper |
51 | 53 | from lib.pysquared.watchdog import Watchdog |
52 | | -from version import __version__ |
53 | 54 |
|
54 | 55 | rtc = MicrocontrollerManager() |
55 | 56 |
|
@@ -283,21 +284,21 @@ def __init__(self, add: int, pos: str, tca: TCA9548A, logger: Logger) -> None: |
283 | 284 | def sensor_init(self, senlist, address) -> None: |
284 | 285 | if "MCP" in senlist: |
285 | 286 | try: |
286 | | - self.mcp: MCP9808 = MCP9808(self.tca[address], address=27) |
| 287 | + self.mcp = MCP9808(self.tca[address], address=27) |
287 | 288 | self.sensors["MCP"] = True |
288 | 289 | except Exception as e: |
289 | 290 | self.logger.error("Error Initializing Temperature Sensor", e) |
290 | 291 |
|
291 | 292 | if "VEML" in senlist: |
292 | 293 | try: |
293 | | - self.veml: VEML7700 = VEML7700(self.tca[address]) |
| 294 | + self.veml = VEML7700(self.tca[address]) |
294 | 295 | self.sensors["VEML"] = True |
295 | 296 | except Exception as e: |
296 | 297 | self.logger.error("Error Initializing Light Sensor", e) |
297 | 298 |
|
298 | 299 | if "DRV" in senlist: |
299 | 300 | try: |
300 | | - self.drv: DRV2605 = DRV2605(self.tca[address]) |
| 301 | + self.drv = DRV2605(self.tca[address]) |
301 | 302 | self.sensors["DRV"] = True |
302 | 303 | except Exception as e: |
303 | 304 | self.logger.error("Error Initializing Motor Driver", e) |
@@ -328,14 +329,14 @@ def face_test_all(self) -> list[list[float]]: |
328 | 329 | if face: |
329 | 330 | try: |
330 | 331 | temp: Union[float, None] = ( |
331 | | - face.mcp.temperature if face.sensors.get("MCP") else None |
| 332 | + face.mcp.temperature if face.sensors.get("MCP") else None # type: ignore |
332 | 333 | ) |
333 | 334 | light: Union[float, None] = ( |
334 | | - face.veml.lux if face.sensors.get("VEML") else None |
| 335 | + face.veml.lux if face.sensors.get("VEML") else None # type: ignore |
335 | 336 | ) |
336 | | - results.append([temp, light]) |
| 337 | + results.append([temp, light]) # type: ignore |
337 | 338 | except Exception: |
338 | | - results.append([None, None]) |
| 339 | + results.append([None, None]) # type: ignore |
339 | 340 | return results |
340 | 341 |
|
341 | 342 |
|
|
0 commit comments