mirror of https://github.com/sqfmi/Watchy.git
Added public and private declarations for weather-related functions and members.
parent
4150bc625a
commit
581a561aed
13
src/Watchy.h
13
src/Watchy.h
|
@ -15,8 +15,9 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
typedef struct weatherData{
|
typedef struct weatherData{
|
||||||
int8_t temperature;
|
int8_t temperature;
|
||||||
int16_t weatherConditionCode;
|
int16_t weatherConditionCode;
|
||||||
|
String weatherDescription;
|
||||||
}weatherData;
|
}weatherData;
|
||||||
|
|
||||||
class Watchy {
|
class Watchy {
|
||||||
|
@ -47,12 +48,20 @@ class Watchy {
|
||||||
|
|
||||||
void showWatchFace(bool partialRefresh);
|
void showWatchFace(bool partialRefresh);
|
||||||
virtual void drawWatchFace(); //override this method for different watch faces
|
virtual void drawWatchFace(); //override this method for different watch faces
|
||||||
|
void setupWeather( uint32_t city, bool celsius, uint16_t updateInterval, String lang, String apikey );
|
||||||
|
uint8_t getAmbientTemp();
|
||||||
|
bool weatherCelsius = true;
|
||||||
private:
|
private:
|
||||||
void _bmaConfig();
|
void _bmaConfig();
|
||||||
static void _configModeCallback(WiFiManager *myWiFiManager);
|
static void _configModeCallback(WiFiManager *myWiFiManager);
|
||||||
static uint16_t _readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len);
|
static uint16_t _readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len);
|
||||||
static uint16_t _writeRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len);
|
static uint16_t _writeRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len);
|
||||||
|
uint16_t weatherInterval;
|
||||||
|
uint32_t weatherCity;
|
||||||
|
String weatherAPIKey;
|
||||||
|
String weatherLang;
|
||||||
|
bool weatherInit = false;
|
||||||
|
uint16_t weatherIntervalCounter = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern RTC_DATA_ATTR int guiState;
|
extern RTC_DATA_ATTR int guiState;
|
||||||
|
|
Loading…
Reference in New Issue