changeset 180:b72d6a919c6c main

Rework the way that the ODR project motor speed / wheel speed is specified and reported.
author Bob Cook <bob@bobcookdev.com>
date Sat, 13 Apr 2013 20:28:29 -0700
parents 240d07f41efe
children a84d43219fbc
files main/packages/common/can/can_messages.h
diffstat 1 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/packages/common/can/can_messages.h	Mon Apr 01 20:24:56 2013 -0700
+++ b/main/packages/common/can/can_messages.h	Sat Apr 13 20:28:29 2013 -0700
@@ -144,14 +144,27 @@
 
 // ----------------------------------------------------------------------------------------
 
-const uint16_t can_dataid_motor_speed = 0x0120;
+const uint16_t can_dataid_wheel_speed = 0x0120;
 
 typedef struct
 {
-    int8_t motor_front;
-    int8_t motor_rear;
+    int8_t rpm_front;   // positive values indicate forward, negative reverse
+    int8_t rpm_rear;
+
+} can_data_wheel_speed;
+
+// ----------------------------------------------------------------------------------------
+
+const uint16_t can_dataid_wheel_status = 0x0121;
 
-} can_data_motor_speed;
+typedef struct
+{
+    int8_t actual_rpm_front;
+    int8_t actual_rpm_rear;
+    int8_t actual_motor_front;
+    int8_t actual_motor_rear;
+
+} can_data_wheel_status;
 
 // ----------------------------------------------------------------------------------------