summaryrefslogtreecommitdiffstats
path: root/Project/Limiter.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-05-13 16:15:22 -0300
committerGitHub <noreply@github.com>2017-05-13 16:15:22 -0300
commit17d1dd82ec065eff08546ef1fd2a188ce77471b2 (patch)
tree811c788656f71692ccb0b038215dab7a87c2c0dc /Project/Limiter.cpp
parentfe4776d88169c048e06c142d81bfd42651c63d1d (diff)
parentd44c3a76943c90cfcbf336961d9ba3516a1c80dc (diff)
downloadPSP.git-17d1dd82ec065eff08546ef1fd2a188ce77471b2.tar.gz
PSP.git-17d1dd82ec065eff08546ef1fd2a188ce77471b2.tar.xz
PSP.git-17d1dd82ec065eff08546ef1fd2a188ce77471b2.zip
Merge pull request #32 from Thales1330/wip/controller-solver
Wip controller solver
Diffstat (limited to 'Project/Limiter.cpp')
-rw-r--r--Project/Limiter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Project/Limiter.cpp b/Project/Limiter.cpp
index 2a0b707..cd76fba 100644
--- a/Project/Limiter.cpp
+++ b/Project/Limiter.cpp
@@ -87,3 +87,12 @@ void Limiter::UpdatePoints()
m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
}
}
+
+bool Limiter::Solve(double input, double timeStep)
+{
+ m_output = input;
+ if(m_output > m_upLimit) m_output = m_upLimit;
+ else if(m_output < m_lowLimit) m_output = m_lowLimit;
+
+ return true;
+}