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

Dependencies:   mbed

Fork of analoghalls6 by N K

Revision:
6:99ee0ce47fb2
Parent:
5:ee1e6c84c302
Child:
7:76d6ceb23e0d
Child:
9:d3b70c15baa9
--- a/statusupdater.cpp	Tue Mar 03 06:28:10 2015 +0000
+++ b/statusupdater.cpp	Wed Mar 04 15:33:32 2015 +0000
@@ -44,21 +44,25 @@
     int last_slow = 0;
     
     for(;;) {
-        
-        
-        
         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