almanac delivers data when disabled
This commit is contained in:
parent
a44bd866ed
commit
7cf9dd6466
3 changed files with 7 additions and 6 deletions
|
@ -368,7 +368,6 @@ const btnGetGpsClick = async () => {
|
||||||
txtAddress.value = `${round2(latitude, 4)}, ${round2(longitude, 4)}`;
|
txtAddress.value = `${round2(latitude, 4)}, ${round2(longitude, 4)}`;
|
||||||
|
|
||||||
doRedirectToGeometry({ y: latitude, x: longitude }, (point) => {
|
doRedirectToGeometry({ y: latitude, x: longitude }, (point) => {
|
||||||
console.log(point);
|
|
||||||
const location = point.properties.relativeLocation.properties;
|
const location = point.properties.relativeLocation.properties;
|
||||||
// Save the query
|
// Save the query
|
||||||
const query = `${location.city}, ${location.state}`;
|
const query = `${location.city}, ${location.state}`;
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Almanac extends WeatherDisplay {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getData(_weatherParameters) {
|
async getData(_weatherParameters) {
|
||||||
if (!super.getData(_weatherParameters)) return;
|
const superResponse = super.getData(_weatherParameters);
|
||||||
const weatherParameters = _weatherParameters ?? this.weatherParameters;
|
const weatherParameters = _weatherParameters ?? this.weatherParameters;
|
||||||
|
|
||||||
// get sun/moon data
|
// get sun/moon data
|
||||||
|
@ -33,11 +33,13 @@ class Almanac extends WeatherDisplay {
|
||||||
sun,
|
sun,
|
||||||
moon,
|
moon,
|
||||||
};
|
};
|
||||||
// update status
|
|
||||||
this.setStatus(STATUS.loaded);
|
|
||||||
|
|
||||||
// share data
|
// share data
|
||||||
this.getDataCallback();
|
this.getDataCallback();
|
||||||
|
|
||||||
|
if (!superResponse) return;
|
||||||
|
|
||||||
|
// update status
|
||||||
|
this.setStatus(STATUS.loaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
calcSunMoonData(weatherParameters) {
|
calcSunMoonData(weatherParameters) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ const weatherParameters = {};
|
||||||
|
|
||||||
// auto refresh
|
// auto refresh
|
||||||
const AUTO_REFRESH_INTERVAL_MS = 500;
|
const AUTO_REFRESH_INTERVAL_MS = 500;
|
||||||
const AUTO_REFRESH_TIME_MS = 6000; // 10 min.
|
const AUTO_REFRESH_TIME_MS = 600000; // 10 min.
|
||||||
let AutoRefreshIntervalId = null;
|
let AutoRefreshIntervalId = null;
|
||||||
let AutoRefreshCountMs = 0;
|
let AutoRefreshCountMs = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue