1 #ifndef _HKXPOSCONTROL_H
2 #define _HKXPOSCONTROL_H
328 uint8_t
setLoad(uint16_t newDeadZone, uint8_t newSaturatorOffset,
const uint32_t& newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM);
463 #endif // _HKXPOSCONTROL_H
uint8_t reboot()
Reboot servo.
Definition: HkxPosControl.cpp:361
void setLEDControlVariable(hkxLEDControl newLEDControl)
Set the LED variable.
Definition: HkxPosControl.h:216
uint8_t getBehaviour(HkxMaybe< uint16_t > inputVoltage, HkxMaybe< uint16_t > temperature, HkxMaybe< int16_t > position, HkxMaybe< int16_t > velocity, HkxMaybe< uint16_t > PWM, HkxMaybe< int16_t > goalPosition, HkxMaybe< int16_t > trajectoryPosition, HkxMaybe< int16_t > trajectoryVelocity)
Get the servo behaviour.
Definition: HkxPosControl.cpp:310
uint16_t _saturatorSlope
Definition: HkxPosControl.h:43
const String _className
Definition: HkxPosControl.h:32
void warningPrint(const String &message) const
Print warning.
Definition: HkxCommunication.h:394
uint8_t _id
Definition: HkxPosControl.h:37
uint8_t _saturatorOffset
Definition: HkxPosControl.h:41
void errorPrint(const String &message) const
Print error.
Definition: HkxCommunication.h:381
uint8_t getID() const
Get the ID.
Definition: HkxPosControl.h:135
uint8_t _deadZone
Definition: HkxPosControl.h:39
boolean isInPosition()
Check if the servo arrived.
Definition: HkxPosControl.h:235
Class to manage optional parameters.
Definition: HkxCommunication.h:202
void errorPrint(const String &message)
Print error.
Definition: HkxPosControl.h:78
uint8_t updateStatus()
Update the status.
Definition: HkxPosControl.cpp:73
Status management of the Arduino library for HerkuleX servo (DRS-0101 and DRS-0201 models) ...
uint16_t _minPosition
Definition: HkxPosControl.h:51
hkxTorqueControl
Torque control.
Definition: HkxCommunication.h:127
int16_t positionAbsoluteToRelative(int16_t positionAbsolute) const
Convert absolute to relative position.
Definition: HkxPosControl.h:194
HkxCommunication & getCommunication() const
Get servo communication.
Definition: HkxPosControl.h:171
Class to manage the communication.
Definition: HkxCommunication.h:634
Class to manage the status of the servos.
Definition: HkxStatus.h:55
uint8_t clearStatus()
Clear the status.
Definition: HkxPosControl.cpp:119
hkxTorqueControl getTorqueControl() const
Get torque control.
Definition: HkxPosControl.h:149
hkxLEDControl getLEDControl() const
Get LED control.
Definition: HkxPosControl.h:163
uint8_t setTorqueLEDControl(HkxMaybe< hkxTorqueControl > newTorqueControl, HkxMaybe< hkxLEDControl > newLEDControl)
Set torque actuation and LED colour.
Definition: HkxPosControl.cpp:181
boolean _connected
Definition: HkxPosControl.h:29
HkxCommunication & _herkXCom
Definition: HkxPosControl.h:25
boolean isDetail(uint8_t mask) const
Check for details.
Definition: HkxStatus.h:118
uint8_t setCurrentPositionTo(int16_t currentPosition)
Set current position.
Definition: HkxPosControl.cpp:226
boolean tryConnect()
Try connect servo.
Definition: HkxPosControl.cpp:30
int16_t positionRelativeToAbsolute(int16_t positionRelative) const
Convert relative to absolute position.
Definition: HkxPosControl.h:187
uint16_t _maxPWM
Definition: HkxPosControl.h:49
Class to drive one servo in position control mode.
Definition: HkxPosControl.h:22
hkxTorqueControl _torqueControl
Definition: HkxPosControl.h:55
hkxLEDControl
LED control.
Definition: HkxCommunication.h:146
hkxLEDControl _ledControl
Definition: HkxPosControl.h:57
int16_t _zeroPosition
Definition: HkxPosControl.h:35
uint8_t getStatus(HkxStatus &statusED, boolean update)
Get the status.
Definition: HkxPosControl.cpp:96
uint16_t getMinPosition() const
Get min position.
Definition: HkxPosControl.h:201
HkxPosControl(uint8_t ID, HkxCommunication &herkXCom, HkxPrint &print)
Constructor.
Definition: HkxPosControl.cpp:13
uint16_t _maxPosition
Definition: HkxPosControl.h:53
Class to manage the print of the messages.
Definition: HkxCommunication.h:278
void infoPrint(const String &message) const
Print info.
Definition: HkxCommunication.h:407
uint16_t getMaxPosition() const
Get max position.
Definition: HkxPosControl.h:208
HkxPrint & _print
Definition: HkxPosControl.h:27
void infoPrint(const String &message)
Print info.
Definition: HkxPosControl.h:92
uint8_t setLoad(uint16_t newDeadZone, uint8_t newSaturatorOffset, const uint32_t &newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM)
Set load control parameters.
Definition: HkxPosControl.cpp:137
const uint8_t HKX_STAT_INPOSITION_FLAG
Definition: HkxStatus.h:35
uint8_t _minPWM
Definition: HkxPosControl.h:47
HkxStatus _statusED
Definition: HkxPosControl.h:59
void warningPrint(const String &message)
Print warning.
Definition: HkxPosControl.h:85
boolean isConnected() const
Is the servo connected.
Definition: HkxPosControl.h:180
const boolean _errorMessages
Definition: HkxCommunication.h:407
Communication management of the Arduino library for HerkuleX servo (DRS-0101 and DRS-0201 models) ...
uint8_t movePosition(int16_t destinationAngle, uint16_t playTime, HkxMaybe< hkxLEDControl > LEDControl, bool waitStop)
Move position.
Definition: HkxPosControl.cpp:260
int8_t _pwmOffset
Definition: HkxPosControl.h:45