@@ -168,27 +168,27 @@ class Servo
168
168
{
169
169
public:
170
170
171
- Servo (SmartServoClass & servos, int const idx ) : _servos (servos), _idx (idx ) { }
171
+ Servo (SmartServoClass & servos, int const id ) : _servos (servos), _id (id ) { }
172
172
173
- inline void disengage () { _servos.disengage (_idx ); }
174
- inline void engage () { _servos.engage (_idx ); }
175
- inline bool engaged () { return _servos.isEngaged (_idx ); }
173
+ inline void disengage () { _servos.disengage (_id ); }
174
+ inline void engage () { _servos.engage (_id ); }
175
+ inline bool engaged () { return _servos.isEngaged (_id ); }
176
176
177
177
inline Servo & move () { return *this ; }
178
- inline Servo & to (float const angle) { _servos.setPosition (_idx , angle, _speed); return *this ; }
179
- inline Servo & in (std::chrono::milliseconds const len) { _servos.setTime (_idx , len.count ()); return *this ; }
178
+ inline Servo & to (float const angle) { _servos.setPosition (_id , angle, _speed); return *this ; }
179
+ inline Servo & in (std::chrono::milliseconds const len) { _servos.setTime (_id , len.count ()); return *this ; }
180
180
181
- inline float position () { return _servos.getPosition (_idx ); }
182
- inline bool connected () { return Braccio.connected (_idx ); }
183
- inline void info (Stream & stream) { _servos.getInfo (stream, _idx ); }
181
+ inline float position () { return _servos.getPosition (_id ); }
182
+ inline bool connected () { return Braccio.connected (_id ); }
183
+ inline void info (Stream & stream) { _servos.getInfo (stream, _id ); }
184
184
185
185
operator bool () { return connected (); }
186
186
187
187
188
188
private:
189
189
190
190
SmartServoClass & _servos;
191
- int const _idx ;
191
+ int const _id ;
192
192
int const _speed = 100 ;
193
193
194
194
};
0 commit comments