fixed bug with anim effect disable not showing button toggles
This commit is contained in:
@@ -223,7 +223,7 @@ void initSevSegDisplay()
|
||||
void loop()
|
||||
{
|
||||
//animation draw tick
|
||||
if (animationEnabled && animationPlaying && millis() > (animationLastFrameMillis + animationFrameDelayMillis))
|
||||
if (animationEnabled && animationPlaying && (millis() > (animationLastFrameMillis + animationFrameDelayMillis)))
|
||||
{
|
||||
drawAnimation(animationLooping);
|
||||
animationLastFrameMillis = millis();
|
||||
@@ -464,6 +464,13 @@ MemSlot* getMemorySlot(String memSlotName)
|
||||
|
||||
void sendInputOuput(int input)
|
||||
{
|
||||
int numberOfModes = sizeof(modes)/(sizeof(Action)*15);
|
||||
|
||||
int currentMode = (getMemorySlot("prst")->value) % numberOfModes;
|
||||
//Hardware inputs ordered from the bottom left = 1 to the top right = 12 on the switch matrix,
|
||||
Action actionToRun = modes[currentMode][input-1]; //getting the virtual inputs from the modes array.
|
||||
//Inputs uids starts with 1, so input - 1 to get the index 0 of the array
|
||||
|
||||
String inputName = "bt";
|
||||
inputName += input;
|
||||
MemSlot* buttonInputMem = getMemorySlot(inputName);
|
||||
@@ -488,17 +495,10 @@ void sendInputOuput(int input)
|
||||
buttonsVirtualState[input-1] = false;
|
||||
}
|
||||
}
|
||||
|
||||
clickKey(actionToRun.keyID, actionToRun.keyModifierID);
|
||||
}
|
||||
|
||||
lastInputMillis = millis();
|
||||
|
||||
int numberOfModes = sizeof(modes)/(sizeof(Action)*15);
|
||||
|
||||
int currentMode = (getMemorySlot("prst")->value) % numberOfModes;
|
||||
//Hardware inputs ordered from the bottom left = 1 to the top right = 12 on the switch matrix,
|
||||
Action actionToRun = modes[currentMode][input-1]; //getting the virtual inputs from the modes array.
|
||||
//Inputs uids starts with 1, so input - 1 to get the index 0 of the array
|
||||
|
||||
if (actionToRun.keyID == -1) //menu input, input mapping can be changed in modeAction.h
|
||||
{
|
||||
if (isInMenu)
|
||||
@@ -526,11 +526,8 @@ void sendInputOuput(int input)
|
||||
{
|
||||
menuEnter();
|
||||
}
|
||||
else
|
||||
{
|
||||
clickKey(actionToRun.keyID, actionToRun.keyModifierID);
|
||||
}
|
||||
|
||||
lastInputMillis = millis();
|
||||
}
|
||||
|
||||
void clickKey(int key, int modifier)
|
||||
@@ -544,9 +541,12 @@ void clickKey(int key, int modifier)
|
||||
|
||||
void playAnimation(int animID)
|
||||
{
|
||||
if (animationEnabled)
|
||||
{
|
||||
currentAnimationID = animID;
|
||||
animationFrame = 0;
|
||||
animationPlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
void drawAnimation(bool looping)
|
||||
|
||||
Reference in New Issue
Block a user