Skip to content

Commit a3616a5

Browse files
Merge pull request #1854 from Thomas-PM/patch-1
Bugfix in mouse-controller.md example code
2 parents e2f92b2 + 2c127b1 commit a3616a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,23 +153,23 @@ void mouseReleased() {
153153
154154
Serial.print("Released: ");
155155
156-
if (!mouse.getButton(LEFT_BUTTON) && left==true) {
156+
if (!mouse.getButton(LEFT_BUTTON) && leftButton==true) {
157157
158158
Serial.print("L");
159159
160160
leftButton = false;
161161
162162
}
163163
164-
if (!mouse.getButton(MIDDLE_BUTTON) && middle==true) {
164+
if (!mouse.getButton(MIDDLE_BUTTON) && middleButton==true) {
165165
166166
Serial.print("M");
167167
168168
middleButton = false;
169169
170170
}
171171
172-
if (!mouse.getButton(RIGHT_BUTTON) && right==true) {
172+
if (!mouse.getButton(RIGHT_BUTTON) && rightButton==true) {
173173
174174
Serial.print("R");
175175

0 commit comments

Comments
 (0)