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) {
|
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);
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user