fdcavalcanti opened a new pull request, #3671:
URL: https://github.com/apache/nuttx-apps/pull/3671
## Summary
Add a -p option to select the pattern to draw. The existing expanding
rectangles animation remains the default, and a new "smpte" pattern fills the
display with seven equal vertical bars (white, yellow, cyan, green, magenta,
red and blue), which is useful to verify color ordering and channel wiring of a
framebuffer display.
To support more than one palette, the draw_rect() helpers now receive the
color value to write instead of an index into the per-format color tables.
Monochrome displays pick black or white per bar using a BT.601 luma threshold.
The FBIO_UPDATE ioctl is moved out of draw_rect() into a new present_area()
helper, so the SMPTE pattern can draw every bar and then update the display
only once.
Assisted-by: Cursor:claude-opus-5
## Impact
- No impact on `fb` program usage, default options maintain compatibility.
- Adds new test possibility.
## Testing
Tested on `esp32p4-tab5` which has MIPI-DSI under development right now.
- New help text
```
nsh> fb --help
USAGE: fb [-p rectangles|smpte] [<fb-driver-path>]
```
- Normal `fb` call
```
nsh> fb
VideoInfo:
fmt: 11
xres: 720
yres: 1280
nplanes: 1
PlaneInfo (plane 0):
fbmem: 0x48000040
fblen: 1843200
stride: 1440
display: 0
bpp: 16
Mapped FB: 0x48000040
0: ( 0, 0) (720,1280)
1: ( 65,116) (590,1048)
2: (130,232) (460,816)
3: (195,348) (330,584)
4: (260,464) (200,352)
5: (325,580) ( 70,120)
Test finished
```
<img width="30%" alt="image"
src="https://github.com/user-attachments/assets/72264446-25ca-49db-9864-08d3694a9b48"
/>
- `fb` with SMPTE pattern
```
nsh> fb -p smpte
VideoInfo:
fmt: 11
xres: 720
yres: 1280
nplanes: 1
PlaneInfo (plane 0):
fbmem: 0x48000040
fblen: 1843200
stride: 1440
display: 0
bpp: 16
Mapped FB: 0x48000040
Test finished
```
<img width="30%" alt="image"
src="https://github.com/user-attachments/assets/b016b414-8bef-4c71-99e5-5137851a44aa"
/>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]