working-est copy with class-based code. still open loop

Dependencies:   mbed

Fork of analoghalls6 by N K

Revision:
7:76d6ceb23e0d
Parent:
6:99ee0ce47fb2
--- a/statusupdater.cpp	Wed Mar 04 15:33:32 2015 +0000
+++ b/statusupdater.cpp	Thu Mar 05 11:02:54 2015 +0000
@@ -44,25 +44,24 @@
     int last_slow = 0;
     
     for(;;) {
+        
+        #ifdef __DEBUG
+        pc->printf("%f",LutSin(_motor->angle));
+        pc->printf("\n\r");
+        #endif
+        
         if (_time - last_fast > fast_us) {
-            
             _motor->UpdateState();
             _inverter->UpdateVbus();
             last_fast = _time;
-            
-            pc->printf("%f %f %f %f %f\n\r", _motor->angle, _motor->I_c, _motor->I_b, test_alpha, test_beta);
-            //pc->printf("%f %f %f %f\n\r", _motor->angle);
-                                    
         }
         
         if (_time - last_slow > slow_us) {
-            
             _user->UpdateState();
             _motor->UpdateTemp();
             _inverter->UpdateTemp();
             last_slow = _time;
-                                  
-            //pc->printf("%f %f\n\r", _inverter->va, _inverter->vb);
         }
+ 
     }
 }
\ No newline at end of file