Watchy/examples/WatchFaces/MacPaint/settings.h

29 lines
1.0 KiB
C
Raw Normal View History

2021-12-30 22:47:38 -05:00
#ifndef SETTINGS_H
#define SETTINGS_H
//Weather Settings
#define LAT "45.793411" // New York City, Looked up on https://www.latlong.net/
#define LON "-97.751968"
2021-12-30 22:47:38 -05:00
#define OPENWEATHERMAP_APIKEY "f058fe1cad2afe8e2ddc5d063a64cecb" //use your own API key :)
#define OPENWEATHERMAP_URL "http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&lang={lang}&units={units}&appid={apiKey}" //open weather api
2021-12-30 22:47:38 -05:00
#define TEMP_UNIT "metric" //metric = Celsius , imperial = Fahrenheit
#define TEMP_LANG "en"
#define WEATHER_UPDATE_INTERVAL 30 //must be greater than 5, measured in minutes
//NTP Settings
#define NTP_SERVER "pool.ntp.org"
#define GMT_OFFSET_SEC 3600 * -5 //New York is UTC -5 EST, -4 EDT, will be overwritten by weather data
2021-12-30 22:47:38 -05:00
watchySettings settings{
.lat = LAT,
.lon = LON,
.weatherAPIKey = OPENWEATHERMAP_APIKEY,
.weatherURL = OPENWEATHERMAP_URL,
.weatherUnit = TEMP_UNIT,
.weatherLang = TEMP_LANG,
.weatherUpdateInterval = WEATHER_UPDATE_INTERVAL,
.ntpServer = NTP_SERVER,
.gmtOffset = GMT_OFFSET_SEC,
2021-12-30 22:47:38 -05:00
};
#endif