Merge remote-tracking branch 'origin/develop' into feat/m5_lcd
# Conflicts: # config.ini # src/Program.cpp
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#include "Arduino.h"
|
||||
#include "M5LCD.h"
|
||||
#include "DolibarrClient.h"
|
||||
#include "ServoMotorComponent.h"
|
||||
|
||||
int initialize_wifi(WifiConfig wifi) {
|
||||
lcdScreen->add_log("Connecting to the WiFi network...");
|
||||
@ -12,10 +13,10 @@ int initialize_wifi(WifiConfig wifi) {
|
||||
}
|
||||
|
||||
Program::Program() {
|
||||
/*lcd = new M5LCD();*/
|
||||
Serial.begin(MONITOR_SPEED);
|
||||
this->servo = new ServoMotorComponent(2, 1, 0.1);
|
||||
lcdScreen = new M5LCD();
|
||||
lcdScreen->add_log("Initialize M5LCD component....");
|
||||
Serial.begin(MONITOR_SPEED);
|
||||
struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD};
|
||||
initialize_wifi(wifi_c);
|
||||
|
||||
@ -23,6 +24,8 @@ Program::Program() {
|
||||
|
||||
void Program::loop() {
|
||||
lcdScreen->update();
|
||||
this->servo->refresh();
|
||||
this->servo->setDesiredPosition(Position::LEFT);
|
||||
if (WiFiClass::status() == WL_CONNECTED && lcdScreen->get_components().wifi != COMPONENT_OK) {
|
||||
lcdScreen->add_log("Connected to the WiFi network");
|
||||
lcdScreen->set_wifi_status(COMPONENT_OK);
|
||||
|
Reference in New Issue
Block a user