Skip to content

Commit

Permalink
Stupid mistake found and fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tainfante committed Jan 24, 2018
1 parent d2d1bbc commit fa6ac14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/mainwindow/Chart.java
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ public int numberOfSamples() {
public boolean update() {

if (null != series1) {
System.out.println(series1.getData().sorted().size());
return series1.getData().sorted().size() > samples;
}
else return false;
Expand Down
4 changes: 2 additions & 2 deletions src/plot/Plot.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void run() {
receivedFrame.setNumberOfChannels(receivedFrame.getChannelData().size());
if (receivedFrame.getNumberOfChannels() != numberOfChannels) {
numberOfChannels = receivedFrame.getNumberOfChannels();
for (int i = 8; i > 8 - numberOfChannels; i++) {
for (int i = 8; i > numberOfChannels; i--) {
int finalI = i;
Platform.runLater(() -> {
switch (finalI) {
Expand Down Expand Up @@ -136,7 +136,7 @@ public void run() {
break;
}
}
boolean update = Chart.getInstance().update();
final boolean update = Chart.getInstance().update();
final int samples = Chart.getInstance().numberOfSamples();
if (update) {
final int removeData=series1.getData().size()-samples;
Expand Down

0 comments on commit fa6ac14

Please sign in to comment.