Commit bd6eb9a0 authored by José Luis Rivero Partida's avatar José Luis Rivero Partida
Browse files

Support to retrieve all status information at one call

get_status() will return an struct of type TSegwayRMP400Status
parent fb5efea3
......@@ -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()
{
......
......@@ -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
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment