Merged to branch

Dependencies:   USBDevice mbed EquatorStrutController LightWeightSerialTransmit

Fork of EquatorStrutDigitalMonitor by Stewart Coulden-Smith

Files at this revision

API Documentation at this revision

Comitter:
pyrostew
Date:
Fri Aug 15 09:15:15 2014 +0000
Parent:
19:a6369257c00f
Commit message:
Stewart's code before updating

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Aug 14 14:46:31 2014 +0000
+++ b/main.cpp	Fri Aug 15 09:15:15 2014 +0000
@@ -265,6 +265,13 @@
     pc.putc(13);
 }
 
+void SerialNewFile()
+{
+    pc.putc(28);
+    pc.putc(10);
+    pc.putc(13);
+}
+
 void Home()
 {
     if (!Enabled)
@@ -486,11 +493,11 @@
     {
         //double pow = 0.4;
         //while(pow < 1.0)
-        PosKpGain = 10.0;
-        while(PosKpGain < 50.0)
+        PosKpGain = 1.7;
+        while(PosKpGain > 0.0)
         {
             //pow += 0.05;
-            PosKpGain += 1.0;
+            PosKpGain -= 0.2;
             
           //  VelKpGain = 0.003;
           //  while (VelKpGain < 0.008)
@@ -506,6 +513,7 @@
                     Controller();
                 }
                 
+                SerialNewFile();
                 Home();
           //  }
         }