summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-03-23 16:05:53 -0400
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-03-23 16:05:53 -0400
commit681e44f8e168cae7d63064d9029388bcceff1955 (patch)
tree249f883a33e7298c0c639555348b48e106f696d8
parent38926291a49aa27a9ec7476e2347b2bca4e5a466 (diff)
Make negative diagnostic response format clearer.
-rw-r--r--README.md18
1 files changed, 14 insertions, 4 deletions
diff --git a/README.md b/README.md
index 65f0d198..3675d906 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ with this command format:
"pid": 5,
"payload": "0x1234",
"parse_payload": true,
- "multiple_response": false,
+ "multiple_responses": false,
"factor": 1.0,
"offset": 0,
"frequency": 1,
@@ -89,7 +89,7 @@ with this command format:
the response. The 'payload' field will be omitted in responses with a
'value'.
-**multiple_response** - (optional, false by default) if true, request will stay
+**multiple_responses** - (optional, false by default) if true, request will stay
active for a full 100ms, even after receiving a diagnostic response message.
This is useful for requests to the functional broadcast arbitration ID
(`0x7df`) when you need to get responses from multiple modules. It's possible
@@ -125,14 +125,24 @@ If you're just requesting a PID, you can use this minimal field set for the
### Responses
+The response to a successful request:
+
{"bus": 1,
"id": 1234,
"mode": 1,
"pid": 5,
"success": true,
- "negative_response_code": 17,
"payload": "0x1234",
- "parsed_payload": 4660}
+ "value": 4660}
+
+and to an unsuccessful request, with the `negative_response_code` and no `pid`
+echo:
+
+ {"bus": 1,
+ "id": 1234,
+ "mode": 1,
+ "success": false,
+ "negative_response_code": 17}
**bus** - the numerical identifier of the CAN bus where this response was
received.