[MAINT] Duplicate DisplayDriverTFT code across boards #8

Open
opened 2026-05-29 22:23:00 +00:00 by david · 0 comments
Owner

Problem

boards/esp32-32e/DisplayDriverTFT.cpp and boards/esp32-32e-4/DisplayDriverTFT.cpp are nearly identical (~330 lines each) with only minor differences:

  • esp32-32e-4 has transformTouch() for rotated panel
  • esp32-32e-4 has drawStatus() method
  • Font sizes differ slightly

Code duplication makes maintenance harder.

Fix

Extract common code to shared base class or template, or use build-time configuration to handle minor differences.

## Problem `boards/esp32-32e/DisplayDriverTFT.cpp` and `boards/esp32-32e-4/DisplayDriverTFT.cpp` are nearly identical (~330 lines each) with only minor differences: - esp32-32e-4 has `transformTouch()` for rotated panel - esp32-32e-4 has `drawStatus()` method - Font sizes differ slightly Code duplication makes maintenance harder. ## Fix Extract common code to shared base class or template, or use build-time configuration to handle minor differences.
david added the enhancement label 2026-05-29 22:23:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: klubhaus/klubhaus-doorbell#8