Skip to content

Commit

Permalink
Merge pull request #209 from Benoitone/develop
Browse files Browse the repository at this point in the history
Clean Spaces in files
  • Loading branch information
Frix-x authored May 22, 2023
2 parents 02a8be5 + ad44a52 commit d9479e1
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 49 deletions.
4 changes: 2 additions & 2 deletions config/hardware/axis/XY/TMC/xy_TMC2209_V0specific.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ driver_TBL: 2
driver_TOFF: 2
driver_HEND: 1
driver_HSTRT: 4
driver_PWM_LIM: 8
driver_PWM_LIM: 8
driver_PWM_GRAD: 8
driver_PWM_FREQ: 1
driver_PWM_REG: 4
Expand All @@ -23,7 +23,7 @@ driver_TBL: 2
driver_TOFF: 2
driver_HEND: 1
driver_HSTRT: 4
driver_PWM_LIM: 8
driver_PWM_LIM: 8
driver_PWM_GRAD: 8
driver_PWM_FREQ: 1
driver_PWM_REG: 4
4 changes: 2 additions & 2 deletions config/hardware/displays/BTT_mini12864.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable_status_leds_minidisplay_enabled = True
variable_status_leds_minidisplay_led_name: "btt_mini12864"
gcode:

# Also include directly the leds control macros from here
# Also include directly the leds control macros from here
[include ../../../macros/hardware_functions/status_leds.cfg]


Expand Down Expand Up @@ -35,7 +35,7 @@ initial_GREEN: 0.5
initial_BLUE: 0.0
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
Expand Down
4 changes: 2 additions & 2 deletions config/hardware/displays/BTT_mini12864_inversed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable_status_leds_minidisplay_enabled = True
variable_status_leds_minidisplay_led_name: "btt_mini12864"
gcode:

# Also include directly the leds control macros from here
# Also include directly the leds control macros from here
[include ../../../macros/hardware_functions/status_leds.cfg]


Expand Down Expand Up @@ -35,7 +35,7 @@ initial_GREEN: 0.5
initial_BLUE: 0.0
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
Expand Down
4 changes: 2 additions & 2 deletions config/hardware/displays/Fysetc_mini12864.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable_status_leds_minidisplay_enabled = True
variable_status_leds_minidisplay_led_name: "fysetc_mini12864"
gcode:

# Also include directly the leds control macros from here
# Also include directly the leds control macros from here
[include ../../../macros/hardware_functions/status_leds.cfg]


Expand Down Expand Up @@ -35,7 +35,7 @@ initial_GREEN: 0.5
initial_BLUE: 0.0
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
Expand Down
4 changes: 2 additions & 2 deletions config/hardware/displays/Fysetc_mini12864_inversed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable_status_leds_minidisplay_enabled = True
variable_status_leds_minidisplay_led_name: "fysetc_mini12864"
gcode:

# Also include directly the leds control macros from here
# Also include directly the leds control macros from here
[include ../../../macros/hardware_functions/status_leds.cfg]


Expand Down Expand Up @@ -35,7 +35,7 @@ initial_GREEN: 0.5
initial_BLUE: 0.0
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
Expand Down
2 changes: 0 additions & 2 deletions config/hardware/filament_sensors/motion_sensor.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ pause_on_runout:False
#pause_delay:
# See the "filament_switch_sensor" section for a description of the
# above parameters.


10 changes: 5 additions & 5 deletions config/mcu_definitions/main/BTT_SKR_Pico_v1.0.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[board_pins mcu_manufacturer]
aliases:
MCU_X_STEP=gpio11 , MCU_X_DIR=gpio10 , MCU_X_EN=gpio12 ,
MCU_Y_STEP=gpio6 , MCU_Y_DIR=gpio5 , MCU_Y_EN=gpio7 ,
MCU_Z_STEP=gpio19 , MCU_Z_DIR=gpio28 , MCU_Z_EN=gpio2 ,
MCU_E0_STEP=gpio14 , MCU_E0_DIR=gpio13 , MCU_E0_EN=gpio15 ,
MCU_TMCUART=gpio9 , MCU_TMCTX=gpio8 ,
MCU_X_STEP=gpio11 , MCU_X_DIR=gpio10 , MCU_X_EN=gpio12 ,
MCU_Y_STEP=gpio6 , MCU_Y_DIR=gpio5 , MCU_Y_EN=gpio7 ,
MCU_Z_STEP=gpio19 , MCU_Z_DIR=gpio28 , MCU_Z_EN=gpio2 ,
MCU_E0_STEP=gpio14 , MCU_E0_DIR=gpio13 , MCU_E0_EN=gpio15 ,
MCU_TMCUART=gpio9 , MCU_TMCTX=gpio8 ,

MCU_X-STOP=gpio4 , MCU_Y-STOP=gpio3 , MCU_Z-STOP=gpio25 ,
MCU_E0-STOP=gpio16 ,
Expand Down
2 changes: 1 addition & 1 deletion macros/base/homing/homing_overide.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ gcode:
G0 Y{probe_dock_location_y - probe_dock_margin_y} F{homing_travel_speed}
#go z endstop X
G0 X{z_endstop_x} F{homing_travel_speed}
{% endif %}
{% endif %}

G0 X{z_endstop_x} Y{z_endstop_y} F{homing_travel_speed}

Expand Down
10 changes: 5 additions & 5 deletions macros/base/start_print.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gcode:
{% set bed_mesh_enabled = printer["gcode_macro _USER_VARIABLES"].bed_mesh_enabled %}
{% set firmware_retraction_enabled = printer["gcode_macro _USER_VARIABLES"].firmware_retraction_enabled %}
{% set filter_enabled = printer["gcode_macro _USER_VARIABLES"].filter_enabled %}

{% if MATERIAL not in printer["gcode_macro _USER_VARIABLES"].material_parameters %}
RESPOND MSG="Material '{MATERIAL}' is unknown!"
{ action_raise_error("Add this new material to your material_parameters variable!") }
Expand All @@ -59,7 +59,7 @@ gcode:
{% if status_leds_enabled %}
STATUS_LEDS COLOR="BUSY"
{% endif %}

{% if light_enabled %}
LIGHT_ON S={light_intensity_start_print}
{% endif %}
Expand Down Expand Up @@ -169,7 +169,7 @@ gcode:
{% set klippain_ercf_enabled = printer["gcode_macro _USER_VARIABLES"].klippain_ercf_enabled %}
{% set verbose = printer["gcode_macro _USER_VARIABLES"].verbose %}

{% set max_extrude_cross_section = printer.configfile.settings.extruder.max_extrude_cross_section|float %}
{% set max_extrude_cross_section = printer.configfile.settings.extruder.max_extrude_cross_section|float %}
{% set Sp = (prime_line_flowrate / max_extrude_cross_section) * 60 |float %}

{% if klippain_ercf_enabled %}
Expand Down Expand Up @@ -281,7 +281,7 @@ gcode:
{% if CHAMBER_TEMP > 0 %}
{% set chamber_sensor_name = printer["gcode_macro _USER_VARIABLES"].chamber_temperature_sensor_name %}
{% set CURRENT_TEMP = printer["temperature_sensor " ~ chamber_sensor_name].temperature|float %}

# We do a first test to validate that the chamber is not already at temperature before starting the soak
{% if CURRENT_TEMP <= CHAMBER_TEMP %}
G0 X{max_x|int / 2} Y{max_y|int / 3} Z50 F{St}
Expand Down Expand Up @@ -485,7 +485,7 @@ gcode:
# gcode:
# ## Your custom code here


[gcode_macro _MODULE_CUSTOM3]
gcode:
# ---- CUSTOM Macro section
Expand Down
2 changes: 1 addition & 1 deletion macros/calibration/adaptive_bed_mesh.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gcode:
{% if params.SIZE is defined and params.SIZE != "0_0_0_0" %}
RESPOND MSG="Got a SIZE parameter for the adaptive bed mesh"
{% set xMinSpec, yMinSpec, xMaxSpec, yMaxSpec = params.SIZE.split('_')|map('trim')|map('int') %}

{% elif printer.exclude_object.objects %}
# Else if SIZE is not defined, we fallback to use the [exclude_object] tags
# This method is derived from Kyleisah KAMP repository: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging)
Expand Down
2 changes: 1 addition & 1 deletion macros/calibration/calibrate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gcode:
{% elif TYPE=="pressure_advance" %}
# A bed mesh is needed for this one as it's a large print so we compute the size manually (default PA size is 120mm)
{% set computed_size = (center_x - 60)|string + '_' + (center_y - 60)|string + '_' + (center_x + 60)|string + '_' + (center_y + 60)|string %}

# Call the standard START_PRINT with almost no soaking time and no chamber temp requirement (we want to go fast!)
START_PRINT EXTRUDER_TEMP={EXTRUDER_TEMP} BED_TEMP={BED_TEMP} MATERIAL={MATERIAL} SOAK=1 SIZE={computed_size}
PRESSURE_ADVANCE_CALIBRATION
Expand Down
6 changes: 3 additions & 3 deletions macros/calibration/calibrate_flow.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ gcode:
#
SET_GCODE_VARIABLE MACRO=_FLOW_CALIB_VARIABLES VARIABLE=last_shell_thickness VALUE={shell_thickness}
SET_GCODE_VARIABLE MACRO=_FLOW_CALIB_VARIABLES VARIABLE=last_evalue VALUE={e_multiplier}

#
# purging before raft
#
G90
M83
G92 E0.0
G0 X{x_start} Y{y_start - 5} Z{layer_height} F{feedrate_travel} # move at the start position to do a purge line

G91 # use relative coordinates for the prime line
G1 E{initial_purge} F{5 * 60}
G1 X{raft_size} E{raft_size * e_per_mm * 1.5} F{feedrate_raft / 2} # print prime line
Expand Down Expand Up @@ -232,7 +232,7 @@ gcode:
# similarly, if there is no THEORICAL_THICKNESS passed as param, get the one from the last print calib run
{% if theorical_thickness == 0.0 %}
{% set last_shell_thickness = printer["gcode_macro _FLOW_CALIB_VARIABLES"].last_shell_thickness %}

# then, if there is also no evalue saved from the last run, alert user
{% if last_shell_thickness == 0.0 %}
{action_respond_info("It seems that no calibration print was run prior to this (or a restart of Klipper occured).")}
Expand Down
4 changes: 2 additions & 2 deletions macros/calibration/calibrate_pa.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ gcode:
#
{% if do_raft == 1 %}
G0 F{feedrate_raft} # set print speed

{% for curr_raft_line in range(1, num_raft_lines + 2) %} # rafts need to be on both sides
# see if we need to print thick raft on slow/fast line boundary
{% if curr_raft_line == thick_raft_num1 or curr_raft_line == thick_raft_num2 %}
Expand All @@ -184,7 +184,7 @@ gcode:
G1 Y{loop.cycle(-1.0, 1.0) * print_height} E{print_height * e_per_mm}
G1 X{line_width} E{line_width * e_per_mm}
{% endif %}

G1 Y{loop.cycle(1.0, -1.0) * print_height} E{print_height * e_per_mm} # print the vertical raft line

# move over to next column
Expand Down
18 changes: 9 additions & 9 deletions macros/miscs/debugging.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ gcode:
{% if ' ' in item %}
{% set ns.path = ['printer', "['%s']" % (item), ''] %}
{% else %}
{% set ns.path = ['printer.', item, ''] %}
{% endif %}
{% set ns.path = ['printer.', item, ''] %}
{% endif %}

{% if search in ns.path|lower %}
{ action_respond_info(ns.path|join) }
{% endif %}
{% endif %}

{% if printer[item].items() %}
{% for childkey, child in printer[item].items() recursive %}
Expand All @@ -22,16 +22,16 @@ gcode:
{% set null = ns.path.append("['%s']" % (childkey)) %}
{% else %}
{% set null = ns.path.append(".%s" % (childkey)) %}
{% endif %}
{% endif %}

{% if child is mapping %}
{ loop(child.items()) }
{% else %}
{% if search in ns.path|lower %}
{ action_respond_info("%s : %s" % (ns.path|join, child)) }
{% endif %}
{% endif %}
{ action_respond_info("%s : %s" % (ns.path|join, child)) }
{% endif %}
{% endif %}

{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
8 changes: 4 additions & 4 deletions scripts/graph_vibrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def calc_psd(datas, group, max_freq):
data = np.pad(data, [(0, (M-N)+1), (0, 0)], mode='constant', constant_values=0)

freqrsp.add_data(calc_freq_response(data))

if not psd_list:
# First group, just put it in the result list
first_freqs = freqrsp.freq_bins
Expand Down Expand Up @@ -191,7 +191,7 @@ def sort_and_slice(raw_speeds, raw_datas, remove):
for data in raw_datas:
sliced = round((len(data) * remove / 100) / 2)
datas.append(data[sliced:len(data)-sliced])

return raw_speeds, datas


Expand Down Expand Up @@ -222,14 +222,14 @@ def main():
opts.error("You must specify an output file.png to use the script (option -o)")
if options.remove > 50 or options.remove < 0:
opts.error("You must specify a correct percentage (option -r) in the 0-50 range")

setup_klipper_import(options.klipperdir)

# Parse the raw data and get them ready for analysis
raw_datas = [parse_log(filename, opts) for filename in args]
raw_speeds = [extract_speed(filename, opts) for filename in args]
speeds, datas = sort_and_slice(raw_speeds, raw_datas, options.remove)

# As we assume that we have the same number of file for each speeds. We can group
# the PSD results by this number (to combine vibrations at given speed on all movements)
group_by = speeds.count(speeds[0])
Expand Down
2 changes: 1 addition & 1 deletion user_templates/mcu_defaults/main/BTT_Octopus.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ aliases:
RUNOUT_SENSOR=MCU_STOP3 ,

E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_T0 ,
BED_HEATER=MCU_HE1 , BED_TEMPERATURE=MCU_TB ,
BED_HEATER=MCU_HE1 , BED_TEMPERATURE=MCU_TB ,

PART_FAN=MCU_FAN0 , E_FAN=MCU_FAN1 ,
CONTROLLER_FAN=MCU_FAN2 ,
Expand Down
2 changes: 1 addition & 1 deletion user_templates/mcu_defaults/main/BTT_SKR_E3mini_v2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ aliases:
Z_STEP=MCU_ZM_STEP , Z_DIR=MCU_ZM_DIR , Z_ENABLE=MCU_ZM_ENABLE ,
E_STEP=MCU_EM_STEP , E_DIR=MCU_EM_DIR , E_ENABLE=MCU_EM_ENABLE ,

TMCUART=MCU_TMCUART , TMCTX=MCU_TMCTX ,
TMCUART=MCU_TMCUART , TMCTX=MCU_TMCTX ,

X_STOP=MCU_XSTOP , Y_STOP=MCU_YSTOP , Z_STOP=MCU_ZSTOP ,
RUNOUT_SENSOR=MCU_E0STOP ,
Expand Down
4 changes: 2 additions & 2 deletions user_templates/mcu_defaults/main/BTT_SKR_E3mini_v3.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ aliases:
Z_STEP=MCU_ZM_STEP , Z_DIR=MCU_ZM_DIR , Z_ENABLE=MCU_ZM_ENABLE ,
E_STEP=MCU_EM_STEP , E_DIR=MCU_EM_DIR , E_ENABLE=MCU_EM_ENABLE ,

TMCUART=MCU_TMCUART , TMCTX=MCU_TMCTX ,
TMCUART=MCU_TMCUART , TMCTX=MCU_TMCTX ,

X_STOP=MCU_XSTOP , Y_STOP=MCU_YSTOP , Z_STOP=MCU_ZSTOP ,
RUNOUT_SENSOR=MCU_E0STOP ,
PROBE_INPUT=MCU_PROBE ,

E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 ,
E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 ,
BED_HEATER=MCU_BED , BED_TEMPERATURE=MCU_THB ,

PART_FAN=MCU_FAN0 , E_FAN=MCU_FAN1 , CONTROLLER_FAN=MCU_FAN2 ,
Expand Down
2 changes: 1 addition & 1 deletion user_templates/mcu_defaults/main/BTT_SKR_Pico_v1.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ aliases:
RUNOUT_SENSOR=MCU_E0-STOP ,
PROBE_INPUT=MCU_PROBE ,

E_HEATER=MCU_HE , E_TEMPERATURE=MCU_TH0 ,
E_HEATER=MCU_HE , E_TEMPERATURE=MCU_TH0 ,
BED_HEATER=MCU_HB , BED_TEMPERATURE=MCU_THB ,

PART_FAN=MCU_FAN1 , E_FAN=MCU_FAN2 ,
Expand Down
2 changes: 1 addition & 1 deletion user_templates/variables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ variable_status_leds_colors: {
'on': {'r': 0.0, 'g': 0.2, 'b': 0.4, 'w':1.0},
'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
'error': {'r': 0.4, 'g': 0.0, 'b': 0.0, 'w':0.0},
},
},
'thermal': {
'hot': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
'cold': {'r': 0.3, 'g': 0.0, 'b': 0.3, 'w': 0.0}
Expand Down

0 comments on commit d9479e1

Please sign in to comment.