]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: fix HISTORY for disconnecting PVs
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Tue, 12 Sep 2017 09:44:08 +0000 (11:44 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Tue, 12 Sep 2017 09:44:08 +0000 (11:44 +0200)
python_suite/dashboard/dashboard.py

index fa2788dc541df0ee2865fd61864720ff6bd3df78..ff8d700ed7130f4d87e74453ff973487fc7a3711 100755 (executable)
@@ -32,7 +32,7 @@ def register_pv_value_in_history(pv_name, ts, value):
     # If we are asked to put a float:NaN value into the history,
     # repeat the previous value just before our new NaN value
     # This is important to extend plot lines until the value gets invalid.
-    if len(HISTORY[pv_name]) > 0 and value is None:
+    if len(HISTORY[pv_name]) > 0 and math.isnan(value):
         HISTORY[pv_name].append( [ts-0.1, HISTORY[pv_name][-1][1]] )
     HISTORY[pv_name].append( [ts, value] )