forked from toniebox-reverse-engineering/hackiebox_cfw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoxConfig.h
33 lines (24 loc) · 914 Bytes
/
BoxConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef BoxConfig_h
#define BoxConfig_h
#include "BaseHeader.h"
#include "ConfigStructures.h"
#include "BoxSD.h"
#define BOXCONFIG_JSON_SIZE 515
//{"version":255,"battery":{"voltageFactor":4294967295,"voltageChargerFactor":4294967295,"lowAdc":65535,"criticalAdc":65535,"sleepMinutes":255},"buttonEars":{"longPressMs":65535,"veryLongPressMs":65535},"wifi":{"ssid":"12345678901234567890123456789012","password":"1234567890123456789012345678901234567890123456789012345678901234"},"log":{"sdLog":false},"misc":{"autodump":false}}
//Size from https://arduinojson.org/v6/assistant/
class BoxConfig {
public:
void
begin(),
read(),
write();
String getAsJson();
bool setFromJson(String);
ConfigStruct* get();
private:
String _json;
ConfigStruct _config;
void _initializeConfig();
};
extern BoxConfig Config;
#endif