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-3381 - Add defaults to streamStatus #111

Merged
merged 8 commits into from
May 31, 2023

Conversation

cheukt
Copy link
Member

@cheukt cheukt commented May 31, 2023

came across while writing tests

@cheukt cheukt requested a review from maximpertsov May 31, 2023 16:21
Copy link
Contributor

@maximpertsov maximpertsov left a comment

Choose a reason for hiding this comment

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

good catch - just a minor suggestion for the api

src/robot/client.ts Outdated Show resolved Hide resolved
src/robot/client.ts Outdated Show resolved Hide resolved
src/robot/robot.ts Outdated Show resolved Hide resolved
cheukt and others added 6 commits May 31, 2023 15:12
Co-authored-by: maximpertsov <maxim.pertsov@gmail.com>
Co-authored-by: maximpertsov <maxim.pertsov@gmail.com>
Co-authored-by: maximpertsov <maxim.pertsov@gmail.com>
@cheukt cheukt requested a review from maximpertsov May 31, 2023 20:25
@cheukt
Copy link
Member Author

cheukt commented May 31, 2023

merge suggestions and added fixes - tested with

  const names = await robot.resourceNames();
  console.log(names[0]);
  console.log(await robot.getStatus([names[0]]));
  let stream = robot.streamStatus();
  stream.on('data', (response: VIAM.robotApi.Status[]) => {
    console.log(response);
  });
  stream.on('status', (newStatus?: { details: unknown }) => {
    console.error('error streaming robot status', newStatus);
  });
  stream.on('end', () => {
    console.error('done streaming robot status');
  });

and variations

@cheukt cheukt changed the title Add defaults to streamStatus RSDK-3381 - Add defaults to streamStatus May 31, 2023
@cheukt cheukt merged commit fd5664f into viamrobotics:main May 31, 2023
@cheukt cheukt deleted the add-status-stream-defaults branch May 31, 2023 21:12
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.

2 participants