Merge remote-tracking branch 'upstream/main' into modernization-and-refactor

This commit is contained in:
Eddy G
2025-06-29 22:42:03 -04:00
3 changed files with 7 additions and 4 deletions

View File

@@ -153,7 +153,7 @@ class CurrentWeather extends WeatherDisplay {
condition = shortConditions(condition);
}
const wind = (typeof this.data.WindSpeed === 'number') ? this.data.WindDirection.padEnd(3, '') + this.data.WindSpeed.toString().padStart(3, ' ') : '-';
const wind = (typeof this.data.WindSpeed === 'number') ? this.data.WindDirection.padEnd(3, '') + this.data.WindSpeed.toString().padStart(3, ' ') : this.data.WindSpeed;
const fill = {
temp: this.data.Temperature + String.fromCharCode(176),
@@ -251,6 +251,9 @@ const parseData = (data) => {
data.PressureDirection = '';
data.TextConditions = observations.textDescription;
// set wind speed of 0 as calm
if (data.WindSpeed === 0) data.WindSpeed = 'Calm';
// difference since last measurement (pascals, looking for difference of more than 150)
const pressureDiff = (observations.barometricPressure.value - data.features[1].properties.barometricPressure.value);
if (pressureDiff > 150) data.PressureDirection = 'R';