diff --git a/src/com/serotonin/mango/rt/dataImage/SetPointSource.java b/src/com/serotonin/mango/rt/dataImage/SetPointSource.java index bc7868a64e..0f0083a6b9 100644 --- a/src/com/serotonin/mango/rt/dataImage/SetPointSource.java +++ b/src/com/serotonin/mango/rt/dataImage/SetPointSource.java @@ -33,6 +33,7 @@ public interface Types { int EVENT_HANDLER = 2; int ANONYMOUS = 3; int POINT_LINK = 4; + int UNKNOWN = 5; } public int getSetPointSourceType(); diff --git a/src/org/scada_lts/mango/service/PointValueService.java b/src/org/scada_lts/mango/service/PointValueService.java index 66f1312fde..66dfd07d3f 100644 --- a/src/org/scada_lts/mango/service/PointValueService.java +++ b/src/org/scada_lts/mango/service/PointValueService.java @@ -273,6 +273,9 @@ private long savePointValueImpl(int pointId, int dataType, double dvalue, long t if (source != null) { sourceType = source.getSetPointSourceType(); sourceId = source.getSetPointSourceId(); + } else { + sourceType = SetPointSource.Types.UNKNOWN; + sourceId = new Integer(1); } String shortString = null; @@ -285,9 +288,8 @@ private long savePointValueImpl(int pointId, int dataType, double dvalue, long t } PointValueAdnnotation pointValueAdnnotation = new PointValueAdnnotation(id,shortString, longString, sourceType, sourceId); - PointValueAdnnotationsDAO.getInstance().create(pointValueAdnnotation); - + } return id;