klipper/klippy/extras
Alex Voinea bee1c67416 tmc5160: allow changing the globalscaler at runtime
Previously, the globalscaler was calculated during the config parsing and set to a fixed value. If the current was changed for any reason after the initialization, only IRUN and IHOLD would be changed. This however caused issues:
- If the new current was lower, then the resolution of the possible current values would be low since there are only 32 IRUN/IHOLD steps.
- If the new current was higher, it wouldn't actually work since IRUN and IHOLD are capped at 31, so it wouldn't be possible to increase the current without increasing globalscaler.

With this commit, the globalscaler is recalculated whenever necessary in order to ensure the correct range of IRUN/IHOLD is used.

Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
2023-03-07 10:55:44 -05:00
..
display menu: Conditional display of common Control utils 2022-11-03 16:05:24 -04:00
__init__.py
ad5206.py
adc_scaled.py
adc_temperature.py
adxl345.py adxl345: Apply correct scaling for X,Y and Z axes 2022-10-25 14:41:00 -04:00
angle.py tmc2240: initial implementation 2023-03-01 20:43:53 -05:00
bed_mesh.py bed_mesh: do not load a profile on startup 2023-02-01 11:07:16 -05:00
bed_screws.py bed_screws: report status 2022-07-28 20:43:19 -04:00
bed_tilt.py
bltouch.py
bme280.py bme280: fix integer handling for python3 in bme280.py (#5237) 2022-02-06 12:15:35 -05:00
board_pins.py board_pins: Use config list helpers 2021-08-21 18:08:11 -04:00
bus.py spicmds: Allow inversion of CS pin for SPI busses 2022-04-22 13:25:03 -04:00
buttons.py button: Support half-stepping encoders 2021-10-11 11:29:53 -04:00
canbus_ids.py canbus_ids: Use 4 as the first nodeid to reduce id bitstuffing 2022-07-29 11:40:54 -04:00
controller_fan.py
dac084S085.py dac084S085: SPI DAC DAC084S085 implementation (#5134) 2022-02-22 10:28:28 -05:00
delayed_gcode.py
delta_calibrate.py delta_calibrate: Fix Python3 error in DELTA_ANALYZE 2022-06-13 13:51:07 -04:00
display_status.py display_status: Implement SET_DISPLAY_TEXT command 2022-06-27 10:09:02 -04:00
dotstar.py dotstar: Update to use LEDHelper class 2022-03-31 13:08:12 -04:00
ds18b20.py ds18b20: fix string conversion error on startup (#5559) 2022-06-08 18:05:27 -04:00
duplicate_pin_override.py duplicate_pin_override: Use config.getlist() for pins config option 2021-08-21 18:08:11 -04:00
endstop_phase.py tmc2240: initial implementation 2023-03-01 20:43:53 -05:00
exclude_object.py exclude_objects: initial implementation 2022-06-03 14:12:04 -04:00
extruder_stepper.py extruder_stepper: Support configuring pressure advance from config 2022-09-01 14:53:12 -04:00
fan.py fan: add enable_pin option (#5732) 2022-09-03 12:23:55 -04:00
fan_generic.py
filament_motion_sensor.py
filament_switch_sensor.py
firmware_retraction.py
force_move.py kinematics: Convert to Python3 string encoding 2021-10-01 19:12:30 -04:00
gcode_arcs.py gcode_arcs: Allow either one of I, J, K to be default-zero on G2/G3 (#5939) 2022-12-14 12:06:11 -05:00
gcode_button.py
gcode_macro.py gcode_macro: Add "rawparams" pseudo-variable 2021-11-19 11:22:36 -05:00
gcode_move.py
hall_filament_width_sensor.py
heater_bed.py
heater_fan.py
heater_generic.py
heaters.py temperature_sensors: Deprecate "NTC 100K beta 3950" thermistor 2021-11-10 18:56:51 -05:00
homing.py homing: Fix bug in multi_complete() 2022-05-13 13:53:17 -04:00
homing_heaters.py
homing_override.py
htu21d.py htu21d: SI7021 is has id 0x15 (#5375) 2022-04-11 10:33:41 -04:00
idle_timeout.py idle_timeout: exit the timer if the printer is shutdown 2021-10-29 18:39:47 -04:00
input_shaper.py input_shaper: Fix python3 string encoding 2021-10-26 20:01:33 -04:00
led.py led: Remove has_white check from LEDHelper 2022-04-18 09:34:25 -04:00
lm75.py lm75: round reported temps to 2 decimal places 2021-10-15 18:01:19 -04:00
manual_probe.py manual_probe: Add Z_OFFSET_APPLY_ENDSTOP for delta 2022-12-19 13:14:06 -05:00
manual_stepper.py kinematics: Convert to Python3 string encoding 2021-10-01 19:12:30 -04:00
mcp4018.py mcp4018: Add SET_DIGIPOT command to mcp4018 implementation (#5737) 2022-09-02 10:30:06 -04:00
mcp4451.py
mcp4728.py
motion_report.py motion_report: Ensure startstop_cb is called atomically 2022-02-21 22:22:14 -05:00
mpu9250.py mpu9250: add MPU6500 (#5767) 2022-11-19 09:58:24 -05:00
multi_pin.py multi_pin: Use config.getlist() for pins config option 2021-08-21 18:08:11 -04:00
neopixel.py neopixel: Simplify color_order parsing 2022-04-18 12:55:32 -04:00
output_pin.py
palette2.py palette2: Fix errors with bad handling of NoneType in a few locations 2022-12-31 21:03:37 -05:00
pause_resume.py pause_resume: Do not clobber default state name by accident (#5156) 2022-01-16 13:00:24 -05:00
pca9533.py led: Remove has_white check from LEDHelper 2022-04-18 09:34:25 -04:00
pca9632.py pca9632: Fix color_order assignment 2022-04-18 11:07:05 -04:00
pid_calibrate.py pid_calibrate: Improve Python3 compatibility in debug file output 2022-03-29 20:37:03 -04:00
print_stats.py print_stats: add `SET_PRINT_STATS_INFO` G-Code for pass slicer variables to Klipper (#5726) 2022-10-05 15:02:28 -04:00
probe.py
pulse_counter.py
quad_gantry_level.py quad_gantry_level: Use config.getlists() for gantry_corners config option 2021-08-21 18:08:11 -04:00
query_adc.py
query_endstops.py
replicape.py replicape: Only call note_pwm_enable() in main thread 2023-01-17 18:39:47 -05:00
resonance_tester.py adxl345: Support recording data from multiple ADXL345's in one run, and more. (#5224) 2022-05-23 19:56:58 -04:00
respond.py respond: No forced spaces (#5152) 2022-06-30 13:56:35 -04:00
safe_z_home.py safe_z_home: Fix final z hop to use relative z coordinates (#5879) 2022-11-22 18:55:43 -05:00
samd_sercom.py
save_variables.py save_variables: Verify filename path is writeable at startup 2022-12-11 21:07:47 -05:00
screws_tilt_adjust.py screws_tilt_adjust: status result as dictionary 2023-02-03 18:16:19 -05:00
sdcard_loop.py
servo.py
shaper_calibrate.py shaper_calibrate: Add missing import 2022-04-23 21:49:50 -04:00
shaper_defs.py input_shaper: Define input shapers in a single place in Python code 2021-10-26 16:14:50 -04:00
skew_correction.py skew_corrections: Fix typo (gmcd vs gcmd) 2022-03-17 20:52:10 -04:00
smart_effector.py smart_effector: Initial support of programmable SmartEffector 2022-04-09 19:04:57 -04:00
spi_temperature.py thermocouple: Only shutdown on multiple consecutive sensor errors 2022-09-23 11:56:20 -04:00
static_digital_output.py static_digital_output: Use config.getlist() for pins config option 2021-08-21 18:08:11 -04:00
statistics.py statistics: Improve Python3 compatibility 2021-12-15 11:27:08 -05:00
stepper_enable.py stepper_enable: report status 2023-02-13 12:16:17 -05:00
sx1509.py
temperature_fan.py temperature_fan: Fix divide by zero error when pid_Ki is zero 2022-04-07 12:11:54 -04:00
temperature_host.py temperature_host: Remove support for deprecated rpi_temperature alias 2021-11-02 12:45:11 -04:00
temperature_mcu.py stm32: add STM32H723 support 2022-12-02 13:55:23 -05:00
temperature_sensor.py temperature_sensor: round reported temps to 2 decimal places 2021-10-15 18:01:19 -04:00
temperature_sensors.cfg temperature_sensors: add ATC Semitec 104NT-4-R025H42G thermistor 2021-11-15 23:14:32 -05:00
thermistor.py temperature_sensors: Define default thermistors in config 2021-11-10 18:52:55 -05:00
tmc.py tmc: Configurable microstep lookup table (#5920) 2022-12-21 21:23:23 -05:00
tmc2130.py tmc: Configurable microstep lookup table (#5920) 2022-12-21 21:23:23 -05:00
tmc2208.py tmc: Fix s2vs field formatters 2023-03-07 10:52:52 -05:00
tmc2209.py tmc: Add support for a get_status() method 2021-08-30 12:00:46 -04:00
tmc2240.py tmc2240: initial implementation 2023-03-01 20:43:53 -05:00
tmc2660.py tmc2130: Rework current selection to prefer vsense=1 2022-01-16 19:00:00 -05:00
tmc5160.py tmc5160: allow changing the globalscaler at runtime 2023-03-07 10:55:44 -05:00
tmc_uart.py tmc_uart: Use config.getlist() for select_pins config option 2021-08-21 18:08:11 -04:00
tsl1401cl_filament_width_sensor.py
tuning_tower.py tuning_tower: add is_active() method 2022-06-03 14:12:04 -04:00
verify_heater.py
virtual_sdcard.py virtual_sdcard: read new lines as-is 2022-09-11 21:43:43 -04:00
z_thermal_adjust.py z_thermal_adjust: get_temp hotfix 2022-09-30 11:19:01 -04:00
z_tilt.py z_tilt: Improve python3 compatibility 2023-01-17 18:11:57 -05:00