Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to using an animated SD card icon instead of a loading or saving popup #3294

Closed
wants to merge 4 commits into from

Conversation

Metamere
Copy link
Contributor

The loading animation was not working as intended, because a timer was only set once for the standard popup time. It needed to be set for a short duration, then set again once it runs out and an update is made. During the discovering of this, I created a better way to indicate loading, that doesn't block the name of the thing you are loading. I made a small SD card icon that shows up in the upper right corner. It only displays when loading or saving time exceeds 350ms. Then it will display a static icon for 750ms. Then it will load an alternate SD card icon that has the empty inner portion filled with a checkerboard. Then it will alternate between the two images every 250 ms, causing a blink to occur every 500ms (2Hz).

Also reduced text scrolling and light blinking speeds slightly to make things easier to track and less distracting.

The loading animation was not working as intended, because a timer was only set once for the standard popup time. It needed to be set for a short duration, then set again once it runs out and an update is made. During the discovering of this, I created a better way to indicate loading, that doesn't block the name of the thing you are loading. It is a small SD card icon that shows up in the upper right corner. It only displays when loading time exceeds 350ms. Then it will display a static icon for 750ms. Then it will load an alternate SD card icon that has the empty inner portion filled with a checkerboard. Then it will alternate between the two images every 250 mm, causing a blink to occur every 500ms (2Hz).
Also text reduced scrolling and blinking speeds slightly to make things easier to track and less distracting.
Copy link
Contributor

github-actions bot commented Jan 18, 2025

Test Results

107 tests  +1   107 ✅ +1   1s ⏱️ ±0s
 16 suites ±0     0 💤 ±0 
 16 files   ±0     0 ❌ ±0 

Results for commit 7014ce6. ± Comparison against base commit d6818f9.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@stellar-aria stellar-aria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending

int32_t workingAnimationCount;
char const* workingAnimationText; // NULL means animation not active
int32_t working_animation_count;
// char const* workingAnimationText; // NULL means animation not active
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// char const* workingAnimationText; // NULL means animation not active

@@ -413,7 +433,7 @@ void OLED::removePopup() {

oledPopupWidth = 0;
popupType = PopupType::NONE;
workingAnimationText = nullptr;
// workingAnimationText = nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// workingAnimationText = nullptr;

if (workingAnimationText) {
workingAnimationCount = (workingAnimationCount + 1) & 3;
if (working_animation_count) {
// working_animation_count = (working_animation_count + 1) & 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// working_animation_count = (working_animation_count + 1) & 1;

}

// if(workingAnimationText) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// if(workingAnimationText) return;

}

error = textNow.concatenate(buffer);
OLED::popupText(textNow.get(), true, PopupType::LOADING);
}

void OLED::displayWorkingAnimation(char const* word) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This signature will probably need to be changed if it's no longer valid...

Progress save, before possibly rolling back some changes to make the loading animation the default.

Reverted scroll speed change
Changed clearing portion of animation.
made description comments for all variables.
@Metamere Metamere closed this Jan 21, 2025
@Metamere Metamere deleted the Loading-icon branch January 21, 2025 21:11
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.

2 participants