-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathotController.h
More file actions
39 lines (30 loc) · 900 Bytes
/
otController.h
File metadata and controls
39 lines (30 loc) · 900 Bytes
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
#ifndef OT_CONTROLLER_H
#define OT_CONTROLLER_H
#include "regulator.h"
#include "opentherm.h"
#include "state.h"
#include "accumulatorCtrl.h"
class OT_CONTROLLER {
public:
OT_CONTROLLER(STATE *state, ACCUMULATOR_CTRL *accumulatorCtrl, byte pinMasterIn, byte pinMasterOut, byte pinSlaveIn, byte pinSlaveOut);
void setup();
void update(int deltaMs);
private:
STATE &_state;
ACCUMULATOR_CTRL &_accumulatorCtrl;
OpenthermData _request;
OpenthermData _response;
bool _responseOverridden = false; // user provided response to master instead of received from slave
byte _pinMasterIn;
byte _pinMasterOut;
byte _pinSlaveIn;
byte _pinSlaveOut;
byte _mode;
byte _phase;
void _interceptRequest();
void _interceptResponse();
void _onRequestTimeout();
void _logRequestToSerial();
void _logResponseToSerial();
};
#endif