Skip to content

Conversation

@Hacuchino-hash
Copy link

@Hacuchino-hash Hacuchino-hash commented Jan 2, 2026

Summary

Adds a runtime display orientation flip feature for the companion radio UI, allowing users to toggle between landscape and portrait modes without reflashing. This is useful for cases where the physical button placement requires a different screen orientation, such as the Muzi Works H1 case for Heltec V3 where buttons are positioned at the bottom.

Changes:

  • Add FLIP page to the home screen carousel (between SENSORS and SHUTDOWN)
  • Implement flipOrientation(), setRotation(), and getRotation() in DisplayDriver and SSD1306Display
  • Add portrait-aware layouts for all UI pages (splash, home, radio, bluetooth, advert, GPS, flip, shutdown)
  • Persist display_rotation preference across reboots via NodePrefs/DataStore
  • Sanitize display_rotation on load to handle existing prefs files gracefully
  • Add Heltec V3 H1 build target in platformio.ini

Behavior:

  • Default orientation remains landscape (stock behavior unchanged)
  • Long-press on the FLIP page toggles between portrait and landscape
  • Orientation preference persists across power cycles
  • All existing functionality works in both orientations

Test Plan

  • Build and flash Heltec_v3_companion_radio_ble_H1 target
  • Verify default boot is landscape orientation
  • Navigate to FLIP page and long-press to switch to portrait
  • Verify all pages render correctly in portrait mode
  • Power cycle and verify orientation persists
  • Switch back to landscape and verify persistence
  • Test on device without saved prefs (fresh flash) to verify default landscape

- Add FLIP page to cycle through display orientations
- Persist display_rotation in NodePrefs across reboots
- Add portrait-aware layouts for all UI pages
- Add circular arrow flip icon
- Add Heltec V3 H1 build target for Muzi Works case
- Sanitize display_rotation on load to handle old prefs files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant