fix end of csv
This commit is contained in:
parent
c6b8ad6648
commit
115ae21ee5
|
@ -78,8 +78,8 @@ int brake;
|
||||||
color bg=color(0);
|
color bg=color(0);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
//size(1920, 1080);
|
size(1920, 1080);
|
||||||
size(1000, 800);
|
//size(1000, 800);
|
||||||
frameRate(100);
|
frameRate(100);
|
||||||
|
|
||||||
if (useSerial) {
|
if (useSerial) {
|
||||||
|
@ -179,7 +179,7 @@ void setup() {
|
||||||
//Current
|
//Current
|
||||||
color c_currentall=color(240,255,50);
|
color c_currentall=color(240,255,50);
|
||||||
vis_currentAll = new Tacho(width/2+150,height-150,100,-1,10);
|
vis_currentAll = new Tacho(width/2+150,height-150,100,-1,10);
|
||||||
vis_currentAll.setTitle("minCurrent");
|
vis_currentAll.setTitle("currentAll");
|
||||||
vis_currentAll.setValueUnit("A");
|
vis_currentAll.setValueUnit("A");
|
||||||
vis_currentAll.setcmain(c_currentall); //currentAll color
|
vis_currentAll.setcmain(c_currentall); //currentAll color
|
||||||
vis_currentAll.setShowMinMax(true);
|
vis_currentAll.setShowMinMax(true);
|
||||||
|
@ -215,7 +215,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw() {
|
void draw() {
|
||||||
long loopmillis=millis()+25000;
|
long loopmillis=millis();
|
||||||
|
|
||||||
if (useSerial) {
|
if (useSerial) {
|
||||||
if (serial.available() > 0) {
|
if (serial.available() > 0) {
|
||||||
|
@ -257,10 +257,10 @@ void draw() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if (loopmillis>=nextTimeData){ //New Data
|
if (loopmillis>=nextTimeData && nextID+1<logdata.getRowCount()){ //New Data
|
||||||
TableRow row = logdata.getRow(nextID);
|
TableRow row = logdata.getRow(nextID);
|
||||||
lastTimeData=nextTimeData;
|
lastTimeData=nextTimeData;
|
||||||
nextTimeData=(long)(row.getFloat("time")*1000); //get time and convert from seconds to ms
|
nextTimeData=(long)(logdata.getRow(nextID+1).getFloat("time")*1000); //get time and convert from seconds to ms
|
||||||
|
|
||||||
lastTimeMillis=nextTimeMillis;
|
lastTimeMillis=nextTimeMillis;
|
||||||
nextTimeMillis=loopmillis;
|
nextTimeMillis=loopmillis;
|
||||||
|
|
Loading…
Reference in New Issue