Program for STCL Control of motors via PWM

Dependencies:   SoftPWM USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
Dzak
Date:
Tue Apr 21 02:54:07 2015 +0000
Parent:
4:58ae811bff73
Commit message:
latest changes

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 58ae811bff73 -r 65c7c053e4ac main.cpp
--- a/main.cpp	Tue Apr 21 02:14:24 2015 +0000
+++ b/main.cpp	Tue Apr 21 02:54:07 2015 +0000
@@ -65,7 +65,7 @@
        if (Z_Speed > (SWITCH_LEVELS / 2)) {Z_Direction = FWD; Stop_Run = 1;}
        if (Z_Speed < (SWITCH_LEVELS / 2)) {Z_Direction = REV; Stop_Run = 1;}
         
-       if(X_Speed == SWITCH_LEVELS / 2 && Y_Speed == SWITCH_LEVELS / 2 && Z_Speed == SWITCH_LEVELS / 2)
+       if((X_Speed == SWITCH_LEVELS / 2) && (Y_Speed == SWITCH_LEVELS / 2) && (Z_Speed == SWITCH_LEVELS / 2))
        {
            Stop_Run = 0;  //Stopped
        }
@@ -82,7 +82,7 @@
         Direction_Byte = (Direction_Byte | Z_Direction);               //Place X_Dir value : Z_Dir is now bit 0
         
         Send_Stage_Controller.putc(Direction_Byte);
-        
+        //serial.printf("%d\n",Direction_Byte);
         
         /*
         //============================================================================