term width fix, autoconnect

This commit is contained in:
Rene Hopf
2015-11-27 01:25:46 +01:00
parent a12dbd6d07
commit 610f27dc06
3 changed files with 6 additions and 14 deletions
+3 -10
View File
@@ -55,7 +55,7 @@ void BasicDrawPane::paintEvent(wxPaintEvent & evt)
gc->SetPen(pen[i]);
x = 0;
y = h/2;
xstep = w/(data[i].size()-1);
xstep = (double)w/(double)(data[i].size()-1);
path.MoveToPoint(x, y);
for(auto point : data[i]){
y = h/2-point*h/2;
@@ -80,16 +80,9 @@ void BasicDrawPane::paintEvent(wxPaintEvent & evt)
void BasicDrawPane::plotvalue(float values[])
{
//std::cout << "data:" << value << std::endl;
//data.at(xpos) += 0.1;
for (int i = 0; i<channels; i++) {
data[i].at(xpos) = (float)values[i];
}
xpos = (xpos+1)%data[0].size();
//if(wxGetUTCTimeMillis()-time > 50){
Refresh();
// time = wxGetUTCTimeMillis();
//}
//oder
//Update();
xpos = ((int)xpos+1)%data[0].size();
Refresh();
}