-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Conversation
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// char const* workingAnimationText; // NULL means animation not active |
src/deluge/hid/display/oled.cpp
Outdated
@@ -413,7 +433,7 @@ void OLED::removePopup() { | |||
|
|||
oledPopupWidth = 0; | |||
popupType = PopupType::NONE; | |||
workingAnimationText = nullptr; | |||
// workingAnimationText = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// workingAnimationText = nullptr; |
if (workingAnimationText) { | ||
workingAnimationCount = (workingAnimationCount + 1) & 3; | ||
if (working_animation_count) { | ||
// working_animation_count = (working_animation_count + 1) & 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// working_animation_count = (working_animation_count + 1) & 1; |
} | ||
|
||
// if(workingAnimationText) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if(workingAnimationText) return; |
} | ||
|
||
error = textNow.concatenate(buffer); | ||
OLED::popupText(textNow.get(), true, PopupType::LOADING); | ||
} | ||
|
||
void OLED::displayWorkingAnimation(char const* word) { |
There was a problem hiding this comment.
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.
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.