fix diagramme
This commit is contained in:
parent
0037b1831a
commit
23651cb6d5
@ -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
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user