From e0470e73a3067a671b4976067a3863b90e5cbe30 Mon Sep 17 00:00:00 2001
From: Angel <roangel@student.ethz.ch>
Date: Fri, 13 Oct 2017 12:34:47 +0200
Subject: [PATCH] fixed motors_off thing

---
 pps_ws/src/d_fall_pps/src/PPSClient.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pps_ws/src/d_fall_pps/src/PPSClient.cpp b/pps_ws/src/d_fall_pps/src/PPSClient.cpp
index 3d3defc0..8d0a5025 100755
--- a/pps_ws/src/d_fall_pps/src/PPSClient.cpp
+++ b/pps_ws/src/d_fall_pps/src/PPSClient.cpp
@@ -34,6 +34,11 @@
 
 #include "d_fall_pps/ControlCommand.h"
 
+// types PPS firmware
+#define TYPE_PPS_MOTORS 6
+#define TYPE_PPS_RATE 7
+#define TYPE_PPS_ANGLE 8
+
 // tipes of controllers being used:
 #define SAFE_CONTROLLER   0
 #define CUSTOM_CONTROLLER 1
@@ -515,7 +520,7 @@ void viconCallback(const ViconData& viconData) {
             else
             {
                 ControlCommand zeroOutput = ControlCommand(); //everything set to zero
-                zeroOutput.onboardControllerType = 2; //set to motor_mode
+                zeroOutput.onboardControllerType = TYPE_PPS_MOTORS; //set to motor_mode
                 controlCommandPublisher.publish(zeroOutput);
                 bag.write("ViconData", ros::Time::now(), local);
                 bag.write("ControlOutput", ros::Time::now(), zeroOutput);
-- 
GitLab