diff --git a/api_drivers/common_api_drivers/display/gc9a01/gc9a01.py b/api_drivers/common_api_drivers/display/gc9a01/gc9a01.py index dddc122..df8b4b8 100644 --- a/api_drivers/common_api_drivers/display/gc9a01/gc9a01.py +++ b/api_drivers/common_api_drivers/display/gc9a01/gc9a01.py @@ -1,6 +1,5 @@ # Copyright (c) 2024 - 2025 Kevin G. Schlosser -import time from micropython import const # NOQA import lvgl as lv # NOQA diff --git a/api_drivers/common_api_drivers/display/hx8357c/_hx8357c_init.py b/api_drivers/common_api_drivers/display/hx8357.wip/_hx8357c_init.py similarity index 100% rename from api_drivers/common_api_drivers/display/hx8357c/_hx8357c_init.py rename to api_drivers/common_api_drivers/display/hx8357.wip/_hx8357c_init.py diff --git a/api_drivers/common_api_drivers/display/hx8357c/hx8357c.py b/api_drivers/common_api_drivers/display/hx8357.wip/hx8357c.py similarity index 100% rename from api_drivers/common_api_drivers/display/hx8357c/hx8357c.py rename to api_drivers/common_api_drivers/display/hx8357.wip/hx8357c.py diff --git a/api_drivers/common_api_drivers/display/hx8357d/hx8357d.py b/api_drivers/common_api_drivers/display/hx8357d/hx8357d.py index a325ab6..90b9130 100644 --- a/api_drivers/common_api_drivers/display/hx8357d/hx8357d.py +++ b/api_drivers/common_api_drivers/display/hx8357d/hx8357d.py @@ -13,5 +13,3 @@ class HX8357D(display_driver_framework.DisplayDriver): pass - - diff --git a/api_drivers/common_api_drivers/display/hx8369/hx8369.py b/api_drivers/common_api_drivers/display/hx8369/hx8369.py index 676bbf8..fa48f9b 100644 --- a/api_drivers/common_api_drivers/display/hx8369/hx8369.py +++ b/api_drivers/common_api_drivers/display/hx8369/hx8369.py @@ -3,7 +3,6 @@ import display_driver_framework from micropython import const # NOQA -import lvgl as lv import time TYPE_A = 1 diff --git a/api_drivers/common_api_drivers/display/ili9225/ili9225.py b/api_drivers/common_api_drivers/display/ili9225/ili9225.py index 707df92..8c297bb 100644 --- a/api_drivers/common_api_drivers/display/ili9225/ili9225.py +++ b/api_drivers/common_api_drivers/display/ili9225/ili9225.py @@ -72,7 +72,7 @@ def _on_size_change(self, _): if self._initilized: if rotation <= 1: - value = int(not rotation) + rotation = int(not rotation) self._param_buf[0] = rotation self._param_buf[1] = 0x1C diff --git a/api_drivers/common_api_drivers/display/ili9341/_ili9341_init_type1.py b/api_drivers/common_api_drivers/display/ili9341/_ili9341_init_type1.py index 96b3d18..7b973db 100644 --- a/api_drivers/common_api_drivers/display/ili9341/_ili9341_init_type1.py +++ b/api_drivers/common_api_drivers/display/ili9341/_ili9341_init_type1.py @@ -86,7 +86,7 @@ def init(self): param_buf[0] = pixel_format self.set_params(_COLMOD, param_mv[:1]) - param_buf[:2] = bytearray([0x00, 0x13]) # 0x18 ?? + param_buf[:2] = bytearray([0x00, 0x13]) # 0x18 ?? self.set_params(_FRMCTR1, param_mv[:2]) param_buf[:3] = bytearray([0x08, 0x82, 0x27]) diff --git a/api_drivers/common_api_drivers/display/ili9341/ili9341.py b/api_drivers/common_api_drivers/display/ili9341/ili9341.py index 94029e7..e4ac2c3 100644 --- a/api_drivers/common_api_drivers/display/ili9341/ili9341.py +++ b/api_drivers/common_api_drivers/display/ili9341/ili9341.py @@ -1,6 +1,5 @@ # Copyright (c) 2024 - 2025 Kevin G. Schlosser -import sys import display_driver_framework @@ -14,6 +13,3 @@ class ILI9341(display_driver_framework.DisplayDriver): pass - - - diff --git a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type1.py b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type1.py index 1df1a22..dcf17cb 100644 --- a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type1.py +++ b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type1.py @@ -112,5 +112,3 @@ def init(self): time.sleep_ms(120) # NOQA self.set_params(_DISPON) time.sleep_ms(25) # NOQA - - display_driver_framework.DisplayDriver.init(self) \ No newline at end of file diff --git a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type3.py b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type3.py index cba158d..149cbe4 100644 --- a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type3.py +++ b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type3.py @@ -28,7 +28,7 @@ _SWRESET = const(0x01) -def init(self1): +def init(self): param_buf = bytearray(12) param_mv = memoryview(param_buf) @@ -60,7 +60,6 @@ def init(self1): param_buf[0] = 0x03 self.set_params(_VCOMCTL1, param_mv[:1]) - param_buf[0] = 0x00 param_buf[1] = 0x14 param_buf[2] = 0x33 @@ -75,7 +74,6 @@ def init(self1): param_buf[11] = 0x00 self.set_params(_GAMMASET, param_mv[:12]) - param_buf[0] = 0x00 self.set_params(_IFMODE, param_mv[:1]) diff --git a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type4.py b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type4.py index c980df7..acbce08 100644 --- a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type4.py +++ b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type4.py @@ -74,14 +74,12 @@ def init(self): param_buf[11] = 0x0C self.set_params(_GAMMASET, param_mv[:12]) - param_buf[0] = 0x00 self.set_params(_IFMODE, param_mv[:1]) param_buf[0] = 0xA0 self.set_params(0xE4, param_mv[:1]) - param_buf[0] = 0x01 self.set_params(0xF0, param_mv[:1]) diff --git a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type6.py b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type6.py index 4139be4..5c3c6fd 100644 --- a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type6.py +++ b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type6.py @@ -78,7 +78,6 @@ def init(self): param_buf[11] = 0x00 self.set_params(_GAMMASET, param_mv[:12]) - param_buf[0] = 0x00 self.set_params(_IFMODE, param_mv[:1]) @@ -146,5 +145,3 @@ def init(self): time.sleep_ms(120) # NOQA self.set_params(_DISPON) time.sleep_ms(25) # NOQA - - display_driver_framework.DisplayDriver.init(self) \ No newline at end of file diff --git a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type7.py b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type7.py index 3b659cb..e24fe56 100644 --- a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type7.py +++ b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type7.py @@ -113,5 +113,3 @@ def init(self): time.sleep_ms(120) # NOQA self.set_params(_DISPON) time.sleep_ms(25) # NOQA - - display_driver_framework.DisplayDriver.init(self) \ No newline at end of file diff --git a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type8.py b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type8.py index 1bfbe41..d2864cc 100644 --- a/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type8.py +++ b/api_drivers/common_api_drivers/display/ili9481/_ili9481_init_type8.py @@ -50,7 +50,6 @@ def init(self): param_buf[1] = 0x11 self.set_params(_RDNVSTAT, param_mv[:2]) - param_buf[0] = 0x00 param_buf[1] = 0x3B param_buf[2] = 0x00 diff --git a/api_drivers/common_api_drivers/display/lt768x/_lt768x_init.py b/api_drivers/common_api_drivers/display/lt768x/_lt768x_init.py index 33312ed..7a76c69 100644 --- a/api_drivers/common_api_drivers/display/lt768x/_lt768x_init.py +++ b/api_drivers/common_api_drivers/display/lt768x/_lt768x_init.py @@ -1 +1 @@ -# Copyright (c) 2024 - 2025 Kevin G. Schlosser \ No newline at end of file +# Copyright (c) 2024 - 2025 Kevin G. Schlosser diff --git a/api_drivers/common_api_drivers/display/lt768x/lt768x.py b/api_drivers/common_api_drivers/display/lt768x/lt768x.py index ab6888c..f2ce35f 100644 --- a/api_drivers/common_api_drivers/display/lt768x/lt768x.py +++ b/api_drivers/common_api_drivers/display/lt768x/lt768x.py @@ -1,6 +1,6 @@ # Copyright (c) 2024 - 2025 Kevin G. Schlosser -import ra8876 as _ra8876 +import ra8876 as _ra8876 # NOQA STATE_HIGH = _ra8876.STATE_HIGH diff --git a/api_drivers/common_api_drivers/display/nv3041a/nv3041a.py b/api_drivers/common_api_drivers/display/nv3041a/nv3041a.py index 46d6ac2..0420827 100644 --- a/api_drivers/common_api_drivers/display/nv3041a/nv3041a.py +++ b/api_drivers/common_api_drivers/display/nv3041a/nv3041a.py @@ -115,7 +115,7 @@ def __init__( break except MemoryError: - frame_buffer1 = data_bus.free_framebuffer(frame_buffer1) + frame_buffer1 = data_bus.free_framebuffer(frame_buffer1) # NOQA if frame_buffer1 is None: raise MemoryError( diff --git a/api_drivers/common_api_drivers/display/ra8876/_ra8876_init.py b/api_drivers/common_api_drivers/display/ra8876/_ra8876_init.py index 33312ed..7a76c69 100644 --- a/api_drivers/common_api_drivers/display/ra8876/_ra8876_init.py +++ b/api_drivers/common_api_drivers/display/ra8876/_ra8876_init.py @@ -1 +1 @@ -# Copyright (c) 2024 - 2025 Kevin G. Schlosser \ No newline at end of file +# Copyright (c) 2024 - 2025 Kevin G. Schlosser diff --git a/api_drivers/common_api_drivers/display/ra8876/ra8876.py b/api_drivers/common_api_drivers/display/ra8876/ra8876.py index 5c71421..6c52a2f 100644 --- a/api_drivers/common_api_drivers/display/ra8876/ra8876.py +++ b/api_drivers/common_api_drivers/display/ra8876/ra8876.py @@ -207,15 +207,13 @@ def __init__( offset_x=offset_x, offset_y=offset_y, color_byte_order=color_byte_order, - color_space=lv.COLOR_FORMAT.RGB565, + color_space=lv.COLOR_FORMAT.RGB565, # NOQA rgb565_byte_swap=rgb565_byte_swap ) - def invert_colors(self, value): + def set_invert_colors(self, value): raise NotImplementedError - invert_colors = property(None, invert_colors) - @property def orientation(self): raise NotImplementedError @@ -226,21 +224,21 @@ def orientation(self, value): def _wait(self): if self._wait_pin is not None: - start_time = time.ticks_ms() + start_time = time.ticks_ms() # NOQA while ( self._wait_pin.value() != self._wait_state and - time.ticks_diff(time.ticks_ms(), start_time) < self.WAIT_TIMEOUT + time.ticks_diff(time.ticks_ms(), start_time) < self.WAIT_TIMEOUT # NOQA ): - time.sleep_ms(1) + time.sleep_ms(1) # NOQA def reset(self): if self._reset_pin is None: self.set_params(_SRR) - time.sleep_ms(20) + time.sleep_ms(20) # NOQA else: display_driver_framework.DisplayDriver.reset(self) - time.sleep_ms(50) + time.sleep_ms(50) # NOQA def init( # NOQA self, @@ -256,9 +254,9 @@ def init( # NOQA vstr=12, # vertical start position vpwr=10, # VSYNC pulse width ): - time.sleep_ms(100) + time.sleep_ms(100) # NOQA self.reset() - time.sleep_ms(100) + time.sleep_ms(100) # NOQA self._wait() buf = self._param_buf @@ -350,10 +348,10 @@ def init( # NOQA # reconfigure PLL generator buf[0] = 0x00 self.set_params(_CCR, mv) - time.sleep_us(10) + time.sleep_us(10) # NOQA buf[0] = 0x80 self.set_params(_CCR, mv) - time.sleep_us(10) + time.sleep_us(10) # NOQA # configure SDRAM if dram_ic == IS42SM16160D: @@ -402,7 +400,7 @@ def init( # NOQA self.set_params(_SDRCR, mv) self._wait() - time.sleep_ms(10) + time.sleep_ms(10) # NOQA # set chip config register lane_count = self._data_bus.get_lane_count() diff --git a/api_drivers/common_api_drivers/display/rgb_display/rgb_display.py b/api_drivers/common_api_drivers/display/rgb_display/rgb_display.py index f37d9d7..a960a16 100644 --- a/api_drivers/common_api_drivers/display/rgb_display/rgb_display.py +++ b/api_drivers/common_api_drivers/display/rgb_display/rgb_display.py @@ -1,6 +1,6 @@ # Copyright (c) 2024 - 2025 Kevin G. Schlosser -import rgb_display_framework +import rgb_display_framework # NOQA import lvgl as lv diff --git a/api_drivers/common_api_drivers/display/ssd1306/_ssd1306_init.py b/api_drivers/common_api_drivers/display/ssd1306/_ssd1306_init.py index 40b840f..86d105a 100644 --- a/api_drivers/common_api_drivers/display/ssd1306/_ssd1306_init.py +++ b/api_drivers/common_api_drivers/display/ssd1306/_ssd1306_init.py @@ -1,6 +1,6 @@ # Copyright (c) 2024 - 2025 Kevin G. Schlosser -from micropython import const +from micropython import const # NOQA _SET_CONTRAST = const(0x81) _SET_ENTIRE_ON = const(0xA4) diff --git a/api_drivers/common_api_drivers/display/ssd1306/ssd1306.py b/api_drivers/common_api_drivers/display/ssd1306/ssd1306.py index df344c5..4bd8c37 100644 --- a/api_drivers/common_api_drivers/display/ssd1306/ssd1306.py +++ b/api_drivers/common_api_drivers/display/ssd1306/ssd1306.py @@ -72,7 +72,7 @@ def __init__( break except MemoryError: - frame_buffer1 = data_bus.free_framebuffer(frame_buffer1) + frame_buffer1 = data_bus.free_framebuffer(frame_buffer1) # NOQA if frame_buffer1 is None: raise MemoryError( @@ -119,7 +119,7 @@ def get_power(self): return self._power def set_power(self, value): - self._power = bool(value) + self._power = bool(value) # NOQA if self._power: self.set_params(_DISP_ON) diff --git a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type1.py b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type1.py index 310af13..80abada 100644 --- a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type1.py +++ b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type1.py @@ -16,14 +16,14 @@ def init(self): param_buf[0] = 0x01 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA param_buf[0] = 0x03 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA self.set_params(0x01) - time.sleep_ms(100) + time.sleep_ms(100) # NOQA param_buf[0] = 0x01 param_buf[1] = 0x1F param_buf[2] = 0xFF @@ -64,13 +64,13 @@ def init(self): param_buf[1] = 0x01 self.set_params(0xB8, param_mv[:2]) - param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER + param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER self.set_params(0x36, param_mv[:1]) param_buf[0] = 0x00 self.set_params(0xF0, param_mv[:1]) - time.sleep_ms(1) + time.sleep_ms(1) # NOQA param_buf[0] = 0x0f param_buf[1] = 0x01 self.set_params(0xB8, param_mv[:2]) diff --git a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type2.py b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type2.py index 5c37dc6..e462758 100644 --- a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type2.py +++ b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type2.py @@ -16,14 +16,14 @@ def init(self): param_buf[0] = 0x01 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA param_buf[0] = 0x03 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA self.set_params(0x01) - time.sleep_ms(100) + time.sleep_ms(100) # NOQA param_buf[0] = 0x03 param_buf[1] = 0xFF param_buf[2] = 0xFF @@ -64,13 +64,13 @@ def init(self): param_buf[1] = 0x01 self.set_params(0xB8, param_mv[:2]) - param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER + param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER self.set_params(0x36, param_mv[:1]) param_buf[0] = 0x00 self.set_params(0xF0, param_mv[:1]) - time.sleep_ms(1) + time.sleep_ms(1) # NOQA param_buf[0] = 0x0f param_buf[1] = 0x01 self.set_params(0xB8, param_mv[:2]) diff --git a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type3.py b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type3.py index eceafb0..7e00300 100644 --- a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type3.py +++ b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type3.py @@ -16,14 +16,14 @@ def init(self): param_buf[0] = 0x01 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA param_buf[0] = 0x03 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA self.set_params(0x01) - time.sleep_ms(100) + time.sleep_ms(100) # NOQA param_buf[0] = 0x04 param_buf[1] = 0x93 param_buf[2] = 0xE0 @@ -64,13 +64,13 @@ def init(self): param_buf[1] = 0x01 self.set_params(0xB8, param_mv[:2]) - param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER + param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER self.set_params(0x36, param_mv[:1]) param_buf[0] = 0x00 self.set_params(0xF0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA param_buf[0] = 0 param_buf[1] = 0 param_buf[2] = (479 & 0xFF00) >> 8 diff --git a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type4.py b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type4.py index 3633ac8..ab0e1ae 100644 --- a/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type4.py +++ b/api_drivers/common_api_drivers/display/ssd1963/_ssd1963_init_type4.py @@ -16,14 +16,14 @@ def init(self): param_buf[0] = 0x01 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA param_buf[0] = 0x03 self.set_params(0xE0, param_mv[:1]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA self.set_params(0x01) - time.sleep_ms(100) + time.sleep_ms(100) # NOQA param_buf[0] = 0x03 param_buf[1] = 0x33 param_buf[2] = 0x33 @@ -64,7 +64,7 @@ def init(self): param_buf[0] = 0x01 self.set_params(0xBA, param_mv[:1]) - param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER + param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER self.set_params(0x36, param_mv[:1]) param_buf[0] = 0x00 @@ -76,7 +76,7 @@ def init(self): param_buf[3] = 0x01 self.set_params(0xBC, param_mv[:4]) - time.sleep_ms(10) + time.sleep_ms(10) # NOQA self.set_params(0x29) param_buf[0] = 0x06 diff --git a/api_drivers/common_api_drivers/display/ssd1963/ssd1963.py b/api_drivers/common_api_drivers/display/ssd1963/ssd1963.py index 6227d71..af31eec 100644 --- a/api_drivers/common_api_drivers/display/ssd1963/ssd1963.py +++ b/api_drivers/common_api_drivers/display/ssd1963/ssd1963.py @@ -18,5 +18,3 @@ class SSD1963(display_driver_framework.DisplayDriver): pass - - diff --git a/api_drivers/common_api_drivers/display/st7701/_st7701_type17.py b/api_drivers/common_api_drivers/display/st7701/_st7701_type17.py index d5455ff..74e3f33 100644 --- a/api_drivers/common_api_drivers/display/st7701/_st7701_type17.py +++ b/api_drivers/common_api_drivers/display/st7701/_st7701_type17.py @@ -75,7 +75,7 @@ def init(self): param_buf[0] = 0x78 self.set_params(0xC2, param_mv[:1]) - time.sleep_ms(20) + time.sleep_ms(20) # NOQA param_buf[:3] = bytearray([0x00, 0x1B, 0x02]) self.set_params(0xE0, param_mv[:3]) diff --git a/api_drivers/common_api_drivers/display/st7701/st7701.py b/api_drivers/common_api_drivers/display/st7701/st7701.py index 1f08f5c..0009587 100644 --- a/api_drivers/common_api_drivers/display/st7701/st7701.py +++ b/api_drivers/common_api_drivers/display/st7701/st7701.py @@ -4,7 +4,7 @@ import lvgl as lv # NOQA import lcd_bus # NOQA -import rgb_display_framework +import rgb_display_framework # NOQA STATE_HIGH = rgb_display_framework.STATE_HIGH diff --git a/api_drivers/common_api_drivers/display/st7735/st7735.py b/api_drivers/common_api_drivers/display/st7735/st7735.py index 841cf5f..599dd7f 100644 --- a/api_drivers/common_api_drivers/display/st7735/st7735.py +++ b/api_drivers/common_api_drivers/display/st7735/st7735.py @@ -45,4 +45,4 @@ def init(self, type): # NOQA _MADCTL_MY | _MADCTL_MX, _MADCTL_MV | _MADCTL_MX ) - display_driver_framework.DisplayDriver.init(self, type) + display_driver_framework.DisplayDriver.init(self, type) # NOQA diff --git a/api_drivers/common_api_drivers/display/st7789/st7789.py b/api_drivers/common_api_drivers/display/st7789/st7789.py index 4ba5fdf..26b9b3a 100644 --- a/api_drivers/common_api_drivers/display/st7789/st7789.py +++ b/api_drivers/common_api_drivers/display/st7789/st7789.py @@ -78,4 +78,3 @@ def __init__( _param_bits=8, _init_bus=True ) - diff --git a/api_drivers/common_api_drivers/indev/cst328.py b/api_drivers/common_api_drivers/indev/cst328.py index e6c392f..6f7dc02 100644 --- a/api_drivers/common_api_drivers/indev/cst328.py +++ b/api_drivers/common_api_drivers/indev/cst328.py @@ -77,7 +77,7 @@ def __init__( device, reset_pin=None, touch_cal=None, - startup_rotation=pointer_framework.lv.DISPLAY_ROTATION._0, + startup_rotation=pointer_framework.lv.DISPLAY_ROTATION._0, # NOQA debug=False ): self._tx_buf = bytearray(3) diff --git a/api_drivers/common_api_drivers/indev/cst340.py b/api_drivers/common_api_drivers/indev/cst340.py.wip similarity index 100% rename from api_drivers/common_api_drivers/indev/cst340.py rename to api_drivers/common_api_drivers/indev/cst340.py.wip diff --git a/api_drivers/common_api_drivers/indev/cst816s.py b/api_drivers/common_api_drivers/indev/cst816s.py index ea10576..146bdae 100644 --- a/api_drivers/common_api_drivers/indev/cst816s.py +++ b/api_drivers/common_api_drivers/indev/cst816s.py @@ -171,7 +171,7 @@ def __init__( device, reset_pin=None, touch_cal=None, - startup_rotation=pointer_framework.lv.DISPLAY_ROTATION._0, + startup_rotation=pointer_framework.lv.DISPLAY_ROTATION._0, # NOQA debug=False ): self._tx_buf = bytearray(2) diff --git a/api_drivers/common_api_drivers/indev/focaltech_touch.py b/api_drivers/common_api_drivers/indev/focaltech_touch.py index 9ef543b..5e0f6d1 100644 --- a/api_drivers/common_api_drivers/indev/focaltech_touch.py +++ b/api_drivers/common_api_drivers/indev/focaltech_touch.py @@ -59,7 +59,7 @@ def __init__( self._read_reg(_PANEL_ID_REG) print("Touch Device ID: 0x%02x" % self._rx_buf[0]) - ven_id = self._rx_buf[0] + ven_id = self._rx_buf[0] # NOQA self._read_reg(_CHIPID_REG) print("Touch Chip ID: 0x%02x" % self._rx_buf[0]) diff --git a/api_drivers/common_api_drivers/indev/sdl_keyboard.py b/api_drivers/common_api_drivers/indev/sdl_keyboard.py index 730a732..ab6c67a 100644 --- a/api_drivers/common_api_drivers/indev/sdl_keyboard.py +++ b/api_drivers/common_api_drivers/indev/sdl_keyboard.py @@ -165,14 +165,14 @@ def __init__(self, *args, **kwargs): # NOQA self.__current_state = self.RELEASED self.group = lv.group_create() - self.group.set_default() + self.group.set_default() # NOQA self.set_group(self.group) - self.set_mode(lv.INDEV_MODE.EVENT) + self.set_mode(lv.INDEV_MODE.EVENT) # NOQA self._py_disp_drv._data_bus.register_keypad_callback(self._keypad_cb) # NOQA def set_mode(self, mode): - self._indev_drv.set_mode(mode) + self._indev_drv.set_mode(mode) # NOQA def _keypad_cb(self, *args): _, state, key, mod = args @@ -201,21 +201,21 @@ def _keypad_cb(self, *args): else: mapping = { KEYPAD_0: KEY_INSERT, - KEYPAD_1: lv.KEY.END, - KEYPAD_2: lv.KEY.DOWN, - KEYPAD_3: lv.KEY.PREV, - KEYPAD_4: lv.KEY.LEFT, + KEYPAD_1: lv.KEY.END, # NOQA + KEYPAD_2: lv.KEY.DOWN, # NOQA + KEYPAD_3: lv.KEY.PREV, # NOQA + KEYPAD_4: lv.KEY.LEFT, # NOQA KEYPAD_5: KEY_5, - KEYPAD_6: lv.KEY.RIGHT, - KEYPAD_7: lv.KEY.HOME, - KEYPAD_8: lv.KEY.UP, - KEYPAD_9: lv.KEY.NEXT, - KEYPAD_PERIOD: lv.KEY.DEL, + KEYPAD_6: lv.KEY.RIGHT, # NOQA + KEYPAD_7: lv.KEY.HOME, # NOQA + KEYPAD_8: lv.KEY.UP, # NOQA + KEYPAD_9: lv.KEY.NEXT, # NOQA + KEYPAD_PERIOD: lv.KEY.DEL, # NOQA KEYPAD_DIVIDE: KEY_SLASH, KEYPAD_MULTIPLY: KEY_ASTERISK, KEYPAD_MINUS: KEY_MINUS, KEYPAD_PLUS: KEY_PLUS, - KEYPAD_ENTER: lv.KEY.ENTER, + KEYPAD_ENTER: lv.KEY.ENTER, # NOQA KEYPAD_EQUALS: KEY_EQUALS } @@ -224,19 +224,19 @@ def _keypad_cb(self, *args): return else: mapping = { - KEY_BACKSPACE: lv.KEY.BACKSPACE, - KEY_TAB: lv.KEY.NEXT, - KEY_RETURN: lv.KEY.ENTER, - KEY_ESCAPE: lv.KEY.ESC, - KEY_DELETE: lv.KEY.DEL, - KEY_UP: lv.KEY.UP, - KEY_DOWN: lv.KEY.DOWN, - KEY_RIGHT: lv.KEY.RIGHT, - KEY_LEFT: lv.KEY.LEFT, - KEY_HOME: lv.KEY.HOME, - KEY_END: lv.KEY.END, - KEY_PAGEDOWN: lv.KEY.PREV, - KEY_PAGEUP: lv.KEY.NEXT + KEY_BACKSPACE: lv.KEY.BACKSPACE, # NOQA + KEY_TAB: lv.KEY.NEXT, # NOQA + KEY_RETURN: lv.KEY.ENTER, # NOQA + KEY_ESCAPE: lv.KEY.ESC, # NOQA + KEY_DELETE: lv.KEY.DEL, # NOQA + KEY_UP: lv.KEY.UP, # NOQA + KEY_DOWN: lv.KEY.DOWN, # NOQA + KEY_RIGHT: lv.KEY.RIGHT, # NOQA + KEY_LEFT: lv.KEY.LEFT, # NOQA + KEY_HOME: lv.KEY.HOME, # NOQA + KEY_END: lv.KEY.END, # NOQA + KEY_PAGEDOWN: lv.KEY.PREV, # NOQA + KEY_PAGEUP: lv.KEY.NEXT # NOQA } self.__last_key = mapping.get(key, key) diff --git a/api_drivers/common_api_drivers/indev/sdl_pointer.py b/api_drivers/common_api_drivers/indev/sdl_pointer.py index f4c7f00..1abccda 100644 --- a/api_drivers/common_api_drivers/indev/sdl_pointer.py +++ b/api_drivers/common_api_drivers/indev/sdl_pointer.py @@ -9,10 +9,10 @@ class SDLPointer(pointer_framework.PointerDriver): def __init__( self, - *args, + *_, startup_rotation=pointer_framework.lv.DISPLAY_ROTATION._0, # NOQA debug=False, - **kwargs + **__ ): # NOQA super().__init__( touch_cal=None, startup_rotation=startup_rotation, debug=debug @@ -25,12 +25,12 @@ def __init__( self.__wheel_y = 0 self.__scroll_obj = None self.__button_state = self.RELEASED - self.set_mode(lv.INDEV_MODE.EVENT) + self.set_mode(lv.INDEV_MODE.EVENT) # NOQA self._py_disp_drv._data_bus.register_mouse_callback(self._mouse_cb) # NOQA def set_mode(self, mode): - self._indev_drv.set_mode(mode) + self._indev_drv.set_mode(mode) # NOQA def _get_object(self): if not self.__wheel_x and not self.__wheel_y: @@ -47,14 +47,14 @@ def _get_object(self): obj = lv.indev_search_obj(self._disp_drv.get_layer_bottom(), point) if obj: - dir_flags = obj.get_scroll_dir() + dir_flags = obj.get_scroll_dir() # NOQA - if self.__wheel_x and dir_flags | lv.DIR.HOR == dir_flags: + if self.__wheel_x and dir_flags | lv.DIR.HOR == dir_flags: # NOQA pass else: self.__wheel_x = 0 - if self.__wheel_y and dir_flags | lv.DIR.VER == dir_flags: + if self.__wheel_y and dir_flags | lv.DIR.VER == dir_flags: # NOQA pass else: self.__wheel_y = 0 diff --git a/builder/__init__.py b/builder/__init__.py index 0d8c636..c0e3b9c 100644 --- a/builder/__init__.py +++ b/builder/__init__.py @@ -279,6 +279,9 @@ def generate_manifest( path = f'{script_dir}/api_drivers/common_api_drivers/io_expander' for file in os.listdir(path): + if '.wip' in file: + continue + if file.endswith('.py'): name = file[:-3] io_expanders.append(name) @@ -287,6 +290,9 @@ def generate_manifest( indevs.remove('all') path = f'{script_dir}/api_drivers/common_api_drivers/indev' for file in os.listdir(path): + if '.wip' in file: + continue + if ( file == 'focaltech_touch.py' or file == 'evdev' or @@ -306,6 +312,9 @@ def generate_manifest( if file.endswith('.py'): continue + if '.wip' in file: + continue + displays.append(file) for file in io_expanders: