Compare commits
No commits in common. "9b6c1beb8de46af8890beac2bdbb3b5d2145b140" and "2fefc9f96d5ec3b05897f6ea1d08d2b457f0cbe6" have entirely different histories.
9b6c1beb8d
...
2fefc9f96d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
IOT/docs/doxygen output/*
|
|
2740
IOT/docs/Doxyfile
2740
IOT/docs/Doxyfile
File diff suppressed because it is too large
Load Diff
@ -1,24 +0,0 @@
|
|||||||
@startuml Class Diagram
|
|
||||||
|
|
||||||
|
|
||||||
Class API {
|
|
||||||
- user: String
|
|
||||||
- password: String
|
|
||||||
- serveurHost: String
|
|
||||||
- https: bool
|
|
||||||
- client: WiFiEspClient*
|
|
||||||
- connect(): bool
|
|
||||||
+ API(user: String, password: String, host: String, https: bool = true)
|
|
||||||
+ wifiBegin(wifiId: String, wifiPass: String, espSerial: Stream*): bool
|
|
||||||
+ sendValue(val: String, pouvelleID: String, unit: String, full: bool): bool
|
|
||||||
}
|
|
||||||
|
|
||||||
Class Program {
|
|
||||||
+ Program()
|
|
||||||
+ setup()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@enduml
|
|
@ -21,25 +21,25 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Initialise la connection Wifi de l'esp
|
* @brief Initialise la connection Wifi de l'esp
|
||||||
*
|
*
|
||||||
* @param[in] wifiId nom du wifi
|
* @param wifiId nom du wifi
|
||||||
* @param[in] wifiPass mot de passe du wifi
|
* @param wifiPass mot de passe du wifi
|
||||||
* @param[in] espSerial port serie de l'esp (hard ou soft)
|
* @param espSerial port serie de l'esp (hard ou soft)
|
||||||
* @return true la connexion a bien fonctionner
|
* @return true la connexion a bien fonctionner
|
||||||
* @return false erreur a la connexion
|
* @return false erreur a la connexion
|
||||||
*/
|
*/
|
||||||
bool wifiBegin(String wifiID, String wifiPass, Stream* espSerial);
|
bool wifiBegin(String wifiId, String wifiPass, Stream* espSerial);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief envoie la valeur d'un capteur de poubelle à l'api
|
* @brief envoie la valeur d'un capteur de poubelle à l'api
|
||||||
*
|
*
|
||||||
* @param[in] val valeur du capteur
|
* @param val valeur du capteur
|
||||||
* @param[in] poubelleID ID de la poubelle
|
* @param poubelleID ID de la poubelle
|
||||||
* @param[in] unit uniter de mesure du capteur *(ex: g, cm, degree,...)
|
* @param unit uniter de mesure du capteur *(ex: g, cm, degree,...)
|
||||||
* @param[in] full poubelle est considéré comme pleine
|
* @param full poubelle est considéré comme pleine
|
||||||
* @return true la valeur s'est bien envoyer
|
* @return true la valeur s'est bien envoyer
|
||||||
* @return false il y a une erreur durran l'envoie
|
* @return false il y a une erreur durran l'envoie
|
||||||
*/
|
*/
|
||||||
bool sendValue(String val, String poubelleID, String unit, bool full);
|
bool sendValute(String val, String poubelleID, String unit, bool full);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -81,7 +81,7 @@ bool API::connect(){
|
|||||||
return sortie;
|
return sortie;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool API::sendValue(String val, String poubelleID, String valUnit, bool full){
|
bool API::sendValute(String val, String poubelleID, String valUnit, bool full){
|
||||||
JSONVar data;
|
JSONVar data;
|
||||||
data["value"] = val;
|
data["value"] = val;
|
||||||
data["trash_id"] = poubelleID;
|
data["trash_id"] = poubelleID;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user