虽然移植完毕,但是不work。需要细调……

Dependencies:   mbed

Revision:
3:c6caae712d5d
Parent:
2:99785a1007a4
--- a/PID_v2.cpp	Tue Jun 07 05:26:03 2016 +0000
+++ b/PID_v2.cpp	Tue Jun 07 08:14:15 2016 +0000
@@ -57,7 +57,8 @@
     unsigned long now = g_Timer.read_us();
     float dt = (now - lastTime)/1000.0;
 
-    if(dt>=SampleTime) {
+    //if(dt>=SampleTime) {
+	if (1) {
         /*Compute all the working error variables*/
         float input = Input;
         float error = Setpoint - input;