Skip to content

Commit

Permalink
Correct constant name
Browse files Browse the repository at this point in the history
  • Loading branch information
gioblu committed Feb 27, 2016
1 parent 016d760 commit abc4d08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Error types:
- `CONNECTION_LOST` (value 101), `data` parameter contains lost device's id.
- `PACKETS_BUFFER_FULL` (value 102), `data` parameter contains buffer length.
- `MEMORY_FULL` (value 103), `data` parameter contains `FAIL`.
- `MESSAGE_TOO_LONG` (value 104), `data` parameter contains content length.
- `CONTENT_TOO_LONG` (value 104), `data` parameter contains content length.

```cpp
void error_handler(uint8_t code, uint8_t data) {
Expand All @@ -176,7 +176,7 @@ void error_handler(uint8_t code, uint8_t data) {
if(code == MEMORY_FULL) {
Serial.println("Packet memory allocation failed. Memory is full.");
}
if(code == MESSAGE_TOO_LONG) {
if(code == CONTENT_TOO_LONG) {
Serial.print("Content is too long, length: ");
Serial.println(data, DEC);
}
Expand Down

0 comments on commit abc4d08

Please sign in to comment.