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

Bugfix kbemf set to 0 by default when not found #935

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

sgiraz
Copy link
Contributor

@sgiraz sgiraz commented Jan 22, 2024

This PR enables the eomcParser to parse all parameters within TRQ_PID_OUTPUT_CURR, even if kbemf is missing.

cc @pattacini @Nicogene @isorrentino @DanielePucci

@sgiraz sgiraz self-assigned this Jan 22, 2024
@sgiraz sgiraz requested a review from pattacini January 22, 2024 13:40
@DanielePucci
Copy link
Contributor

Cc @GiulioRomualdi

Copy link
Member

@pattacini pattacini left a comment

Choose a reason for hiding this comment

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

Thanks heaps for the fix @sgiraz
Just one inline comment to address.

@sgiraz sgiraz requested a review from pattacini January 22, 2024 14:05
Copy link
Member

@pattacini pattacini left a comment

Choose a reason for hiding this comment

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

Thanks!
Awaiting the CI before merging.

Copy link

sonarcloud bot commented Jan 22, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@randaz81
Copy link
Member

Is kbemf not used anymore? Then it's ok to have a default = 0. Otherwise I'd like to say that's a bad software practice to mix mandatory with optional parameters in the same parser block. In the long term things get confused, undocumented and In the past I have seen default value changing without any notice, leading to difficult-to-debug situations. For this reason, at least in yarp, the use default parameters is generally discouraged, and a revision of the configuration files to add the missing parameter is preferred.

@pattacini
Copy link
Member

Hi @randaz81

Is kbemf not used anymore? Then it's ok to have a default = 0.

Indeed, kbemf is deprecated and already removed from the config files as per robotology/robots-configuration#599.

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.

None yet

4 participants