Skip to content

Displays v2#875

Draft
tyeth wants to merge 39 commits intoadafruit:migrate-api-v2from
tyeth:displays-v2
Draft

Displays v2#875
tyeth wants to merge 39 commits intoadafruit:migrate-api-v2from
tyeth:displays-v2

Conversation

@tyeth
Copy link
Member

@tyeth tyeth commented Mar 10, 2026

No description provided.

@tyeth tyeth changed the base branch from main to migrate-api-v2 March 10, 2026 16:21
tyeth and others added 14 commits March 10, 2026 16:24
…ds it's backlight control boolean back as part of write. Other displays need similar control (pwm/bool)
1. src/ws_boards.h — Added ARDUINO_ADAFRUIT_QUALIA_S3_RGB666 board
   definition (BOARD_ID "qualia-s3-rgb666", USE_TINYUSB, USE_PSRAM,
   BOOT_BUTTON 0, no status LED/NeoPixel).

2. platformio.ini — Added [env:adafruit_qualia_s3_rgb666] extending
   common:esp32 with 16MB partitions and moononournation/GFX Library
   for Arduino as a board-specific lib dependency.

3. src/components/display/drivers/dispDrvBase.h — Added default no-pin
   constructor dispDrvBase() {} for board-integrated displays.

4. src/components/display/drivers/dispDrvRgb666.h — NEW file. Full
   RGB666 dotclock driver using Arduino_XCA9554SWSPI +
   Arduino_ESP32RGBPanel + Arduino_RGB_Display. Supports panel
   selection via string ("TL021WVC02" for 2.1" round 480x480,
   "TL032FWV01" for 3.2" bar 320x820). Includes status bar,
   writeMessage, all guarded behind
   #ifdef ARDUINO_ADAFRUIT_QUALIA_S3_RGB666.

5. src/components/display/hardware.h — Added guarded
   #include "drivers/dispDrvRgb666.h" and beginTtlRgb666() declaration.

6. src/components/display/hardware.cpp — Added
   ws_display_Add_ttl_rgb666_tag case to the switch in begin(), and
   implemented beginTtlRgb666() which parses TtlRgb666Config, creates
   the driver with panel selection, and initializes it. Guarded with
   #ifdef/#else so non-Qualia boards get an error message.

7. src/components/display/controller.cpp — Added
   resolveRgb666Defaults() mapping "qualia-round-480x480" ->
   ST7701S/TL021WVC02 and "qualia-bar-320x820" -> ST7701S/TL032FWV01.
   Called from Handle_Display_Add().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
need to refactor display model methods out, and i2c output methods in from i2c to display model, and driver files out of i2c drivers.
@brentru brentru self-requested a review March 11, 2026 17:33
Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall great, some feedback and questions attached.

Please doxygen and clang, too. There's a lot of files that are undocumented.

As mentioned on the PB PR, I'd like to remove mentions of I2C Display/Outputs from i2c.proto, so i2c's model should reflect that too

defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_REVTFT) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_REVTFT) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || \
defined(ARDUINO_ADAFRUIT_QUALIA_S3_RGB666) || \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a definition for this board?

adafruit/Adafruit MAX1704X
adafruit/Adafruit ADT7410 Library
adafruit/Adafruit GFX Library
adafruit/Adafruit ST7735 and ST7789 Library
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to add the new Qualia here, too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done, it uses the moon on our nation Arduino GFX library (L87)

if (width <= 0 || height <= 0) {
if (strcmp(msg->panel, "TL021WVC02") == 0 ||
strcmp(msg->panel, "adafruit-5792") == 0) {
width = 480;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number - can we set this in the driver?

if (brightness < 0) {
brightness = 8; // Set to median brightness if out of range
brightness = 8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to make this a MACRO within OutputBase?

@tyeth
Copy link
Member Author

tyeth commented Mar 13, 2026

@tyeth two things left...

As mentioned on the PB PR, I'd like to remove mentions of I2C Display/Outputs from i2c.proto, so i2c's model should reflect that too

Ensure all mention of i2c display + i2c output removed.

Refactor I2cBase from i2c folder in with drvDisplayBaseI2c.

Double check protos for anything else.

Backlight pin / control per display, and if that's to be exposed and how/where. Kill off the separate proto model ideally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants