70 uint8_t
setPolicies(uint8_t ID, uint8_t newAlarmLEDPolicy, uint8_t newTorquePolicy);
84 uint8_t
setTemperatureVoltage(uint8_t ID, int16_t newMaxTemp, uint16_t newMinVoltage, uint16_t newMaxVoltage);
110 uint8_t
setAcceleration(uint8_t ID, uint8_t newAccelerationRatio, uint16_t newMaxAccelerationTime);
142 uint8_t
setLoadControl(uint8_t ID, uint16_t newDeadZone, uint8_t newSaturatorOffset,
const uint32_t& newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM);
155 uint8_t
setPWMPositionLimits(uint8_t ID, uint16_t newOverlaodPWMThreshold, int16_t newMinPosition, int16_t newMaxPosition);
170 uint8_t
setControlSystem(uint8_t ID, uint16_t kProportionnal, uint16_t kDerivative, uint16_t kInteger, uint16_t feedforwardGain1, uint16_t feedforwardGain2);
185 uint8_t
setErrorsCheckPeriod(uint8_t ID, uint16_t LEDBlink, uint16_t ADCFault, uint16_t packetGarbage, uint16_t stopDetection, uint16_t overloadDetection);
242 uint8_t
factoryReset(uint8_t ID,
boolean IDskip,
boolean baudrateSkip);
324 uint8_t
setID(uint8_t ID, uint8_t newID);
358 uint8_t
setOnePolicies(uint8_t ID, uint8_t newAlarmLEDPolicy, uint8_t newTorquePolicy){
360 errorPrint(F(
"setOnePolicies > Input not correct"));
363 return setPolicies(ID, newAlarmLEDPolicy, newTorquePolicy);
413 errorPrint(F(
"setOneMaxTemperature > Input value not correct"));
485 uint8_t
setOneAcceleration(uint8_t ID, uint8_t newAccelerationRatio, uint16_t newMaxAccelerationTime){
487 errorPrint(F(
"setOneAcceleration > acceleration ratio value or max acceleration time not correct"));
490 return setAcceleration(ID, newAccelerationRatio, newMaxAccelerationTime);
582 uint8_t
setOneLoadControl(uint8_t ID, uint16_t newDeadZone, uint8_t newSaturatorOffset,
const uint32_t& newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM){
584 errorPrint(F(
"setOneLoadControl > Input not correct"));
587 return setLoadControl(ID, newDeadZone, newSaturatorOffset, newSaturatorSlope, newPWMOffset, newMinPWM, newMaxPWM);
619 uint8_t
setAllLoadControl(uint16_t newDeadZone, uint8_t newSaturatorOffset,
const uint32_t& newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM){
return setLoadControl(
HKX_ID_ALL, newDeadZone, newSaturatorOffset, newSaturatorSlope, newPWMOffset, newMinPWM, newMaxPWM);};
647 uint8_t
setOnePWMPositionLimits(uint8_t ID, uint16_t newOverlaodPWMThreshold, int16_t newMinPosition, int16_t newMaxPosition){
649 errorPrint(F(
"setOnePWMPositionLimits > Input not correct"));
697 uint8_t
setOneControlSystem(uint8_t ID, uint16_t kProportionnal, uint16_t kDerivative, uint16_t kInteger, uint16_t feedforwardGain1, uint16_t feedforwardGain2){
699 errorPrint(F(
"setOneControlSystem > Input not correct"));
702 return setControlSystem(ID, kProportionnal, kDerivative, kInteger, feedforwardGain1, feedforwardGain2);
717 uint8_t
setAllControlSystem(uint16_t kProportionnal, uint16_t kDerivative, uint16_t kInteger, uint16_t feedforwardGain1, uint16_t feedforwardGain2){
return setControlSystem(
HKX_ID_ALL, kProportionnal, kDerivative, kInteger, feedforwardGain1, feedforwardGain2);};
749 uint8_t
setOneErrorsCheckPeriod(uint8_t ID, uint16_t LEDBlink, uint16_t ADCFault, uint16_t packetGarbage, uint16_t stopDetection, uint16_t overloadDetection){
751 errorPrint(F(
"setOneErrorsCheckPeriod > Input not correct"));
754 return setErrorsCheckPeriod(ID, LEDBlink, ADCFault, packetGarbage, stopDetection, overloadDetection);
797 errorPrint(F(
"setOneInPositionCriteria > Input not correct"));
851 errorPrint(F(
"setOneTorqueLEDControl > Input not correct"));
899 uint8_t
getBehaviour(uint8_t ID,
HkxMaybe<uint16_t> voltage,
HkxMaybe<uint16_t> temperature,
HkxMaybe<hkxControlMode> controlMode,
HkxMaybe<uint16_t> tick,
HkxMaybe<int16_t> absolutePosition,
HkxMaybe<int16_t> velocity,
HkxMaybe<uint16_t> PWM,
HkxMaybe<int16_t> absoluteGoalPosition,
HkxMaybe<int16_t> absoluteDesiredTrajectoryPosition,
HkxMaybe<int16_t> desiredVelocity);
924 errorPrint(F(
"clearOneStatus > Input not correct"));
963 errorPrint(F(
"factoryResetOne > Input not correct"));
990 errorPrint(F(
"rebootOne > Input not correct"));
1004 #endif // _HKXSETUP_H
uint8_t getTorqueLEDControl(uint8_t ID, HkxMaybe< hkxTorqueControl > torqueControl, HkxMaybe< hkxLEDControl > LEDControl)
Get torque actuation and LED colour.
Definition: HkxSetup.cpp:417
const uint8_t HKX_MAX_ID
Definition: HkxCommunication.h:29
void infoPrint(const String &message)
Print info.
Definition: HkxSetup.h:50
uint8_t getLoadControl(uint8_t ID, HkxMaybe< uint16_t > deadZone, HkxMaybe< uint8_t > saturatorOffSet, HkxMaybe< uint32_t > saturatorSlope, HkxMaybe< int8_t > PWMoffset, HkxMaybe< uint8_t > minPWM, HkxMaybe< uint16_t > maxPWM)
Get load control.
Definition: HkxSetup.cpp:202
uint8_t setOneTorqueLEDControl(uint8_t ID, hkxTorqueControl newTorqueControl, hkxLEDControl newLEDControl)
Set torque actuation and LED colour.
Definition: HkxSetup.h:849
uint8_t rebootRequest(uint8_t ID)
Reboot request.
Definition: HkxCommunication.h:925
uint8_t setAllLoadControl(uint16_t newDeadZone, uint8_t newSaturatorOffset, const uint32_t &newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM)
Set load control parameters for all.
Definition: HkxSetup.h:619
uint8_t clearStatus(uint8_t ID)
Clear status.
Definition: HkxSetup.cpp:509
void warningPrint(const String &message) const
Print warning.
Definition: HkxCommunication.h:394
uint8_t setOnePWMPositionLimits(uint8_t ID, uint16_t newOverlaodPWMThreshold, int16_t newMinPosition, int16_t newMaxPosition)
Set PWM and position limits.
Definition: HkxSetup.h:647
HkxCommunication & _herkXCom
Definition: HkxSetup.h:24
uint8_t setOneLoadControl(uint8_t ID, uint16_t newDeadZone, uint8_t newSaturatorOffset, const uint32_t &newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM)
Set load control parameters.
Definition: HkxSetup.h:582
uint8_t setControlSystem(uint8_t ID, uint16_t kProportionnal, uint16_t kDerivative, uint16_t kInteger, uint16_t feedforwardGain1, uint16_t feedforwardGain2)
Set Control System.
Definition: HkxSetup.cpp:317
void scanIDs(boolean IDs[])
Scan IDs.
Definition: HkxSetup.cpp:524
uint8_t setOnePolicies(uint8_t ID, uint8_t newAlarmLEDPolicy, uint8_t newTorquePolicy)
Set policies.
Definition: HkxSetup.h:358
uint8_t setPolicies(uint8_t ID, uint8_t newAlarmLEDPolicy, uint8_t newTorquePolicy)
Set policies.
Definition: HkxSetup.cpp:115
uint8_t setOneTemperatureVoltage(uint8_t ID, int16_t newMaxTemp, uint16_t newMinVoltage, uint16_t newMaxVoltage)
Set temperature and voltage.
Definition: HkxSetup.h:411
void errorPrint(const String &message) const
Print error.
Definition: HkxCommunication.h:381
uint8_t setID(uint8_t ID, uint8_t newID)
Set ID.
Definition: HkxSetup.cpp:75
uint8_t setAcceleration(uint8_t ID, uint8_t newAccelerationRatio, uint16_t newMaxAccelerationTime)
Set Acceleration.
Definition: HkxSetup.cpp:186
uint8_t setAllInPositionCriteria(uint16_t stopThreshold, uint16_t inPositionMargin)
Set in position criteria for all.
Definition: HkxSetup.h:812
uint8_t getStatus(uint8_t ID, HkxStatus &statusED)
Get status.
Definition: HkxSetup.cpp:490
Class to manage optional parameters.
Definition: HkxCommunication.h:202
uint8_t clearAllStatus()
Clear status for all.
Definition: HkxSetup.h:937
uint8_t factoryResetAll(boolean IDskip, boolean baudrateSkip)
Factory reset for all.
Definition: HkxSetup.h:978
hkxBaudrate
Baud rate.
Definition: HkxCommunication.h:109
hkxTorqueControl
Torque control.
Definition: HkxCommunication.h:127
uint8_t setTorqueLEDControl(uint8_t ID, hkxTorqueControl newTorqueControl, hkxLEDControl newLEDControl)
Set torque actuation and LED colour.
Definition: HkxSetup.cpp:439
uint8_t getBehaviour(uint8_t ID, HkxMaybe< uint16_t > voltage, HkxMaybe< uint16_t > temperature, HkxMaybe< hkxControlMode > controlMode, HkxMaybe< uint16_t > tick, HkxMaybe< int16_t > absolutePosition, HkxMaybe< int16_t > velocity, HkxMaybe< uint16_t > PWM, HkxMaybe< int16_t > absoluteGoalPosition, HkxMaybe< int16_t > absoluteDesiredTrajectoryPosition, HkxMaybe< int16_t > desiredVelocity)
Get behaviour.
Definition: HkxSetup.cpp:451
uint8_t clearOneStatus(uint8_t ID)
Clear status.
Definition: HkxSetup.h:922
Class to manage the communication.
Definition: HkxCommunication.h:634
Class to manage the status of the servos.
Definition: HkxStatus.h:55
uint8_t setTemperatureVoltage(uint8_t ID, int16_t newMaxTemp, uint16_t newMinVoltage, uint16_t newMaxVoltage)
Set temperature and voltage.
Definition: HkxSetup.cpp:151
uint8_t factoryReset(uint8_t ID, boolean IDskip, boolean baudrateSkip)
Factory reset.
Definition: HkxSetup.cpp:538
uint8_t setOneAcceleration(uint8_t ID, uint8_t newAccelerationRatio, uint16_t newMaxAccelerationTime)
Set Acceleration.
Definition: HkxSetup.h:485
uint8_t getPolicies(uint8_t ID, HkxMaybe< uint8_t > newAlarmLEDPolicy, HkxMaybe< uint8_t > newTorquePolicy)
Get Policies.
Definition: HkxSetup.cpp:94
uint8_t setAllErrorsCheckPeriod(uint16_t LEDBlink, uint16_t ADCFault, uint16_t packetGarbage, uint16_t stopDetection, uint16_t overloadDetection)
Set check periods for all.
Definition: HkxSetup.h:769
uint8_t setErrorsCheckPeriod(uint8_t ID, uint16_t LEDBlink, uint16_t ADCFault, uint16_t packetGarbage, uint16_t stopDetection, uint16_t overloadDetection)
Set check periods.
Definition: HkxSetup.cpp:360
uint8_t setAllAcceleration(uint8_t newAccelerationRatio, uint16_t newMaxAccelerationTime)
Set Acceleration for all.
Definition: HkxSetup.h:516
uint8_t getAcceleration(uint8_t ID, HkxMaybe< uint8_t > accelerationRatio, HkxMaybe< uint16_t > maxAccelerationTime)
Get Acceleration.
Definition: HkxSetup.cpp:164
uint8_t setLoadControl(uint8_t ID, uint16_t newDeadZone, uint8_t newSaturatorOffset, const uint32_t &newSaturatorSlope, int8_t newPWMOffset, uint8_t newMinPWM, uint16_t newMaxPWM)
Set load control parameters.
Definition: HkxSetup.cpp:228
const uint8_t HKX_ID_ALL
Definition: HkxCommunication.h:31
uint8_t setAllTemperatureVoltage(int16_t newMaxTemp, int16_t newMinVoltage, int16_t newMaxVoltage)
Set temperature and voltage for all.
Definition: HkxSetup.h:429
uint8_t setInPositionCriteria(uint8_t ID, uint16_t stopThreshold, uint16_t inPositionMargin)
Set in position criteria.
Definition: HkxSetup.cpp:402
uint8_t getPWMPositionLimits(uint8_t ID, HkxMaybe< uint16_t > overlaodPWMThreshold, HkxMaybe< int16_t > minPosition, HkxMaybe< int16_t > maxPosition)
Get PWM and position limits.
Definition: HkxSetup.cpp:251
uint8_t getBaudRate(uint8_t ID, hkxBaudrate *baudRate)
Get the baud rate.
Definition: HkxSetup.cpp:38
hkxLEDControl
LED control.
Definition: HkxCommunication.h:146
uint8_t getErrorsCheckPeriod(uint8_t ID, HkxMaybe< uint16_t > LEDBlink, HkxMaybe< uint16_t > ADCFault, HkxMaybe< uint16_t > packetGarbage, HkxMaybe< uint16_t > stopDetection, HkxMaybe< uint16_t > overloadDetection)
Get check periods.
Definition: HkxSetup.cpp:334
uint8_t setOneControlSystem(uint8_t ID, uint16_t kProportionnal, uint16_t kDerivative, uint16_t kInteger, uint16_t feedforwardGain1, uint16_t feedforwardGain2)
Set Control System.
Definition: HkxSetup.h:697
uint8_t reboot(uint8_t ID)
Reboot.
Definition: HkxSetup.h:252
uint8_t rebootOne(uint8_t ID)
Reboot.
Definition: HkxSetup.h:988
uint8_t getControlSystem(uint8_t ID, HkxMaybe< uint16_t > kProportionnal, HkxMaybe< uint16_t > kDerivative, HkxMaybe< uint16_t > kInteger, HkxMaybe< uint16_t > feedforwardGain1, HkxMaybe< uint16_t > feedforwardGain2)
Get Control System.
Definition: HkxSetup.cpp:291
Class to manage the print of the messages.
Definition: HkxCommunication.h:278
uint8_t setOneErrorsCheckPeriod(uint8_t ID, uint16_t LEDBlink, uint16_t ADCFault, uint16_t packetGarbage, uint16_t stopDetection, uint16_t overloadDetection)
Set check periods.
Definition: HkxSetup.h:749
uint8_t setAllPWMPositionLimits(uint16_t newOverlaodPWMThreshold, int16_t newMinPosition, int16_t newMaxPosition)
Set PWM and position limits for all.
Definition: HkxSetup.h:665
void rebootAll()
Reboot.
Definition: HkxSetup.h:1000
HkxPrint & _print
Definition: HkxSetup.h:26
void infoPrint(const String &message) const
Print info.
Definition: HkxCommunication.h:407
uint8_t setAllPolicies(uint8_t newAlarmLEDPolicy, uint8_t newTorquePolicy)
Set policies for all.
Definition: HkxSetup.h:383
uint8_t setAllBaudRate(const hkxBaudrate &baudrate)
Set the baud rate for all.
Definition: HkxSetup.cpp:60
uint8_t setPWMPositionLimits(uint8_t ID, uint16_t newOverlaodPWMThreshold, int16_t newMinPosition, int16_t newMaxPosition)
Set PWM and position limits.
Definition: HkxSetup.cpp:274
void errorPrint(const String &message)
Print error.
Definition: HkxSetup.h:36
HkxSetup(HkxCommunication &herkXCom, HkxPrint &print)
Constructor.
Definition: HkxSetup.h:267
uint8_t getServoInfo(uint8_t ID, HkxMaybe< uint16_t > model, HkxMaybe< uint16_t > version)
Get model and firmware.
Definition: HkxSetup.cpp:13
const boolean _errorMessages
Definition: HkxCommunication.h:407
uint8_t setOneInPositionCriteria(uint8_t ID, uint16_t stopThreshold, uint16_t inPositionMargin)
Set in position criteria.
Definition: HkxSetup.h:795
uint8_t getInPositionCriteria(uint8_t ID, HkxMaybe< uint16_t > stopThreshold, HkxMaybe< uint16_t > inPositionMargin)
Get in position criteria.
Definition: HkxSetup.cpp:380
uint8_t setAllControlSystem(uint16_t kProportionnal, uint16_t kDerivative, uint16_t kInteger, uint16_t feedforwardGain1, uint16_t feedforwardGain2)
Set Control System for all.
Definition: HkxSetup.h:717
Communication management of the Arduino library for HerkuleX servo (DRS-0101 and DRS-0201 models) ...
const String _className
Definition: HkxSetup.h:29
void warningPrint(const String &message)
Print warning.
Definition: HkxSetup.h:43
Class to setup the servos.
Definition: HkxSetup.h:21
uint8_t factoryResetOne(uint8_t ID, boolean IDskip, boolean baudrateSkip)
Factory reset.
Definition: HkxSetup.h:961
uint8_t getTemperatureVoltage(uint8_t ID, HkxMaybe< int16_t > maxTemp, HkxMaybe< uint16_t > minVoltage, HkxMaybe< uint16_t > maxVoltage)
Get temperature and voltage.
Definition: HkxSetup.cpp:128
uint8_t setAllTorqueLEDControl(hkxTorqueControl newTorqueControl, hkxLEDControl newLEDControl)
Set torque actuation and LED colour for all.
Definition: HkxSetup.h:877