From e953e9ac75341b928ae89861ce38f7bba0d8b911 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 29 Jan 2013 14:52:31 +0100 Subject: LocomotorPrimitives: Implement signal handling This way we can still write result files if the simulation is interrupted. --- LocomotorPrimitivesManager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'LocomotorPrimitivesManager.cpp') 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); +} -- cgit v1.2.3-54-g00ecf