menu: Default menu should check extruders have heaters (#3969)

For the hotend targets check also available heaters.
It'll solve crash when using shared heaters.

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
Janar Sööt 2021-02-20 18:33:34 +02:00 committed by GitHub
parent 5a7fbe671e
commit 92cc286159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -471,7 +471,7 @@ name: Temperature
[menu __main __temp __hotend0_target] [menu __main __temp __hotend0_target]
type: input type: input
enable: {'extruder' in printer} enable: {('extruder' in printer) and ('extruder' in printer.heaters.available_heaters)}
name: {"Ex0:%3.0f (%4.0f)" % (menu.input, printer.extruder.temperature)} name: {"Ex0:%3.0f (%4.0f)" % (menu.input, printer.extruder.temperature)}
input: {printer.extruder.target} input: {printer.extruder.target}
input_min: 0 input_min: 0
@ -481,7 +481,7 @@ gcode: M104 T0 S{'%.0f' % menu.input}
[menu __main __temp __hotend1_target] [menu __main __temp __hotend1_target]
type: input type: input
enable: {'extruder1' in printer} enable: {('extruder1' in printer) and ('extruder1' in printer.heaters.available_heaters)}
name: {"Ex1:%3.0f (%4.0f)" % (menu.input, printer.extruder1.temperature)} name: {"Ex1:%3.0f (%4.0f)" % (menu.input, printer.extruder1.temperature)}
input: {printer.extruder1.target} input: {printer.extruder1.target}
input_min: 0 input_min: 0