Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved TriggerType enum to dedicated file to avoid repetition in hardware component classes #1962

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

kumar-sanjeeev
Copy link
Contributor

@kumar-sanjeeev kumar-sanjeeev commented Dec 19, 2024

  • Moved TriggerType enum to hardware_interface_trigger_type.hpp, to avoid repetition across hardware components classes.

Fixes: #1958

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.10%. Comparing base (62b1908) to head (72ab66d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1962      +/-   ##
==========================================
- Coverage   88.11%   88.10%   -0.01%     
==========================================
  Files         121      121              
  Lines       13174    13174              
  Branches     1187     1187              
==========================================
- Hits        11608    11607       -1     
  Misses       1132     1132              
- Partials      434      435       +1     
Flag Coverage Δ
unittests 88.10% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../include/hardware_interface/actuator_interface.hpp 91.96% <ø> (ø)
...ce/include/hardware_interface/system_interface.hpp 81.81% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we can add it to the hardware_interface_return_values.hpp along side

namespace hardware_interface
{
enum class return_type : std::uint8_t
{
OK = 0,
ERROR = 1,
DEACTIVATE = 2,
};
} // namespace hardware_interface
instead of creating a new one.

WHat's your opinion on this @ros-controls/ros2-maintainers ?

@bmagyar
Copy link
Member

bmagyar commented Dec 20, 2024

Looks good to me. I'd simplify the file name to "trigger_type.hpp", the "hardware_interface" is already implied

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@saikishor saikishor merged commit 4439bc7 into ros-controls:master Dec 20, 2024
21 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not repeat TriggerType enum in all hardware component classes
4 participants