Description
Migrate lib/vl53l1x/examples/radar_screen.py from direct SSD1327 framebuf calls to the steami_screen widget API.
Current state
The example manually draws a distance bar using framebuf.rect(), framebuf.fill_rect(), and display.text() with hand-coded centering and brightness mapping.
Proposed change
Replace manual drawing with steami_screen widgets:
screen.bar() for the distance bar
screen.text() or screen.value() for the distance display
SSD1327Display wrapper for color conversion
from steami_screen import Screen, SSD1327Display
display = SSD1327Display(ssd1327.WS_OLED_128X128_SPI(spi, dc, res, cs))
screen = Screen(display)
screen.clear()
screen.title("Radar")
screen.value(distance, unit="mm")
screen.bar(proximity, max_val=MAX_DISTANCE_MM)
screen.show()
Reference
Description
Migrate
lib/vl53l1x/examples/radar_screen.pyfrom direct SSD1327 framebuf calls to the steami_screen widget API.Current state
The example manually draws a distance bar using
framebuf.rect(),framebuf.fill_rect(), anddisplay.text()with hand-coded centering and brightness mapping.Proposed change
Replace manual drawing with steami_screen widgets:
screen.bar()for the distance barscreen.text()orscreen.value()for the distance displaySSD1327Displaywrapper for color conversionReference
lib/vl53l1x/examples/radar_screen.pyscreen.bar(val, max_val=100)calibrate_magnetometer.py(PR refactor(steami_config): Migrate calibrate_magnetometer to steami_screen UI. #357)