Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ You can adjust each property in the JSON object according to your preferences. I
| `8` | Blink |
| `9` | Reload |
| `10` | Fade |
| `11` | Instant |

## Update

Expand Down
2 changes: 1 addition & 1 deletion src/Dictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const char HAbriOptions[] PROGMEM = {"Manual;Auto"};
const char HAeffectID[] PROGMEM = {"%s_eff"};
const char HAeffectIcon[] PROGMEM = {"mdi:auto-fix"};
const char HAeffectName[] PROGMEM = {"Transition effect"};
const char HAeffectOptions[] PROGMEM = {"Random;Slide;Dim;Zoom;Rotate;Pixelate;Curtain;Ripple;Blink;Reload;Fade"};
const char HAeffectOptions[] PROGMEM = {"Random;Slide;Dim;Zoom;Rotate;Pixelate;Curtain;Ripple;Blink;Reload;Fade;Instant"};

const char HAbtnaID[] PROGMEM = {"%s_btna"};
const char HAbtnaIcon[] PROGMEM = {"mdi:bell-off"};
Expand Down
10 changes: 10 additions & 0 deletions src/MatrixDisplayUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ void MatrixDisplayUi::drawApp()
{
crossfadeTransition();
}
else if (currentTransition == INSTANT)
{
instantTransition();
}
break;
}
case FIXED:
Expand Down Expand Up @@ -932,3 +936,9 @@ void MatrixDisplayUi::crossfadeTransition()
}
}
}

void MatrixDisplayUi::instantTransition()
{
this->matrix->clear();
(this->AppFunctions[this->getnextAppNumber()])(this->matrix, &this->state, 0, 0, &gif2);
}
4 changes: 3 additions & 1 deletion src/MatrixDisplayUi.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ enum TransitionType
RIPPLE,
BLINK,
RELOAD,
CROSSFADE
CROSSFADE,
INSTANT
};

enum AppState
Expand Down Expand Up @@ -132,6 +133,7 @@ class MatrixDisplayUi
void blinkTransition();
void reloadTransition();
void crossfadeTransition();
void instantTransition();

public:
MatrixDisplayUi(FastLED_NeoMatrix *matrix);
Expand Down