Skip to content

Conversation

@dariusarnold
Copy link
Contributor

@dariusarnold dariusarnold commented Mar 12, 2025

I was confused by the issue with the shake calibration on my PineTime for which a partial fix exists in #2161 (thank you lmamane). I adopted those changes and made the suggested enum refactor as well as fixed an issue with the text not disappearing when leaving the shake calibration screen.

Here is a screenshot of the new disabled message:
InfiniSim_2025-03-12_203033

All changes are:

  • Switch from bool EnableForCal to always saving and restoring shake wake mode to avoid to many conditionals in the constructor and destructor
  • Refactor calibrating into currentCalibrationStep enum with descriptive names
  • Initialize variables with default values in the class body
  • Switch to forward declarations for references in the header and remove unused include
  • Fix issue where text would stay on screen due to not calling lv_obj_clean() in the destructor

Lionel Elie Mamane and others added 2 commits March 12, 2025 20:15
- Switch from bool EnableForCal to always saving and restoring shake wake mode to avoid to many conditionals in the constructor and destructor
- Refactor calibrating into currentCalibrationStepEnum with descriptive names
- Initialize variables with default values in the class body
- Switch to forward declarations for references in the header and remove unused include
- Fix issue where text would stay on screen due to not calling lv_obj_clean() in the destructor

(cherry picked from commit af30390)
@github-actions
Copy link

github-actions bot commented Mar 12, 2025

Build size and comparison to main:

Section Size Difference
text 373312B 192B
data 948B 0B
bss 22536B 0B

Run in InfiniEmu

@mark9064 mark9064 added enhancement Enhancement to an existing app/feature UI/UX User interface/User experience labels Mar 13, 2025
@mark9064 mark9064 self-requested a review March 13, 2025 00:39
@mark9064
Copy link
Member

After #2328 it now works all the time :) thanks for writing up this feature nonetheless

The refactoring you've done still looks good though, if you would like to open a new PR for that I will try and take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to an existing app/feature UI/UX User interface/User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants