File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ void BraccioClass::motorConnectedThreadFunc()
345
345
int next_id_to_be_pinged = SmartServoClass::MIN_MOTOR_ID;
346
346
int servo_missed_ping_cnt[SmartServoClass::NUM_MOTORS] = {0 };
347
347
348
- static int const MAX_MISSED_PING_CNT = 3 ;
348
+ static int const MAX_MISSED_PING_CNT = 2 ;
349
349
350
350
for (;;)
351
351
{
@@ -356,7 +356,7 @@ void BraccioClass::motorConnectedThreadFunc()
356
356
if (!is_connected) servo_missed_ping_cnt[SmartServoClass::idToArrayIndex (next_id_to_be_pinged)]++;
357
357
else servo_missed_ping_cnt[SmartServoClass::idToArrayIndex (next_id_to_be_pinged)] = 0 ;
358
358
359
- if (servo_missed_ping_cnt[SmartServoClass::idToArrayIndex (next_id_to_be_pinged)] > MAX_MISSED_PING_CNT)
359
+ if (servo_missed_ping_cnt[SmartServoClass::idToArrayIndex (next_id_to_be_pinged)] >= MAX_MISSED_PING_CNT)
360
360
setMotorConnectionStatus (next_id_to_be_pinged, false );
361
361
else
362
362
setMotorConnectionStatus (next_id_to_be_pinged, true );
You can’t perform that action at this time.
0 commit comments