SINGLE Inputs code

Dependencies:   mbed reScale USBDevice

Files at this revision

API Documentation at this revision

Comitter:
BETZtechnik
Date:
Sun Oct 06 21:58:29 2019 +0000
Parent:
11:baedb9e32b6d
Commit message:
fixed x7atc

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Oct 06 21:18:30 2019 +0000
+++ b/main.cpp	Sun Oct 06 21:58:29 2019 +0000
@@ -136,10 +136,10 @@
 
 //************************************  Interrupt response **********************
 
-
+if (autoMode == 1){ // x7 atc mode
         if (aux1 == 0 && aux1State == 0) {
 
-            wait(0.1);     //**************************2019-06-27
+          //wait(0.1);     //**************************2019-06-27
 
             if (cw == 1) {
 //servo2 = 1;
@@ -171,6 +171,7 @@
             aux1State = 0;
 //wait(0.1);
         }
+        } // end x7 atc mode
 
 //********************** Tool Pulse **********************************
 
@@ -222,7 +223,7 @@
         }
          */
 
-
+if (autoMode == 2){ // pulse
         if (pulse == 0 && pulseActive == 0 && pulseFlag == 1 && (t.read_ms() > (lastPulse + pulseDebounce))) {
             pulseStart = t.read_ms();
             lastPulse = t.read_ms();
@@ -260,7 +261,7 @@
             lastPulse = t.read_ms();
             //wait(0.01);
         }
-
+} // end of pulse