Use the new gcode_position class in the T5UID1 configurations

This commit is contained in:
Desuuuu 2020-08-25 22:43:05 +02:00
parent cfb51d72a3
commit 77caf75b06
No known key found for this signature in database
GPG Key ID: 85943F4B2C2CE0DC
4 changed files with 17 additions and 17 deletions

View File

@ -111,7 +111,7 @@ script:
{% set t5uid1 = printer.t5uid1 %} {% set t5uid1 = printer.t5uid1 %}
{% set x = (t5uid1.limits.x_min + t5uid1.limits.x_max) / 2 %} {% set x = (t5uid1.limits.x_min + t5uid1.limits.x_max) / 2 %}
{% set y = (t5uid1.limits.y_min + t5uid1.limits.y_max) / 2 %} {% set y = (t5uid1.limits.y_min + t5uid1.limits.y_max) / 2 %}
{% if printer.gcode.move_zpos < 10 %} {% if printer.gcode_move.gcode_position.z < 10 %}
G1 Z10 F600 G1 Z10 F600
{% endif %} {% endif %}
G1 X{x} Y{y} F4800 G1 X{x} Y{y} F4800
@ -138,7 +138,7 @@ script:
{% set t5uid1 = printer.t5uid1 %} {% set t5uid1 = printer.t5uid1 %}
{% set x = (t5uid1.limits.x_min + t5uid1.limits.x_max) / 2 %} {% set x = (t5uid1.limits.x_min + t5uid1.limits.x_max) / 2 %}
{% set y = (t5uid1.limits.y_min + t5uid1.limits.y_max) / 2 %} {% set y = (t5uid1.limits.y_min + t5uid1.limits.y_max) / 2 %}
{% if printer.gcode.move_zpos < 5 %} {% if printer.gcode_move.gcode_position.z < 5 %}
G1 Z5 F600 G1 Z5 F600
{% endif %} {% endif %}
G1 X{x} Y{y} F4800 G1 X{x} Y{y} F4800

View File

@ -295,7 +295,7 @@ script:
{% endif %} {% endif %}
SAVE_GCODE_STATE NAME=state_level_manual_point SAVE_GCODE_STATE NAME=state_level_manual_point
G90 G90
{% if printer.gcode.move_zpos < hop %} {% if printer.gcode_move.gcode_position.z < hop %}
G1 Z{hop} F600 G1 Z{hop} F600
{% endif %} {% endif %}
G1 X{x} Y{y} F4800 G1 X{x} Y{y} F4800
@ -508,27 +508,27 @@ script:
{% endif %} {% endif %}
{% if data == t5uid1.constants['move_x+'] %} {% if data == t5uid1.constants['move_x+'] %}
{% set axis = "x" %} {% set axis = "x" %}
{% set pos = printer.gcode.move_xpos + step %} {% set pos = printer.gcode_move.gcode_position.x + step %}
{% set speed = 4800 %} {% set speed = 4800 %}
{% elif data == t5uid1.constants['move_x-'] %} {% elif data == t5uid1.constants['move_x-'] %}
{% set axis = "x" %} {% set axis = "x" %}
{% set pos = printer.gcode.move_xpos - step %} {% set pos = printer.gcode_move.gcode_position.x - step %}
{% set speed = 4800 %} {% set speed = 4800 %}
{% elif data == t5uid1.constants['move_y+'] %} {% elif data == t5uid1.constants['move_y+'] %}
{% set axis = "y" %} {% set axis = "y" %}
{% set pos = printer.gcode.move_ypos + step %} {% set pos = printer.gcode_move.gcode_position.y + step %}
{% set speed = 4800 %} {% set speed = 4800 %}
{% elif data == t5uid1.constants['move_y-'] %} {% elif data == t5uid1.constants['move_y-'] %}
{% set axis = "y" %} {% set axis = "y" %}
{% set pos = printer.gcode.move_ypos - step %} {% set pos = printer.gcode_move.gcode_position.y - step %}
{% set speed = 4800 %} {% set speed = 4800 %}
{% elif data == t5uid1.constants['move_z+'] %} {% elif data == t5uid1.constants['move_z+'] %}
{% set axis = "z" %} {% set axis = "z" %}
{% set pos = printer.gcode.move_zpos + step %} {% set pos = printer.gcode_move.gcode_position.z + step %}
{% set speed = 900 %} {% set speed = 900 %}
{% elif data == t5uid1.constants['move_z-'] %} {% elif data == t5uid1.constants['move_z-'] %}
{% set axis = "z" %} {% set axis = "z" %}
{% set pos = printer.gcode.move_zpos - step %} {% set pos = printer.gcode_move.gcode_position.z - step %}
{% set speed = 900 %} {% set speed = 900 %}
{% endif %} {% endif %}
{% if axis not in printer.toolhead.homed_axes %} {% if axis not in printer.toolhead.homed_axes %}

View File

@ -37,7 +37,7 @@ script: { "{:>32s}".format(get_variable("message", "")|trim) }
type: output type: output
address: 0x30e6 address: 0x30e6
data_type: int16 data_type: int16
script: { (printer.gcode.move_zpos * 10 ** 1)|round|int } script: { (printer.gcode_move.gcode_position.z * 10 ** 1)|round|int }
[t5uid1_var status_ellapsed] [t5uid1_var status_ellapsed]
type: output type: output
@ -88,13 +88,13 @@ script:
type: output type: output
address: 0x30f8 address: 0x30f8
data_type: int16 data_type: int16
script: { (printer.gcode.speed_factor * 100)|round|int } script: { (printer.gcode_move.speed_factor * 100)|round|int }
[t5uid1_var adjust_flowrate] [t5uid1_var adjust_flowrate]
type: output type: output
address: 0x30f9 address: 0x30f9
data_type: int16 data_type: int16
script: { (printer.gcode.extrude_factor * 100)|round|int } script: { (printer.gcode_move.extrude_factor * 100)|round|int }
[t5uid1_var temp_bed_current] [t5uid1_var temp_bed_current]
type: output type: output
@ -180,7 +180,7 @@ script:
type: output type: output
address: 0x3106 address: 0x3106
data_type: int16 data_type: int16
script: { (printer.gcode.base_zpos * 10 ** 1)|round|int } script: { (printer.gcode_move.homing_origin.z * 10 ** 1)|round|int }
[t5uid1_var level_offset_step_icons] [t5uid1_var level_offset_step_icons]
type: output type: output
@ -275,19 +275,19 @@ script: { get_variable("filament_length", 10) }
type: output type: output
address: 0x3126 address: 0x3126
data_type: int16 data_type: int16
script: { (printer.gcode.move_xpos * 10 ** 1)|round|int } script: { (printer.gcode_move.gcode_position.x * 10 ** 1)|round|int }
[t5uid1_var move_current_y] [t5uid1_var move_current_y]
type: output type: output
address: 0x3127 address: 0x3127
data_type: int16 data_type: int16
script: { (printer.gcode.move_ypos * 10 ** 1)|round|int } script: { (printer.gcode_move.gcode_position.y * 10 ** 1)|round|int }
[t5uid1_var move_current_z] [t5uid1_var move_current_z]
type: output type: output
address: 0x3128 address: 0x3128
data_type: int16 data_type: int16
script: { (printer.gcode.move_zpos * 10 ** 1)|round|int } script: { (printer.gcode_move.gcode_position.z * 10 ** 1)|round|int }
[t5uid1_var move_step_icons] [t5uid1_var move_step_icons]
type: output type: output

View File

@ -810,7 +810,7 @@ class T5UID1:
eventtime) eventtime)
idle_time = est_print_time - print_time idle_time = est_print_time - print_time
return (not lookahead_empty return (not lookahead_empty
or idle_time < 1.0 or idle_time < 0.2
or self.gcode.get_mutex().test() or self.gcode.get_mutex().test()
or self.probe.multi_probe_pending) or self.probe.multi_probe_pending)