Skip to content

Commit 098111c

Browse files
committed
Add AlwaysSend option to PedalsJoystick
Restores the old behavior of the example if set. Always nice to have an override.
1 parent b8ede59 commit 098111c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/Pedals/PedalsJoystick/PedalsJoystick.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Joystick_ Joystick(
4949
false, false, false, false, false, false); // no other axes
5050

5151
const int ADC_Max = 1023; // max value of the analog inputs, 10-bit on AVR boards
52+
const bool AlwaysSend = false; // override the position checks, *always* send data constantly
5253

5354

5455
void setup() {
@@ -68,7 +69,7 @@ void setup() {
6869
void loop() {
6970
pedals.update();
7071

71-
if (pedals.positionChanged()) {
72+
if (pedals.positionChanged() || AlwaysSend) {
7273
updateJoystick();
7374
}
7475
}

0 commit comments

Comments
 (0)