From 4665070601104b7e31c693f169d46fd338776b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 22 Jun 2017 12:47:55 +0200 Subject: [PATCH] last_temperatures -> last_temperature (for consistency) --- docs/features/gcode_scripts.rst | 2 +- src/octoprint/util/comm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/gcode_scripts.rst b/docs/features/gcode_scripts.rst index b2d8b87e..6b14a616 100644 --- a/docs/features/gcode_scripts.rst +++ b/docs/features/gcode_scripts.rst @@ -72,7 +72,7 @@ All GCODE scripts have access to the following template variables through the te Consists of ``x``, ``y``, ``z`` and ``e`` coordinates as received by the printer and tracked values for ``f`` and current tool ``t`` taken from commands sent through OctoPrint. All of these coordinates might be ``None`` if no position could be retrieved from the printer or the values could not be tracked (in case of ``f`` and ``t``)! - * ``last_temperatures``: Last actual and target temperature reported for all available tools and if available the + * ``last_temperature``: Last actual and target temperature reported for all available tools and if available the heated bed. This is a dictionary of key-value pairs. The keys are the indices of the available tools (``0``, ``1``, ...) and ``b`` for the heated bed. The values are a dictionary consisting of ``actual`` and ``target`` keys mapped to the corresponding temperature in degrees celsius. Note that not all tools your printer has must necessarily be diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 1882e392..1e31e5d1 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -762,7 +762,7 @@ class MachineCom(object): context.update(dict( printer_profile=self._printerProfileManager.get_current_or_default(), last_position=self.last_position, - last_temperatures=self.last_temperature.as_script_dict() + last_temperature=self.last_temperature.as_script_dict() )) if scriptName == "afterPrintPaused" or scriptName == "beforePrintResumed":