Skip to content

Commit 84f90a9

Browse files
committed
Use extracted bytes for FromHeader/FromHeaderBody functions
1 parent ccb38d0 commit 84f90a9

6 files changed

Lines changed: 211 additions & 144 deletions

File tree

KEYWORDS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ getMeasurementDecimals KEYWORD2
6868

6969
getFormulaFromHeader KEYWORD2
7070
getNWbFromHeader KEYWORD2
71+
getMWbFromBody KEYWORD2
7172
getDataTableFromHeader KEYWORD2
7273
getDataTableLengthFromHeader KEYWORD2
7374

examples/02.Fault_code_test/02.Fault_code_test.ino

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ void setup()
9797

9898
// Connect to the module.
9999
/*
100-
*There is an optional argument for connect()/attemptConnect(), which, if set to false, will make it so extra identification will not be requested
100+
-There is an optional argument for connect()/attemptConnect(), which, if set to false, will make it so extra identification will not be requested
101101
if the module supports it.
102-
*This would save almost one second of the connection time, with the downside being that getExtraIdentification() will return an empty string.
103-
*It has no effect if the module doesn't support extra identification.
102+
-This would save almost one second of the connection time, with the downside being that getExtraIdentification() will return an empty string.
103+
-It has no effect if the module doesn't support extra identification.
104104
*/
105105
diag.connect(connect_to_module, module_baud_rate, false);
106106

@@ -110,10 +110,10 @@ void setup()
110110

111111
// Disconnect from the module.
112112
/*
113-
*There is an optional argument for disconnect(), which, if set to false, will make it so the library doesn't wait for a response.
114-
*When disconnecting, some modules send a response, some don't.
115-
*If the module doesn't send a response, not waiting saves [diag.responseTimeout] milliseconds, by default 2 seconds.
116-
*If the module sends a response, not waiting for it shouldn't really have consequences.
113+
-There is an optional argument for disconnect(), which, if set to false, will make it so the library doesn't wait for a response.
114+
-When disconnecting, some modules send a response, some don't.
115+
-If the module doesn't send a response, not waiting saves [diag.responseTimeout] milliseconds, by default 2 seconds.
116+
-If the module sends a response, not waiting for it shouldn't really have consequences.
117117
*/
118118
diag.disconnect(false);
119119
Serial.println("Disconnected.");
@@ -133,9 +133,12 @@ void showDTCs()
133133
Always check the return value of functions!
134134
135135
The readFaults() function can return:
136-
*KLineKWP1281Lib::SUCCESS - received fault codes
137-
*KLineKWP1281Lib::FAIL - the module doesn't support fault codes
138-
*KLineKWP1281Lib::ERROR - communication error
136+
KLineKWP1281Lib::SUCCESS - received fault codes
137+
KLineKWP1281Lib::FAIL - the module doesn't support fault codes
138+
KLineKWP1281Lib::ERROR - communication error
139+
140+
Technically, there are 3 more values defined for the KLineKWP1281Lib::executionStatus data type,
141+
but they only apply to the readGroup() function, so they will never be returned by other functions.
139142
*/
140143

141144
// If fault codes were read successfully, display them.

examples/06.Output_tests/06.Output_tests.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ void performOutputTests()
115115

116116
/*
117117
The outputTests() function can return:
118-
*KLineKWP1281Lib::SUCCESS - performed next output test
119-
*KLineKWP1281Lib::FAIL - the module doesn't support output tests / reached end of output tests
120-
*KLineKWP1281Lib::ERROR - communication error
118+
KLineKWP1281Lib::SUCCESS - performed next output test
119+
KLineKWP1281Lib::FAIL - the module doesn't support output tests / reached end of output tests
120+
KLineKWP1281Lib::ERROR - communication error
121+
122+
Technically, there are 3 more values defined for the KLineKWP1281Lib::executionStatus data type,
123+
but they only apply to the readGroup() function, so they will never be returned by other functions.
121124
*/
122125

123126
// Run the first output test and store the return value.

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=KLineKWP1281Lib
2-
version=2.2.0
2+
version=2.2.1
33
author=domnulvlad <https://github.com/domnulvlad>
44
maintainer=domnulvlad <https://github.com/domnulvlad>
55
sentence=Library for interfacing with the VAG KWP1281 protocol, via the K-line.

0 commit comments

Comments
 (0)