fix some thing
This commit is contained in:
@ -8,11 +8,13 @@ API::API(String user, String password, String host, bool https){
|
||||
this->https = https;
|
||||
this->token = "";
|
||||
this->client = new WiFiEspClient();
|
||||
this->init = false;
|
||||
}
|
||||
|
||||
|
||||
bool API::wifiBegin(String wifiId, String wifiPass, Stream* espSerial){
|
||||
WiFi.init(espSerial);
|
||||
this->init = true;
|
||||
|
||||
// check for the presence of the shield
|
||||
if (WiFi.status() == WL_NO_SHIELD) {
|
||||
@ -28,6 +30,7 @@ bool API::wifiBegin(String wifiId, String wifiPass, Stream* espSerial){
|
||||
return true;
|
||||
}
|
||||
bool API::connect(){
|
||||
if(!this->init)return false;
|
||||
this->client->stop();
|
||||
bool sortie = false;
|
||||
|
||||
|
Reference in New Issue
Block a user