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()
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()
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():
except:
pass
- self._doTimelaps = False
+ self._doTimelapse = False
self._bitmap = None
def hasCamera(self):
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
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"))