Commit 65222478 authored by James Pallister's avatar James Pallister

Small interactive graph fix

parent b0790aac
......@@ -362,10 +362,10 @@ class Graph(QMainWindow):
if first_on is None and mp != disabled_tref:
first_on = mp
if self.tref is None:
if self.tref is None or first_on is None:
self.tref = first_on
if disabled_tref is not None:
if disabled_tref is not None and first_on is not None:
self.toffset += (measurements[self.tref][4] - measurements[first_on][4]) * 2. / 168000000*2.
self.tref = first_on
......@@ -402,7 +402,7 @@ def main():
app = QApplication(sys.argv)
app.setStyle("plastique")
em = pyenergy.EnergyMonitor("EE00")
em = pyenergy.EnergyMonitor("MSP0")
em.connect()
form = Graph(em)
......
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