mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
ahrscomms: reduce retries and retry delay
The number of retries and delay between retries was increased in a previous commit. This doesn't appear to be necessary so I'm reverting the increases. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1432 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
24a4c6b791
commit
a19c225697
@ -103,7 +103,7 @@ static enum opahrs_result opahrs_msg_v1_recv_rsp (enum opahrs_msg_v1_tag tag, st
|
||||
|
||||
opahrs_msg_v1_init_link_tx(&link_tx, OPAHRS_MSG_LINK_TAG_NOP);
|
||||
|
||||
for (uint8_t retries = 0; retries < 100; retries++) {
|
||||
for (uint8_t retries = 0; retries < 20; retries++) {
|
||||
if (opahrs_msg_txrx((const uint8_t *)&link_tx, (uint8_t *)rsp, sizeof(*rsp)) < 0) {
|
||||
return OPAHRS_RESULT_FAILED;
|
||||
}
|
||||
@ -119,7 +119,7 @@ static enum opahrs_result opahrs_msg_v1_recv_rsp (enum opahrs_msg_v1_tag tag, st
|
||||
switch (rsp->payload.link.state) {
|
||||
case OPAHRS_MSG_LINK_STATE_BUSY:
|
||||
/* Wait for a small delay and retry */
|
||||
vTaskDelay(40 / portTICK_RATE_MS);
|
||||
vTaskDelay(20 / portTICK_RATE_MS);
|
||||
continue;
|
||||
case OPAHRS_MSG_LINK_STATE_INACTIVE:
|
||||
case OPAHRS_MSG_LINK_STATE_READY:
|
||||
|
Loading…
x
Reference in New Issue
Block a user