From 2c127b12d27334e4c4b9243399f26dc077b2abd2 Mon Sep 17 00:00:00 2001 From: Thomas McRoberts Date: Thu, 4 Apr 2024 19:33:43 -0500 Subject: [PATCH] Bugfix in mouse-controller.md example code Minor bugs in the source code example: button variable names not matching --- .../due/tutorials/mouse-controller/mouse-controller.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md b/content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md index 116e787304..012a734abc 100644 --- a/content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md +++ b/content/hardware/10.mega/boards/due/tutorials/mouse-controller/mouse-controller.md @@ -153,7 +153,7 @@ void mouseReleased() { Serial.print("Released: "); - if (!mouse.getButton(LEFT_BUTTON) && left==true) { + if (!mouse.getButton(LEFT_BUTTON) && leftButton==true) { Serial.print("L"); @@ -161,7 +161,7 @@ void mouseReleased() { } - if (!mouse.getButton(MIDDLE_BUTTON) && middle==true) { + if (!mouse.getButton(MIDDLE_BUTTON) && middleButton==true) { Serial.print("M"); @@ -169,7 +169,7 @@ void mouseReleased() { } - if (!mouse.getButton(RIGHT_BUTTON) && right==true) { + if (!mouse.getButton(RIGHT_BUTTON) && rightButton==true) { Serial.print("R");