From f33a58fdb8bc87c5c536704a925774cd4cf09c54 Mon Sep 17 00:00:00 2001 From: RuMolloy Date: Thu, 27 Jun 2019 17:17:42 +0200 Subject: [PATCH] Bug fix for event marker progress details for Consensys --- .../guiUtilities/plot/BasicPlotManagerPC.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ShimmerDriverPC/src/main/java/com/shimmerresearch/guiUtilities/plot/BasicPlotManagerPC.java b/ShimmerDriverPC/src/main/java/com/shimmerresearch/guiUtilities/plot/BasicPlotManagerPC.java index bba34d8fc..095abb45f 100644 --- a/ShimmerDriverPC/src/main/java/com/shimmerresearch/guiUtilities/plot/BasicPlotManagerPC.java +++ b/ShimmerDriverPC/src/main/java/com/shimmerresearch/guiUtilities/plot/BasicPlotManagerPC.java @@ -95,6 +95,7 @@ public class BasicPlotManagerPC extends AbstractPlotManager { private boolean mIsDebugMode = false; private boolean mIsTraceDataBuffered = false; protected boolean isFirstPointOnFillTrace = true; + protected boolean isSingleEventMarkerTest = true; public PlotCustomFeature pcf=null; @@ -1948,7 +1949,8 @@ public void filterDataAndPlot(ObjectCluster ojc) throws Exception { //prevent eventmarkers from plotting back in time boolean eventMarker=false; - if (props[0].equals(mEventMarkerCheck) && shimmerName.equals(props[0])){ + + if (isEventMarkerData(shimmerName, props[0])){ if (xData>mCurrentXValue){ eventMarker=true; } @@ -2062,6 +2064,21 @@ else if(isXAxisFrequency){ } } + public void setEventMarkerDataCheck(boolean isSingleEventMarkerTest) { + this.isSingleEventMarkerTest = isSingleEventMarkerTest; + } + + private boolean isEventMarkerData(String shimmerName, String signalName) { + if(isSingleEventMarkerTest) { + // used for Consensys (CON-628) + return mEventMarkerCheck.equals(signalName); + } + else { + // used for NeuroLynQ + return mEventMarkerCheck.equals(signalName) && shimmerName.equals(signalName); + } + } + /** * Method to add a dummy point as the first point in the trace if the line style is fill * so that the chart doesn't plot from (0, 0), this method is overriden in PlotManagerPC