fix: RM-all-todo #49

Merged
Clement merged 6 commits from fix-RM-all-todo into master 2023-05-14 21:26:54 +00:00
3 changed files with 13 additions and 28 deletions
Showing only changes of commit 23651cb6d5 - Show all commits

View File

@ -41,7 +41,7 @@ class Balance{
+ tar(val: int = 0): bool + tar(val: int = 0): bool
} }
class Ultrason{ class HumiTemp{
- capteur: DHT* - capteur: DHT*
+ HumiTemp(pin: int, type: String, fullVal: String) + HumiTemp(pin: int, type: String, fullVal: String)
+ read(): String + read(): String
@ -53,6 +53,15 @@ class Ultrason{
+ read(): String + 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 Balance --|> Capteur
Ultrason --|> Capteur Ultrason --|> Capteur
HumiTemp --|> Capteur HumiTemp --|> Capteur
@ -62,5 +71,8 @@ Program <-- Balance
Program <-- Ultrason Program <-- Ultrason
Program <-- HumiTemp Program <-- HumiTemp
Program <- API
OledScreen -> Program
@enduml @enduml

View File

@ -21,13 +21,6 @@ public:
*/ */
void welcome(); 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 * @brief Clear the screen

View File

@ -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() { void OledScreen::wifiWaiting() {
this->clear(); this->clear();
this->display->setCursor(0, 0); this->display->setCursor(0, 0);