Compare commits
3 commits
2e0d19d8f6
...
eac6b29825
Author | SHA1 | Date | |
---|---|---|---|
|
eac6b29825 | ||
|
c6a7fd1f9e | ||
07382f4982 |
2 changed files with 15 additions and 11 deletions
|
@ -34,10 +34,10 @@ class Oled
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void begin();
|
void begin();
|
||||||
void progressBar(uint8_t i);
|
void progressBar(uint8_t i, bool clear);
|
||||||
void progressBar(uint8_t i, String big_text);
|
void progressBar(uint8_t i, String big_text, bool clear);
|
||||||
void progressBar(uint8_t i, String big_text, String small_text1);
|
void progressBar(uint8_t i, String big_text, String small_text1, bool clear);
|
||||||
void progressBar(uint8_t i, String big_text, String small_text1, String small_text2);
|
void progressBar(uint8_t i, String big_text, String small_text1, String small_text2, bool clear);
|
||||||
void show_values(int speed, int min_speed, int max_speed, volatile DataStruct *HallData, uint8_t hall_sensors_count, unsigned long runtime, String ipaddr);
|
void show_values(int speed, int min_speed, int max_speed, volatile DataStruct *HallData, uint8_t hall_sensors_count, unsigned long runtime, String ipaddr);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,23 +22,27 @@ void Oled::begin()
|
||||||
display->setFont(ArialMT_Plain_16);
|
display->setFont(ArialMT_Plain_16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Oled::progressBar(uint8_t i)
|
void Oled::progressBar(uint8_t i, bool clear)
|
||||||
{
|
{
|
||||||
progressBar(i, "", "", "");
|
progressBar(i, "", "", "", clear);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Oled::progressBar(uint8_t i, String big_text)
|
void Oled::progressBar(uint8_t i, String big_text, bool clear)
|
||||||
{
|
{
|
||||||
progressBar(i, big_text, "", "");
|
progressBar(i, big_text, "", "", clear);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Oled::progressBar(uint8_t i, String big_text, String small_text1)
|
void Oled::progressBar(uint8_t i, String big_text, String small_text1, bool clear)
|
||||||
{
|
{
|
||||||
progressBar(i, big_text, small_text1, "");
|
progressBar(i, big_text, small_text1, "", clear);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Oled::progressBar(uint8_t i, String big_text, String small_text1, String small_text2)
|
void Oled::progressBar(uint8_t i, String big_text, String small_text1, String small_text2, bool clear)
|
||||||
{
|
{
|
||||||
|
if(true == clear)
|
||||||
|
{
|
||||||
|
display->clear();
|
||||||
|
}
|
||||||
display->drawProgressBar(6, 28, 116, 6, i);
|
display->drawProgressBar(6, 28, 116, 6, i);
|
||||||
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
if(big_text != "")
|
if(big_text != "")
|
||||||
|
|
Loading…
Add table
Reference in a new issue