43 lines
827 B
C++
43 lines
827 B
C++
#ifndef SETTINGS_H
|
|
#define SETTINGS_H
|
|
|
|
#include <Preferences.h>
|
|
|
|
#ifdef WIFI
|
|
#ifdef TINANCE2_BACKEND
|
|
#include "tinance2.h"
|
|
#include "secrets.h"
|
|
#endif
|
|
#endif
|
|
|
|
class Settings {
|
|
private:
|
|
bool disableDoor;
|
|
String doorMode;
|
|
String tinance2ReaderIdentifier;
|
|
String tinance2ReaderKey;
|
|
|
|
public:
|
|
Settings();
|
|
|
|
void loadFromEEPROM();
|
|
void saveToEEPROM();
|
|
void saveStringToEEPROM(String string, String value);
|
|
void saveBoolToEEPROM(String string, String value);
|
|
|
|
void setDisableDoor(bool value);
|
|
bool getDoorDisabled();
|
|
|
|
void setDoorMode(String value);
|
|
String getDoorMode();
|
|
|
|
void setTinance2ReaderIdentifier(String value);
|
|
String getTinance2ReaderIdentifier();
|
|
|
|
void setTinance2ReaderKey(String value);
|
|
String getTinance2ReaderKey();
|
|
};
|
|
|
|
extern Settings settings;
|
|
|
|
#endif // SETTINGS_H
|