Inverted Pendulum / Mbed 2 deprecated IP-Interface

Dependencies:   mbed QEI

Revision:
23:5238b046119b
Parent:
22:c18f04d1dc49
--- a/pot/pot.cpp	Fri Nov 18 02:47:59 2016 +0000
+++ b/pot/pot.cpp	Fri Nov 18 11:55:33 2016 +0000
@@ -9,15 +9,16 @@
 }
 
 void Pot::update(){
-    angular_velocity = (get_angle() - angle)/ UPDATE_TIME;
+    //angular_velocity = (get_angle() - angle)/ UPDATE_TIME;
     angle=get_angle_pulse();
-    velocity = (get_position() - position) / UPDATE_TIME;   
-    position=get_position();
+    //velocity = (get_position() - position) / UPDATE_TIME;   
+    //position=get_position();
 }
     
 void Pot::set_zeros(){
     this->offset = (-1)*this->get_angle();
     this->encoder->reset();
+    wait(2);
 }
 
 float Pot::get_angle(){