CUER / Mbed 2 deprecated Telemetry_ChaseCar

Dependencies:   CUER_CAN XBeeLib mbed

Files at this revision

API Documentation at this revision

Comitter:
ItsJustZi
Date:
Tue Sep 26 12:09:13 2017 +0000
Parent:
14:842201fb6e10
Commit message:
Attempt to increase frequency of CAN packets sent to CANAlyzer by increasing time between xbee callbacks which are blocking functions

Changed in this revision

CAN_Parser_Telemetry.cpp Show annotated file Show diff for this revision Revisions of this file
config.h 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
--- a/CAN_Parser_Telemetry.cpp	Mon Sep 25 15:54:45 2017 +0000
+++ b/CAN_Parser_Telemetry.cpp	Tue Sep 26 12:09:13 2017 +0000
@@ -98,10 +98,10 @@
 {
     CANMessage msg;
     msg.id=(uint16_t)xbeeData[0]+((uint16_t)(xbeeData[1])<<8);
-    for (int i=0; i<10; i++) {
-        if (DEBUG) printf("byte %d is %x \r\n", i, xbeeData[i]);
-        }
-    if (DEBUG) printf("CAN ID is %x \r\n", msg.id);
+    //for (int i=0; i<10; i++) {
+        //if (DEBUG) printf("byte %d is %x \r\n", i, xbeeData[i]);
+        //}
+    //if (DEBUG) printf("CAN ID is %x \r\n", msg.id);
     msg.len = 8;
     //CAN_Data data;
     for (int i=0; i<8; i++) {
--- a/config.h	Mon Sep 25 15:54:45 2017 +0000
+++ b/config.h	Tue Sep 26 12:09:13 2017 +0000
@@ -14,12 +14,12 @@
 #define __CONFIG_H_
 
 /** Library configuration options */
-#define ENABLE_LOGGING
-#define ENABLE_ASSERTIONS
-#define FRAME_BUFFER_SIZE           128 //4
+//#define ENABLE_LOGGING
+//#define ENABLE_ASSERTIONS
+#define FRAME_BUFFER_SIZE           25 //4
 #define MAX_FRAME_PAYLOAD_LEN       128
 
-#define SYNC_OPS_TIMEOUT_MS         2000
+#define SYNC_OPS_TIMEOUT_MS         1000
 
 #define RADIO_TX                p13 /* TODO: specify your setup's Serial TX pin connected to the XBee module DIN pin */
 #define RADIO_RX                p14 /* TODO: specify your setup's Serial RX pin connected to the XBee module DOUT pin */
--- a/main.cpp	Mon Sep 25 15:54:45 2017 +0000
+++ b/main.cpp	Tue Sep 26 12:09:13 2017 +0000
@@ -19,7 +19,7 @@
 using namespace CAN_IDs;
 #endif
 
-#define DEBUG                   1
+#define DEBUG                   0
 
 using namespace XBeeLib;
 
@@ -66,7 +66,7 @@
 
     while (true) {
         xbee.process_rx_frames();
-        wait_ms(50);
+        wait_ms(1000);
         if (DEBUG) log_serial->printf(".");
     }