diff --git a/.github/workflows/nightly_merge.yml b/.github/workflows/nightly_merge.yml index fc74e5415..089f44c8c 100644 --- a/.github/workflows/nightly_merge.yml +++ b/.github/workflows/nightly_merge.yml @@ -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" diff --git a/AUTHORS.md b/AUTHORS.md index b33aad895..6542ddb5b 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -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 diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst index 24a10f904..595c91d0d 100644 --- a/docs/api/datamodel.rst +++ b/docs/api/datamodel.rst @@ -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 diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index 1a87e4157..e1c126dcb 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -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 diff --git a/docs/development/virtual_printer.rst b/docs/development/virtual_printer.rst index 5e7a31e4d..f0d96138f 100644 --- a/docs/development/virtual_printer.rst +++ b/docs/development/virtual_printer.rst @@ -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 diff --git a/docs/features/accesscontrol.rst b/docs/features/accesscontrol.rst index 1c3ee2583..218e3bb9c 100644 --- a/docs/features/accesscontrol.rst +++ b/docs/features/accesscontrol.rst @@ -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 `_ via the plugin manager. diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 815482ac3..6d1b32709 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -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. diff --git a/docs/plugins/python3_migration.rst b/docs/plugins/python3_migration.rst index 170e039e7..cbf9ccaf4 100644 --- a/docs/plugins/python3_migration.rst +++ b/docs/plugins/python3_migration.rst @@ -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 diff --git a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 index b8d8df41e..960bf2604 100644 --- a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 +++ b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 @@ -37,7 +37,7 @@ There is not enough free disk space available to run an update.

- 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:

{% endtrans %} diff --git a/src/octoprint/static/js/app/helpers.js b/src/octoprint/static/js/app/helpers.js index fcea464ef..fd0faecba 100644 --- a/src/octoprint/static/js/app/helpers.js +++ b/src/octoprint/static/js/app/helpers.js @@ -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); } } diff --git a/src/octoprint/static/js/app/viewmodels/control.js b/src/octoprint/static/js/app/viewmodels/control.js index 38431100e..e7a590cb8 100644 --- a/src/octoprint/static/js/app/viewmodels/control.js +++ b/src/octoprint/static/js/app/viewmodels/control.js @@ -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) { diff --git a/src/octoprint/templates/tabs/temperature.jinja2 b/src/octoprint/templates/tabs/temperature.jinja2 index 57c21fb87..438ae097a 100644 --- a/src/octoprint/templates/tabs/temperature.jinja2 +++ b/src/octoprint/templates/tabs/temperature.jinja2 @@ -49,7 +49,7 @@ + + + + diff --git a/tests/static/js/test-helpers.js b/tests/static/js/test-helpers.js index f2cdc9ac9..89b947a06 100644 --- a/tests/static/js/test-helpers.js +++ b/tests/static/js/test-helpers.js @@ -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) + ); +});