Added post roll to timelapse
You can now define an amount of seconds that should be added to the rendered timelapse (so, since the current fps setting is 25 frames per seconds, 25 * the configured amount of post roll seconds images will need to be captured). Timed timelapses add this to the actual run time of the timelapse capturing process (so if you configure 1s post roll, a timed timelapse will run 25s longer than the print) Z-triggered timelapses just create one last capture from the webcam and use this image again and again (so 25 times for a post roll of 1s). Implements #384
This commit is contained in:
1 parent
27322a971f
commit
f580acaf70
7 files changed
+94
-17
No files matched your search
@@ -23,12 +23,13 @@ from octoprint.server.api import api
|
||||
def getTimelapseData():
|
||||
timelapse = octoprint.timelapse.current
|
||||
|
||||
type = "off"
|
||||
config = {"type": "off"}
|
||||
if timelapse is not None and isinstance(timelapse, octoprint.timelapse.ZTimelapse):
|
||||
config["type"] = "zchange"
|
||||
config["postRoll"] = timelapse.postRoll()
|
||||
elif timelapse is not None and isinstance(timelapse, octoprint.timelapse.TimedTimelapse):
|
||||
config["type"] = "timed"
|
||||
config["postRoll"] = timelapse.postRoll()
|
||||
config.update({
|
||||
"interval": timelapse.interval()
|
||||
})
|
||||
@@ -64,9 +65,17 @@ def setTimelapseConfig():
|
||||
if "type" in request.values:
|
||||
config = {
|
||||
"type": request.values["type"],
|
||||
"postRoll": 0,
|
||||
"options": {}
|
||||
}
|
||||
|
||||
|
||||
if "postRoll" in request.values:
|
||||
try:
|
||||
config["postRoll"] = int(request.values["postRoll"])
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if "interval" in request.values:
|
||||
interval = 10
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user