mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-09 17:40:47 +02:00
extended SetIO service to correctly set configurable and tool digital output
This commit is contained in:
@@ -2,6 +2,10 @@ speed_slider_mask
|
||||
speed_slider_fraction
|
||||
standard_digital_output_mask
|
||||
standard_digital_output
|
||||
configurable_digital_output_mask
|
||||
configurable_digital_output
|
||||
tool_digital_output_mask
|
||||
tool_digital_output
|
||||
standard_analog_output_mask
|
||||
standard_analog_output_type
|
||||
standard_analog_output_0
|
||||
|
||||
@@ -547,7 +547,15 @@ bool HardwareInterface::setIO(ur_msgs::SetIORequest& req, ur_msgs::SetIOResponse
|
||||
{
|
||||
if (req.fun == req.FUN_SET_DIGITAL_OUT)
|
||||
{
|
||||
res.success = ur_driver_->getRTDEWriter().sendStandardDigitalOutput(req.pin, req.state);
|
||||
if (req.pin <= 7)
|
||||
{
|
||||
res.success = ur_driver_->getRTDEWriter().sendStandardDigitalOutput(req.pin, req.state);
|
||||
} else if (req.pin <= 15)
|
||||
{
|
||||
res.success = ur_driver_->getRTDEWriter().sendConfigurableDigitalOutput(req.pin-8, req.state);
|
||||
} else {
|
||||
res.success = ur_driver_->getRTDEWriter().sendToolDigitalOutput(req.pin-16, req.state);
|
||||
}
|
||||
}
|
||||
else if (req.fun == req.FUN_SET_ANALOG_OUT)
|
||||
{
|
||||
|
||||
@@ -151,8 +151,8 @@ bool RTDEWriter::sendToolDigitalOutput(uint8_t output_pin, bool value)
|
||||
{
|
||||
digital_output = 0;
|
||||
}
|
||||
success = package->setData("tooldigital_output_mask", mask);
|
||||
success = success && package->setData("tooldigital_output", digital_output);
|
||||
success = package->setData("tool_digital_output_mask", mask);
|
||||
success = success && package->setData("tool_digital_output", digital_output);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user