diff --git a/bin/d32_pro_tft_firmware.bin b/bin/d32_pro_tft_firmware.bin index 3e3899c..1d1761b 100644 Binary files a/bin/d32_pro_tft_firmware.bin and b/bin/d32_pro_tft_firmware.bin differ diff --git a/bin/lcd_ssd1306_firmware.bin b/bin/lcd_ssd1306_firmware.bin index bdb93cc..c34700b 100644 Binary files a/bin/lcd_ssd1306_firmware.bin and b/bin/lcd_ssd1306_firmware.bin differ diff --git a/bin/tft_espi_firmware.bin b/bin/tft_espi_firmware.bin index 143abe8..7239ab8 100644 Binary files a/bin/tft_espi_firmware.bin and b/bin/tft_espi_firmware.bin differ diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 0953a90..a5a8b1a 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -2,7 +2,7 @@ Changelog ######### -v1.0.0 - Feb 11, 2021 - UI Overhaul, Scanner Overhaul, and loads more +v1.0.0 - Feb 12, 2021 - UI Overhaul, Scanner Overhaul, and loads more --------------------------------------------------------------------- This is a significant release, and is the result of a large number of changes over the past few weeks. Of note - this @@ -22,6 +22,8 @@ the primary authors of this update - @lbussy and @pletch. - Added uptime/last crash statistics to "About" page - Added "Factory Reset" option which removes WiFi configuration and push target settings - Changed: Multiple endpoints for settings updates +- Fixed bug where configuration AP could drown out other devices on nearby channels +- Added note to TFT at first boot about screen rotation being configurable diff --git a/platformio.ini b/platformio.ini index 93ae98d..be43524 100644 --- a/platformio.ini +++ b/platformio.ini @@ -48,14 +48,14 @@ build_flags = ; Do not use spaces around the "=" here, ; Debug logging -D PRINT_GRAV_UPDATES=0 ; Turn on and off gravity printing to serial log -D CORE_DEBUG_LEVEL=0 ; Set core Arduino log level (5 = high) - -D ARDUINO_LOG_LEVEL=4 ; Set Serial log level (6 = high) - ; -D DISABLE_LOGGING ; This will remove log lib from sketch + -D ARDUINO_LOG_LEVEL=0 ; Set Serial log level (6 = high) + -D DISABLE_LOGGING ; This will remove log lib from sketch ; Project conditional compile/options: -D BAUD=${common.monitor_speed} ; Serial monitor baud setting -D FILESYSTEM=SPIFFS ; Define filesystem in use -D DISABLE_OTA_UPDATES=1 - -D DOTELNET=0 ; Allow Telnet serial logging - -D TELNETPORT=23 + ;-D DOTELNET=0 ; Allow Telnet serial logging + ;-D TELNETPORT=23 -D WEBPORT=80 ; -D FSEDIT=0 ; Use a filesystem editor extra_scripts = tools/get_port.py ; Pick up port information based on OS @@ -65,7 +65,7 @@ lib_deps = https://github.com/lbussy/esptelnet.git https://github.com/thorrak/AsyncTCP.git#queued_push ; Originally ul-gh's queued_push branch https://github.com/thorrak/ESPAsyncWebServer.git#dev ; Originally ul-gh's dev branch - https://github.com/h2zero/NimBLE-Arduino.git ; TODO - At some point we need to lock the version of this down + h2zero/NimBLE-Arduino @ 1.2.0 ; https://github.com/h2zero/NimBLE-Arduino.git 256dpi/MQTT @ 2.4.8 https://github.com/tzapu/WiFiManager.git https://github.com/lbussy/LCBUrl.git#devel diff --git a/src/bridge_lcd.cpp b/src/bridge_lcd.cpp index 779accc..d733056 100644 --- a/src/bridge_lcd.cpp +++ b/src/bridge_lcd.cpp @@ -175,6 +175,15 @@ void bridge_lcd::display_wifi_connect_screen(const char *ap_name, const char *ap print_line("this AP via WiFi:", "", 2); print_line("Name:", ap_name, 3); print_line("Pass: ", ap_pass, 4); + +#ifdef LCD_TFT + tft->setFreeFont(&FreeSans9pt7b); + print_line("NOTE - If this appears upside-down,", "", 8); + print_line("this can be corrected via a setting in the", "", 9); + print_line("settings portal after connecting to WiFi", "", 10); +// print_line("", "", 11); +#endif + display(); } @@ -240,7 +249,11 @@ void bridge_lcd::print_line(const char *left_text, const char *right_text, uint8 #endif } -void bridge_lcd::print_line(const char *left_text, const char *middle_text, const char *right_text, uint8_t line) +void bridge_lcd::print_line(const char *left_text, const char *middle_text, const char *right_text, uint8_t line) { + print_line(left_text, middle_text, right_text, line, false); +} + +void bridge_lcd::print_line(const char *left_text, const char *middle_text, const char *right_text, uint8_t line, bool add_gutter) { #ifdef LCD_SSD1306 int16_t starting_pixel_row = 0; @@ -257,15 +270,21 @@ void bridge_lcd::print_line(const char *left_text, const char *middle_text, cons oled_display->setTextAlignment(TEXT_ALIGN_RIGHT); oled_display->drawString(128, starting_pixel_row, right_text); #elif defined(LCD_TFT) - int16_t starting_pixel_row = 0; starting_pixel_row = (tft->fontHeight(GFXFF)) * (line - 1) + 2; - tft->drawString(left_text, 25, starting_pixel_row, GFXFF); + if(add_gutter) // We need space to the left to be able to display the Tilt color block + tft->drawString(left_text, 25, starting_pixel_row, GFXFF); + else + tft->drawString(left_text, 1, starting_pixel_row, GFXFF); + yield(); tft->drawString(middle_text, 134, starting_pixel_row, GFXFF); yield(); - tft->drawString(right_text, 300 - tft->textWidth(right_text, GFXFF), starting_pixel_row, GFXFF); + if(add_gutter) + tft->drawString(right_text, 300 - tft->textWidth(right_text, GFXFF), starting_pixel_row, GFXFF); + else + tft->drawString(right_text, 319 - tft->textWidth(right_text, GFXFF), starting_pixel_row, GFXFF); #elif defined(LCD_TFT_ESPI) // ignore left text as we color the text by the tilt int16_t starting_pixel_row = 0; @@ -364,7 +383,7 @@ void bridge_lcd::display_tilt_screen(uint8_t screen_number) { #endif // Display the header row - print_line("Color", "Temp", "Gravity", header_row); + print_line("Color", "Temp", "Gravity", header_row, true); // Loop through each of the tilt colors cached by tilt_scanner, searching for active tilts for (uint8_t i = 0; i < TILT_COLORS; i++) { @@ -415,7 +434,8 @@ void bridge_lcd::print_tilt_to_line(tiltHydrometer *tilt, uint8_t line) { tft->setTextColor(tilt->text_color()); #endif - print_line(tilt->color_name().c_str(), temp, gravity, line); + // Print line with gutter for the color block for TFT screens + print_line(tilt->color_name().c_str(), temp, gravity, line, true); #ifdef LCD_TFT uint16_t fHeight = tft->fontHeight(GFXFF); diff --git a/src/bridge_lcd.h b/src/bridge_lcd.h index b85234a..e8375f4 100644 --- a/src/bridge_lcd.h +++ b/src/bridge_lcd.h @@ -60,6 +60,7 @@ class bridge_lcd { void print_line(const char *left_text, const char *right_text, uint8_t line); void print_line(const char *left_text, const char *middle_text, const char *right_text, uint8_t line); + void print_line(const char *left_text, const char *middle_text, const char *right_text, uint8_t line, bool add_gutter); void check_screen(); void clear();