Fixed #154 Rotary encoder usage jumpy in emulation mode
This commit is contained in:
parent
d3f045e7c3
commit
bdcf49f758
2 changed files with 7 additions and 3 deletions
|
@ -142,6 +142,7 @@ enum PIGPIOMasks
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned ButtonPinFlags[5] = { PIGPIO_MASK_IN_BUTTON1, PIGPIO_MASK_IN_BUTTON2, PIGPIO_MASK_IN_BUTTON3, PIGPIO_MASK_IN_BUTTON4, PIGPIO_MASK_IN_BUTTON5 };
|
static const unsigned ButtonPinFlags[5] = { PIGPIO_MASK_IN_BUTTON1, PIGPIO_MASK_IN_BUTTON2, PIGPIO_MASK_IN_BUTTON3, PIGPIO_MASK_IN_BUTTON4, PIGPIO_MASK_IN_BUTTON5 };
|
||||||
|
static int buttonCount = sizeof(ButtonPinFlags) / sizeof(unsigned);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Original Non-split lines
|
// Original Non-split lines
|
||||||
|
@ -290,7 +291,6 @@ public:
|
||||||
write32(PWM_CTL, PWM_USEF2 + PWM_PWEN2 + PWM_USEF1 + PWM_PWEN1 + PWM_CLRF1);
|
write32(PWM_CTL, PWM_USEF2 + PWM_PWEN2 + PWM_USEF1 + PWM_PWEN1 + PWM_CLRF1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int buttonCount = sizeof(ButtonPinFlags) / sizeof(unsigned);
|
|
||||||
for (index = 0; index < buttonCount; ++index)
|
for (index = 0; index < buttonCount; ++index)
|
||||||
{
|
{
|
||||||
InputButton[index] = false;
|
InputButton[index] = false;
|
||||||
|
@ -409,8 +409,8 @@ public:
|
||||||
|
|
||||||
|
|
||||||
static void ReadBrowseMode(void);
|
static void ReadBrowseMode(void);
|
||||||
|
static void ReadGPIOUserInput(int buttonCount);
|
||||||
static void ReadEmulationMode1541(void);
|
static void ReadEmulationMode1541(void);
|
||||||
static void ReadButtonsEmulationMode(void);
|
|
||||||
static void ReadEmulationMode1581(void);
|
static void ReadEmulationMode1581(void);
|
||||||
|
|
||||||
static void WaitUntilReset(void)
|
static void WaitUntilReset(void)
|
||||||
|
|
|
@ -868,7 +868,7 @@ EXIT_TYPE Emulate1541(FileBrowser* fileBrowser)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
IEC_Bus::ReadButtonsEmulationMode();
|
IEC_Bus::ReadGPIOUserInput(3);
|
||||||
|
|
||||||
// Other core will check the uart (as it is slow) (could enable uart irqs - will they execute on this core?)
|
// Other core will check the uart (as it is slow) (could enable uart irqs - will they execute on this core?)
|
||||||
#if not defined(EXPERIMENTALZERO)
|
#if not defined(EXPERIMENTALZERO)
|
||||||
|
@ -1074,8 +1074,12 @@ EXIT_TYPE Emulate1581(FileBrowser* fileBrowser)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IEC_Bus::ReadGPIOUserInput(3);
|
||||||
|
|
||||||
// Other core will check the uart (as it is slow) (could enable uart irqs - will they execute on this core?)
|
// Other core will check the uart (as it is slow) (could enable uart irqs - will they execute on this core?)
|
||||||
|
#if not defined(EXPERIMENTALZERO)
|
||||||
inputMappings->CheckKeyboardEmulationMode(numberOfImages, numberOfImagesMax);
|
inputMappings->CheckKeyboardEmulationMode(numberOfImages, numberOfImagesMax);
|
||||||
|
#endif
|
||||||
inputMappings->CheckButtonsEmulationMode();
|
inputMappings->CheckButtonsEmulationMode();
|
||||||
|
|
||||||
bool exitEmulation = inputMappings->Exit();
|
bool exitEmulation = inputMappings->Exit();
|
||||||
|
|
Loading…
Reference in a new issue