Commit 053f2f13 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

scope: fix online start attempt with minute trend scale initial window

Don't attempt to start online.
parent 556b3ea8
......@@ -566,7 +566,7 @@ class NDScope(QMainWindow, Ui_MainWindow):
start, end = self.get_range()
return abs(end - start)
def preferred_trend(self, online=False):
def preferred_trend(self):
"""preferred trend for the current time span"""
trend = TREND_OPTIONS[self.trendSelectGroup.checkedId()]
if trend == 'auto':
......@@ -587,17 +587,17 @@ class NDScope(QMainWindow, Ui_MainWindow):
"""Start online mode
"""
trend = self.preferred_trend(online=True)
if trend == 'min':
self.status_error("Online minute trends not supported. Try a smaller window.")
return
logger.info('START')
if window:
span = abs(min(window))
else:
span = self.get_span()
window = (-span, 0)
self.set_window(*window)
trend = self.preferred_trend()
if trend == 'min':
self.status_error("Online minute trends not supported. Try a smaller window.")
return
logger.info('START')
self.data.online_start(trend, span)
def stop(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment