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-5813 RSDK-5788 Fix code samples and add sensors #183

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions codesamples/apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,43 @@
"base": {
"client": "BaseClient",
"func": "is_moving",
"args": []
"args": []
},
"camera": {
"client": "CameraClient",
"func": "get_image",
"args": [ "std::string(\"image/png\")" ],
"comment": "Note that the supplied MIME type is just a placeholder. Please update as necessary."
"args": [ "std::string(\"image/png\")" ],
"comment": "Note that the supplied MIME type is just a placeholder. Please update as necessary."
},
"encoder": {
"client": "EncoderClient",
"func": "get_properties",
"args": []
"args": []
},
"motion": {
"client": "MotionClient",
"func": "get_pose",
"args": ["{{\"rdk\", \"component\", \"fake\"}, \"\", \"component\"}", "<destination-frame>", "{}", "nullptr"]
"args": ["{{\"rdk\", \"component\", \"fake\"}, \"\", \"component\"}", "<destination-frame>", "{}", "nullptr"],
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks to @mcous who quickly spotted that this line was just missing a comma and that's why resource-specific code was not being generated 🙏🏻 .

"comment": "Update with correct component name, destination frame, supplemental transforms, and extra params"
},
"motor": {
"client": "MotorClient",
"func": "is_moving",
"args": []
},
"movement_sensor": {
"client": "MovementSensorClient",
"func": "get_linear_velocity",
Copy link
Member Author

Choose a reason for hiding this comment

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

I chose the example functions for these sort of arbitrarily; happy to change them if desired.

"args": []
},
"power_sensor": {
"client": "PowerSensorClient",
"func": "get_voltage",
"args": []
},
"sensor": {
"client": "SensorClient",
"func": "get_readings",
"args": []
}
}