mirror of
https://github.com/Lemonochrme/clover.git
synced 2025-06-08 08:40:50 +02:00
Changed font
This commit is contained in:
parent
cf50debfd0
commit
668d22fd40
3 changed files with 9 additions and 6 deletions
|
@ -28,6 +28,7 @@ void Screen::Setup(uint8_t *font)
|
|||
connectedWindow.Add({TextBox("Connected to Wi-Fi !", StyleWidth::LEFT, U8G2_BTN_BW0),
|
||||
TextBox("IP address: ", StyleWidth::LEFT, U8G2_BTN_BW0),
|
||||
TextBox("addr", StyleWidth::CENTERED, U8G2_BTN_BW0)});
|
||||
loopWindow.Add(TextBox("Hello, Plant!", StyleWidth::CENTERED, U8G2_BTN_BW1));
|
||||
}
|
||||
|
||||
uint16_t Screen::setupHeader(const uint16_t w_padding, const uint16_t h_padding)
|
||||
|
@ -95,11 +96,12 @@ void Screen::connected(const char *ipaddress, uint8_t timing)
|
|||
|
||||
void Screen::loop()
|
||||
{
|
||||
_screen->clearBuffer(); // clear the internal memory
|
||||
_screen->clearBuffer();
|
||||
_screen->setFont(_font);
|
||||
_screen->drawStr(0, 10, "Hello Plant!"); // write something to the internal memory
|
||||
_screen->sendBuffer(); // transfer internal memory to the display
|
||||
delay(1000);
|
||||
|
||||
loopWindow.Display(StyleHeight::CENTERED);
|
||||
|
||||
_screen->sendBuffer();
|
||||
}
|
||||
|
||||
uint16_t Screen::getHeight() { return _height; }
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace Display
|
||||
{
|
||||
constexpr uint8_t FONT_SIZE=6;
|
||||
constexpr uint8_t FONT_SIZE=8;
|
||||
|
||||
class Screen
|
||||
{
|
||||
|
@ -48,6 +48,7 @@ namespace Display
|
|||
// Static Components
|
||||
Components connectingWindow;
|
||||
Components connectedWindow;
|
||||
Components loopWindow;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Component humidity(ComponentType::Analog, PIN_A0);
|
|||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
Display::Screen::GetInstance().Setup(const_cast<uint8_t*>(u8g2_font_profont10_tr));
|
||||
Display::Screen::GetInstance().Setup(const_cast<uint8_t*>(u8g2_font_busdisplay8x5_tr));
|
||||
ServerHandler::GetInstance().setup(ssid, pswd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue