-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFSInterface.h
77 lines (58 loc) · 1.27 KB
/
FSInterface.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
// Created by aren on 4/2/21.
//
#ifndef DIVECOMPUTER_FSINTERFACE_H
#define DIVECOMPUTER_FSINTERFACE_H
#include "LittleFS.h"
#include "Deco.h"
#include "UI.h"
#include "DiveManager.h"
#include "HWInterface.h"
#define DIVE_LOG_PATH "/Dives/"
#define SETTINGS_PATH "/settings.cfg"
#define MAX_GAS_COUNT 10
//#define FORCE_RESET
struct UIData;
struct CompassCalibrationCoefficients;
#ifndef REALTIME
#define REALTIME
struct RealTime {
int Second;
int Minute;
int Hour;
int Day;
int Month;
int Year;
};
#else
struct RealTime;
#endif
struct Settings {
double GFHigh;
double GFLow;
double WaterDensity;
int GasCount;
Deco::Gas Gases[MAX_GAS_COUNT];
double TissueN2[16];
double TissueHe[16];
double CNS;
double OTU;
float CompassCalX;
float CompassCalY;
float CompassCalZ;
double LastDepth;
double LastTime;
RealTime Time;
};
extern File CurrDiveLog;
extern char SampleStartText[20];
bool InitFS(FSInfo &fsInfo);
void WriteSettingsFile(Settings settings);
Settings GenerateSettings();
void ApplySettings(Settings settings);
Settings ReadSettingsFile();
void OpenDiveLog();
void CloseDiveLog();
void EnterInDiveLog(UIData data);
std::vector<std::string> ListDives();
#endif //DIVECOMPUTER_FSINTERFACE_H