changeset 261:71ff00c4bae6 main

New messages for the O.D.R. project and its various nodes.
author Bob Cook <bob@bobcookdev.com>
date Tue, 13 Oct 2015 19:17:59 -0700
parents 98dfb5a2c37a
children 19ac16c0ea47
files main/packages/common/can/can_messages.h
diffstat 1 files changed, 28 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/main/packages/common/can/can_messages.h	Tue Oct 13 19:17:17 2015 -0700
+++ b/main/packages/common/can/can_messages.h	Tue Oct 13 19:17:59 2015 -0700
@@ -53,6 +53,8 @@
 const uint16_t can_dataid_emergency = 0x0001;
 const uint16_t can_dataid_all_clear = 0x0002;
 
+const uint16_t can_dataid_estop_off = 0x0003;
+
 // ----------------------------------------------------------------------------------------
 
 const uint16_t can_dataid_heartbeat = 0x0010;
@@ -88,9 +90,12 @@
 
 const uint16_t can_dataid_odr_start_pgm = 0x0014;
 
+const uint8_t odr_pgm_stop          = 0x00;
 const uint8_t odr_pgm_wander        = 0x01;
 const uint8_t odr_pgm_straight_line = 0x02;
 const uint8_t odr_pgm_small_box     = 0x03;
+const uint8_t odr_pgm_go_to_waypt   = 0x04;
+const uint8_t odr_pgm_robothon      = 0x05;
 
 typedef struct
 {
@@ -138,12 +143,6 @@
 const uint16_t can_dataid_gps_latitude  = 0x0101;
 const uint16_t can_dataid_gps_longitude = 0x0102;
 
-const uint16_t can_dataid_origin_lat  = 0x0104;
-const uint16_t can_dataid_origin_long = 0x0105;
-
-const uint16_t can_dataid_target_lat  = 0x0106;
-const uint16_t can_dataid_target_long = 0x0107;
-
 const int32_t  can_data_gps_min_multiplier = 1000;
 
 typedef struct
@@ -165,6 +164,29 @@
 
 // ----------------------------------------------------------------------------------------
 
+const uint16_t can_dataid_origin_lat  = 0x0104;
+const uint16_t can_dataid_origin_long = 0x0105;
+
+const uint16_t can_dataid_target_lat  = 0x0106;
+const uint16_t can_dataid_target_long = 0x0107;
+
+// these messages use the same structure can_data_gps_data
+
+// ----------------------------------------------------------------------------------------
+
+const uint16_t can_dataid_navigation = 0x0108;
+
+const uint32_t can_data_nav_multiplier = 10000;
+
+typedef struct
+{
+    uint16_t distance; // meters away from target
+    int32_t  heading;  // angle * 10,000 (can_data_nav_multiplier)
+
+} can_data_navigation;
+
+// ----------------------------------------------------------------------------------------
+
 const uint16_t can_dataid_wheel_position = 0x0110;
 
 typedef struct