From cfffa667b6761ada67c7346073056a9137809f66 Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 18 Jan 2024 15:01:41 +0100 Subject: [PATCH] fix grbl lib compile --- lib/GRBL/include/GRBL.h | 2 +- lib/GRBL/src/GRBL.cpp | 2 +- src/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/GRBL/include/GRBL.h b/lib/GRBL/include/GRBL.h index 8837ca9..769cc14 100644 --- a/lib/GRBL/include/GRBL.h +++ b/lib/GRBL/include/GRBL.h @@ -7,7 +7,7 @@ class iGRBL{ public: virtual void init(int speed, double pas, int accel, String mode = "distance") = 0; - virtual void mouveForward(int mm = 5) = 0; + virtual void mouveForward(int mm) = 0; }; class GRBL : public iGRBL{ diff --git a/lib/GRBL/src/GRBL.cpp b/lib/GRBL/src/GRBL.cpp index a10807b..f71f61d 100644 --- a/lib/GRBL/src/GRBL.cpp +++ b/lib/GRBL/src/GRBL.cpp @@ -27,7 +27,7 @@ void GRBL::init(int speed, double pas, int accel, String mode){ Serial.println(s); } -void GRBL::mouveForward(int mm = 5){ +void GRBL::mouveForward(int mm){ char s[1024]; sprintf(s, "G1 X%d", mm); this->grbl->sendGcode(s); diff --git a/src/main.cpp b/src/main.cpp index b27e527..27c73f8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -90,7 +90,7 @@ void loop() { } if (M5.BtnB.wasPressed()) { - grbl->mouveForward(50); + grbl->mouveForward(-50); } if (M5.BtnC.wasReleased()) {