change baudrate and move text in direction vis
This commit is contained in:
parent
662ea41690
commit
68c6cf81d6
|
@ -290,13 +290,13 @@ public class Direction extends Visualization {
|
|||
|
||||
//text
|
||||
fill(super.ctext);
|
||||
text(super.getFormattedValue(super.value),super.posOrigin.x-super.getFormattedValue(super.value).length()*super.textWidthScale,super.posOrigin.y+super.textsize/2-this.size*0.3);
|
||||
text(super.getFormattedValue(super.value),super.posOrigin.x-super.getFormattedValue(super.value).length()*super.textWidthScale,super.posOrigin.y+super.textsize*1.5*1);
|
||||
if (super.value2<super.value2Max){ //display only if in use
|
||||
text("l="+super.getFormattedValue(super.value2),super.posOrigin.x-("l="+super.getFormattedValue(super.value2)).length()*super.textWidthScale,super.posOrigin.y+super.textsize/2-this.size*0.3+super.textsize);
|
||||
text("l="+super.getFormattedValue(super.value2),super.posOrigin.x-("l="+super.getFormattedValue(super.value2)).length()*super.textWidthScale,super.posOrigin.y+super.textsize*1.5*2);
|
||||
}
|
||||
|
||||
//Title
|
||||
text(super.title, super.posOrigin.x-super.title.length()*super.textWidthScale, super.posOrigin.y+super.textsize*1.5);
|
||||
text(super.title, super.posOrigin.x-super.title.length()*super.textWidthScale, super.posOrigin.y+super.textsize*1.5*3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ void setup() {
|
|||
frameRate(100);
|
||||
|
||||
printArray(Serial.list());
|
||||
serialport = new Serial(this, Serial.list()[32], 57600);
|
||||
serialport = new Serial(this, Serial.list()[32], 115200);
|
||||
|
||||
|
||||
visVoltage = new BarV(50,150,10,100,10*3.3,12*4.2);
|
||||
|
|
|
@ -290,13 +290,13 @@ public class Direction extends Visualization {
|
|||
|
||||
//text
|
||||
fill(super.ctext);
|
||||
text(super.getFormattedValue(super.value),super.posOrigin.x-super.getFormattedValue(super.value).length()*super.textWidthScale,super.posOrigin.y+super.textsize/2-this.size*0.3);
|
||||
text(super.getFormattedValue(super.value),super.posOrigin.x-super.getFormattedValue(super.value).length()*super.textWidthScale,super.posOrigin.y+super.textsize*1.5*1);
|
||||
if (super.value2<super.value2Max){ //display only if in use
|
||||
text("l="+super.getFormattedValue(super.value2),super.posOrigin.x-("l="+super.getFormattedValue(super.value2)).length()*super.textWidthScale,super.posOrigin.y+super.textsize/2-this.size*0.3+super.textsize);
|
||||
text("l="+super.getFormattedValue(super.value2),super.posOrigin.x-("l="+super.getFormattedValue(super.value2)).length()*super.textWidthScale,super.posOrigin.y+super.textsize*1.5*2);
|
||||
}
|
||||
|
||||
//Title
|
||||
text(super.title, super.posOrigin.x-super.title.length()*super.textWidthScale, super.posOrigin.y+super.textsize*1.5);
|
||||
text(super.title, super.posOrigin.x-super.title.length()*super.textWidthScale, super.posOrigin.y+super.textsize*1.5*3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue