Dual CANbus monitor and instrumentation cluster

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 beep mbed

Fork of CANary by Tick Tock

Revision:
94:c3a14b3975d6
Parent:
93:c2402e8cd0e2
Child:
95:248b3c25a7df
--- a/utility.cpp	Wed May 01 03:02:59 2013 +0000
+++ b/utility.cpp	Fri May 03 11:25:03 2013 +0000
@@ -370,55 +370,12 @@
     }
 }
 
-/*void sendCPreq() {
-    char i;
-    char data[8] = {0x02, 0x21, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff};
-    can1.monitor(false); // set to active mode
-    can1SleepMode = 0; // enable TX
-    can1.write(CANMessage(0x79b, data, 8));
-    
-    if( ZeroSecTick ) { ZeroSecTick = false; logTS(); } // gg - 0-second EV bus
-    
-    logCan(1,CANMessage(0x79b, data, 8)); // Group 2 Request on EV
-    data[0]=0x30; //change to request next line message
-    data[1]=0x01;
-    data[2]=0x00;
-    for(i=0;i<29;i++){
-        wait_ms(16); //wait 16ms
-        can1.write(CANMessage(0x79b, data, 8));
-    }
-    can1SleepMode = 1; // disable TX
-    can1.monitor(true); // set to snoop mode
-}
-
-void sendTreq() {
-    char i;
-    char data[8] = {0x02, 0x21, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff};
-    can1.monitor(false); // set to active mode
-    can1SleepMode = 0; // enable TX
-    can1.write(CANMessage(0x79b, data, 8));
-    
-    if( ZeroSecTick ) { ZeroSecTick = false; logTS(); } // gg - 0-second EV bus
-    
-    logCan(1,CANMessage(0x79b, data, 8)); // Group 4 request on EV
-    data[0]=0x30; //change to request next line message
-    data[1]=0x01;
-    data[2]=0x00;
-    for(i=0;i<3;i++){
-        wait_ms(16); //wait 16ms
-        can1.write(CANMessage(0x79b, data, 8));
-    }
-    can1SleepMode = 1; // disable TX
-    can1.monitor(true); // set to snoop mode
-}
-
-void autoPollISR() {  //This is the ticker ISR for auto-polling
-    pollCP=true;    //Set a flag to do in main loop instead of here
-}                   //since ticker blocks other interrupts*/
-
 void autoPollISR(){
+    char sTemp[40]; // just for debug
+    sprintf(sTemp,"Requesting cp data\n"); // just for debug
+    printMsg(sTemp); // just for debug
     reqMsgCnt = 0; //reset message counter
-    msgReq.attach(&sendReq,0.025);
+    msgReq.attach(&sendReq,0.015);
 }
 
 void playbackISR() { //Used for autoplayback