From 8834f0b680b8115e83487b99e1fc090dc6f9edcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu>
Date: Fri, 11 Dec 2015 09:15:39 +0000
Subject: [PATCH] Solved a bug in which the last command was sent all the time.

---
 src/segway_rmp200.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/segway_rmp200.cpp b/src/segway_rmp200.cpp
index 41af963..fc0f714 100755
--- a/src/segway_rmp200.cpp
+++ b/src/segway_rmp200.cpp
@@ -430,6 +430,13 @@ void CSegwayRMP200::command_thread(void)
       packet.data[15]=command[2];
       packet.data[16]=command[3];
     }
+    else
+    {
+      packet.data[13]=0x00;
+      packet.data[14]=0x00;
+      packet.data[15]=0x00;
+      packet.data[16]=0x00;
+    }
     this->access_command.exit();
     packet.data[17]=this->compute_checksum(&packet);
     try{
-- 
GitLab