#ifndef MAIN_H
#define MAIN_H

#include <version.h>

extern "C" {
  #include "freertos/FreeRTOS.h"
  #include "freertos/timers.h"
}


//#define MAXREADINGS 224
#define MAXREADINGS 200

typedef struct {
    float temp;
    float hum;
    float pres;
} BME280Data;

#ifdef MAIN
const char* wday[] = {"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"};
const char* month[] = {"Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}; 
TimerHandle_t mqttReconnectTimer;
TimerHandle_t wifiReconnectTimer;
int bmeReadTime = 10000;
int updateTime = 30000;
struct tm timeinfo;
int oldDay = 0;
BME280Data bmedata;

#else
extern const char* wday[7];
extern const char* month[12];
extern TimerHandle_t mqttReconnectTimer;
extern TimerHandle_t wifiReconnectTimer;
extern int bmeReadTime;
extern int updateTime;
extern struct tm timeinfo;
extern BME280Data bmedata;
#endif

void setBMEreadtime(int time);

#endif

