- Expose buttons to HA
- HA Switch to control the transition
- Icons are not reloaded if its the same as before
This commit is contained in:
Stephan Mühl
2023-03-30 12:34:53 +02:00
parent 9381b2a33b
commit 249074d022
12 changed files with 92 additions and 30 deletions

View File

@@ -236,18 +236,6 @@ void MatrixDisplayUi::drawApp()
int16_t x, y, x1, y1;
switch (this->appAnimationDirection)
{
case SLIDE_LEFT:
x = -32 * progress;
y = 0;
x1 = x + 32;
y1 = 0;
break;
case SLIDE_RIGHT:
x = 32 * progress;
y = 0;
x1 = x - 32;
y1 = 0;
break;
case SLIDE_UP:
x = 0;
y = -8 * progress;

View File

@@ -41,9 +41,7 @@
enum AnimationDirection
{
SLIDE_UP,
SLIDE_DOWN,
SLIDE_LEFT,
SLIDE_RIGHT
SLIDE_DOWN
};
enum AppState
@@ -79,7 +77,7 @@ private:
FastLED_NeoMatrix *matrix;
// Values for the Apps
AnimationDirection appAnimationDirection = SLIDE_RIGHT;
AnimationDirection appAnimationDirection = SLIDE_DOWN;
int8_t lastTransitionDirection = 1;