patch #22
@ -60,6 +60,7 @@ public:
|
||||
void set_product_label(std::string str);
|
||||
void set_product_id(std::string str);
|
||||
void set_servo_message(std::string str);
|
||||
int _current_page;
|
||||
private:
|
||||
void update_page() const;
|
||||
void show_debug() const;
|
||||
@ -68,7 +69,6 @@ private:
|
||||
void update_pagination() const;
|
||||
void update_dashboard() const;
|
||||
|
||||
int _current_page;
|
||||
int _debug_loc_y;
|
||||
std::vector<LogMessage> _logs;
|
||||
ComponentsStatus _components_status;
|
||||
|
@ -83,6 +83,7 @@ Program::Program() {
|
||||
this->outputReader = new BigNfcReader();
|
||||
this->outputReader->init();
|
||||
this->grblUpdateTime = 0;
|
||||
lcdScreen->set_grbl_status(COMPONENT_OK);
|
||||
Wire.begin(21, 22);
|
||||
grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC);
|
||||
struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD};
|
||||
@ -105,7 +106,7 @@ void Program::loop() {
|
||||
|
||||
if(this->outputReader->getNbTags() >= 2){
|
||||
lcdScreen->set_nfc_message("To mutch colis number detected");
|
||||
return;
|
||||
lcdScreen->set_grbl_status(COMPONENT_KO);
|
||||
}
|
||||
|
||||
String nfcId = this->nfcReader->ReadNfc();
|
||||
@ -163,10 +164,12 @@ void Program::loop() {
|
||||
}
|
||||
this->grbl->mouveForward(CONVOYER_LEN);
|
||||
} else {
|
||||
if(this->grbl->isIddle() || (maintenant - this->grblUpdateTime >= GRBL_UPDATE)){
|
||||
if((this->grbl->isIddle() || (maintenant - this->grblUpdateTime >= GRBL_UPDATE)) && lcdScreen->get_components().grbl == COMPONENT_OK){
|
||||
this->grblUpdateTime = maintenant;
|
||||
this->grbl->mouveForward(5);
|
||||
Serial.print("pouet");
|
||||
}
|
||||
}
|
||||
if(M5.BtnC.wasReleased() != 0 && lcdScreen->_current_page == DASHBOARD_SCREEN){
|
||||
lcdScreen->set_grbl_status(COMPONENT_OK);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user