From 44da3ffb57517074637ef8f12db53bca05805da9 Mon Sep 17 00:00:00 2001 From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com> Date: Tue, 10 Jan 2023 10:45:33 +0000 Subject: [PATCH] Fix alarm module so it correctly uses Data Selectors --- src/alarm/SimpleAlarmCounter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/alarm/SimpleAlarmCounter.java b/src/alarm/SimpleAlarmCounter.java index f0c7c524..f36397e2 100644 --- a/src/alarm/SimpleAlarmCounter.java +++ b/src/alarm/SimpleAlarmCounter.java @@ -27,7 +27,11 @@ public class SimpleAlarmCounter extends AlarmCounter { @Override public double getValue(int countType, PamDataUnit dataUnit) { - return 1; + if (dataSelector == null) { + return 1; + } + double val = dataSelector.scoreData(dataUnit); + return val; } @Override