1 #ifndef _HKXCONTROTATION_H
2 #define _HKXCONTROTATION_H
32 const String _className;
53 uint8_t updateStatus();
60 void errorPrint(
const String& message){
if(_print._errorMessages){_print.
errorPrint(_className + message);}};
67 void warningPrint(
const String& message){
if(_print._errorMessages){_print.
warningPrint(_className + message);}};
74 void infoPrint(
const String& message){
if(_print._errorMessages){_print.
infoPrint(_className + message);}};
102 boolean tryConnect();
163 boolean isConnected()
const {
return this->
_connected;};
171 void setLEDControlVariable(
hkxLEDControl newLEDControl){this->_ledControl = newLEDControl;};
191 this->updateStatus();
272 uint8_t
setTorqueLEDControl(HkxMaybe<hkxTorqueControl> newTorqueControl, HkxMaybe<hkxLEDControl> newLEDControl);
301 uint8_t
moveRotation(int16_t pwm, HkxMaybe<uint16_t> playTime, HkxMaybe<hkxLEDControl> LEDControl);
329 uint8_t
getBehaviour(HkxMaybe<uint16_t> inputVoltage, HkxMaybe<uint16_t> temperature, HkxMaybe<int16_t> velocity, HkxMaybe<int16_t> PWM);
350 #endif // _HKXCONTROTATION_H
boolean _connected
Definition: HkxContRotation.h:29
uint8_t moveRotation(int16_t pwm, HkxMaybe< uint16_t > playTime, HkxMaybe< hkxLEDControl > LEDControl)
Move continuous rotation.
Definition: HkxContRotation.cpp:171
HkxPrint & _print
Definition: HkxContRotation.h:27
uint8_t getBehaviour(HkxMaybe< uint16_t > inputVoltage, HkxMaybe< uint16_t > temperature, HkxMaybe< int16_t > velocity, HkxMaybe< int16_t > PWM)
Get the servo behaviour.
Definition: HkxContRotation.cpp:220
void warningPrint(const String &message) const
Print warning.
Definition: HkxCommunication.h:394
HkxStatus _statusED
Definition: HkxContRotation.h:41
Class to drive one servo in continuous rotation mode.
Definition: HkxContRotation.h:22
hkxLEDControl _ledControl
Definition: HkxContRotation.h:39
void errorPrint(const String &message) const
Print error.
Definition: HkxCommunication.h:381
HkxContRotation(uint8_t ID, HkxCommunication &herkXCom, HkxPrint &print)
Constructor.
Definition: HkxContRotation.cpp:13
Status management of the Arduino library for HerkuleX servo (DRS-0101 and DRS-0201 models) ...
hkxTorqueControl
Torque control.
Definition: HkxCommunication.h:127
boolean isStopped()
Check if the servo stopped.
Definition: HkxContRotation.h:190
Class to manage the communication.
Definition: HkxCommunication.h:634
Class to manage the status of the servos.
Definition: HkxStatus.h:55
hkxTorqueControl getTorqueControl() const
Get torque control.
Definition: HkxContRotation.h:132
boolean isDetail(uint8_t mask) const
Check for details.
Definition: HkxStatus.h:118
uint8_t _id
Definition: HkxContRotation.h:35
hkxLEDControl
LED control.
Definition: HkxCommunication.h:146
uint8_t getStatus(HkxStatus &statusED, boolean update)
Get the status.
Definition: HkxContRotation.cpp:86
const uint8_t HKX_STAT_MOVING_FLAG
Definition: HkxStatus.h:33
Class to manage the print of the messages.
Definition: HkxCommunication.h:278
void infoPrint(const String &message) const
Print info.
Definition: HkxCommunication.h:407
uint8_t reboot()
Reboot servo.
Definition: HkxContRotation.cpp:259
hkxTorqueControl _torqueControl
Definition: HkxContRotation.h:37
uint8_t clearStatus()
Clear the status.
Definition: HkxContRotation.cpp:109
HkxCommunication & _herkXCom
Definition: HkxContRotation.h:25
hkxLEDControl getLEDControl() const
Get LED control.
Definition: HkxContRotation.h:146
uint8_t setTorqueLEDControl(HkxMaybe< hkxTorqueControl > newTorqueControl, HkxMaybe< hkxLEDControl > newLEDControl)
Set torque actuation and LED colour.
Definition: HkxContRotation.cpp:126
Communication management of the Arduino library for HerkuleX servo (DRS-0101 and DRS-0201 models) ...
uint8_t getID() const
Get the ID.
Definition: HkxContRotation.h:118