Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:958c25c1b151, committed 2017-01-04
- 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: