Bug fixes.
This commit is contained in:
@ -38,6 +38,7 @@ Joystick::Joystick(bool debug) {
|
||||
void Joystick::Init() {
|
||||
Serial.begin(115200);
|
||||
delay(100);
|
||||
if (_debug) Serial.println("Joystick serial communication initialized.");
|
||||
}
|
||||
|
||||
void Joystick::AddButton(uint8_t pin, ButtonType type, bool pullup) {
|
||||
@ -68,6 +69,8 @@ void Joystick::AddEncoder(uint8_t pin1, uint8_t pin2, ButtonType type) {
|
||||
Serial.println(type);
|
||||
}
|
||||
}
|
||||
|
||||
if (_debug) Serial.println("Added an encoder.");
|
||||
}
|
||||
|
||||
void Joystick::AddAxis(uint8_t pin) {
|
||||
@ -165,6 +168,10 @@ void Joystick::_addButton(ButtonType type, Reader* reader) {
|
||||
button = new PulsedButton(_virtual_buttons, reader, true, true);
|
||||
_virtual_buttons += 2;
|
||||
break;
|
||||
case BUTTON_LATCHED_MOMENTARY:
|
||||
button = new LatchedButton(_virtual_buttons, reader);
|
||||
_virtual_buttons++;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user