-
Notifications
You must be signed in to change notification settings - Fork 113
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-2084: Add movement sensor and power sensor snippets #3863
DOCS-2084: Add movement sensor and power sensor snippets #3863
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
This looks good to me aside from the whitespace. For where to place the readings description you'll have to ask the SME reviewer because I'm not sure |
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.
Where does stuff about
Readings
go?
It should go in the Sensor
interface, rather than being copied between MovementSensor, PowerSensor, etc. That's the DRY (Don't Repeat Yourself) approach, so that if the Sensor
interface ever changes, you only need to update that and everything else just points to the updated version.
My feedback is extremely minor, and the rest LGTM!
Is it preferred that the the code snippet for the sensor's
Readings()
method go in thesensors
service'ssensors.go
file?