ThingPulse / esp8266-weather-station-color

ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display
https://thingpulse.com/product/esp8266-wifi-color-display-kit-2-4/
MIT License
569 stars 222 forks source link

12 hour setting on clock but not on forecasts #124

Closed SillyHats closed 2 years ago

SillyHats commented 3 years ago

8<------------------------ BUG REPORT -----------------------------------------

Expected behavior

Clock on top shows AM/PM with IS_STYLE_12HR setting set to true. Currently the clock shows 6:15pm. Under clock is current conditions. Under current conditions is the forecast scrolling right to left. Under the forecast is the moon information with rise and set times.

Actual behavior

The times for the forecast currently show 8:00 and 20:00 rather than 8am and 8pm. Moon rise and set times show 06:00 and 19:00 rather than 6:00am and 7:00pm.

Test code

Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.

// pick one from https://github.com/esp8266/Arduino/blob/master/cores/esp8266/TZ.h
#define TIMEZONE TZ_America_New_York

// values in metric or imperial system?
const boolean IS_METRIC = false;

// Change for 12 Hour/ 24 hour style clock
bool IS_STYLE_12HR = true;

Weather Station Color version

Master code branch.

Hardware

2.8" TFT touch display with ESP8266 D1 pro WeMos D1 Mini ESP8266 WIFI Module Board Pro 16M 240x320 2.8" SPI TFT LCD Touch Panel Serial Port Module With PBC ILI9341 2.8 Inch SPI Serial White LED Display

8<------------------------ END BUG REPORT -------------------------------------

TiVoHomeUser commented 3 years ago

I created a fix for this and made a draft pull request "Time period" with proposed changes please check it out

SillyHats commented 3 years ago

PR#128 seems to have fixed this issue. Thanks!

While we are here discussing units do you know which line controls the decimal precision of the temperature display in current and forecasts? I would prefer 65F to the 65.1F that it currently shows.

marcelstoer commented 3 years ago

do you know which line controls the decimal precision of the temperature display in current and forecasts?

https://github.com/ThingPulse/esp8266-weather-station-color/blob/master/esp8266-weather-station-color.ino -> search for "temp"