Fix pulsed buttons and remove unnecessary delay from matrix buttons.

This commit is contained in:
Anna Rose 2021-11-24 16:39:00 +00:00
parent 7cc9717e78
commit 4c5b51f7b8
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,10 @@ bool PulsedButton::Update(Joystick* js) {
switch(type) { switch(type) {
case BUTTON_PULSED: case BUTTON_PULSED:
if (reader->On()) js->PressButton(vbutton); if (reader->On()) {
js->PressButton(vbutton);
release_time1 = millis() + 250;
}
break; break;
case BUTTON_PULSED_DOUBLE_ACTION: case BUTTON_PULSED_DOUBLE_ACTION:
js->PressButton(vbutton); js->PressButton(vbutton);

View File

@ -19,7 +19,6 @@ void Matrix::Activate(uint8_t pin) {
_enable(pin); _enable(pin);
active_pin = pin; active_pin = pin;
delayMicroseconds(10); // allow ample time for signal to propagate
} }
void Matrix::_enable(uint8_t pin) { void Matrix::_enable(uint8_t pin) {