Add CYD-2432S024R Support#521
Conversation
Updated display configuration to swap axes and mirror display.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds support for a new device target "cyd-2432s024r". Changes include a CI matrix entry for the board, a CMake component under Devices/cyd-2432s024r, device-specific sources (hardware Configuration with exported 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
KenVanHoeylandt
left a comment
There was a problem hiding this comment.
Looks good! I only have 2 small remarks.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
Devices/cyd-2432s024r/Source/devices/SdCard.h (1)
3-7: Avoid exportingusingdeclarations from headers.Line 5 introduces namespace leakage to every includer. Prefer a fully-qualified return type in the declaration.
Proposed refactor
`#pragma` once `#include` "Tactility/hal/sdcard/SdCardDevice.h" +#include <memory> -using tt::hal::sdcard::SdCardDevice; - -std::shared_ptr<SdCardDevice> createSdCard(); +std::shared_ptr<tt::hal::sdcard::SdCardDevice> createSdCard();Devices/cyd-2432s024r/CMakeLists.txt (1)
1-5: PreferSRC_DIRSover recursive source globbing here.Line 1’s glob adds avoidable fragility and diverges from existing component CMake patterns in this repo.
Proposed refactor
-file(GLOB_RECURSE SOURCE_FILES Source/*.c*) - idf_component_register( - SRCS ${SOURCE_FILES} + SRC_DIRS "Source" INCLUDE_DIRS "Source" REQUIRES Tactility esp_lvgl_port ILI934x XPT2046 PwmBacklight driver vfs fatfs )
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 084a76c0-bf93-41a4-b4c0-2286fef92683
📒 Files selected for processing (11)
.github/workflows/build.ymlDevices/cyd-2432s024r/CMakeLists.txtDevices/cyd-2432s024r/Source/Configuration.cppDevices/cyd-2432s024r/Source/devices/Display.cppDevices/cyd-2432s024r/Source/devices/Display.hDevices/cyd-2432s024r/Source/devices/SdCard.cppDevices/cyd-2432s024r/Source/devices/SdCard.hDevices/cyd-2432s024r/Source/module.cppDevices/cyd-2432s024r/cyd,2432s024r.dtsDevices/cyd-2432s024r/device.propertiesDevices/cyd-2432s024r/devicetree.yaml
There was a problem hiding this comment.
♻️ Duplicate comments (1)
Devices/cyd-2432s024r/Source/devices/Display.cpp (1)
39-39:⚠️ Potential issue | 🔴 CriticalPass a real SPI bus handle to
createTouch, not a host-device enum.Line 39 passes
spi_configuration->spiHostDeviceintocreateTouch(esp_lcd_spi_bus_handle_t). IfspiHostDeviceisspi_host_device_t, this is a hard type/API mismatch and can break touch SPI initialization.Use this read-only check to confirm the type definitions and call-site compatibility:
#!/bin/bash set -euo pipefail echo "== Xpt2046Touch configuration signature ==" rg -n -C3 'class Configuration|esp_lcd_spi_bus_handle_t|Configuration\(' --iglob '*Xpt2046Touch.h' echo echo "== Ili934x/EspLcd SPI configuration field types ==" rg -n -C4 'struct SpiConfiguration|spiHostDevice|esp_lcd_spi_bus_handle_t|spi_host_device_t' --iglob '*Ili934xDisplay.h' --iglob '*EspLcdSpiDisplay*.h' echo echo "== Local call site ==" rg -n -C3 'createTouch\s*\(|spi_configuration->spiHostDevice' Devices/cyd-2432s024r/Source/devices/Display.cppExpected result: the argument type passed at Line 39 should match
esp_lcd_spi_bus_handle_texactly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f5191148-7e48-4573-a244-8afb6746d04c
📒 Files selected for processing (1)
Devices/cyd-2432s024r/Source/devices/Display.cpp
|
Looks good, thanks! |
|
I think the touch calibration is as good as it will get with the current (old) driver system. Thanks! |
This PR depends on #520 as the screen is the correct orientation just currently not calibrated.
Will update when that is merged!
Summary by CodeRabbit