Only enable timelapse feature when necessary config settings are made. Expanded on documentation.
This commit is contained in:
1 parent
ef0820a067
commit
7ffb8c3bd7
4 files changed
+32
-19
No files matched your search
@@ -12,8 +12,8 @@ import timelapse
|
||||
import os
|
||||
import fnmatch
|
||||
|
||||
BASEURL="/ajax/"
|
||||
SUCCESS={}
|
||||
BASEURL = "/ajax/"
|
||||
SUCCESS = {}
|
||||
|
||||
UPLOAD_FOLDER = settings().getBaseFolder("uploads")
|
||||
|
||||
@@ -22,7 +22,11 @@ printer = Printer()
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return render_template("index.html", webcamStream = settings().get("webcam", "stream"))
|
||||
return render_template(
|
||||
"index.html",
|
||||
webcamStream=settings().get("webcam", "stream"),
|
||||
enableTimelapse=(settings().get("webcam", "snapshot") is not None and settings().get("webcam", "ffmpeg") is not None)
|
||||
)
|
||||
|
||||
#~~ Printer state
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ table th.gcode_files_action, table td.gcode_files_action {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#temp_newTemp, #temp_newBedTemp, #speed_innerWall, #speed_outerWall, #speed_fill, #speed_support {
|
||||
#temp_newTemp, #temp_newBedTemp, #speed_innerWall, #speed_outerWall, #speed_fill, #speed_support, #webcam_timelapse_interval {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -107,12 +107,6 @@ table th.gcode_files_action, table td.gcode_files_action {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#webcam_container {
|
||||
height: 440px;
|
||||
background-color: #000000;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
table th.timelapse_files_name, table td.timelapse_files_name {
|
||||
text-overflow: ellipsis;
|
||||
text-align: left;
|
||||
|
||||
@@ -218,6 +218,7 @@
|
||||
<img id="webcam_image" src="{{ webcamStream }}">
|
||||
</div>
|
||||
|
||||
{% if enableTimelapse %}
|
||||
<h1>Timelapse Configuration</h1>
|
||||
|
||||
<label for="webcam_timelapse_mode">Timelapse Mode</label>
|
||||
@@ -229,7 +230,10 @@
|
||||
|
||||
<div id="webcam_timelapse_timedsettings" data-bind="visible: intervalInputEnabled()">
|
||||
<label for="webcam_timelapse_interval">Interval</label>
|
||||
<input type="text" id="webcam_timelapse_interval" data-bind="value: timelapseTimedInterval, enable: isOperational() && !isPrinting()">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-mini" id="webcam_timelapse_interval" data-bind="value: timelapseTimedInterval, enable: isOperational() && !isPrinting()">
|
||||
<span class="add-on">sec</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -254,6 +258,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user