diff --git a/IOT/docs/diagram/class.puml b/IOT/docs/diagram/class.puml index 36bc169..4b7cdb5 100644 --- a/IOT/docs/diagram/class.puml +++ b/IOT/docs/diagram/class.puml @@ -41,7 +41,7 @@ class Balance{ + tar(val: int = 0): bool } -class Ultrason{ +class HumiTemp{ - capteur: DHT* + HumiTemp(pin: int, type: String, fullVal: String) + read(): String @@ -53,6 +53,15 @@ class Ultrason{ + read(): String } +class OledScreen{ + - display: Adafruit_SSD1306* + + OledScreen(screenWidth: int, screenHeight: int, oledResetPin: int = -1) + + welcome(): void + + clear(): void + + wifiWaiting(): void + + printVal(distance: String, poid: String, humitemp: String): void +} + Balance --|> Capteur Ultrason --|> Capteur HumiTemp --|> Capteur @@ -62,5 +71,8 @@ Program <-- Balance Program <-- Ultrason Program <-- HumiTemp +Program <- API + +OledScreen -> Program @enduml \ No newline at end of file diff --git a/IOT/lib/OledScreen/include/OledScreen.h b/IOT/lib/OledScreen/include/OledScreen.h index d2a7f6e..11a553d 100644 --- a/IOT/lib/OledScreen/include/OledScreen.h +++ b/IOT/lib/OledScreen/include/OledScreen.h @@ -21,13 +21,6 @@ public: */ void welcome(); - /** - * @brief print the total amount on the screen - * - * @param amount The total amount to print in centimes - */ - void printAmount(int amount); - /** * @brief Clear the screen diff --git a/IOT/lib/OledScreen/src/OledScreeen.cpp b/IOT/lib/OledScreen/src/OledScreeen.cpp index c88b6b2..dfa7c29 100644 --- a/IOT/lib/OledScreen/src/OledScreeen.cpp +++ b/IOT/lib/OledScreen/src/OledScreeen.cpp @@ -40,26 +40,6 @@ void OledScreen::printVal(String distance, String poid, String humitemp){ -void OledScreen::printAmount(int amount) { - this->display->clearDisplay(); - this->display->setCursor(0, 0); - this->display->setTextSize(2); - this->display->setTextColor(WHITE); - this->display->println(F(" Total: ")); - this->display->println(); - - this->display->print(amount / 100); - this->display->print(F(",")); - int centimes = amount % 100; - if (centimes < 10) { - this->display->print(F("0")); - } - this->display->println(centimes); - this->display->print(F(" EUR")); - this->display->display(); -} - - void OledScreen::wifiWaiting() { this->clear(); this->display->setCursor(0, 0);