Conversation
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 19
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| """ | ||
| def start do | ||
| # Open SPI (bus "spidev0.0" or adjust if different) | ||
| {:ok, spi} = Circuits.SPI.open("spidev1.0", @spi_opts) |
There was a problem hiding this comment.
Module attribute defined but not used for SPI
Low Severity
The @spi_device module attribute is defined on line 9 but not used. The Circuits.SPI.open call uses a hardcoded string "spidev1.0" instead of @spi_device. This means changing @spi_device to switch between board configurations has no effect on the actual SPI device opened. The companion file tft_spi_ili9488.ex correctly uses @spi_device.
| defp send_pixels(devs, pixel, pixels_left, chunk_pixels) do | ||
| count = min(pixels_left, chunk_pixels) | ||
| chunk = :binary.copy(pixel, count) | ||
| safe_send_data(devs, chunk) |
There was a problem hiding this comment.
SPI error return value silently discarded in pixel loop
Medium Severity
The safe_send_data function catches SPI errors and returns {:error, e} to signal failure, but send_pixels at line 178 completely ignores this return value. When an SPI transfer fails, the error is silently swallowed and the loop continues sending subsequent chunks. The overall fill_color operation always returns :ok even if pixel data failed to transfer, making it impossible for callers to detect partial or failed screen updates.
Note
Introduces initial SPI-based support and test utilities for an ILI9488 TFT display using Circuits.GPIO/SPI.
TFTTestreads key registers (0x04,0x09,0x0A,0x0B,0x0C) and writesMADCTLto verify communication and rotationIli9488driver: reset + two init sequences (primarynew_init_display), sets RGB666 mode, memory access control, and turns on displayfill_red/green/blue/white) and rectangle draw (test_rect) using window set +MEMORY_WRITEWritten by Cursor Bugbot for commit eca9210. This will update automatically on new commits. Configure here.