diff --git a/CO2_Gadget_TFT.h b/CO2_Gadget_TFT.h index 1c90a678..4e2af1e0 100644 --- a/CO2_Gadget_TFT.h +++ b/CO2_Gadget_TFT.h @@ -188,9 +188,18 @@ void showBLEIcon(int32_t posX, int32_t posY) { void showMQTTIcon(int32_t posX, int32_t posY) { tft.drawRoundRect(posX-2, posY-2, 16+4, 16+4, 2, TFT_DARKGREY); if (!activeMQTT) { - tft.drawBitmap(posX-1, posY-1, iconMQTT, 16, 16, TFT_BLACK, TFT_DARKGREY); + tft.drawBitmap(posX, posY, iconMQTT, 16, 16, TFT_BLACK, TFT_DARKGREY); } else { - tft.drawBitmap(posX-1, posY-1, iconMQTT, 16, 16, TFT_BLACK, iconDefaultColor); + tft.drawBitmap(posX, posY, iconMQTT, 16, 16, TFT_BLACK, iconDefaultColor); + } +} + +void showEspNowIcon(int32_t posX, int32_t posY) { + tft.drawRoundRect(posX-2, posY-2, 16+4, 16+4, 2, TFT_DARKGREY); + if (!activeESPNOW) { + tft.drawBitmap(posX, posY, iconEspNow, 16, 16, TFT_BLACK, TFT_DARKGREY); + } else { + tft.drawBitmap(posX, posY, iconEspNow, 16, 16, TFT_BLACK, iconDefaultColor); } } @@ -284,6 +293,7 @@ void displayShowValues(uint16_t co2) { showWiFiIcon(24, 3); showMQTTIcon(46, 3); showBLEIcon(2, 3); + showEspNowIcon(68, 3); // Revert datum setting tft.setTextDatum(defaultDatum); diff --git a/icons.h b/icons.h index fc38a926..018f32e2 100644 --- a/icons.h +++ b/icons.h @@ -36,8 +36,13 @@ const unsigned char iconBLE[32] PROGMEM = { // 'iconMQTT', 16x16px const unsigned char iconMQTT[32] PROGMEM = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xc3, 0xe1,0xc3, 0xe1, 0x83, 0xe1, 0x83, - 0xe0, 0x83, 0xe4, 0x83, 0xe4, 0x03, 0xe4, 0x23, 0xe4, 0x23, 0xe6, 0x23, 0xe6, 0x73, 0xff, 0xff}; + 0xff, 0xff, 0xff, 0xff, 0x87, 0xe1, 0x87, 0xe1, 0x83, 0xc1, 0x83, 0xc1, 0x89, 0x91, 0x89, 0x91, + 0x8c, 0x31, 0x8c, 0x31, 0x8e, 0x71, 0x8e, 0x71, 0x8f, 0xf1, 0x8f, 0xf1, 0xff, 0xff, 0xff, 0xff}; + +// 'iconEspNow', 16x16px +const unsigned char iconEspNow[32] PROGMEM = { + 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xc0, 0x03, 0xe6, 0x67, 0xe2, 0x47, 0xf0, 0x0f, 0xf8, 0x1f, + 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff}; // 'iconHumidity', 16x16px const uint16_t iconHumidity[256] PROGMEM = { diff --git a/platformio.ini b/platformio.ini index e2daaf50..4ea3da32 100644 --- a/platformio.ini +++ b/platformio.ini @@ -50,7 +50,7 @@ build_flags = -D MQTT_BROKER_SERVER="\"192.168.1.145"\" -D CO2_GADGET_VERSION="\"0.7."\" - -D CO2_GADGET_REV="\"005"\" + -D CO2_GADGET_REV="\"006"\" -D CORE_DEBUG_LEVEL=0 -DNEOPIXEL_PIN=26 ; Pinnumber for button for down/next and back / exit actions -DNEOPIXEL_COUNT=16 ; How many neopixels to control