idle animation & toggle alternate mode
This commit is contained in:
@@ -3,13 +3,14 @@ int currentAnimationID = 0;
|
||||
struct AnimationData
|
||||
{
|
||||
const uint8_t *animationPtr;
|
||||
unsigned int animationFrameCount;
|
||||
const unsigned int animationFrameCount;
|
||||
const bool animationLooping;
|
||||
};
|
||||
|
||||
//animations created using https://jasonacox.github.io/TM1637TinyDisplay/examples/7-segment-animator.html
|
||||
|
||||
/* Animation Data - HGFEDCBA Map */
|
||||
const uint8_t ANIMATION1[31][4] = {
|
||||
const uint8_t ANIMATION1[][4] = {
|
||||
{ 0x00, 0x00, 0x00, 0x01 }, // Frame 0
|
||||
{ 0x00, 0x00, 0x01, 0x00 }, // Frame 1
|
||||
{ 0x00, 0x01, 0x00, 0x00 }, // Frame 2
|
||||
@@ -39,8 +40,6 @@ const uint8_t ANIMATION1[31][4] = {
|
||||
{ 0x08, 0x08, 0x08, 0x0e }, // Frame 26
|
||||
{ 0x39, 0x09, 0x09, 0x0f }, // Frame 27
|
||||
{ 0x46, 0x76, 0x76, 0x70 }, // Frame 28
|
||||
{ 0x40, 0x40, 0x40, 0x40 }, // Frame 29
|
||||
{ 0x00, 0x40, 0x40, 0x00 } // Frame 30
|
||||
};
|
||||
|
||||
/* Animation Data - HGFEDCBA Map */
|
||||
@@ -78,12 +77,32 @@ const uint8_t ANIMATION4[][4] = {
|
||||
{ 0x40, 0x40, 0x40, 0x40 }, // Frame 3
|
||||
{ 0x00, 0x40, 0x40, 0x00 }, // Frame 4
|
||||
{ 0x00, 0x00, 0x00, 0x00 }, // Frame 5
|
||||
{ 0x00, 0x00, 0x00, 0x00 }, // Frame 5
|
||||
{ 0x00, 0x00, 0x00, 0x00 }, // Frame 5
|
||||
};
|
||||
|
||||
/* Animation Data - HGFEDCBA Map */
|
||||
const uint8_t ANIMATION5[13][4] = {
|
||||
{ 0x39, 0x09, 0x09, 0x0f }, // Frame 0
|
||||
{ 0x39, 0x08, 0x09, 0x0f }, // Frame 1
|
||||
{ 0x38, 0x09, 0x09, 0x0f }, // Frame 2
|
||||
{ 0x19, 0x09, 0x09, 0x0f }, // Frame 3
|
||||
{ 0x29, 0x09, 0x09, 0x0f }, // Frame 4
|
||||
{ 0x31, 0x09, 0x09, 0x0f }, // Frame 5
|
||||
{ 0x39, 0x01, 0x09, 0x0f }, // Frame 6
|
||||
{ 0x39, 0x09, 0x01, 0x0f }, // Frame 7
|
||||
{ 0x39, 0x09, 0x09, 0x07 }, // Frame 8
|
||||
{ 0x39, 0x09, 0x09, 0x0b }, // Frame 9
|
||||
{ 0x39, 0x09, 0x09, 0x0d }, // Frame 10
|
||||
{ 0x39, 0x09, 0x09, 0x0e }, // Frame 11
|
||||
{ 0x39, 0x09, 0x08, 0x0f } // Frame 12
|
||||
};
|
||||
|
||||
AnimationData animData[] =
|
||||
{
|
||||
{(const uint8_t*)ANIMATION1, sizeof(ANIMATION1) / (sizeof(const uint8_t)*4)},
|
||||
{(const uint8_t*)ANIMATION2, sizeof(ANIMATION2) / (sizeof(const uint8_t)*4)},
|
||||
{(const uint8_t*)ANIMATION3, sizeof(ANIMATION3) / (sizeof(const uint8_t)*4)},
|
||||
{(const uint8_t*)ANIMATION4, sizeof(ANIMATION4) / (sizeof(const uint8_t)*4)}
|
||||
{(const uint8_t*)ANIMATION1, sizeof(ANIMATION1) / (sizeof(const uint8_t)*4), false},
|
||||
{(const uint8_t*)ANIMATION2, sizeof(ANIMATION2) / (sizeof(const uint8_t)*4), false},
|
||||
{(const uint8_t*)ANIMATION3, sizeof(ANIMATION3) / (sizeof(const uint8_t)*4), false},
|
||||
{(const uint8_t*)ANIMATION4, sizeof(ANIMATION4) / (sizeof(const uint8_t)*4), false},
|
||||
{(const uint8_t*)ANIMATION5, sizeof(ANIMATION5) / (sizeof(const uint8_t)*4), true}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user