1 #ifndef EAGLE_EBOARD_HELPLIB_AX12SERVO 2 #define EAGLE_EBOARD_HELPLIB_AX12SERVO 70 #if EBOARD_USE_UTILITY > 0x0 86 inline void changeMotorID(
optVAL_t newID);
92 inline void setPositionMode(
void);
98 inline void setSpeedMode(
void);
106 inline void ledOff(
void);
108 inline void ledOn(
void);
110 inline void setTorque(uint16_t);
176 #if EBOARD_USE_UTILITY > 0x0 180 void AX12Servo::setPositionMode(
void) {}
181 void AX12Servo::setSpeedMode(
void) {}
182 void AX12Servo::setSpeed(
optVAL_t) {}
183 void AX12Servo::ledOff(
void) {}
184 void AX12Servo::ledOn(
void) {}
185 void AX12Servo::setTorque(uint16_t) {}
189 #if EBOARD_CLAMP > 0x0 190 if(pos>1023 || speed > 1023)
return;
192 speed = speed*600/1023 - 300;
193 pos = pos *600/1023 - 300;
195 if(pos>300 || speed > 300)
return;
int actPos
stores the actual pos or move-to pos of the AX12Servo
This is the AX12Servo ghost struct :D.
void storePosition(int pos, int speed=0x3FF)
This saves the Servo Position.
int actSpe
stores the actual 'would use speed' of the AX12Servo
optVAL_t getPosition(void)
This "kind of" returns the Servo-Position.
void SetServoLimit(int ID, int upperLimit)
(probably) set the posLimit for only one servo (will be overwritten by write() => writePos()) ...
void setVelocity(int velocity)
Sets the default speed of servos.
bool isMoving(void)
Use this if you wan't to have a nice way of writing false.
int storedPos
stores the position the Servo should go to DynamixelBoard::action()
optVAL_t id
stores the id of the AX12Servo obejct
void SetID(int ID, int newID)
change the ID of a special Servo
int storedSpe
stores the Speed of the Servo DynamixelBoard::action()
This is the DynamixelBoard ghost struct :D.
int upperLimit_temp
stores the posLimit value send with write()
DynamixelBoard * _conBoard
void write(int ID, int Pos)
Moves a Servo to a certain position.
AX12Servo(void)
The constructor.
void setPosition(int pos, int speed=0x3FF)
This moves the Servo to the new position.
DynamixelBoard dBoard(board)
the dBoard object
ServoCds55 _servoHandler
this is the "to_use" instance of ServoCds55