You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
980 B

#ifndef _MAIN_H
#define _MAIN_H
void resetToFactoryDefaults();
void setup();
void onMqttConnect(bool sessionPresent);
void transmitStatus();
void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total);
void suspend(uint32_t secondsToSleep);
void suspend();
void setAlarmTime(struct tm time);
struct tm getAlarmTime();
bool isAlarmActive();
void loop();
void rotation(int i, int direction, int buttonPressed);
void WiFiGotIP(WiFiEvent_t event, WiFiEventInfo_t info);
struct __attribute__((packed)) WEBRADIO_STATE_PERSISTANT {
int boot_count = 0;
// uint8_t volume;
};
struct __attribute__((packed)) WEBRADIO_STATE {
bool displaySleep = true;
char timeStr[20];
char string1[32];
char string2[32];
// currentScreen
// bool playing;
// bool wifiConnected;
/* float temperature;
float humidity;
float pressure;
float temp2;*/
int voltage;
int32_t rssi;
};
#endif /* _MAIN_H */