From 9064af75b58d8c3efb60166bd26847ea3bc0fea4 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 12 Sep 2017 11:44:08 +0200 Subject: [PATCH] DASH: fix HISTORY for disconnecting PVs --- python_suite/dashboard/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_suite/dashboard/dashboard.py b/python_suite/dashboard/dashboard.py index fa2788d..ff8d700 100755 --- a/python_suite/dashboard/dashboard.py +++ b/python_suite/dashboard/dashboard.py @@ -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] ) -- 2.43.0