Use f-strings
Avoid unnecessary casts to str()bool()int()
Ensure file closure
Merge nested ifs
Simplify for-assigns-appends with comprehensions and internal functions
Avoid shadowing internal function names
Initialize variables
Return value directly instead of assign then return
Make some methods static
These changes allow to define custom code to be run when using the cooldown preset.
Here an example in the configuration:
```
[preheat cooldown]
gcode: M107
```
Drawing the graph has a high load impact, reduce the interval of redraw
if the user needs instantaneous values, then the list provides it,
the graph is there to provide historical data of behaviour not instantaneous values.
-------- | Load | Note
idle | 0.3 | screensaver
menu | 0.4 | No process update
extrude | 0.6 | updates temp
graph 5s | 0.8 |
graph 1s | 1.2 |
the load is the 15 min mean after about half an hour
Tests carried out on a Pi3A
fix axis sizes for high resolutions (tie to font_size)
fix update interval sometimes being faster (fix printer timer)
fix new device added causing horizontal line (use min not max)
* Graph in temp panel, combine preheat and temp
* Fix target not working properly
* Fix initial preselect
* Add the ability to change in delta temps
* Make the label translatable
* Add Unit to the label
* Add de/select button to popover
* Warn the user if nothing was selected
* Fix templabel
* Fix to comply with pep8
* Fix colors, thanks Jordan
* Fix popover selection
* Update docs image
* Gain horizontal space
* Gain even more horizontal space (remove target)
* Fix temperature_fan
* Add icon and style to temperature_fan
* List preheat deprecation in breaking changes
* Use the printer maximum temperature
* Cleanup target and fix popover select
* Fix codestyle
* Add extra preheat presets
* Change Class name
* Update docs image
* Improve Maximum temperature handling and Temperature fans