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

RSDK-7677 Update Analog reader RC card #3975

Closed
wants to merge 3 commits into from

Conversation

oliviamiller
Copy link
Member

@oliviamiller oliviamiller commented May 20, 2024

board readAnalogReader response type was changed to a struct so we need to call value to get the bit value for the RC card.
This relies on the typescipt change so will be waiting to merge this until the updated typescript sdk version is being used by RDK.
Tested locally with a fake board.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label May 20, 2024
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 20, 2024
Copy link
Member

@DTCurrie DTCurrie left a comment

Choose a reason for hiding this comment

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

@@ -95,7 +95,7 @@ const writeAnalog = async () => {

const readAnalog = async () => {
try {
const value = await boardClient.readAnalogReader(analogPinName);
const {value} = await boardClient.readAnalogReader(analogPinName);
Copy link
Contributor

Choose a reason for hiding this comment

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

This should resolve your lint error!

Suggested change
const {value} = await boardClient.readAnalogReader(analogPinName);
const { value } = await boardClient.readAnalogReader(analogPinName);

Copy link
Member Author

Choose a reason for hiding this comment

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

i'm pretty sure the lint error is because rdk doesn't point to the new typescript changes yet so it still thinks the return value is a number? im waiting to merge this until next TS release. But can still change to this syntax if preferred.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah that's certainly the case as well, I think you'll start getting this error once the TS release is resolved. Either way, this spacing looks a little nicer to me. Thanks!

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 21, 2024
@oliviamiller
Copy link
Member Author

closing, being done in https://github.com/viamrobotics/rdk/pull/3994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
4 participants