Skip to content

Commit

Permalink
[Playback] Fix WriteStateCreator to pass period only if it has a valu…
Browse files Browse the repository at this point in the history
…e. Because WriteState use isSet value...
  • Loading branch information
epernod committed Aug 13, 2024
1 parent 4aa12ba commit 83f7358
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ void WriteStateCreator::addWriteState(sofa::core::behavior::BaseMechanicalState
if (!m_times.empty())
ws->d_time.setValue(m_times);

ws->d_period.setValue(m_period);
if (m_period > 0.0) {
ws->d_period.setValue(m_period);
}

ws->init();
ws->f_listening.setValue(true); //Activated at init
Expand Down

0 comments on commit 83f7358

Please sign in to comment.