From af2aea42accd5dc2e46b32f3df04de65c4a3ffe0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu>
Date: Mon, 7 Mar 2016 15:38:36 +0000
Subject: [PATCH] In the stop function, the current state is not changed to
 off.

---
 src/examples/test_segwayRMP400.cpp | 3 ++-
 src/segway_RMP400.cpp              | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/examples/test_segwayRMP400.cpp b/src/examples/test_segwayRMP400.cpp
index 3f57ab2..2186490 100644
--- a/src/examples/test_segwayRMP400.cpp
+++ b/src/examples/test_segwayRMP400.cpp
@@ -40,7 +40,8 @@ int main(int argc, char *argv[])
     sleep(1);
     segway->move(0.05,0.0); // 5cm per second 10 seconds = half a meter
     int i;
-    for(i=0;i<10;i++)
+    //for(i=0;i<10;i++)
+    for(;;)
     {
       sleep(1);
       cout << (*segway) << endl;
diff --git a/src/segway_RMP400.cpp b/src/segway_RMP400.cpp
index f40ca93..71ef1bc 100644
--- a/src/segway_RMP400.cpp
+++ b/src/segway_RMP400.cpp
@@ -277,7 +277,7 @@ CSegwayRMP400::stop()
     for (unsigned int i=0;i < segways_.size();i++)
         segways_[i]->stop();
 
-    status_ = rmp400_off;
+    //status_ = rmp400_off;
 }
 
 CSegwayRMP400::~CSegwayRMP400()
-- 
GitLab