livox: rename handshakeTimeoutMs=>commandTimeoutMs
This commit is contained in:
@@ -554,9 +554,9 @@ extern "C" void livoxGen1_attachDeviceReq(
|
||||
*/
|
||||
|
||||
/* The Livox Avia will generally respond to a handshake request within
|
||||
* 50ms. So we set the handshake timeout to 300ms to be safe.
|
||||
* 5ms.
|
||||
*/
|
||||
int handshakeTimeoutMs = 5; // Default: 5ms
|
||||
int commandTimeoutMs = 5; // Default: 5ms
|
||||
/* Based on testing on a Livox Avia, the device will generally resume
|
||||
* sending broadcast advertisement dgrams after about 5 seconds at most.
|
||||
* Generally, it will resume sending them within 1-2 seconds.
|
||||
@@ -572,11 +572,16 @@ extern "C" void livoxGen1_attachDeviceReq(
|
||||
// Parse optional integer parameters from provider params
|
||||
for (const auto& param : desc->providerParams)
|
||||
{
|
||||
if (param.first == "handshake-timeout-ms")
|
||||
if (param.first == "cmd-timeout-ms")
|
||||
{
|
||||
handshakeTimeoutMs = smo::device::DeviceAttachmentSpec
|
||||
commandTimeoutMs = smo::device::DeviceAttachmentSpec
|
||||
::parseRequiredParamAsInt(
|
||||
desc->providerParams, "handshake-timeout-ms");
|
||||
desc->providerParams, "cmd-timeout-ms");
|
||||
} else if (param.first == "command-timeout-ms")
|
||||
{
|
||||
commandTimeoutMs = smo::device::DeviceAttachmentSpec
|
||||
::parseRequiredParamAsInt(
|
||||
desc->providerParams, "command-timeout-ms");
|
||||
} else if (param.first == "retry-delay-ms")
|
||||
{
|
||||
retryDelayMs = smo::device::DeviceAttachmentSpec
|
||||
@@ -630,7 +635,7 @@ extern "C" void livoxGen1_attachDeviceReq(
|
||||
(*livoxProto1.livoxProto1_getOrCreateDeviceReq)(
|
||||
desc->deviceSelector, // deviceIdentifier (broadcast code)
|
||||
componentThread,
|
||||
handshakeTimeoutMs, retryDelayMs,
|
||||
commandTimeoutMs, retryDelayMs,
|
||||
smoIp, smoSubnetNbits,
|
||||
dataPort, cmdPort, imuPort,
|
||||
{request, std::bind(
|
||||
|
||||
Reference in New Issue
Block a user