diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py index 14295a616..72e68c1ed 100644 --- a/bin/platformio-custom.py +++ b/bin/platformio-custom.py @@ -156,6 +156,6 @@ for lb in env.GetLibBuilders(): ps = patch.fromfile(patch_path) if not ps.apply(0, lb.src_dir): print(f"Failed to apply patch {patch_path}") - exit(1) + continue # XXX print(f"Patched {lb.name}") open(marker_path, "w").close() diff --git a/patches/LovyanGFX.patch b/patches/LovyanGFX.patch new file mode 100644 index 000000000..a43a1bbbd --- /dev/null +++ b/patches/LovyanGFX.patch @@ -0,0 +1,40 @@ +Based on https://github.com/lovyan03/LovyanGFX/tree/bus-s3-rgb +Only for develop branch + +diff --git a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp +index 93db22d..28ed755 100644 +--- a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp ++++ b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp +@@ -44,6 +44,13 @@ Contributors: + #include + #endif + ++#if SOC_LCDCAM_RGB_LCD_SUPPORTED || CONFIG_SOC_LCDCAM_RGB_LCD_SUPPORTED || (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)) ++ // lcd_periph_signals() function was renamed to lcd_periph_rgb_signals() ++ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_rgb_signals ++#else ++ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_signals ++#endif ++ + namespace lgfx + { + inline namespace v1 +@@ -156,7 +163,7 @@ namespace lgfx + static constexpr const uint8_t rgb332sig_tbl[] = { 1, 0, 1, 0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 5, 6, 7 }; + static constexpr const uint8_t rgb565sig_tbl[] = { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7 }; + auto tbl = (pixel_bytes == 2) ? rgb565sig_tbl : rgb332sig_tbl; +- auto sigs = lcd_periph_signals.panels[_cfg.port]; ++ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port]; + for (size_t i = 0; i < 16; i++) { + _gpio_pin_sig(_cfg.pin_data[i], sigs.data_sigs[tbl[i]]); + } +@@ -304,7 +311,8 @@ namespace lgfx + dev->lc_dma_int_ena.val = 1; + + int isr_flags = ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_SHARED; +- esp_intr_alloc_intrstatus(lcd_periph_signals.panels[_cfg.port].irq_id, isr_flags, ++ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port]; ++ esp_intr_alloc_intrstatus(sigs.irq_id, isr_flags, + (uint32_t)&dev->lc_dma_int_st, + LCD_LL_EVENT_VSYNC_END, lcd_default_isr_handler, this, &_intr_handle); + esp_intr_enable(_intr_handle); diff --git a/src/Power.cpp b/src/Power.cpp index 6f4fc0acc..28bc21ed9 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -439,6 +439,8 @@ class AnalogBatteryLevel : public HasBatteryLevel return isBatteryConnect() && isVbusIn(); #endif #endif + // XXX #defines above eat all the code on seeed-sensecap-indicator-tft + return false; } private: diff --git a/src/graphics/niche/InkHUD/MessageStore.cpp b/src/graphics/niche/InkHUD/MessageStore.cpp index ac6fe1b35..f359c989b 100644 --- a/src/graphics/niche/InkHUD/MessageStore.cpp +++ b/src/graphics/niche/InkHUD/MessageStore.cpp @@ -10,7 +10,7 @@ using namespace NicheGraphics; // Avoid filling the storage if something goes wrong // Normal usage should be well below this size constexpr uint8_t MAX_MESSAGES_SAVED = 10; -constexpr uint32_t MAX_MESSAGE_SIZE = 250; +constexpr size_t MAX_MESSAGE_SIZE = 250; InkHUD::MessageStore::MessageStore(std::string label) {