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

Add support for Phidgets Current sensors #148

Open
wants to merge 1 commit into
base: noetic
Choose a base branch
from

Conversation

lights0123
Copy link
Contributor

This is really just a find/replace from the phidgets_analog_inputs package.

Comment on lines +7 to +12
<maintainer email="[email protected]">Martin Günther</maintainer>
<maintainer email="[email protected]">Chris Lalancette</maintainer>

<license>BSD</license>

<author>Chris Lalancette</author>
Copy link
Contributor Author

@lights0123 lights0123 Jun 17, 2022

Choose a reason for hiding this comment

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

Should the maintainer and/or author be me, even though I wrote essentially no code?

Copy link
Contributor

Choose a reason for hiding this comment

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

By "I wrote essentially no code", you mean that you simply followed the pattern of the other phidgets and did some text replacement? That still counts as writing code, and the author should be you. It's better to leave the maintainer fields as is, because it's @clalancette and me who will be maintaining the code once it's merged. I think the maintainer field is parsed by the build farm to send out emails on build failures, and Chris and me want to get those. :)

Copy link
Contributor

@mintar mintar left a comment

Choose a reason for hiding this comment

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

Very nice pull request, almost done!

I've suggested some tiny changes. Also, don't forget to put your name into the author tag.

Also, there's a CI error because of the failing style check. Simply install pre-commit as described here, run pre-commit run -a, and it will reformat your code properly.

PhidgetCurrentInput_getCurrent(ci_handle_, &sensor_value);
if (ret != EPHIDGET_OK)
{
throw Phidget22Error("Failed to get analog sensor value", ret);
Copy link
Contributor

Choose a reason for hiding this comment

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

analog -> current

PhidgetCurrentInput_setDataInterval(ci_handle_, data_interval_ms);
if (ret != EPHIDGET_OK)
{
throw Phidget22Error("Failed to set analog data interval", ret);
Copy link
Contributor

Choose a reason for hiding this comment

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

analog -> current

Comment on lines +5 to +21
1.0.5 (2022-02-17)
------------------

1.0.4 (2021-10-22)
------------------

1.0.3 (2021-09-29)
------------------

1.0.2 (2021-03-09)
------------------

1.0.1 (2020-06-04)
------------------

1.0.0 (2020-06-03)
------------------
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1.0.5 (2022-02-17)
------------------
1.0.4 (2021-10-22)
------------------
1.0.3 (2021-09-29)
------------------
1.0.2 (2021-03-09)
------------------
1.0.1 (2020-06-04)
------------------
1.0.0 (2020-06-03)
------------------
Forthcoming
-----------

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, it is better if you don't add a CHANGELOG at all. We have automated tools to do that.

@mintar
Copy link
Contributor

mintar commented Aug 19, 2022

@lights0123 : Could you address the requested changes, so we can merge this?

@mintar mintar added the ros1 label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants