fix example issues

This commit is contained in:
Erwin Coumans
2015-11-24 11:34:17 -08:00
parent 03cc4f0554
commit 460998c472

View File

@@ -37,7 +37,6 @@ subject to the following restrictions:
#include "../RenderingExamples/TimeSeriesCanvas.h"
#include <unistd.h>
#include <vector>
// the UI interface makes it easier to use static variables & free functions
@@ -195,12 +194,12 @@ void InverseDynamicsExample::initPhysics()
for(std::size_t dof=0;dof<qd.size();dof++) {
qd[dof] = 0;
char tmp[25];
snprintf(tmp,25,"q_desired[%zu]",dof);
sprintf(tmp,"q_desired[%zu]",dof);
qd_name[dof] = tmp;
SliderParams slider(qd_name[dof].c_str(),&qd[dof]);
slider.m_minVal=-3.14;
slider.m_maxVal=3.14;
snprintf(tmp,25,"q[%zu]",dof);
sprintf(tmp,"q[%zu]",dof);
q_name[dof] = tmp;
m_guiHelper->getParameterInterface()->registerSliderFloatParameter(slider);
m_timeSeriesCanvas->addDataSource(q_name[dof].c_str(), 255,0,0);