diff --git a/build/synctastic.js b/build/synctastic.js index 211ef99e5a20a93b6c361b4c4a1542d037845ccb..9ddc6df31f2f65d6fede38b18a03122bdad0c9a0 100644 --- a/build/synctastic.js +++ b/build/synctastic.js @@ -16845,6 +16845,8 @@ exclude: ["minutely", "hourly", "daily", "alerts"], units: "metric" }); + if (this.config.debug) + this.log(sbbsdefs.LOG_DEBUG, "Weather API response: ".concat(weather)); if (weather.current === void 0) return false; var wd = openWeatherMap.wind_direction(weather.current.wind_deg); diff --git a/src/modules/weather.ts b/src/modules/weather.ts index 4632d8413bd04eacca0ed8ced4360da903bf0519..4f9e8733a0cbe43adf039b039cefaf036171d49e 100644 --- a/src/modules/weather.ts +++ b/src/modules/weather.ts @@ -37,6 +37,7 @@ export default class Weather extends Module { const lat = nodeInfo.position.latitudeI * .0000001; const lon = nodeInfo.position.longitudeI * .0000001; const weather = openWeatherMap.call_api_v3({ lat, lon, exclude: ['minutely', 'hourly', 'daily', 'alerts'], units: 'metric' }); + if (this.config.debug) this.log(sbbsdefs.LOG_DEBUG, `Weather API response: ${weather}`); if (weather.current === undefined) return false; const wd = openWeatherMap.wind_direction(weather.current.wind_deg); const conditions = weather.current.weather.map(e => e.main).join(', ');