|
46 | 46 | import os
|
47 | 47 | import time
|
48 | 48 | import gc
|
49 |
| -import rtc |
50 | 49 | import supervisor
|
51 | 50 | import board
|
52 | 51 | import busio
|
|
62 | 61 | from adafruit_display_text.text_area import TextArea
|
63 | 62 | from adafruit_esp32spi import adafruit_esp32spi
|
64 | 63 | import adafruit_esp32spi.adafruit_esp32spi_requests as requests
|
| 64 | +import rtc |
65 | 65 |
|
66 | 66 | try:
|
67 | 67 | from settings import settings
|
@@ -135,7 +135,7 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
|
135 | 135 | self._debug = debug
|
136 | 136 |
|
137 | 137 | try:
|
138 |
| - self._backlight = pulseio.PWMOut(board.TFT_BACKLIGHT) |
| 138 | + self._backlight = pulseio.PWMOut(board.TFT_BACKLIGHT) # pylint: disable=no-member |
139 | 139 | except ValueError:
|
140 | 140 | self._backlight = None
|
141 | 141 | self.set_backlight(1.0) # turn on backlight
|
@@ -168,11 +168,13 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
|
168 | 168 | # Make ESP32 connection
|
169 | 169 | if self._debug:
|
170 | 170 | print("Init ESP32")
|
| 171 | + # pylint: disable=no-member |
171 | 172 | esp32_cs = DigitalInOut(microcontroller.pin.PB14) # PB14
|
172 | 173 | esp32_ready = DigitalInOut(microcontroller.pin.PB16)
|
173 | 174 | esp32_gpio0 = DigitalInOut(microcontroller.pin.PB15)
|
174 | 175 | esp32_reset = DigitalInOut(microcontroller.pin.PB17)
|
175 | 176 | spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
|
| 177 | + # pylint: enable=no-member |
176 | 178 |
|
177 | 179 | if not self._uselocal:
|
178 | 180 | self._esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset,
|
@@ -263,13 +265,15 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
|
263 | 265 |
|
264 | 266 | if self._debug:
|
265 | 267 | print("Init touchscreen")
|
| 268 | + # pylint: disable=no-member |
266 | 269 | self.touchscreen = adafruit_touchscreen.Touchscreen(microcontroller.pin.PB01,
|
267 | 270 | microcontroller.pin.PB08,
|
268 | 271 | microcontroller.pin.PA06,
|
269 | 272 | microcontroller.pin.PB00,
|
270 | 273 | calibration=((5200, 59000),
|
271 | 274 | (5800, 57000)),
|
272 | 275 | size=(320, 240))
|
| 276 | + # pylint: enable=no-member |
273 | 277 |
|
274 | 278 | self.set_backlight(1.0) # turn on backlight
|
275 | 279 | gc.collect()
|
|
0 commit comments