Add some debugging statements.
This commit is contained in:
parent
9af6a589f8
commit
c2974d3d21
12
Joystick.cpp
12
Joystick.cpp
|
@ -42,11 +42,23 @@ void Joystick::AddButton(uint8_t pin, ButtonType type, bool pullup) {
|
|||
if (type == BUTTON_PULSED || type == BUTTON_PULSED_DOUBLE_ACTION) {
|
||||
_have_pulsed_button = true;
|
||||
}
|
||||
|
||||
if (_debug) {
|
||||
Serial.print("Debug: added button of type ");
|
||||
Serial.print(type);
|
||||
Serial.print(" on digital pin ");
|
||||
Serial.println(pin);
|
||||
}
|
||||
}
|
||||
|
||||
void Joystick::AddAxis(uint8_t pin) {
|
||||
_axes[_num_axes] = pin;
|
||||
_num_axes++;
|
||||
|
||||
if (_debug) {
|
||||
Serial.print("Debug: added axis on analog pin ");
|
||||
Serial.println(pin);
|
||||
}
|
||||
}
|
||||
|
||||
void Joystick::Update() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user