This commit is contained in:
aster94
2019-01-31 00:48:23 +01:00
parent 5f433563bf
commit 27ee1cf451
2 changed files with 7 additions and 6 deletions

View File

@@ -4,11 +4,11 @@
//uncomment the line where your board is connected //uncomment the line where your board is connected
//String LA_port = "/dev/ttyACM0"; //linux DFU //String LA_port = "/dev/ttyACM0"; //linux DFU
//String LA_port = "/dev/ttyUSB0"; //linux Serial //String LA_port = "/dev/ttyUSB0"; //linux Serial
String LA_port = "COM3"; //windows //String LA_port = "COM11"; //windows
//Uncomment the board that you are using //Uncomment the board that you are using
//String board = "MEGA"; //String board = "MEGA";
String board = "UNO"; //String board = "UNO";
//String board = "STM32F1"; //String board = "STM32F1";
//String board = "ESP8266"; //String board = "ESP8266";
//String board = "CUSTOM" //String board = "CUSTOM"
@@ -149,7 +149,7 @@ class Box
int height; int height;
void clear() void clear()
{ {
stroke(white); // no borders stroke(white);
fill(black); fill(black);
rect(from_left, from_top, width, height); rect(from_left, from_top, width, height);
} }
@@ -171,6 +171,7 @@ class Button
String text; String text;
void draw() void draw()
{ {
stroke(white);
fill(grey); fill(grey);
rect(from_left, from_top, width, height, corners); rect(from_left, from_top, width, height, corners);
fill(white); fill(white);
@@ -247,7 +248,7 @@ void setup()
board_port.bufferUntil('\n'); board_port.bufferUntil('\n');
//todo //todo
yBottom = box_graph.from_top; yBottom = box_scroll_bar.from_top;
int button_y_position = y_screen_size - 30; int button_y_position = y_screen_size - 30;
xShift = (width - scroll_bar.width) / 2; xShift = (width - scroll_bar.width) / 2;

View File

@@ -145,6 +145,7 @@ void DrawChannelSignals()
} }
// finally we draw the lines // finally we draw the lines
stroke(green);
line(xPos[n] + xShift, yPos, xTime[i] + xShift, yPos); // straight line line(xPos[n] + xShift, yPos, xTime[i] + xShift, yPos); // straight line
line(xTime[i] + xShift, yPos, xTime[i] + xShift, yDiff); // vertical line line(xTime[i] + xShift, yPos, xTime[i] + xShift, yDiff); // vertical line
@@ -170,8 +171,7 @@ void DrawChannelSignals()
textSize(10); textSize(10);
textCovered = !textCovered; textCovered = !textCovered;
dashline(xTime[i] + xShift, firstchange, xTime[i] + xShift, yBottom, spacing); dashline(xTime[i] + xShift, firstchange, xTime[i] + xShift, yBottom, spacing);
text(round(usTime[i]), xTime[i] + xShift + 2, (textCovered == true) ? yBottom : yBottom + 10); //write on different height text(round(usTime[i]), xTime[i] + xShift + 2, (textCovered == true) ? yBottom : yBottom - 10); //write on different height
stroke(green);
} }
} }
} }