Skip to content

Commit

Permalink
Rename UNKNOWN to SET_ON_TEACH_PENDANT
Browse files Browse the repository at this point in the history
This way it is more explicit what is actually happening.
  • Loading branch information
fmauch committed Sep 5, 2024
1 parent 1d8c366 commit e32e642
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/ur_client_library/rtde/rtde_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ class RTDEWriter
* \param output_pin The pin to change
* \param value The new value, it should be between 0 and 1, where 0 is 4mA and 1 is 20mA.
* \param type The domain for the output can be eitherAnalogOutputType::CURRENT or AnalogOutputType::VOLTAGE or
* AnalogOutputType::UNKNOWN. In the latter case the domain is left untouched and the domain configured on the teach
* pendant will be used.
* AnalogOutputType::SET_ON_TEACH_PENDANT. In the latter case the domain is left untouched and the domain configured
* on the teach pendant will be used.
*
* \returns Success of the package creation
*/
bool sendStandardAnalogOutput(uint8_t output_pin, double value,
const AnalogOutputType type = AnalogOutputType::UNKNOWN);
const AnalogOutputType type = AnalogOutputType::SET_ON_TEACH_PENDANT);

/*!
* \brief Creates a package to request setting a new value for an input_bit_register
Expand Down
2 changes: 1 addition & 1 deletion include/ur_client_library/ur/datatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ enum class SafetyStatus : int8_t // Only available on 3.10/5.4

enum class AnalogOutputType : int8_t
{
UNKNOWN = -1,
SET_ON_TEACH_PENDANT = -1,
CURRENT = 0,
VOLTAGE = 1
};
Expand Down
2 changes: 1 addition & 1 deletion src/rtde/rtde_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ bool RTDEWriter::sendStandardAnalogOutput(uint8_t output_pin, double value, cons

bool success = true;
success = package_.setData("standard_analog_output_mask", mask);
if (type != AnalogOutputType::UNKNOWN)
if (type != AnalogOutputType::SET_ON_TEACH_PENDANT)
{
auto output_type_bits = [](const uint8_t pin, const uint8_t type) { return type << pin; };
uint8_t output_type = output_type_bits(output_pin, toUnderlying(type));
Expand Down

0 comments on commit e32e642

Please sign in to comment.