Merge pull request 'fuc j'ai ouvlier un truc' (#21) from feat/output-reader into develop
Reviewed-on: #21
This commit is contained in:
commit
26b1185bca
@ -60,6 +60,7 @@ public:
|
|||||||
void set_product_label(std::string str);
|
void set_product_label(std::string str);
|
||||||
void set_product_id(std::string str);
|
void set_product_id(std::string str);
|
||||||
void set_servo_message(std::string str);
|
void set_servo_message(std::string str);
|
||||||
|
int _current_page;
|
||||||
private:
|
private:
|
||||||
void update_page() const;
|
void update_page() const;
|
||||||
void show_debug() const;
|
void show_debug() const;
|
||||||
@ -68,7 +69,6 @@ private:
|
|||||||
void update_pagination() const;
|
void update_pagination() const;
|
||||||
void update_dashboard() const;
|
void update_dashboard() const;
|
||||||
|
|
||||||
int _current_page;
|
|
||||||
int _debug_loc_y;
|
int _debug_loc_y;
|
||||||
std::vector<LogMessage> _logs;
|
std::vector<LogMessage> _logs;
|
||||||
ComponentsStatus _components_status;
|
ComponentsStatus _components_status;
|
||||||
|
@ -83,6 +83,7 @@ Program::Program() {
|
|||||||
this->outputReader = new BigNfcReader();
|
this->outputReader = new BigNfcReader();
|
||||||
this->outputReader->init();
|
this->outputReader->init();
|
||||||
this->grblUpdateTime = 0;
|
this->grblUpdateTime = 0;
|
||||||
|
lcdScreen->set_grbl_status(COMPONENT_OK);
|
||||||
Wire.begin(21, 22);
|
Wire.begin(21, 22);
|
||||||
grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC);
|
grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC);
|
||||||
struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD};
|
struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD};
|
||||||
@ -105,7 +106,7 @@ void Program::loop() {
|
|||||||
|
|
||||||
if(this->outputReader->getNbTags() >= 2){
|
if(this->outputReader->getNbTags() >= 2){
|
||||||
lcdScreen->set_nfc_message("To mutch colis number detected");
|
lcdScreen->set_nfc_message("To mutch colis number detected");
|
||||||
return;
|
lcdScreen->set_grbl_status(COMPONENT_KO);
|
||||||
}
|
}
|
||||||
|
|
||||||
String nfcId = this->nfcReader->ReadNfc();
|
String nfcId = this->nfcReader->ReadNfc();
|
||||||
@ -163,10 +164,12 @@ void Program::loop() {
|
|||||||
}
|
}
|
||||||
this->grbl->mouveForward(CONVOYER_LEN);
|
this->grbl->mouveForward(CONVOYER_LEN);
|
||||||
} else {
|
} 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->grblUpdateTime = maintenant;
|
||||||
this->grbl->mouveForward(5);
|
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