retraction: allow higher limits fix #630
This commit is contained in:
parent
9e800dd008
commit
511f715f7e
@ -22,31 +22,38 @@ class FWRetractionPanel(ScreenPanel):
|
|||||||
|
|
||||||
conf = self._printer.get_config_section("firmware_retraction")
|
conf = self._printer.get_config_section("firmware_retraction")
|
||||||
|
|
||||||
|
retract_length = float(conf['retract_length']) if 'retract_length' in conf else 0
|
||||||
|
retract_speed = int(float((conf['retract_speed']))) if 'retract_speed' in conf else 20
|
||||||
|
unretract_extra_length = float(conf['unretract_extra_length']) if 'unretract_extra_length' in conf else 0
|
||||||
|
unretract_speed = int(float((conf['unretract_speed']))) if 'unretract_speed' in conf else 10
|
||||||
|
maxlength = retract_length * 1.2 if retract_length >= 6 else 6
|
||||||
|
maxspeed = retract_speed * 1.2 if retract_speed >= 100 else 100
|
||||||
|
|
||||||
self.options = [
|
self.options = [
|
||||||
{"name": _("Retraction Length"),
|
{"name": _("Retraction Length"),
|
||||||
"units": _("mm"),
|
"units": _("mm"),
|
||||||
"option": "retract_length",
|
"option": "retract_length",
|
||||||
"value": float(conf['retract_length']) if 'retract_length' in conf else 0,
|
"value": retract_length,
|
||||||
"digits": 2,
|
"digits": 2,
|
||||||
"maxval": 4},
|
"maxval": maxlength},
|
||||||
{"name": _("Retraction Speed"),
|
{"name": _("Retraction Speed"),
|
||||||
"units": _("mm/s"),
|
"units": _("mm/s"),
|
||||||
"option": "retract_speed",
|
"option": "retract_speed",
|
||||||
"value": int(float((conf['retract_speed']))) if 'retract_speed' in conf else 20,
|
"value": retract_speed,
|
||||||
"digits": 0,
|
"digits": 0,
|
||||||
"maxval": 100},
|
"maxval": maxspeed},
|
||||||
{"name": _("Unretract Extra Length"),
|
{"name": _("Unretract Extra Length"),
|
||||||
"units": _("mm"),
|
"units": _("mm"),
|
||||||
"option": "unretract_extra_length",
|
"option": "unretract_extra_length",
|
||||||
"value": float(conf['unretract_extra_length']) if 'unretract_extra_length' in conf else 0,
|
"value": unretract_extra_length,
|
||||||
"digits": 2,
|
"digits": 2,
|
||||||
"maxval": 15},
|
"maxval": maxlength},
|
||||||
{"name": _("Unretract Speed"),
|
{"name": _("Unretract Speed"),
|
||||||
"units": _("mm/s"),
|
"units": _("mm/s"),
|
||||||
"option": "unretract_speed",
|
"option": "unretract_speed",
|
||||||
"value": int(float((conf['unretract_speed']))) if 'unretract_speed' in conf else 10,
|
"value": unretract_speed,
|
||||||
"digits": 0,
|
"digits": 0,
|
||||||
"maxval": 60}
|
"maxval": maxspeed}
|
||||||
]
|
]
|
||||||
|
|
||||||
for opt in self.options:
|
for opt in self.options:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user