-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
227 lines (203 loc) · 3.52 KB
/
config.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
//--------------------------- SETUP -------------------------------------
#define MPPT_100_30 // Define used Victron Device
// Supported:
// "MPPT 75 | 10" tested with FW 1.64
// "MPPT 75 | 15" tested with FW 1.56
// "MPPT 100 | 20" tested with FW 1.5 / 1.56
// "MPPT 100 | 30" tested with FW 1.59
//--------------------------- SETUP -------------------------------------
// MPPT 75 | 10
#ifdef MPPT_75_10
const byte buffsize = 32;
const byte value_bytes = 33;
const byte label_bytes = 9;
const byte num_keywords = 20;
char keywords[num_keywords][label_bytes] = {
"PID",
"FW",
"SER#",
"V",
"I",
"VPV",
"PPV",
"CS",
"MPPT",
"OR",
"ERR",
"LOAD",
"IL",
"H19",
"H20",
"H21",
"H22",
"H23",
"HSDS",
"Checksum"
};
#define PID 0
#define FW 1
#define SER 2 // Offically SER# but # does not play that well as macro
#define V 3 // ScV
#define I 4 // ScI
#define VPV 5 // PVV
#define PPV 6 // PVI = PVV / VPV
#define CS 7 // ScS
#define ERR 8 // ScERR
#define LOAD 9 // SLs
#define IL 10 // SLI
#define H19 11
#define H20 12
#define H21 13
#define H22 14
#define H23 15
#define HSDS 16
#define CHECKSUM 17
#endif
//----------------------------------------------------------------
// MPPT 75 | 15
#ifdef MPPT_75_15
const byte buffsize = 32;
const byte value_bytes = 33;
const byte label_bytes = 9;
const byte num_keywords = 19;
char keywords[num_keywords][label_bytes] = {
"PID",
"FW",
"SER#",
"V",
"I",
"VPV",
"PPV",
"CS",
"MPPT",
"ERR",
"LOAD",
"IL",
"H19",
"H20",
"H21",
"H22",
"H23",
"HSDS",
"Checksum"
};
#define PID 0
#define FW 1
#define SER 2 // Offically SER# but # does not play that well as macro
#define V 3 // ScV
#define I 4 // ScI
#define VPV 5 // PVV
#define PPV 6 // PVI = PVV / VPV
#define CS 7 // ScS
#define MPPT 8
#define ERR 9 // ScERR
#define LOAD 10 // SLs
#define IL 11 // SLI
#define H19 12
#define H20 13
#define H21 14
#define H22 15
#define H23 16
#define HSDS 17
#define CHECKSUM 18
#endif
//----------------------------------------------------------------
// MPPT 100 | 20
#ifdef MPPT_100_20
const byte buffsize = 32;
const byte value_bytes = 33;
const byte label_bytes = 9;
const byte num_keywords = 20;
char keywords[num_keywords][label_bytes] = {
"PID",
"FW",
"SER#",
"V",
"I",
"VPV",
"PPV",
"CS",
"MPPT",
"OR",
"ERR",
"LOAD",
"IL",
"H19",
"H20",
"H21",
"H22",
"H23",
"HSDS",
"Checksum"
};
#define PID 0
#define FW 1
#define SER 2
#define V 3
#define I 4
#define VPV 5
#define PPV 6
#define MPPT 7
#define OR 8
#define CS 9
#define ERR 10
#define LOAD 11
#define IL 12
#define H19 13
#define H20 14
#define H21 15
#define H22 16
#define H23 17
#define HSDS 18
#define CHECKSUM 19
#endif
//----------------------------------------------------------------
// MPPT 100 | 30
#ifdef MPPT_100_30
const byte buffsize = 32;
const byte value_bytes = 33;
const byte label_bytes = 9;
const byte num_keywords = 20;
char keywords[num_keywords][label_bytes] = {
"PID",
"FW",
"SER#",
"V",
"I",
"VPV",
"PPV",
"CS",
"MPPT",
"OR",
"ERR",
"LOAD",
"IL",
"H19",
"H20",
"H21",
"H22",
"H23",
"HSDS",
"Checksum"
};
#define PID 0
#define FW 1
#define SER 2
#define V 3
#define I 4
#define VPV 5
#define PPV 6
#define MPPT 7
#define OR 8
#define CS 9
#define ERR 10
#define LOAD 11
#define IL 12
#define H19 13
#define H20 14
#define H21 15
#define H22 16
#define H23 17
#define HSDS 18
#define CHECKSUM 19
#endif