Skip to content

Commit

Permalink
new ACK timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak committed Feb 23, 2021
1 parent 1e9cc09 commit d5e0d01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UbxGpsI2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool UbxGpsI2C::send_ack(UbxClassId class_id, char id, const char *payload, uint

if (poll()) {
tr_debug("Waiting for UBX ACK");
uint32_t ack = _flags.wait_all(UBX_FLAGS_ACK_DONE, MBED_CONF_UBXGPSI2C_TIMEOUT);
uint32_t ack = _flags.wait_all(UBX_FLAGS_ACK_DONE, MBED_CONF_UBXGPSI2C_ACK_TIMEOUT);

if (!(ack & UBX_FLAGS_ERROR)) {
ok = ack & UBX_FLAGS_NAK ? false : true;
Expand Down
7 changes: 6 additions & 1 deletion mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
},
"timeout": {
"help": "Timeout for async calls (ms)",
"value": 500,
"value": 200,
"required": true
},
"ack-timeout": {
"help": "Timeout for async calls (ms)",
"value": 800,
"required": true
}
}
Expand Down

0 comments on commit d5e0d01

Please sign in to comment.