ROM Comm / Mbed 2 deprecated espar_mini_control_CAN

Dependencies:   mbed mbed-STM32F103C8T6

Files at this revision

API Documentation at this revision

Comitter:
lorded
Date:
Wed Jul 29 16:48:19 2020 +0000
Parent:
10:a82e51837e2b
Commit message:
Espar

Changed in this revision

globals.cpp Show annotated file Show diff for this revision Revisions of this file
heatcontrol.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
--- a/globals.cpp	Fri Jun 12 23:28:43 2020 +0000
+++ b/globals.cpp	Wed Jul 29 16:48:19 2020 +0000
@@ -2,7 +2,7 @@
 
 
 
-DigitalOut led1 (PA_4);   // not present on Maple Mini
+DigitalOut led1 (PB_1);   // is present
 DigitalOut led2 (PA_5);   // not present on Maple Mini
 DigitalOut led3 (PA_6);   // not present on Maple Mini
 DigitalOut led4 (PA_7);   // not present on Maple Mini
--- a/heatcontrol.cpp	Fri Jun 12 23:28:43 2020 +0000
+++ b/heatcontrol.cpp	Wed Jul 29 16:48:19 2020 +0000
@@ -1705,7 +1705,7 @@
     int incoming = can2.read(canMsg);
     while ((incoming > 0) && (count++ < 10))
     {
-       
+       led1 = 1;
         // start blank
         if ((canMsg.id == 0x0055)) {
             // sub our own
--- a/main.cpp	Fri Jun 12 23:28:43 2020 +0000
+++ b/main.cpp	Wed Jul 29 16:48:19 2020 +0000
@@ -36,13 +36,14 @@
 
 Ticker timer;
 Ticker quartersecond_timed_event;
+Ticker hundredms_timed_event;
 Ticker onesecond_timed_event;
 
 void attime()
 {
     //second_tick = true;
     //myled = !myled;
-    led1 = !led1;
+    led1 = 0; // keep it off.  Flicker on with CAN
 }
 
 // Menu defines
@@ -113,7 +114,10 @@
             heaterState[i].resettick = 0;
         }
     }
-
+}
+void hundredms_tick()
+{
+    led1 = 0;// off
 }
 
 int main()
@@ -126,22 +130,10 @@
 
 
     pc.printf("\n\nRIXEN Simulator v1.1 \r\n");
-
     led1 = 1;
-    wait(0.1);
-    led2 = 1;
-    wait(0.1);
-    led3 = 1;
-    wait(0.1);
-    led4 = 1;
-    wait(0.2);
-    led1 = 0;
-    led2 = 0;
-    led3 = 0;
-    led4 = 0;
-
 
     wait(1);
+    led1 = 0;
     spl_i2c = new I2C(SDA, SCL);
     //canspeed = CAN500;
 //    ecu.dtc = false;
@@ -154,6 +146,7 @@
 
     //timer.attach(&attime, 1);
     quartersecond_timed_event.attach(&quarter_second_tick, 0.250);
+    hundredms_timed_event.attach(&hundredms_tick, 0.1);
     onesecond_timed_event.attach(&one_second_tick, 1.0);
 
 
@@ -189,8 +182,6 @@
             }
         }
         
-
-
         if (secondFlag > 0) {
             secondFlag = 0;