Fix pulsed buttons and remove unnecessary delay from matrix buttons.
This commit is contained in:
parent
7cc9717e78
commit
4c5b51f7b8
|
@ -78,7 +78,10 @@ bool PulsedButton::Update(Joystick* js) {
|
|||
|
||||
switch(type) {
|
||||
case BUTTON_PULSED:
|
||||
if (reader->On()) js->PressButton(vbutton);
|
||||
if (reader->On()) {
|
||||
js->PressButton(vbutton);
|
||||
release_time1 = millis() + 250;
|
||||
}
|
||||
break;
|
||||
case BUTTON_PULSED_DOUBLE_ACTION:
|
||||
js->PressButton(vbutton);
|
||||
|
|
|
@ -19,7 +19,6 @@ void Matrix::Activate(uint8_t pin) {
|
|||
|
||||
_enable(pin);
|
||||
active_pin = pin;
|
||||
delayMicroseconds(10); // allow ample time for signal to propagate
|
||||
}
|
||||
|
||||
void Matrix::_enable(uint8_t pin) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user