-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDiveManager.h
54 lines (38 loc) · 1 KB
/
DiveManager.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
//
// Created by aren on 30/1/21.
//
#ifndef DIVECOMPUTER_DIVEMANAGER_H
#define DIVECOMPUTER_DIVEMANAGER_H
#include <Deco.h>
#include "DiveComputer.h"
#include "HWInterface.h"
#include "UI.h"
#include "FSInterface.h"
#define ASCENT_RATE 10
#define DESCENT_RATE 30
#define ALGO_UPDATE_RATE 0.1 // Update every 6 seconds
extern double CNSSlopes[];
extern double CNSIntercepts[];
struct RealTime;
struct UIData;
extern double CNS;
extern double OTUs;
extern double AverageDepth;
extern double DepthSum;
extern double MaxDepth;
extern double LastDepth;
extern double Rate;
extern Deco DecoActual;
extern RealTime DiveStartTime;
extern Deco::Schedule CurrentSchedule;
extern double LastUpdateTime;
extern double LastDiveDepth;
extern double LastDiveTime;
double TimeDiff(RealTime time1, RealTime time2);
Deco::Gas GetCurrGas();
double GetTTS(const Deco::Schedule &schedule);
void StartDive();
void EndDive();
void UpdateDiveManager(UIData data);
void DecayO2Exposure(double time);
#endif //DIVECOMPUTER_DIVEMANAGER_H