[no commit message]

This commit is contained in:
darksnake 2015-12-24 12:20:42 +03:00
parent 829d48b625
commit c8ad2a51bc
3 changed files with 20 additions and 8 deletions

View File

@ -37,6 +37,7 @@ import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -240,7 +241,7 @@ public class NumassDataLoader extends AbstractLoader implements BinaryLoader<Env
@Override
public List<NMPoint> getNMPoints() {
List<NMPoint> res = new ArrayList<>();
this.getPoints().stream().forEach((point) -> {
this.getPoints().stream().forEachOrdered((point) -> {
res.add(readPoint(point));
});
// res.sort((NMPoint o1, NMPoint o2) -> o1.getAbsouteTime().compareTo(o2.getAbsouteTime()));
@ -256,6 +257,10 @@ public class NumassDataLoader extends AbstractLoader implements BinaryLoader<Env
}
}
});
res.sort((Envelope t, Envelope t1) -> t.meta().getInt("external_meta.point_index", -1)
.compareTo(t1.meta().getInt("external_meta.point_index", -1)));
return res;
}

View File

@ -213,7 +213,7 @@ public class MspViewController implements Initializable {
p.putValue("timestamp", last.getValue("timestamp").timeValue().plusMillis(10));
for (String name : last.namesAsArray()) {
if (!name.equals("timestamp")) {
p.putValue(name, Value.getNull());
p.putValue(name, Value.NULL);
}
}
return p;

View File

@ -209,11 +209,18 @@ public class NumassLoaderViewComponent extends AnchorPane implements Initializab
private void updateSpectrumPane() {
if (spectrumPlotFrame == null) {
spectrumPlotFrame = new JFreeChartFrame("spectrum", null, spectrumPlotPane);
Meta plotMeta = new MetaBuilder("plot")
.setValue("xAxis.axisTitle", "U")
.setValue("xAxis.axisUnits", "V")
.setValue("yAxis.axisTitle", "count rate")
.setValue("yAxis.axisUnits", "Hz")
.setValue("legend.show", false);
spectrumPlotFrame = new JFreeChartFrame("spectrum", plotMeta, spectrumPlotPane);
}
if (spectrumData == null) {
spectrumData = new ChangeablePlottableData("", null);
spectrumData = new ChangeablePlottableData("spectrum", null);
spectrumPlotFrame.add(spectrumData);
}