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-4265] Board and Sensor Widgets #80

Merged
merged 9 commits into from
Aug 2, 2023

Conversation

njooma
Copy link
Member

@njooma njooma commented Aug 2, 2023

New board widget and sensor widget.

Board widget updates the analogs/digital interrupts to use data tables rather than just showing the dict:
Screenshot 2023-08-02 at 1 49 46 PM

Sensor widget adds some new controls, along with auto refreshing:
Screenshot 2023-08-02 at 1 43 32 PM

Finally, updated the buttons so that they look nicer when it's icon only

@njooma njooma requested a review from jckras August 2, 2023 17:53
@njooma njooma requested a review from a team as a code owner August 2, 2023 17:53
@njooma njooma requested a review from benjirewis August 2, 2023 17:53
warning;

/// A button to indicate a warning state, will result in an amber color scheme
warning,
Copy link
Member

Choose a reason for hiding this comment

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

What is an example of something that is in a warning state? Just trying to understand the use 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.

Maybe an action that's not fully destructive, but just a warning. Maybe something like clearing logs in the future?

@@ -92,8 +94,8 @@ class _MyHomePageState extends State<MyHomePage> {
_loading = true;
});
final robotFut = RobotClient.atAddress(
'<URL>',
RobotClientOptions.withLocationSecret('<SECRET>'),
dotenv.env['ROBOT_LOCATION'] ?? '',
Copy link
Member

Choose a reason for hiding this comment

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

what would be stored in these env files? would a user upload their robot_location to the file or is this just a more professional way to include input that may change depending on user?

Copy link
Member Author

Choose a reason for hiding this comment

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

Usually, environment-specific variables are stored in env files (in this case, the robot location and secret). This is super useful when you have different variables based on launch environment (e.g. debug vs release). This is useful in this example because it's also how we're testing internally, so it let's us set these values without the fear of committing them.

Copy link
Member

@jckras jckras left a comment

Choose a reason for hiding this comment

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

added a q for my own understanding but, LGTM

Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

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

Any reason why Link and Level values in the images you included have values that end with .?

@@ -5,13 +5,11 @@ import 'package:viam_sdk/widgets.dart';

class BaseScreen extends StatelessWidget {
final Base base;
final ResourceName resourceName;
final Iterable<Camera> cameras;
final RobotClient robot;

// TODO change BaseScreen to accept camera ResourceName.
Copy link
Member

Choose a reason for hiding this comment

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

Remove?

@njooma
Copy link
Member Author

njooma commented Aug 2, 2023

Any reason why Link and Level values in the images you included have values that end with .?

That's actually the value we're getting back from the server

@benjirewis
Copy link
Member

Any reason why Link and Level values in the images you included have values that end with .?

That's actually the value we're getting back from the server

Is that a server bug?

@njooma
Copy link
Member Author

njooma commented Aug 2, 2023

Any reason why Link and Level values in the images you included have values that end with .?

That's actually the value we're getting back from the server

Is that a server bug?

I actually don't know -- been trying to test that rover using the web control UI but it's breaking :(

@njooma njooma merged commit c36161b into viamrobotics:main Aug 2, 2023
2 checks passed
@njooma njooma deleted the RSDK-4265/widgets branch August 2, 2023 19:33
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.

None yet

3 participants