feat:V1.0 #8
@ -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{
|
||||
|
@ -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);
|
||||
|
@ -90,7 +90,7 @@ void loop() {
|
||||
}
|
||||
|
||||
if (M5.BtnB.wasPressed()) {
|
||||
grbl->mouveForward(50);
|
||||
grbl->mouveForward(-50);
|
||||
}
|
||||
|
||||
if (M5.BtnC.wasReleased()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user