From: Philipp Klaus Date: Tue, 12 Sep 2017 09:44:08 +0000 (+0200) Subject: DASH: fix HISTORY for disconnecting PVs X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=9064af75b58d8c3efb60166bd26847ea3bc0fea4;p=mvd_epics.git DASH: fix HISTORY for disconnecting PVs --- 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] )