#include #include "ui.h" #include "vars.h" bool history_initialized = false; dataset_t glblData = {.temp = NAN, .hum = NAN, .pres = NAN, .seaLevelPress = NAN, .settemp= NAN, .heating=false, .enBuff =false, .relPowerSave=true, .presAlarm=false, .myIP={0}, .wifiStrength = WIFISTRENGTH_OFF, .wifiMode= WIFIMODE_OFF, .override = OVR_NONE, .bootTime = {0}}; hist_t history = {{0},{0},{0}}; int32_t* history_getPressPt(void){ return history.press; } int32_t* history_getHumPt(void){ return history.hum; } int32_t* history_getTempPt(void){ return history.temp; } void history_setPress(const uint16_t index, const float _press){ history.press[index] = (uint8_t) _press; } void history_setHum(uint16_t index, float _hum){ history.hum[index] = (int32_t) _hum; } void history_setTemp(const uint16_t index, const float _temp){ history.temp[index] = (int32_t) (_temp*10); } bool history_isInitialized(void){ return history_initialized; } void history_append(const float _press, const float _temp, const float _hum){ if(history_initialized){ for(uint16_t i=1; i