Merge branch 'maintenance' into devel
This commit is contained in:
commit
0fd1f53230
14 files changed
+147
-14
No files matched your search
@@ -15,7 +15,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🔀 Merge master into maintenance
|
||||
uses: robotology/gh-action-nightly-merge@v1.3.2
|
||||
uses: robotology/gh-action-nightly-merge@v1.3.3
|
||||
with:
|
||||
stable_branch: "master"
|
||||
development_branch: "maintenance"
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 🔀 Merge maintenance into devel
|
||||
uses: robotology/gh-action-nightly-merge@v1.3.2
|
||||
uses: robotology/gh-action-nightly-merge@v1.3.3
|
||||
with:
|
||||
stable_branch: "maintenance"
|
||||
development_branch: "devel"
|
||||
|
||||
@@ -166,6 +166,7 @@ date of first contribution):
|
||||
* [Johan Verrept](https://github.com/JoveToo)
|
||||
* [Nicu Surdu](https://github.com/surdu)
|
||||
* [Zack Lewis](https://github.com/lima3w)
|
||||
* [Billy Richardson](https://github.com/richardsondev)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
@@ -649,7 +649,7 @@ Permission record
|
||||
* - ``dangerous``
|
||||
- 1
|
||||
- boolean
|
||||
- Whether the permission should be considered dangerous due to a high reponsibility (true) or not (false).
|
||||
- Whether the permission should be considered dangerous due to a high responsibility (true) or not (false).
|
||||
* - ``default_groups``
|
||||
- 1
|
||||
- List of string
|
||||
|
||||
@@ -452,7 +452,7 @@ Use the following settings to enable or disable OctoPrint features:
|
||||
# whether G90/G91 also influence absolute/relative mode of extruders
|
||||
g90InfluencesExtruder: false
|
||||
|
||||
# Replace all special characters and spaces with text equivalent to make them univerally compatible.
|
||||
# Replace all special characters and spaces with text equivalent to make them universally compatible.
|
||||
# Most OS filesystems work fine with unicode characters, but just in case you can revert to the
|
||||
# older behaviour by setting this to true.
|
||||
enforceReallyUniversalFilenames: false
|
||||
|
||||
@@ -216,7 +216,7 @@ There many configuration options via ``config.yaml`` for the virtual printer tha
|
||||
|
||||
# Enable virtual EEPROM
|
||||
# If enabled, a file `eeprom.json` will be created in the plugin data folder
|
||||
# to enable settings persistence across connections. Enables M500/1/2/4 commmands
|
||||
# to enable settings persistence across connections. Enables M500/1/2/4 commands
|
||||
# And a selection of other settings commands. Responses modeled on Marlin 2.0
|
||||
enable_eeprom: true
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Example: Your PC has an IP address of ``192.168.23.42`` and a subnet mask of
|
||||
The easy way: Using the OctoPrint-AutoLoginConfig plugin
|
||||
........................................................
|
||||
|
||||
The easist way to configure AutoLogin is to install the
|
||||
The easiest way to configure AutoLogin is to install the
|
||||
`OctoPrint-AutoLoginConfig plugin <https://plugins.octoprint.org/plugins/autologin_config/>`_
|
||||
via the plugin manager.
|
||||
|
||||
|
||||
@@ -1911,7 +1911,7 @@ octoprint.timelapse.capture.post
|
||||
Perform specific actions after capturing a timelapse frame.
|
||||
|
||||
``filename`` will be the path of the frame that should have been saved.
|
||||
``sucesss`` indicates whether the capture was successful or not.
|
||||
``success`` indicates whether the capture was successful or not.
|
||||
|
||||
:param str filename: The path of the frame that should have been saved.
|
||||
:param boolean success: Indicates whether the capture was successful or not.
|
||||
|
||||
@@ -336,7 +336,7 @@ As a summary, follow this checklist to migrate your plugin to be compatible to b
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
* Thorougly test your plugin under Python 3. Pay special attention to any kind of string handling issues, integer
|
||||
* Thoroughly test your plugin under Python 3. Pay special attention to any kind of string handling issues, integer
|
||||
division, relative imports from your plugin package and how the results of ``map``, ``filter`` and ``zip`` are
|
||||
used in your code, as those have proven to be the biggest issues during past migrations.
|
||||
* Once everything works under both Python versions and you've prepared a new release of your plugin (don't forget to
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<strong>There is not enough free disk space available to run an update.</strong>
|
||||
</p>
|
||||
<p>
|
||||
To reduce the likelihood of running into update problems due to insuffient disk space, OctoPrint requires
|
||||
To reduce the likelihood of running into update problems due to insufficient disk space, OctoPrint requires
|
||||
a minimum of {{ min_free_storage }} free disk space in various locations:
|
||||
</p>
|
||||
{% endtrans %}
|
||||
|
||||
@@ -652,13 +652,25 @@ function cleanTemperature(temp, offThreshold) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
function formatTemperature(temp, showF, offThreshold) {
|
||||
function formatTemperature(temp, showF, offThreshold, returnUnicode) {
|
||||
if (temp === undefined || !_.isNumber(temp)) return "-";
|
||||
if (offThreshold !== undefined && temp < offThreshold) return gettext("off");
|
||||
|
||||
var degreeSymbol = "°";
|
||||
if (returnUnicode !== undefined && returnUnicode) {
|
||||
degreeSymbol = "\u00B0";
|
||||
}
|
||||
|
||||
if (showF) {
|
||||
return _.sprintf("%.1f°C (%.1f°F)", temp, (temp * 9) / 5 + 32);
|
||||
return _.sprintf(
|
||||
"%.1f%sC (%.1f%sF)",
|
||||
temp,
|
||||
degreeSymbol,
|
||||
(temp * 9) / 5 + 32,
|
||||
degreeSymbol
|
||||
);
|
||||
} else {
|
||||
return _.sprintf("%.1f°C", temp);
|
||||
return _.sprintf("%.1f%sC", temp, degreeSymbol);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -728,9 +728,12 @@ $(function () {
|
||||
// z home
|
||||
button = $("#control-zhome");
|
||||
break;
|
||||
default:
|
||||
case 9: // prevent tab key from removing focus from webcam
|
||||
event.preventDefault();
|
||||
return false;
|
||||
default:
|
||||
// don't prevent other keys
|
||||
return true;
|
||||
}
|
||||
|
||||
if (button === undefined) {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<script type="text/html" id="temprow-template">
|
||||
<th class="temperature_tool" data-bind="text: name, attr: {title: name}"></th>
|
||||
<td class="temperature_actual" data-bind="html: formatTemperature(actual()), attr: {title: formatTemperature(actual())}"></td>
|
||||
<td class="temperature_actual" data-bind="html: formatTemperature(actual()), attr: {title: formatTemperature(actual(), undefined, undefined, true)}"></td>
|
||||
<td class="temperature_target">
|
||||
<form class="form-inline" style="margin:0" data-bind="submit: function(element) { $root.setTarget($data, element) }">
|
||||
<div class="input-prepend input-append">
|
||||
|
||||
@@ -10,9 +10,22 @@
|
||||
<div id="qunit-fixture"></div>
|
||||
<script src="lib/qunit-1.18.0.js"></script>
|
||||
<script src="lib/qunit-parameterize.js"></script>
|
||||
<script src="../../../src/octoprint/static/js/lib/babel.js"></script>
|
||||
<script src="../../../src/octoprint/static/js/lib/lodash.min.js"></script>
|
||||
<script src="../../../src/octoprint/static/js/lib/sprintf.min.js"></script>
|
||||
<script src="../../../src/octoprint/static/js/app/helpers.js"></script>
|
||||
|
||||
<script>
|
||||
var catalog = {
|
||||
messages: undefined,
|
||||
plural_expr: undefined,
|
||||
locale: undefined,
|
||||
domain: undefined
|
||||
};
|
||||
|
||||
babel.Translations.load(catalog).install();
|
||||
</script>
|
||||
|
||||
<script src="test-helpers.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -85,3 +85,107 @@ QUnit.cases(
|
||||
"As expected: " + String(params.expected)
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.module("formatTemperature");
|
||||
QUnit.cases(
|
||||
(function () {
|
||||
var cases = [];
|
||||
|
||||
var params = [
|
||||
{
|
||||
input: undefined,
|
||||
showF: undefined,
|
||||
useUnicode: undefined,
|
||||
offThreshold: undefined,
|
||||
expected: "-"
|
||||
},
|
||||
{
|
||||
input: "",
|
||||
showF: undefined,
|
||||
useUnicode: undefined,
|
||||
offThreshold: undefined,
|
||||
expected: "-"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: undefined,
|
||||
useUnicode: undefined,
|
||||
offThreshold: 1.1,
|
||||
expected: "off"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: undefined,
|
||||
useUnicode: undefined,
|
||||
offThreshold: 1.0,
|
||||
expected: "1.0°C"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: undefined,
|
||||
useUnicode: undefined,
|
||||
offThreshold: undefined,
|
||||
expected: "1.0°C"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: true,
|
||||
useUnicode: undefined,
|
||||
offThreshold: undefined,
|
||||
expected: "1.0°C (33.8°F)"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: true,
|
||||
useUnicode: true,
|
||||
offThreshold: undefined,
|
||||
expected: "1.0\u00B0C (33.8\u00B0F)"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: undefined,
|
||||
useUnicode: false,
|
||||
offThreshold: undefined,
|
||||
expected: "1.0°C"
|
||||
},
|
||||
{
|
||||
input: 1.0,
|
||||
showF: undefined,
|
||||
useUnicode: true,
|
||||
offThreshold: undefined,
|
||||
expected: "1.0\u00B0C"
|
||||
},
|
||||
{
|
||||
input: 1.1,
|
||||
showF: undefined,
|
||||
useUnicode: undefined,
|
||||
offThreshold: undefined,
|
||||
expected: "1.1°C"
|
||||
}
|
||||
];
|
||||
|
||||
var param, i;
|
||||
for (i = 0; i < params.length; i++) {
|
||||
param = params[i];
|
||||
param["title"] =
|
||||
String(param.input) +
|
||||
String(param.showF) +
|
||||
String(param.offThreshold) +
|
||||
String(param.useUnicode);
|
||||
cases.push(param);
|
||||
}
|
||||
|
||||
return cases;
|
||||
})()
|
||||
).test("formatTemperature", function (params, assert) {
|
||||
assert.equal(
|
||||
params.expected,
|
||||
formatTemperature(
|
||||
params.input,
|
||||
params.showF,
|
||||
params.offThreshold,
|
||||
params.useUnicode
|
||||
),
|
||||
"As expected: " + String(params.expected)
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user