forked from murmlgrmpf/Arduheat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cRooms.h
77 lines (57 loc) · 1.49 KB
/
cRooms.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
#ifndef cRooms_h
#define cRooms_h
//RTC
#include "Arduino.h"
#include "cTemp.h"
#include "cRoomValve.h"
#include <PID_v1.h>
#include "cPump.h"
#include "cMixer.h"
#include "cRoom.h"
#include <ArduinoJson.h>
// RTC for DateTime class
#include <RTClib.h>
#define nSwitch 4 // Number of switching times each day
#define nRooms 16 // Number of rooms
#define DiffTempHeatingLeadReturn 5 //
// Set default parameters for SpHeating curve
#define dsteil 0.6
#define dkh 4
#define dverst 2
#define dminvl 30
#define dmaxvl 40
class cRooms
{
public:
cRooms(void);
cTempSensor IsTempHeatingLead;
cTempSensor IsTempHeatingReturn;
cTempSensor TempOutside;
cRoom Room[nRooms] = {{0, this},{1, this},
{2, this},{3, this},{4, this},{5, this},
{6, this},{7, this},{8, this},{9, this},
{10, this},{11, this},{12, this},{13, this},
{14, this},{15, this}};
cPump Pump;
cMixer Mixer;
boolean need(void);
double getSpHeating(void);
SetTypes SetType;
void ChargeRooms(boolean bneedChargeRooms);
void initDefaultSetpoint();
double MasterSpTemps[nRoomTypes];
sTempSchedule TempOffsetSchedule[nSetTypes][nRoomTypes][nDayTypes][nSwitch];
void getOffsetTime(JsonObject& root);
int setOffsetTime(JsonObject& root);
void getOffsetTemp(JsonObject& root);
int setOffsetTemp(JsonObject& root);
void getRooms(JsonObject& root);
int setRooms(JsonObject& root);
void getData(JsonObject& root);
unsigned long lastHeating;
private:
double dMaxDiff;
double dMaxSp;
boolean needCharge;
};
#endif