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

DOCS-2347: Standardize code samples #4002

Conversation

skyleilani
Copy link
Contributor

Changed the format of the code samples (whitespace, comments, punctuation) and deleted any resource initializations for uniformity across samples.

Method descriptions have been lightly modified.
The meaning has been retained (in my opinion, this is probably subjective!).

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label May 24, 2024
Copy link
Contributor

Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!

component function
base IsMoving
board GPIOPinByName
camera Properties
encoder Properties
motor IsMoving
sensor Readings
servo Position
arm EndPosition
audio MediaProperties
gantry Lengths
gripper IsMoving
input_controller Controls
movement_sensor LinearAcceleration
power_sensor Power
pose_tracker Poses
motion GetPose
vision GetProperties

type Readings struct {
Name resource.Name
Readings map[string]interface{}
}

// A Service centralizes all sensors into one place.
//
Copy link
Contributor

Choose a reason for hiding this comment

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

This is looking great! I'll give this a full read-through Monday, but caught this: This code sample for Readings should precede the description to Service + a newline. Currently it will appear as part of the Service method description.

@andf-viam
Copy link
Contributor

This ticket ended up being resolved in DOCS-2316. Safe to close this, thanks for your work on this Sky --> it helped me write mine.

@andf-viam andf-viam closed this Jun 28, 2024
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
Development

Successfully merging this pull request may close these issues.

3 participants