Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
segway_rmp_400
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
drivers
segway_rmp_400
Commits
bd6eb9a0
Commit
bd6eb9a0
authored
14 years ago
by
José Luis Rivero Partida
Browse files
Options
Downloads
Patches
Plain Diff
Support to retrieve all status information at one call
get_status() will return an struct of type TSegwayRMP400Status
parent
fb5efea3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/segway_RMP400.cpp
+10
-0
10 additions, 0 deletions
src/segway_RMP400.cpp
src/segway_RMP400.h
+12
-0
12 additions, 0 deletions
src/segway_RMP400.h
with
22 additions
and
0 deletions
src/segway_RMP400.cpp
+
10
−
0
View file @
bd6eb9a0
...
...
@@ -155,6 +155,16 @@ CSegwayRMP400::set_wheel_radius(const float radius)
wheel_radius_
=
radius
;
}
TSegwayRMP400Status
CSegwayRMP400
::
get_status
()
{
TSegwayRMP400Status
status
;
status
.
rmp200
[
0
]
=
segways_
[
0
]
->
get_status
();
status
.
rmp200
[
1
]
=
segways_
[
1
]
->
get_status
();
return
status
;
}
float
CSegwayRMP400
::
get_forward_displacement
()
{
...
...
This diff is collapsed.
Click to expand it.
src/segway_RMP400.h
+
12
−
0
View file @
bd6eb9a0
...
...
@@ -16,6 +16,11 @@ const int NUM_SEGWAY_200 = 2;
enum
SegwayRMP400_status
{
rmp400_off
,
rmp400_connected
};
struct
TSegwayRMP400Status
{
TSegwayRMP200Status
rmp200
[
2
];
};
class
CSegwayRMP400
{
private:
...
...
@@ -137,6 +142,13 @@ class CSegwayRMP400
*/
bool
is_connected
()
const
;
/**
* \brief function to return whole platform status
*
* It will return the two segway internal status
*/
TSegwayRMP400Status
get_status
(
void
);
/**
* \brief function to return the total forward displacement
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment