Merge branch 'devel' into dev/pluginLifecycleMgmt
This commit is contained in:
commit
c7146cf432
7 changed files with 154 additions and 134 deletions
|
|
@ -115,6 +115,9 @@
|
|||
for those people who do indeed have their printer connected to ``/dev/ttyAMA0``.
|
||||
* Better behaviour of the settings dialog on low-width devices, navigation and content also now scroll independently
|
||||
from each other (see also [#823](https://github.com/foosel/OctoPrint/pull/823))
|
||||
* Renamed "Temperature Timeout" and "SD Status Timeout" in Settings to "Temperature Interval" and "SD Status Interval"
|
||||
to better reflect what those values are actually used for.
|
||||
* Better behaviour of the settings dialog on mobile devices.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
@ -175,6 +178,9 @@
|
|||
* Fixed handling of SD card files in folders
|
||||
* Fixed refreshing of timelapse file list upon finished rendering of a new one
|
||||
* Fixed ``/api/printer`` which wasn't adapter yet to new internal offset data model
|
||||
* Made initial connection to printer a bit more responsive: Having to wait for the first serial timeout before sending
|
||||
the first ``M105`` even when not waiting for seeing a "start" caused unnecessary wait times for reaching the
|
||||
"Operational" state.
|
||||
|
||||
([Commits](https://github.com/foosel/OctoPrint/compare/master...devel))
|
||||
|
||||
|
|
|
|||
1
src/octoprint/static/css/bootstrap-modal.css
vendored
1
src/octoprint/static/css/bootstrap-modal.css
vendored
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
.modal-open {
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -936,6 +936,6 @@ textarea.block {
|
|||
|
||||
.scrollable {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
|
@ -18,17 +18,8 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Time after which the communication with your printer will be considered timed out if nothing was sent by your printer (and an attempt to get it talking again will be done). Increase this if your printer takes longer than this for some moves. This is also the interval in which the temperature will be polled from the printer while not printing.') }}">
|
||||
<label class="control-label" for="settings-serialTimeoutCommunication">{{ _('Communication timeout') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutCommunication" id="settings-serialTimeoutCommunication">
|
||||
<span class="add-on">s</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Interval in which to poll for the temperature information from the printer while printing') }}">
|
||||
<label class="control-label" for="settings-serialTimeoutTemperature">{{ _('Temperature timeout') }}</label>
|
||||
<label class="control-label" for="settings-serialTimeoutTemperature">{{ _('Temperature interval') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutTemperature" id="settings-serialTimeoutTemperature">
|
||||
|
|
@ -37,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Interval in which to poll for the SD printing status information from the printer while printing') }}">
|
||||
<label class="control-label" for="settings-serialTimeoutSdStatus">{{ _('SD status timeout') }}</label>
|
||||
<label class="control-label" for="settings-serialTimeoutSdStatus">{{ _('SD status interval') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutSdStatus" id="settings-serialTimeoutSdStatus">
|
||||
|
|
@ -45,6 +36,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Time after which the communication with your printer will be considered timed out if nothing was sent by your printer (and an attempt to get it talking again will be done). Increase this if your printer takes longer than this for some moves. This is also the interval in which the temperature will be polled from the printer while not printing.') }}">
|
||||
<label class="control-label" for="settings-serialTimeoutCommunication">{{ _('Communication timeout') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutCommunication" id="settings-serialTimeoutCommunication">
|
||||
<span class="add-on">s</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Time after which a connection attempt to the printer will be considered as having failed') }}">
|
||||
<label class="control-label" for="settings-serialTimeoutConnection">{{ _('Connection timeout') }}</label>
|
||||
<div class="controls">
|
||||
|
|
|
|||
|
|
@ -7,137 +7,143 @@
|
|||
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='img/apple-touch-icon-114x114.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='img/apple-touch-icon-144x144.png') }}">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
{% include 'stylesheets.jinja2' %}
|
||||
{% include 'initscript.jinja2' %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar" class="navbar navbar-static-top">
|
||||
<div class="navbar-inner" data-bind="css: appearanceClasses">
|
||||
<div class="container">
|
||||
<a class="brand" href="#"> <span data-bind="text: appearance.brand">OctoPrint</span></a>
|
||||
<div class="nav-collapse">
|
||||
<!-- Navbar -->
|
||||
<ul class="nav pull-right">
|
||||
{% for key in templates.navbar.order %}
|
||||
{% set data = templates.navbar.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<li id="{{ data._div }}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "classes" in data %}class="{{ data.classes|join(' ') }}"{% endif %}
|
||||
{% if "styles" in data %}style="{{ data.styles|join(', ') }}"{% endif %}
|
||||
<div class="page-container">
|
||||
<div id="navbar" class="navbar navbar-static-top">
|
||||
<div class="navbar-inner" data-bind="css: appearanceClasses">
|
||||
<div class="container">
|
||||
<a class="brand" href="#"> <span data-bind="text: appearance.brand">OctoPrint</span></a>
|
||||
<div class="nav-collapse">
|
||||
<!-- Navbar -->
|
||||
<ul class="nav pull-right">
|
||||
{% for key in templates.navbar.order %}
|
||||
{% set data = templates.navbar.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<li id="{{ data._div }}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "classes" in data %}class="{{ data.classes|join(' ') }}"{% endif %}
|
||||
{% if "styles" in data %}style="{{ data.styles|join(', ') }}"{% endif %}
|
||||
>
|
||||
{% include data.template ignore missing %}
|
||||
</li>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container octoprint-container">
|
||||
<div class="row">
|
||||
<!-- Sidebar -->
|
||||
{% if templates.sidebar.order %}
|
||||
<div class="accordion {% if templates.tab.order %}span4{% else %}span12{% endif %}">
|
||||
{% for key in templates.sidebar.order %}
|
||||
{% set entry, data = templates.sidebar.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<div id="{{ data._div }}_wrapper"
|
||||
class="accordion-group {% if "classes_wrapper" in data %}{{ data.classes_wrapper|join(' ') }}{% elif "classes" in data %}{{ data.classes|join(' ') }}{% endif %}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "styles_wrapper" in data %} style="{{ data.styles_wrapper|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
|
||||
>
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-target="#{{ data._div }}">
|
||||
{% if "icon" in data %}<i class="icon-{{ data.icon }}"></i> {% endif %}{{ entry }}
|
||||
</a>
|
||||
{% if "template_header" in data %}
|
||||
{% include data.template_header ignore missing %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="{{ data._div }}"
|
||||
class="accordion-body collapse in {% if "classes_content" in data %}{{ data.classes_content|join(' ') }}{% elif "classes" in data %}{{ data.classes|join(' ') }}{% endif %}"
|
||||
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}"{% endif %}
|
||||
>
|
||||
{% include data.template ignore missing %}
|
||||
<div class="accordion-inner">
|
||||
{% include data.template ignore missing %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Tabs -->
|
||||
{% if templates.tab.order %}
|
||||
<div class="tabbable {% if templates.sidebar.order %}span8{% else %}span12{% endif %}">
|
||||
<ul class="nav nav-tabs" id="tabs">
|
||||
{% for key in templates.tab.order %}
|
||||
{% set entry, data = templates.tab.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<li id="{{ data._div }}_link"
|
||||
class="{% if loop.first %}active{% endif %} {% if "classes_link" in data %}{{ data.classes_link|join(' ') }}{% elif "classes" in data %}{{ data.classes|join(' ') }}{% endif %}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "styles_link" in data %} style="{{ data.styles_link|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
|
||||
>
|
||||
<a href="#{{ data._div }}" data-toggle="tab">{{ entry }}</a>
|
||||
</li>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container octoprint-container">
|
||||
<div class="row">
|
||||
<!-- Sidebar -->
|
||||
{% if templates.sidebar.order %}
|
||||
<div class="accordion {% if templates.tab.order %}span4{% else %}span12{% endif %}">
|
||||
{% for key in templates.sidebar.order %}
|
||||
{% set entry, data = templates.sidebar.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<div id="{{ data._div }}_wrapper"
|
||||
class="accordion-group {% if "classes_wrapper" in data %}{{ data.classes_wrapper|join(' ') }}{% elif "classes" in data %}{{ data.classes|join(' ') }}{% endif %}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "styles_wrapper" in data %} style="{{ data.styles_wrapper|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
|
||||
>
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-target="#{{ data._div }}">
|
||||
{% if "icon" in data %}<i class="icon-{{ data.icon }}"></i> {% endif %}{{ entry }}
|
||||
</a>
|
||||
{% if "template_header" in data %}
|
||||
{% include data.template_header ignore missing %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="{{ data._div }}"
|
||||
class="accordion-body collapse in {% if "classes_content" in data %}{{ data.classes_content|join(' ') }}{% elif "classes" in data %}{{ data.classes|join(' ') }}{% endif %}"
|
||||
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}"{% endif %}
|
||||
>
|
||||
<div class="accordion-inner">
|
||||
{% include data.template ignore missing %}
|
||||
|
||||
<div class="tab-content">
|
||||
{% for key in templates.tab.order %}
|
||||
{% set entry, data = templates.tab.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<div id="{{ data._div }}"
|
||||
class="tab-pane{% if loop.first %} active{% endif %}{% if "additional_classes" in data %} {{ data.additional_classes|join(' ') }}{% endif %}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
|
||||
>
|
||||
{% include data.template ignore missing %}
|
||||
</div>
|
||||
</div>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Tabs -->
|
||||
{% if templates.tab.order %}
|
||||
<div class="tabbable {% if templates.sidebar.order %}span8{% else %}span12{% endif %}">
|
||||
<ul class="nav nav-tabs" id="tabs">
|
||||
{% for key in templates.tab.order %}
|
||||
{% set entry, data = templates.tab.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<li id="{{ data._div }}_link"
|
||||
class="{% if loop.first %}active{% endif %} {% if "classes_link" in data %}{{ data.classes_link|join(' ') }}{% elif "classes" in data %}{{ data.classes|join(' ') }}{% endif %}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "styles_link" in data %} style="{{ data.styles_link|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
|
||||
>
|
||||
<a href="#{{ data._div }}" data-toggle="tab">{{ entry }}</a>
|
||||
</li>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
{% for key in templates.tab.order %}
|
||||
{% set entry, data = templates.tab.entries[key] %}
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- ko allowBindings: false -->{% endif %}
|
||||
<div id="{{ data._div }}"
|
||||
class="tab-pane{% if loop.first %} active{% endif %}{% if "additional_classes" in data %} {{ data.additional_classes|join(' ') }}{% endif %}"
|
||||
{% if "data_bind" in data %}data-bind="{{ data.data_bind }}"{% endif %}
|
||||
{% if "styles_content" in data %} style="{{ data.styles_content|join(', ') }}" {% elif "styles" in data %} style="{{ data.styles|join(', ') }}" {% endif %}
|
||||
>
|
||||
{% include data.template ignore missing %}
|
||||
</div>
|
||||
{% if "custom_bindings" not in data or data["custom_bindings"] %}<!-- /ko -->{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<ul class="pull-left muted">
|
||||
<li><small>{{ _('Version') }}: <span class="version">{{ display_version }}</span></small></li>
|
||||
</ul>
|
||||
<ul class="pull-right">
|
||||
<li><a href="http://octoprint.org"><i class="icon-home"></i> {{ _('Homepage') }}</a></li>
|
||||
<li><a href="https://github.com/foosel/OctoPrint/"><i class="icon-download"></i> {{ _('Sourcecode') }}</a></li>
|
||||
<li><a href="https://github.com/foosel/OctoPrint/wiki"><i class="icon-book"></i> {{ _('Documentation') }}</a></li>
|
||||
<li><a href="https://github.com/foosel/OctoPrint/issues"><i class="icon-flag"></i> {{ _('Bugs and Requests') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<ul class="pull-left muted">
|
||||
<li><small>{{ _('Version') }}: <span class="version">{{ display_version }}</span></small></li>
|
||||
</ul>
|
||||
<ul class="pull-right">
|
||||
<li><a href="http://octoprint.org"><i class="icon-home"></i> {{ _('Homepage') }}</a></li>
|
||||
<li><a href="https://github.com/foosel/OctoPrint/"><i class="icon-download"></i> {{ _('Sourcecode') }}</a></li>
|
||||
<li><a href="https://github.com/foosel/OctoPrint/wiki"><i class="icon-book"></i> {{ _('Documentation') }}</a></li>
|
||||
<li><a href="https://github.com/foosel/OctoPrint/issues"><i class="icon-flag"></i> {{ _('Bugs and Requests') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Dialogs -->
|
||||
{% include 'dialogs/confirmation.jinja2' %}
|
||||
{% include 'dialogs/firstrun.jinja2' %}
|
||||
{% include 'dialogs/settings.jinja2' %}
|
||||
{% include 'dialogs/slicing.jinja2' %}
|
||||
{% include 'dialogs/usersettings.jinja2' %}
|
||||
<!-- End of dialogs -->
|
||||
|
||||
<!-- Overlays -->
|
||||
{% include 'overlays/dragndrop.jinja2' %}
|
||||
{% include 'overlays/offline.jinja2' %}
|
||||
<!-- End of overlays -->
|
||||
|
||||
<!-- Generic plugin template files -->
|
||||
{% for key in templates.generic.order %}
|
||||
{% set data = templates.generic.entries[key] %}
|
||||
{% include data.template ignore missing %}
|
||||
{% endfor %}
|
||||
<!-- End of generic plugin template files -->
|
||||
|
||||
{% include 'javascripts.jinja2' %}
|
||||
</div>
|
||||
|
||||
<!-- Dialogs -->
|
||||
{% include 'dialogs/confirmation.jinja2' %}
|
||||
{% include 'dialogs/firstrun.jinja2' %}
|
||||
{% include 'dialogs/settings.jinja2' %}
|
||||
{% include 'dialogs/slicing.jinja2' %}
|
||||
{% include 'dialogs/usersettings.jinja2' %}
|
||||
<!-- End of dialogs -->
|
||||
|
||||
<!-- Overlays -->
|
||||
{% include 'overlays/dragndrop.jinja2' %}
|
||||
{% include 'overlays/offline.jinja2' %}
|
||||
<!-- End of overlays -->
|
||||
|
||||
<!-- Generic plugin template files -->
|
||||
{% for key in templates.generic.order %}
|
||||
{% set data = templates.generic.entries[key] %}
|
||||
{% include data.template ignore missing %}
|
||||
{% endfor %}
|
||||
<!-- End of generic plugin template files -->
|
||||
|
||||
{% include 'javascripts.jinja2' %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -787,6 +787,11 @@ class MachineCom(object):
|
|||
startSeen = not settings().getBoolean(["feature", "waitForStartOnConnect"])
|
||||
supportRepetierTargetTemp = settings().getBoolean(["feature", "repetierTargetTemp"])
|
||||
|
||||
# enqueue an M105 first thing
|
||||
self._sendCommand("M105")
|
||||
if startSeen:
|
||||
self._clear_to_send.set()
|
||||
|
||||
while self._monitoring_active:
|
||||
try:
|
||||
line = self._readline()
|
||||
|
|
@ -1007,6 +1012,7 @@ class MachineCom(object):
|
|||
self._serial.write('\n')
|
||||
self._log("Baudrate test retry: %d" % (self._baudrateDetectRetry))
|
||||
self._sendCommand("M105")
|
||||
self._clear_to_send.set()
|
||||
self._testingBaudrate = True
|
||||
else:
|
||||
baudrate = self._baudrateDetectList.pop(0)
|
||||
|
|
@ -1019,6 +1025,7 @@ class MachineCom(object):
|
|||
self._timeout = get_new_timeout("communication")
|
||||
self._serial.write('\n')
|
||||
self._sendCommand("M105")
|
||||
self._clear_to_send.set()
|
||||
self._testingBaudrate = True
|
||||
except:
|
||||
self._log("Unexpected error while setting baudrate: %d %s" % (baudrate, get_exception_string()))
|
||||
|
|
@ -1036,10 +1043,9 @@ class MachineCom(object):
|
|||
|
||||
### Connection attempt
|
||||
elif self._state == self.STATE_CONNECTING:
|
||||
if (line == "" or "wait" in line) and startSeen:
|
||||
self._sendCommand("M105")
|
||||
elif "start" in line:
|
||||
if "start" in line and not startSeen:
|
||||
startSeen = True
|
||||
self._clear_to_send.set()
|
||||
elif "ok" in line and startSeen:
|
||||
self._onConnected()
|
||||
elif time.time() > self._timeout:
|
||||
|
|
@ -1216,7 +1222,6 @@ class MachineCom(object):
|
|||
self._changeState(self.STATE_ERROR)
|
||||
eventManager().fire(Events.ERROR, {"error": self.getErrorString()})
|
||||
return False
|
||||
self._clear_to_send.set()
|
||||
return True
|
||||
|
||||
def _handleErrors(self, line):
|
||||
|
|
@ -1464,6 +1469,8 @@ class MachineCom(object):
|
|||
sending (through received ``ok`` responses from the printer's firmware.
|
||||
"""
|
||||
|
||||
self._clear_to_send.wait()
|
||||
|
||||
while self._send_queue_active:
|
||||
try:
|
||||
# wait until we have something in the queue
|
||||
|
|
|
|||
Loading…
Reference in a new issue