Skip to content

Commit

Permalink
Graph in temp panel, combine preheat and temp (#393)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alfrix committed Jan 11, 2022
1 parent 58e0aa7 commit 8a8c6c0
Show file tree
Hide file tree
Showing 14 changed files with 415 additions and 282 deletions.
2 changes: 2 additions & 0 deletions docs/Configuration.md
Expand Up @@ -69,6 +69,8 @@ bed: 40
extruder: 195
# Temperature for generic heaters
heater_generic: 40
# Temperature controlled fans (temperature_fan in klipper config)
temperature_fan: 40
# optional GCode to run when the option is selected
gcode: MY_HEATSOAK_MACRO
```
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Expand Up @@ -2,6 +2,11 @@

Breaking changes will be listed here.

#### 2022 01 09
* The Preheat panel has been deprecated in favor of an all in one Temperature panel

Remove preheat panel from your Klipperscreen.conf or replace the occurrences of preheat with temperature

#### 2021 05 20
* Default configuration is not merged if a user configuration is set for a specific option

Expand Down
Binary file removed docs/img/preheat.png
Binary file not shown.
Binary file modified docs/img/temperature.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions docs/panels.md
Expand Up @@ -68,11 +68,6 @@ type: power

![Power](img/power.png)

### Preheat
type: preheat

![Preheat Panel](img/preheat.png)

### Print
type: print

Expand All @@ -89,7 +84,7 @@ type: system
![System Panel](img/system.png)

### Temperature
type: temperature theme:material-light
type: temperature theme:custom

![Temperature](img/temperature.png)

Expand Down
2 changes: 0 additions & 2 deletions ks_includes/KlippyGcodes.py
Expand Up @@ -16,10 +16,8 @@ class KlippyGcodes:
EXTRUDE_REL = "M83"

SET_EXT_TEMP = "M104"
MAX_EXT_TEMP = 450

SET_BED_TEMP = "M140"
MAX_BED_TEMP = 150

SET_EXT_FACTOR = "M221"
SET_FAN_SPEED = "M106"
Expand Down
1 change: 1 addition & 0 deletions ks_includes/config.py
Expand Up @@ -419,6 +419,7 @@ def _build_preheat_item(self, name):
"extruder": cfg.getint("extruder", 0),
"bed": cfg.getint("bed", 0),
"heater_generic": cfg.getint("heater_generic", 0),
"temperature_fan": cfg.getint("temperature_fan", 0),
"gcode": cfg.get("gcode", None)
}
return item
19 changes: 11 additions & 8 deletions ks_includes/defaults.conf
Expand Up @@ -10,17 +10,25 @@ extruder = 195
bed = 90
extruder = 220

[preheat PETG]
bed = 80
extruder = 240

[preheat FLEX]
bed = 0
extruder = 210

[menu __main]
name: {{ gettext('Main Menu') }}

[menu __main homing]
name: {{ gettext('Homing') }}
icon: home

[menu __main preheat]
name: {{ gettext('Preheat') }}
[menu __main temperature]
name: {{ gettext('Temperature') }}
icon: heat-up
panel: preheat
panel: temperature

[menu __main actions]
name: {{ gettext('Actions') }}
Expand Down Expand Up @@ -95,11 +103,6 @@ name: {{ gettext('Fan') }}
icon: fan
panel: fan

[menu __main actions temperature]
name: {{ gettext('Temperature') }}
icon: heat-up
panel: temperature

[menu __main actions macros]
name: {{ gettext('Macros') }}
icon: custom-script
Expand Down
2 changes: 1 addition & 1 deletion ks_includes/screen_panel.py
Expand Up @@ -44,7 +44,7 @@ def format_target(self, temp):
if temp <= 0:
return ""
else:
return self.format_temp(temp, 0)
return ("(%s)" % str(int(temp)))

def format_temp(self, temp, places=1):
if places == 0:
Expand Down
153 changes: 0 additions & 153 deletions panels/preheat.py

This file was deleted.

0 comments on commit 8a8c6c0

Please sign in to comment.