new

Dependencies:   mbed CANMsg

Revision:
14:24c5d58e8bc6
Parent:
13:0ae23132a2b6
diff -r 0ae23132a2b6 -r 24c5d58e8bc6 main.cpp
--- a/main.cpp	Tue Jan 08 07:47:07 2019 +0000
+++ b/main.cpp	Thu Jan 10 10:40:27 2019 +0000
@@ -184,6 +184,11 @@
     }else{
         TBmotorDirecti=0;
     }
+    #if defined(pcSerial)
+        #if defined(inversione)
+            pc.printf("cambio M %d\n",cambiaStep);
+        #endif
+    #endif
 }
 //*******************************************************
 // aggiornamento parametri di lavoro fissi e da Tritecnica
@@ -347,7 +352,7 @@
     }else if (TBmotorSteps==1600){
         TBmotor_M1=0;
         TBmotor_M2=1;
-        TBmotor_M3=1;
+        TBmotor_M3=0;
     }else if (TBmotorSteps==3200){
         TBmotor_M1=1;
         TBmotor_M2=0;
@@ -1183,7 +1188,7 @@
     #if defined(provaStepper)
        TBmotorRst=0;
        TBticker.attach_us(&step_TBPulseOut,250.0f);  // clock time are seconds and attach seed motor stepper controls
-       //TATicker.attach(&inverti,2.5f);
+       TATicker.attach(&inverti,2.0f);
     #endif // end prova stepper
     
     #if defined(canbusActive)
@@ -1501,6 +1506,11 @@
                 #endif
             }
             if ((double)TBactualPosition > ((TBgiroStep/cellsNumber)*1.2f)&&(erroreTamburo==0)){
+                #if defined(pcSerial)
+                    #if defined(inversione)
+                        pc.printf("TBact: %d TBgiro: %f \n",TBactualPosition,TBgiroStep);
+                    #endif
+                #endif
                 if (firstStart==0){
                     if (cntTbError>2){
                         all_cellSignal=1;