-
Notifications
You must be signed in to change notification settings - Fork 107
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
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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!
const {value} = await boardClient.readAnalogReader(analogPinName); | |
const { value } = await boardClient.readAnalogReader(analogPinName); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
closing, being done in https://github.com/viamrobotics/rdk/pull/3994 |
board
readAnalogReader
response type was changed to a struct so we need to callvalue
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.