Browse Source

set y_offset globally

ir
Hendrik Langer 5 years ago
parent
commit
af7bdfffc9
  1. 5
      src/main.cpp

5
src/main.cpp

@ -44,6 +44,8 @@ static const char* TAG = "MAIN";
WiFiMulti wifiMulti;
GxEPD2_BW<GxEPD2_213_B72, GxEPD2_213_B72::HEIGHT> display(GxEPD2_213_B72(/*CS=SS*/ TFT_CS, /*DC=*/ TFT_DC, /*RST=*/ TFT_RST, /*BUSY=*/ -1)); // GDEH0213B72
static constexpr uint8_t y_offset = 8;
Adafruit_BME280 bme280; // I2C (also available: hardware SPI
Adafruit_BME680 bme680; // I2C (also available: hardware SPI
//HardwareSerial Serial2(2);
@ -223,7 +225,6 @@ void receiveMqtt(const char* topic, const char* data) {
void displayValues() {
static constexpr uint8_t y_offset = 8;
display.setRotation(1);
display.setFont(NULL);
display.setTextColor(GxEPD_BLACK);
@ -610,7 +611,7 @@ void setup()
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
displayIcoPartial(ico_wifi16, display.width()-20, 0, ico_wifi16_width, ico_wifi16_height);
displayIcoPartial(ico_wifi16, display.width()-20, y_offset+0, ico_wifi16_width, ico_wifi16_height);
}
ESP_LOGD(TAG, "trying to fetch over-the-air update");

Loading…
Cancel
Save