Code used for the 2013 LRM Senior Design Team at VCU 2013 Senior Design Linear Rotary Motor

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
pedlerw
Date:
Wed Apr 24 18:25:18 2013 +0000
Parent:
2:675f8691f469
Commit message:
Read Previous

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Apr 24 18:23:13 2013 +0000
+++ b/main.cpp	Wed Apr 24 18:25:18 2013 +0000
@@ -1899,7 +1899,10 @@
     }//End of if//
     else if(state != check_state(state)){
         rot_position = rot_position + rot_step;
-    }//End of else if//    
+    }//End of else if//   
+    else{
+        xbee.printf("\r\nIncrement Error");
+    }     
 }//End of fucntion
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1913,6 +1916,9 @@
     else if(state != check_state(state)){
         rot_position = rot_position - rot_step;
     }//End of else if//     
+    else{
+        xbee.printf("\r\nDecrement Error");
+    }
 }//End of function
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1928,7 +1934,7 @@
         else if(rot_indication.read() < threash){
             //in this case light has been blocked//
             state = 0;
-            xbee.printf("\r\nCount Error");
+            xbee.printf("\r\nState Change Error");
         }
     }//End of if
     else if(current_state == 1){
@@ -1936,7 +1942,7 @@
         if(rot_indication.read() > threash){
             //in this case light is applied//
             state = 1;
-            xbee.printf("\r\nCount Error");
+            xbee.printf("\r\nState Change Error");
         }
         else if(rot_indication.read() < threash){
             //in this case light has been blocked//