--- a/ProjectController.py Tue Feb 25 13:39:46 2014 +0100
+++ b/ProjectController.py Thu Feb 27 10:45:06 2014 +0100
@@ -166,12 +166,15 @@
self.DispatchDebugValuesTimer = None
- frame.LogViewer.SetLogSource(self._connector)
# Timer to pull PLC status
self.StatusTimer = wx.Timer(self.AppFrame, -1)
self.AppFrame.Bind(wx.EVT_TIMER,
self.PullPLCStatusProc, self.StatusTimer)
+ if self._connector is not None: + frame.LogViewer.SetLogSource(self._connector) + self.StatusTimer.Start(milliseconds=500, oneShot=False) # Timer to dispatch debug values to consumers
self.DispatchDebugValuesTimer = wx.Timer(self.AppFrame, -1)
@@ -1479,7 +1482,8 @@
self.StatusTimer.Start(milliseconds=500, oneShot=False)
- self.StatusTimer.Stop()
+ if self.StatusTimer is not None: + self.StatusTimer.Stop() wx.CallAfter(self.UpdateMethodsFromPLCStatus)