feat:V1.0 #8

Merged
Clement merged 58 commits from develop into master 2024-02-02 16:03:25 +00:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 76ebc00763 - Show all commits

View File

@ -8,6 +8,7 @@ class iGRBL{
public:
virtual void init(int speed, double pas, int accel, String mode = "distance") = 0;
virtual void mouveForward(int mm) = 0;
virtual bool isIddle() = 0;
};
class GRBL : public iGRBL{
@ -15,6 +16,7 @@ public:
GRBL(int grblAddr);
void init(int speed, double pas, int accel, String mode = "distance") override;
void mouveForward(int mm = 5) override;
bool isIddle() override;
private:
Module_GRBL* grbl;
};

View File

@ -32,3 +32,13 @@ void GRBL::mouveForward(int mm){
sprintf(s, "G1 X%d", mm);
this->grbl->sendGcode(s);
}
bool GRBL::isIddle(){
bool sortie = false;
if(this->grbl->readStatus().indexOf("IDLE") != -1){
sortie = true;
}
return sortie;
}