Skip to content

Commit

Permalink
Fixed loading animation to display it properly
Browse files Browse the repository at this point in the history
  • Loading branch information
florianL21 committed Apr 17, 2021
1 parent a601a3c commit ea9210c
Show file tree
Hide file tree
Showing 15 changed files with 549 additions and 93 deletions.
221 changes: 194 additions & 27 deletions lib/LED_clock/Config/Animations/clock-only/Animations.cpp

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion lib/LED_clock/Config/Animations/clock-only/Animations.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
* stopped by calling the stopLooping method as soon as loading is finished.
*
*/
extern Animator::ComplexAmination* LoadingAnimation;
extern Animator::ComplexAmination* IndefiniteLoadingAnimation;

/**
* \brief Animation which is used to display a progress with a defined end point. Similar to a progress bar.
*/
extern Animator::ComplexAmination* LoadingProgressAnimation;

#endif
103 changes: 100 additions & 3 deletions lib/LED_clock/Config/Animations/default/Animations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@

#include "Animations.h"

Animator::ComplexAmination* InitLoadingAnimation(uint16_t totalAnimationLength);
Animator::ComplexAmination* InitIndefiniteLoadingAnimation(uint16_t totalAnimationLength);
Animator::ComplexAmination* InitLoadingProgressAnimation(uint16_t totalAnimationLength);
/**
* \brief Initialize the animation in global context to make it usable.
*
*/
Animator::ComplexAmination* LoadingAnimation = InitLoadingAnimation(LOADING_ANIMATION_DURATION);
Animator::ComplexAmination* IndefiniteLoadingAnimation = InitIndefiniteLoadingAnimation(LOADING_ANIMATION_DURATION);
Animator::ComplexAmination* LoadingProgressAnimation = InitLoadingProgressAnimation(LOADING_ANIMATION_DURATION);

/**
* \brief Initialize the loading animation
*
* \param totalAnimationLength Duration of the whole animation in milliseconds
* \return Animator::ComplexAmination* pointer to the newly created animation
*/
Animator::ComplexAmination* InitLoadingAnimation(uint16_t totalAnimationLength)
Animator::ComplexAmination* InitIndefiniteLoadingAnimation(uint16_t totalAnimationLength)
{
#undef LENGTH
#define LENGTH 2
Expand Down Expand Up @@ -118,3 +120,98 @@ Animator::ComplexAmination* InitLoadingAnimation(uint16_t totalAnimationLength)
animation->animations = allSteps;
return animation;
}


Animator::ComplexAmination* InitLoadingProgressAnimation(uint16_t totalAnimationLength)
{
#undef LENGTH
#define LENGTH 1
Animator::animationStep* step0 = new Animator::animationStep;
step0->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, FIRST_INTERMEDIATE_DISPLAY)};
step0->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step0->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step1 = new Animator::animationStep;
step1->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, LOWER_DIGIT_HOUR_DISPLAY)};
step1->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step1->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step2 = new Animator::animationStep;
step2->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, SECOND_INTERMEDIATE_DISPLAY)};
step2->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step2->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step3 = new Animator::animationStep;
step3->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, HIGHER_DIGIT_MINUTE_DISPLAY)};
step3->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step3->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step4 = new Animator::animationStep;
step4->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, THIRD_INTERMEDIATE_DISPLAY)};
step4->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step4->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step5 = new Animator::animationStep;
step5->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, LOWER_DIGIT_MINUTE_DISPLAY)};
step5->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step5->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step6 = new Animator::animationStep;
step6->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_RIGHT_SEGMENT, LOWER_DIGIT_MINUTE_DISPLAY)};
step6->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToTop};
step6->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step7 = new Animator::animationStep;
step7->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_RIGHT_SEGMENT, LOWER_DIGIT_MINUTE_DISPLAY)};
step7->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToTop};
step7->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step8 = new Animator::animationStep;
step8->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, LOWER_DIGIT_MINUTE_DISPLAY)};
step8->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step8->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step9 = new Animator::animationStep;
step9->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, THIRD_INTERMEDIATE_DISPLAY)};
step9->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step9->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step10 = new Animator::animationStep;
step10->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, HIGHER_DIGIT_MINUTE_DISPLAY)};
step10->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step10->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step11 = new Animator::animationStep;
step11->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, SECOND_INTERMEDIATE_DISPLAY)};
step11->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step11->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step12 = new Animator::animationStep;
step12->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, LOWER_DIGIT_HOUR_DISPLAY)};
step12->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step12->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step13 = new Animator::animationStep;
step13->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, FIRST_INTERMEDIATE_DISPLAY)};
step13->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step13->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step14 = new Animator::animationStep;
step14->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step14->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToBottom};
step14->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step15 = new Animator::animationStep;
step15->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step15->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToBottom};
step15->easingEffects = new EasingBase*[LENGTH] {NO_EASING};

LinkedList<Animator::animationStep*>* allSteps = new LinkedList<Animator::animationStep*>();
allSteps->add(step0);
allSteps->add(step1);
allSteps->add(step2);
allSteps->add(step3);
allSteps->add(step4);
allSteps->add(step5);
allSteps->add(step6);
allSteps->add(step7);
allSteps->add(step8);
allSteps->add(step9);
allSteps->add(step10);
allSteps->add(step11);
allSteps->add(step12);
allSteps->add(step13);
allSteps->add(step14);
allSteps->add(step15);

Animator::ComplexAmination* animation = new Animator::ComplexAmination();
animation->animationComplexity = LENGTH;
animation->LengthPerAnimation = totalAnimationLength / allSteps->size();
animation->animations = allSteps;
return animation;
}
7 changes: 6 additions & 1 deletion lib/LED_clock/Config/Animations/default/Animations.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
* stopped by calling the stopLooping method as soon as loading is finished.
*
*/
extern Animator::ComplexAmination* LoadingAnimation;
extern Animator::ComplexAmination* IndefiniteLoadingAnimation;

/**
* \brief Animation which is used to display a progress with a defined end point. Similar to a progress bar.
*/
extern Animator::ComplexAmination* LoadingProgressAnimation;

#endif
86 changes: 66 additions & 20 deletions lib/LED_clock/Config/Animations/diy-machines/Animations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,100 @@

#include "Animations.h"

Animator::ComplexAmination* InitLoadingAnimation(uint16_t totalAnimationLength);
Animator::ComplexAmination* InitIndefiniteLoadingAnimation(uint16_t totalAnimationLength);
Animator::ComplexAmination* InitLoadingProgressAnimation(uint16_t totalAnimationLength);
/**
* \brief Initialize the animation in global context to make it usable.
*
*/
Animator::ComplexAmination* LoadingAnimation = InitLoadingAnimation(LOADING_ANIMATION_DURATION);
Animator::ComplexAmination* IndefiniteLoadingAnimation = InitIndefiniteLoadingAnimation(LOADING_ANIMATION_DURATION);
Animator::ComplexAmination* LoadingProgressAnimation = InitLoadingProgressAnimation(LOADING_ANIMATION_DURATION);

/**
* \brief Initialize the loading animation
*
* \param totalAnimationLength Duration of the whole animation in milliseconds
* \return Animator::ComplexAmination* pointer to the newly created animation
*/
Animator::ComplexAmination* InitLoadingAnimation(uint16_t totalAnimationLength)
Animator::ComplexAmination* InitIndefiniteLoadingAnimation(uint16_t totalAnimationLength)
{
#undef LENGTH
#define LENGTH 2
Animator::animationStep* preStep = new Animator::animationStep;
preStep->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), NO_SEGMENTS};
preStep->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight, NO_ANIMATION};
preStep->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step0 = new Animator::animationStep;
step0->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(BOTTOM_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step0->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToRight, AnimationEffects::AnimateInToTop};
step0->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), NO_SEGMENTS};
step0->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight, NO_ANIMATION};
step0->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step1 = new Animator::animationStep;
step1->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(TOP_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step1->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToTop, AnimationEffects::AnimateInToTop};
step1->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(BOTTOM_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step1->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToRight, AnimationEffects::AnimateInToTop};
step1->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step2 = new Animator::animationStep;
step2->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(TOP_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step2->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToTop, AnimationEffects::AnimateInToLeft};
step2->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(TOP_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step2->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToTop, AnimationEffects::AnimateInToTop};
step2->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step3 = new Animator::animationStep;
step3->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(TOP_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step3->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToLeft, AnimationEffects::AnimateInToBottom};
step3->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(TOP_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step3->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToTop, AnimationEffects::AnimateInToLeft};
step3->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step4 = new Animator::animationStep;
step4->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(BOTTOM_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step4->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToBottom, AnimationEffects::AnimateInToBottom};
step4->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(TOP_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step4->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToLeft, AnimationEffects::AnimateInToBottom};
step4->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step5 = new Animator::animationStep;
step5->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), NO_SEGMENTS};
step5->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToBottom, NO_ANIMATION};
step5->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), SEGMENT(BOTTOM_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step5->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToBottom, AnimationEffects::AnimateInToBottom};
step5->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};
Animator::animationStep* step6 = new Animator::animationStep;
step6->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY), NO_SEGMENTS};
step6->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateOutToBottom, NO_ANIMATION};
step6->easingEffects = new EasingBase*[LENGTH] {NO_EASING, NO_EASING};

LinkedList<Animator::animationStep*>* allSteps = new LinkedList<Animator::animationStep*>();
allSteps->add(step0);
allSteps->add(step1);
allSteps->add(step2);
allSteps->add(step3);
allSteps->add(step4);
allSteps->add(step5);
allSteps->add(step6);

Animator::ComplexAmination* animation = new Animator::ComplexAmination();
animation->animationComplexity = LENGTH;
animation->LengthPerAnimation = totalAnimationLength / allSteps->size();
animation->animations = allSteps;
return animation;
}

Animator::ComplexAmination* InitLoadingProgressAnimation(uint16_t totalAnimationLength)
{
#undef LENGTH
#define LENGTH 1
Animator::animationStep* step0 = new Animator::animationStep;
step0->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step0->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToRight};
step0->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step1 = new Animator::animationStep;
step1->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step1->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToTop};
step1->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step2 = new Animator::animationStep;
step2->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_RIGHT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step2->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToTop};
step2->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step3 = new Animator::animationStep;
step3->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_MIDDLE_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step3->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToLeft};
step3->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step4 = new Animator::animationStep;
step4->arrayIndex = new int16_t[LENGTH] {SEGMENT(TOP_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step4->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToBottom};
step4->easingEffects = new EasingBase*[LENGTH] {NO_EASING};
Animator::animationStep* step5 = new Animator::animationStep;
step5->arrayIndex = new int16_t[LENGTH] {SEGMENT(BOTTOM_LEFT_SEGMENT, HIGHER_DIGIT_HOUR_DISPLAY)};
step5->animationEffects = new AnimatableObject::AnimationFunction[LENGTH] {AnimationEffects::AnimateInToBottom};
step5->easingEffects = new EasingBase*[LENGTH] {NO_EASING};

LinkedList<Animator::animationStep*>* allSteps = new LinkedList<Animator::animationStep*>();
allSteps->add(preStep);
allSteps->add(step0);
allSteps->add(step1);
allSteps->add(step2);
Expand Down
7 changes: 6 additions & 1 deletion lib/LED_clock/Config/Animations/diy-machines/Animations.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
* stopped by calling the stopLooping method as soon as loading is finished.
*
*/
extern Animator::ComplexAmination* LoadingAnimation;
extern Animator::ComplexAmination* IndefiniteLoadingAnimation;

/**
* \brief Animation which is used to display a progress with a defined end point. Similar to a progress bar.
*/
extern Animator::ComplexAmination* LoadingProgressAnimation;

#endif
2 changes: 1 addition & 1 deletion lib/LED_clock/Config/Setup/clock-only/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ enum DisplayIDs {
/**
* \brief The number of segments to use for displaying a progress bar for the OTA updates
*/
#define NUM_SEGMENTS_PROGRESS 16
#define NUM_SEGMENTS_PROGRESS 18

/**
* \brief The time is shall take for one iteration of the loading animation
Expand Down
2 changes: 1 addition & 1 deletion lib/LED_clock/Config/Setup/diy-machines/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ enum DisplayIDs {
/**
* \brief The number of segments to use for displaying a progress bar for the OTA updates
*/
#define NUM_SEGMENTS_PROGRESS 16
#define NUM_SEGMENTS_PROGRESS 6

/**
* \brief The time is shall take for one iteration of the loading animation
Expand Down
4 changes: 3 additions & 1 deletion lib/LED_clock/Modules/Animator/inc/AnimatableObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ class AnimatableObject

/**
* \brief Gets called by the #Animator #Animator::handle method when the animation is finished.
*
* \param state if not -1 any animations currently running are going to be set to an exact state
*/
void handle();
void handle(uint32_t state = -1);

/**
* \brief Set the animation effect to the current object
Expand Down

0 comments on commit ea9210c

Please sign in to comment.