Some Custom Improvements.
This pull request introduces significant improvements to timezone handling and display refresh logic, as well as some refactoring for the display border logic. The main changes include adding support for selecting GMT-based timezones, updating the UI and logic to allow users to set and display the timezone, and ensuring consistent use of full display refreshes. Additionally, the handling of the display border has been clarified and improved with new getter/setter methods.
Timezone support and selection:
- Added a new
TimezonesGMT.hfile, which defines a list of GMT-based timezones, their offsets, and related configuration logic. This enables users to select from a wide range of timezones or specify a location-based override. - Modified the time-setting UI (
setTime) to allow users to cycle through and select timezones, display the current GMT offset, and update the environment timezone accordingly. The timezone is now stored and used throughout the system, including for NTP synchronization. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
Display refresh consistency:
- Updated multiple UI methods to always use a full refresh (
display.display(true)) instead of a partial or conditional refresh. This ensures consistent and correct updates to the e-paper display for all major UI actions, such as menus, about screens, firmware updates, and WiFi configuration. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
Display border logic improvements:
- Refactored the display border logic by separating the drawing and setting of the dark border. Added
drawDarkBorder,setDarkBorder, andisDarkBordermethods to clarify intent and improve maintainability. The default value fordarkBorderwas also changed totrue. [1] [2] [3]
Other notable changes:
- Updated logic to always show the watch face and menus with a full refresh in response to button presses and state changes, ensuring UI consistency. [1] [2] [3] [4] [5]
- Improved handling of year values and NTP synchronization to be compatible with the new timezone infrastructure. [1] [2] [3] [4]
These changes together make the system more robust, user-friendly, and maintainable, especially regarding timezone management and display behavior.