Chun Feng Huang / STATE_FEEDBACK

Files at this revision

API Documentation at this revision

Comitter:
benson516
Date:
Wed Jan 04 10:09:44 2017 +0000
Parent:
3:7ff53317e0a4
Commit message:
Add "enable" state control

Changed in this revision

STATE_FEEDBACK.cpp Show annotated file Show diff for this revision Revisions of this file
STATE_FEEDBACK.h Show annotated file Show diff for this revision Revisions of this file
--- a/STATE_FEEDBACK.cpp	Tue Jan 03 15:00:01 2017 +0000
+++ b/STATE_FEEDBACK.cpp	Wed Jan 04 10:09:44 2017 +0000
@@ -109,7 +109,11 @@
         }
     }
 }
-void STATE_FEEDBACK::fullStateFeedBack_calc(){
+void STATE_FEEDBACK::fullStateFeedBack_calc(bool enable){
+    if (!enable){
+        sys_inputs = zeros_p;
+        return;
+    }
     // sys_inputs = Get_VectorScalarMultiply(Mat_multiply_Vec(K_full, states),-1.0);
     //
     // With command input
--- a/STATE_FEEDBACK.h	Tue Jan 03 15:00:01 2017 +0000
+++ b/STATE_FEEDBACK.h	Wed Jan 04 10:09:44 2017 +0000
@@ -36,7 +36,7 @@
     // void assign_N_ud(float* N_ud_in, size_t p_in, size_t q_in);
     void assign_N_total(float* N_ud_in, size_t p_in, size_t q_in);
     //
-    void fullStateFeedBack_calc(void);
+    void fullStateFeedBack_calc(bool enable);
 
 private: