diff options
author | Tobias Klauser <tobias.klauser@uzh.ch> | 2013-01-29 14:52:31 +0100 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@uzh.ch> | 2013-01-29 14:52:31 +0100 |
commit | e953e9ac75341b928ae89861ce38f7bba0d8b911 (patch) | |
tree | bab110f1efe97a94ff8a0f84af4c2bac004273b5 /LocomotorPrimitivesManager.cpp | |
parent | dc42304b0778a10b9639253523b82f615a358dfa (diff) |
LocomotorPrimitives: Implement signal handling
This way we can still write result files if the simulation is
interrupted.
Diffstat (limited to 'LocomotorPrimitivesManager.cpp')
-rw-r--r-- | LocomotorPrimitivesManager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/LocomotorPrimitivesManager.cpp b/LocomotorPrimitivesManager.cpp index d1925db..eb267e2 100644 --- a/LocomotorPrimitivesManager.cpp +++ b/LocomotorPrimitivesManager.cpp @@ -5,5 +5,17 @@ bool LocomotorPrimitivesManager::doIntegration(SimTK::State &s, int step, double dtFirst) { // TODO possibly additional calculations + std::cout << "==> doIntegration" << std::endl; return OpenSim::Manager::doIntegration(s, step, dtFirst); } + +bool LocomotorPrimitivesManager::integrate(SimTK::State &s, double dtFirst) +{ + int step = 0; + + std::cout << "==> integrate" << std::endl; + + s.setTime(getInitialTime()); + + return doIntegration(s, step, dtFirst); +} |