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()
345345 int next_id_to_be_pinged = SmartServoClass::MIN_MOTOR_ID;
346346 int servo_missed_ping_cnt[SmartServoClass::NUM_MOTORS] = {0 };
347347
348- static int const MAX_MISSED_PING_CNT = 3 ;
348+ static int const MAX_MISSED_PING_CNT = 2 ;
349349
350350 for (;;)
351351 {
@@ -356,7 +356,7 @@ void BraccioClass::motorConnectedThreadFunc()
356356 if (!is_connected) servo_missed_ping_cnt[SmartServoClass::idToArrayIndex (next_id_to_be_pinged)]++;
357357 else servo_missed_ping_cnt[SmartServoClass::idToArrayIndex (next_id_to_be_pinged)] = 0 ;
358358
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)
360360 setMotorConnectionStatus (next_id_to_be_pinged, false );
361361 else
362362 setMotorConnectionStatus (next_id_to_be_pinged, true );
You can’t perform that action at this time.
0 commit comments