Skip to content

Conversation

oliviamiller
Copy link
Member

@oliviamiller oliviamiller commented Jul 31, 2023

@oliviamiller oliviamiller changed the title Add PowerSensor RSDK-4056 Add PowerSensor Jul 31, 2023
@oliviamiller oliviamiller marked this pull request as ready for review July 31, 2023 16:08
@oliviamiller oliviamiller requested a review from a team as a code owner July 31, 2023 16:08
@oliviamiller oliviamiller requested review from njooma and stuqdog July 31, 2023 16:08
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

One clarifying question, generally lgtm!

def add_reading(name: str, reading, returntype: List) -> None:
possible_error_types = (NotImplementedError, MethodNotImplementedError, NotSupportedError)
if type(reading) in returntype:
if name == "voltage":
Copy link
Member

Choose a reason for hiding this comment

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

(q) it looks to me like is_ac will always defer to the current value if both current and voltage exist. Is that correct? Is that a possible case?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, the is_ac value for voltage and current should always be equivalent. I wanted to include it in both places here so that if voltage is unimplemented or errors the is_ac would still be included in the readings.

@oliviamiller oliviamiller merged commit bb24300 into viamrobotics:main Aug 3, 2023
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.

3 participants