From: Philipp Klaus Date: Fri, 25 Aug 2017 10:00:43 +0000 (+0200) Subject: DASH: bug fix for `None` values in history X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=c5b840b870e2b47519899a50ca752ba2af6665fb;p=mvd_epics.git DASH: bug fix for `None` values in history --- diff --git a/python_suite/dashboard/dashboard.py b/python_suite/dashboard/dashboard.py index 92db225..f7fa056 100755 --- a/python_suite/dashboard/dashboard.py +++ b/python_suite/dashboard/dashboard.py @@ -33,7 +33,7 @@ def register_pv_value_in_history(pv_name, ts, value): # 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: - HISTORY[pv_name].append( [ts-0.1, HISTORY[pv_name][1]] ) + HISTORY[pv_name].append( [ts-0.1, HISTORY[pv_name][-1][1]] ) HISTORY[pv_name].append( [ts, value] ) def cb_connection_change(**kwargs):