MBED code for Xbee module running on solar car

Dependencies:   XBeeLib mbed CUER_CAN

Fork of XBee802_Send_Data by Digi International Inc.

Files at this revision

API Documentation at this revision

Comitter:
ItsJustZi
Date:
Sat Oct 07 02:49:23 2017 +0000
Parent:
13:173e69872505
Commit message:
Final working implementation of send data before modifying to meet MDH requirements

Changed in this revision

CAN_Parser_Telemetry.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 173e69872505 -r e625e467e257 CAN_Parser_Telemetry.cpp
--- a/CAN_Parser_Telemetry.cpp	Wed Sep 13 05:18:55 2017 +0000
+++ b/CAN_Parser_Telemetry.cpp	Sat Oct 07 02:49:23 2017 +0000
@@ -75,12 +75,23 @@
     CAN_data_sent = true;
 }
 
-void CANIDsListUpdater(void) {
+void CANIDsListUpdater(void)
+{
     acceptedCANIDs[0]= MOTOR_CONTROLLER_BASE_ID + MOTOR_STATUS_ID;
     acceptedCANIDs[1]= MOTOR_CONTROLLER_BASE_ID + MOTOR_VELOCITY_ID;
     acceptedCANIDs[2]= BMS_BASE_ID + BATTERY_SOC_ID;
     acceptedCANIDs[3]= BMS_BASE_ID + BATTERY_VI_ID;
     acceptedCANIDs[4]= BMS_BASE_ID + BATTERY_STATUS_ID;
-    acceptedCANIDs[5]= BMS_BASE_ID + BATTERY_PRECHARGE_ID;
-    }
-    
\ No newline at end of file
+    acceptedCANIDs[5]= BCU_STATUS_ID;
+    acceptedCANIDs[5]= BMS_BASE_ID + IVTA_ID;
+    acceptedCANIDs[6]= BMS_BASE_ID + MAX_MIN_VOLTAGE;
+    acceptedCANIDs[7]= DRIVER_CONTROLS_BASE_ID + MOTOR_DRIVE_CMD;
+    acceptedCANIDs[8]= DRIVER_CONTROLS_BASE_ID + MOTOR_POWER_CMD;
+    acceptedCANIDs[9]= 0x40B; //motor controller heatsink and motor temp
+    acceptedCANIDs[10]=AMBIENT_TEMP_ID;
+    acceptedCANIDs[11]=0x404; //motor controller phase currents
+    acceptedCANIDs[12]=CHARGER_ID;
+    acceptedCANIDs[13]=BMS_BASE_ID+MIN_TEMPERATURE;
+    acceptedCANIDs[14]=BMS_BASE_ID+MAX_TEMPERATURE;
+    acceptedCANIDs[15]=BMS_BASE_ID+0xF1; //battery power ID
+}  
\ No newline at end of file
diff -r 173e69872505 -r e625e467e257 main.cpp
--- a/main.cpp	Wed Sep 13 05:18:55 2017 +0000
+++ b/main.cpp	Sat Oct 07 02:49:23 2017 +0000
@@ -112,7 +112,7 @@
     while (1) {
         //send_broadcast_data(xbee);
         readFromVolBufferandRedirect2Xbee(xbee, remoteDevice64b);
-        wait_ms(1000);
+        wait_ms(200);
         //wait(1);
         //send_data_to_remote_node(xbee, remoteDevice16b);
     }