mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 23:40:34 +08:00
drivers: minimize additional I2C retries
This commit is contained in:
@@ -185,9 +185,6 @@ BST::BST(const I2CSPIDriverConfig &config) :
|
||||
|
||||
int BST::probe()
|
||||
{
|
||||
int retries_prev = _retries;
|
||||
_retries = 3;
|
||||
|
||||
BSTPacket<BSTDeviceInfoRequest> dev_info_req = {};
|
||||
dev_info_req.type = 0x0A;
|
||||
dev_info_req.payload.cmd = 0x04;
|
||||
@@ -213,7 +210,7 @@ int BST::probe()
|
||||
(int)swap_uint32(dev_info_reply.payload.hw_id), (int)swap_uint16(dev_info_reply.payload.fw_id),
|
||||
dev_info_reply.payload.dev_name);
|
||||
|
||||
_retries = retries_prev;
|
||||
_retries = 1;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user