changeset 150:cbbd86558aa0 main

Added constants for the IMU messages.
author Bob Cook <bob@bobcookdev.com>
date Sun, 26 Aug 2012 15:31:27 -0700
parents ebede8ccd1f4
children 8fc49d9dcd43
files main/packages/common/can/can_messages.h
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main/packages/common/can/can_messages.h	Mon Aug 13 19:22:43 2012 -0700
+++ b/main/packages/common/can/can_messages.h	Sun Aug 26 15:31:27 2012 -0700
@@ -7,7 +7,7 @@
 // 
 //  Identifiers for Controller Area Network messages.
 //
-//  Copyright (c) 2011 Bob Cook
+//  Copyright (c) 2012 Bob Cook
 //
 //  Permission is hereby granted, free of charge, to any person obtaining a copy
 //  of this software and associated documentation files (the "Software"), to deal
@@ -41,6 +41,7 @@
 // 
 //      Emergency messages:     0x0001 to 0x000f
 //      General messages:       0x0010 to 0x001f
+//      IMU sensor:             0x0020 to 0x002f
 //      GPS sensor:             0x0100 to 0x010f
 //      Servo (front & rear):   0x0110 to 0x011f
 //      Motor (front & rear):   0x0120 to 0x012f
@@ -79,6 +80,18 @@
 
 // ----------------------------------------------------------------------------------------
 
+const uint16_t can_dataid_imu_roll  = 0x0020;
+const uint16_t can_dataid_imu_pitch = 0x0021;
+const uint16_t can_dataid_imu_yaw   = 0x0022;
+
+typedef struct
+{
+    int32_t data; // imu value * 1,000,000
+
+}   can_data_imu_data;
+
+// ----------------------------------------------------------------------------------------
+
 const uint16_t can_dataid_utc_timestamp = 0x0100;
 
 typedef struct