Merge pull request #284 from jcosmo/timelapse_spelling
timelaps -> timelapse
This commit is contained in:
commit
a4f4b7ae0e
2 changed files with 13 additions and 13 deletions
|
@ -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():
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue