From 0a6074be9f72070a8c3ba8f65b61c0ba151a15cd Mon Sep 17 00:00:00 2001 From: James Walker Date: Mon, 10 Dec 2012 20:07:46 +1100 Subject: [PATCH] timelaps -> timelapse --- Cura/gui/printWindow.py | 6 +++--- Cura/gui/util/webcam.py | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index e79d5c2e..20ffebc4 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -280,7 +280,7 @@ class printWindow(wx.Frame): sizer = wx.GridBagSizer(2, 2) self.camPage.SetSizer(sizer) - self.timelapsEnable = wx.CheckBox(self.camPage, -1, 'Enable timelaps movie recording') + self.timelapsEnable = wx.CheckBox(self.camPage, -1, 'Enable timelapse movie recording') sizer.Add(self.timelapsEnable, pos=(0, 0), span=(1, 2), flag=wx.EXPAND) pages = self.cam.propertyPages() @@ -443,7 +443,7 @@ class printWindow(wx.Frame): return self.currentZ = -1 if self.cam != None and self.timelapsEnable.GetValue(): - self.cam.startTimelaps(self.filename[: self.filename.rfind('.')] + ".mpg") + self.cam.startTimelapse(self.filename[: self.filename.rfind('.')] + ".mpg") self.machineCom.printGCode(self.gcodeList) self.UpdateButtonStates() @@ -585,7 +585,7 @@ class printWindow(wx.Frame): def mcStateChange(self, state): if self.machineCom != None: if state == self.machineCom.STATE_OPERATIONAL and self.cam != None: - self.cam.endTimelaps() + self.cam.endTimelapse() if state == self.machineCom.STATE_OPERATIONAL: taskbar.setBusy(self, False) if self.machineCom.isClosedOrError(): diff --git a/Cura/gui/util/webcam.py b/Cura/gui/util/webcam.py index 59e77ff4..d90ce6d1 100644 --- a/Cura/gui/util/webcam.py +++ b/Cura/gui/util/webcam.py @@ -55,7 +55,7 @@ class webcam(object): except: pass - self._doTimelaps = False + self._doTimelapse = False self._bitmap = None def hasCamera(self): @@ -115,7 +115,7 @@ class webcam(object): self._bitmap = bitmap - if self._doTimelaps: + if self._doTimelapse: filename = os.path.normpath(os.path.join(os.path.split(__file__)[0], "../__tmp_snap", "__tmp_snap_%04d.jpg" % (self._snapshotCount))) self._snapshotCount += 1 @@ -126,24 +126,24 @@ class webcam(object): def getLastImage(self): return self._bitmap - def startTimelaps(self, filename): + def startTimelapse(self, filename): if self._cam == None: return self._cleanTempDir() - self._timelapsFilename = filename + self._timelapseFilename = filename self._snapshotCount = 0 - self._doTimelaps = True - print "startTimelaps" + self._doTimelapse = True + print "startTimelapse" - def endTimelaps(self): - if self._doTimelaps: + def endTimelapse(self): + if self._doTimelapse: ffmpeg = getFFMPEGpath() basePath = os.path.normpath( os.path.join(os.path.split(__file__)[0], "../__tmp_snap", "__tmp_snap_%04d.jpg")) subprocess.call( [ffmpeg, '-r', '12.5', '-i', basePath, '-vcodec', 'mpeg2video', '-pix_fmt', 'yuv420p', '-r', '25', '-y', - '-b:v', '1500k', '-f', 'vob', self._timelapsFilename]) - self._doTimelaps = False + '-b:v', '1500k', '-f', 'vob', self._timelapseFilename]) + self._doTimelapse = False def _cleanTempDir(self): basePath = os.path.normpath(os.path.join(os.path.split(__file__)[0], "../__tmp_snap")) -- 2.30.2