You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -178,24 +178,26 @@ While name, address and length are self-explanatory, conversion type is a bit mo
178
178
179
179
### Conversion types
180
180
181
-
Data is stored in binary and often needs a conversion function to transform into a more readable type. This is specified by the conversion type, the last argument in the datapoint definition.
181
+
Data is stored in binary and often needs a conversion function to transform into a more usable type. This is specified by the conversion type, the last argument in the datapoint definition.
182
182
183
-
Since C++ is a strongly typed programming language so using the right type is important (read: mandatory). Each conversion type corresponds with a certain type. Reading or writing has to be done using this specific type and failure to do so will not work or will lead to undefined results.
183
+
C++ is a strongly typed programming language so using the right type is important (read: mandatory). Each conversion type corresponds to a certain type. Reading or writing has to be done using this specific type and failure to do so will not work or will lead to undefined results.
184
184
185
185
In the table below you can find how to define your datapoints:
186
186
187
187
|name|size|converter|return type|remarks|
188
188
|---|---|---|---|---|
189
189
|Temperature|2|div10|float||
190
-
|Temperature short|1|noconv|uint8_t|equivalent to Mode|
191
-
|Power|1|div2|float|also used for temperature in GWG|
192
-
|Status|1|noconv|bool|this is the same as 'Temperature short' and 'Mode'. The `uint8_t` value will be implicitely converted to bool.|
193
-
|Hours|4|div3600|float|this is in fact a `Count` datapoint (seconds) converted to hours.|
190
+
|Temperature short|1|noconv|uint8_t|Equivalent to Mode|
191
+
|Power|1|div2|float|Also used for temperature in GWG|
192
+
|Status|1|noconv|bool|This is the same as 'Temperature short' and 'Mode'. The `uint8_t` value will be implicitely converted to bool.|
193
+
|Hours|4|div3600|float|This is in fact a `Count` datapoint (seconds) converted to hours.|
194
194
|Count|4|noconv|uint32_t||
195
195
|Count short|2|noconv|uint16_t||
196
-
|Mode|1|noconv|uint8_t|possibly castable to ENUM|
196
+
|Mode|1|noconv|uint8_t|Possibly castable to ENUM|
197
197
|CoP|1|div10|float|Also used for heating curve slope|
198
198
199
+
Mind that the converters are declared within the `VitoWiFi` namespace.
200
+
199
201
## Bugs and feature requests
200
202
201
203
Please use Github's facilities to get in touch. While the issue template is not mandatory to use, please use it at least as a starting point to supply the needed info for bughunting.
@@ -204,9 +206,9 @@ Please use Github's facilities to get in touch. While the issue template is not
204
206
205
207
Below is an overview of all commonly used methods. For extra functions you can consult the source code.
Encodes `value` into the supplied `buf` with maximum size `len`. The size should obviously be at least the length of the datapoint.
237
+
Encodes `value` into the supplied `buf` with maximum size `len`. The size must be at least the length of the datapoint.
236
238
237
239
`VariantValue` is a type to implicitely convert datatypes for use in VitoWiFi. Make sure to use the type that matches your Converter type.
238
240
239
-
### `PacketVS2`
241
+
### `VitoWiFi::PacketVS2`
240
242
241
243
Only used in VS2. This type is used in the onResponse callback and contains the returned data.
242
244
Most users will only use the following two methods and only if they want to access the raw data. Otherwise, the data can be decoded using the corresponding `Datapoint`.
@@ -249,25 +251,27 @@ Returns the number of bytes in the payload.
Constructor of the VitoWiFi class. `PROTOCOL_VERSION` can be `GWG`, `VS1` or `VS2`. If your Viessmann device is somewhat modern, you should use `VS2`.
258
+
Constructor of the VitoWiFi class. `PROTOCOL_VERSION` can be `VitoWiFi::GWG`, `VitoWiFi::VS1` or `VitoWiFi::VS2`. If your Viessmann device is somewhat modern, you should use `VitoWiFi::VS2`.
257
259
`interface` can be any of the `HardwareSerial` interfaces (`Serial`, `Serial1`...) on Arduino boards, `SoftwareSerial` (on ESP8266) or if you are on Linux, pass the c-string depicting your device (for example `"/dev/ttyUSB0"`).
@@ -308,11 +312,11 @@ Used in the onError callback. Possible returned values are:
308
312
309
313
##### `VW_START_PAYLOAD_LENGTH`
310
314
311
-
This macro sets the initial payload (data) length VitoWiFi allocates for incoming packets. If you know beforehand the maximum data length you are going to request, you can set this to that value to prevent reallocation of dynamic memory. The default is 10 bytes.
315
+
This macro sets the initial payload (data) length for incoming packets. VitoWiFi will increased the buffer if needed. If you know the maximum data length you are going to request beforehand, use this set to prevent dynamic memory reallocation. The default is 10 bytes.
312
316
313
317
## Bugs and feature requests
314
318
315
-
Please use Github's facilities, issues and discussions, to get in touch.
319
+
Please use Githubs facilities, issues and discussions, to get in touch.
316
320
When creating a bug report, please use the provided template. In any case, better to include too much info than too little.
0 commit comments