File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -213,14 +213,16 @@ void BraccioClass::motors_connected_thread() {
213
213
_connected[i] = (servos->ping (i) == 0 );
214
214
// Serial.print(String(i) + ": ");
215
215
// Serial.println(_connected[i]);
216
- i2c_mutex.lock ();
216
+ }
217
+ i2c_mutex.lock ();
218
+ for (int i = 1 ; i < 7 ; i++) {
217
219
if (_connected[i]) {
218
220
setGreen (i);
219
221
} else {
220
222
setRed (i);
221
223
}
222
- i2c_mutex.unlock ();
223
224
}
225
+ i2c_mutex.unlock ();
224
226
}
225
227
delay (1000 );
226
228
}
Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ template <int MAX_MOTORS> void SmartServoClass<MAX_MOTORS>::receiveResponse() {
63
63
//Serial.print(c, HEX);
64
64
//Serial.print(" ");
65
65
_rxBuf[_rxLen++]=c;
66
- delayMicroseconds(2000);
66
+ if (!_RS485.available()) {
67
+ delay(1);
68
+ }
67
69
}
68
70
//Serial.println();
69
71
_RS485.noReceive();
You can’t perform that action at this time.
0 commit comments