5638 Commits

Author SHA1 Message Date
Kevin O'Connor
f8de9ae080 probe: Add a new ProbeEndstopSessionHelper class
Move the HomingViaProbeHelper() instance from ProbeSessionHelper to a
new ProbeEndstopSessionHelper class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-18 14:38:34 -04:00
Kevin O'Connor
6a87c5e9f5 probe: Add a default probing_move() function to HomingViaProbeHelper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-18 14:38:34 -04:00
Kevin O'Connor
db7a9cf071 manual_stepper: Implement "drip moves" for manual stepper STOP_ON_ENDSTOP
Currently, `MANUAL_STEPPER STOP_ON_ENDSTOP=1` type commands will move
until hitting the endstop, but it will still always consume the total
amount of move time.  That is, following moves can't be started until
the total possible time of the homing move is completed.

Implement "drip moves" so that the code only schedules the movement in
small segments.  This allows following movements to be scheduled
without a significant delay.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-18 14:32:23 -04:00
Kevin O'Connor
765de72f9e toolhead: Avoid toolhead.move() and toolhead._process_moves() in drip_move()
Implement move checking and trapq loading directly from drip_move().
This simplifies the interactions between these components.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-18 14:32:23 -04:00
Kevin O'Connor
6202a0f3bc toolhead: Avoid LookAheadQueue calling back into toolhead class
Avoid lookahead.flush() calling back into toolhead._process_moves().
Instead, rename toolhead._process_moves() to
toolhead._process_lookahead(), have it call lookahead.flush(), and
consistently use it when flushing the lookahead queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-18 14:32:23 -04:00
Kevin O'Connor
413ff19ea8 neopixel: Add comments on timing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 13:06:22 -04:00
Kevin O'Connor
4e7fcc2704 check-software-div: Add a new build check for software divide
Update the build checks to include a check for unexpected software
divide operations.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:09:19 -04:00
Kevin O'Connor
871637d3f2 Kconfig: Note which chips require software divide operations
Add a new HAVE_SOFTWARE_DIVIDE_REQUIRED that indicates which chips
require software divide.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:09:19 -04:00
Kevin O'Connor
0fbcc156c5 neopixel: Make sure nsecs_to_ticks() is always inlined
It is a compile-time calculation that needs to be inlined to work.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:09:19 -04:00
Kevin O'Connor
56d3f4e64c lcd_st7920: Make sure nsecs_to_ticks() is always inlined
It is a compile-time calculation that needs to be inlined to work.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:09:19 -04:00
Kevin O'Connor
cb6828ec34 lcd_hd44780: Make sure nsecs_to_ticks() is always inlined
It is a compile-time calculation that needs to be inlined to work.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:09:19 -04:00
Kevin O'Connor
3656006a30 stm32: Change hard_pwm.c MAX_PWM to 257
Choose a value for MAX_PWM that avoids an expensive run-time division.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:07:44 -04:00
Kevin O'Connor
7a9b06ad86 stm32: Fix prescaler overflow check in hard_pwm.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 12:07:44 -04:00
Kevin O'Connor
acd96047de docs: Update Config_Changes.md to note software spi is now rate limited
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-17 11:54:25 -04:00
Russell Cloran
516ef1d361 hall_filament_width_sensor: Add filament switch values to status
`hall_filament_width_sensor` contains a runout sensor object internally.
This exposes those values in the API status result.

```
SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","filament_detected","is_active","Diameter","Raw"]}}}
GOT: b'{"id":123,"result":{"eventtime":199567.823596603,"status":{"hall_filament_width_sensor":{"enabled":true,"filament_detected":true,"is_active":true,"Diameter":1.9499999999999986,"Raw":6113}}}}'
```

The duplication of `is_active` and `enabled` seems confusing, but both
of these can be independently manipulated by GCode:

```
SEND: {"id":123,"method":"gcode/script","params":{"script":"DISABLE_FILAMENT_WIDTH_SENSOR"}}
GOT: b'{"id":123,"result":{}}'
SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}}
GOT: b'{"id":123,"result":{"eventtime":199770.446013297,"status":{"hall_filament_width_sensor":{"enabled":true,"is_active":false}}}}'

SEND: {"id":123,"method":"gcode/script","params":{"script":"SET_FILAMENT_SENSOR SENSOR=hall_filament_width_sensor ENABLE=0"}}
GOT: b'{"id":123,"result":{}}'
SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}}
GOT: b'{"id":123,"result":{"eventtime":199847.927726196,"status":{"hall_filament_width_sensor":{"enabled":false,"is_active":false}}}}'
```

Signed-off-by: Russell Cloran <rcloran@gmail.com>
2025-04-17 11:44:26 -04:00
Timofey Titovets
b9757c9b69 tmc: add missing freewheel config options
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:42:44 -04:00
Timofey Titovets
a9b04e8536 i2c_software: pass pulse ticks from host
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:41:49 -04:00
Timofey Titovets
841adcfff7 i2c_software: reduce gpio calls count
gpio reset calls are heavy.
gpio state are persistent between calls.
Drop useless calls.
Avoid calls if SDA does not changed.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:41:49 -04:00
Timofey Titovets
8ab12c86bf i2c_software: allow freq adjust
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:41:49 -04:00
Timofey Titovets
abc76ee963 software_spi: set rate limiting ticks from the host
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:37:12 -04:00
Timofey Titovets
b826844b34 spi_software: respect expected rate
On fast MCU software spi may violate maximally supported by TMC driver rate.

Add dynamic limits to overcome that.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-17 11:37:12 -04:00
Kevin O'Connor
017371b744 Revert "Makefile: Don't disable gcc's use-linker-plugin option"
This reverts commit 8087200ffe2fbbe62265dd480ce8be67db8349eb.

The change can break the build on some versions of gcc.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 15:24:05 -04:00
Kevin O'Connor
4aa2250221 test: Disable all additional features in atmega328 build
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 15:24:05 -04:00
JamesH1978
49d9ed22bf
config: Update generic-bigtreetech-skr-2.cfg - SPI Drivers (#6895)
Added SPI tmc2130 driver config

Signed-off-by: James Hartley <james@hartleyns.com>
2025-04-16 14:13:17 -04:00
Kevin O'Connor
51311948be atsamd: Enable HAVE_LIMITED_CODE_SIZE on small atsamd chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
61bbd455cf Kconfig: Add some user visible comments to the optional features menu
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
d93645a750 stm32: Simplify Makefile
Breakout selection of timer and gpioperiph objects.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
8c67adc164 Kconfig: Add new WANT_ADC option to reduce code size
Make it possible to not compile in support for ADC on chips with small
flash sizes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
04e7eb20fd Kconfig: Add new WANT_I2C option to reduce code size
Make it possible to not compile in support for I2C on chips with small
flash sizes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
868760f5b1 Kconfig: Add new WANT_SPI option to reduce code size
Make it possible to not compile in support for SPI on chips with small
flash sizes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
b0fa36e221 Kconfig: Add new WANT_HARD_PWM option to reduce code size
Make it possible to not compile in support for hardware pwm on chips
with small flash sizes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
6356e3d35c stm32: Enable gcc -Os option on CONFIG_HAVE_LIMITED_CODE_SIZE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
6e9b5b309c avr: Enable gcc -Os option on CONFIG_HAVE_LIMITED_CODE_SIZE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:44 -04:00
Kevin O'Connor
d98abfc5db Kconfig: Replace WANT_DISPLAYS with individual options
Support setting WANT_ST7920 and WANT_HD44780 individually.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:39 -04:00
Kevin O'Connor
c3c64adc32 Kconfig: Replace WANT_GPIO_BITBANGING with individual options
Support setting individual options instead of one global option (
WANT_BUTTONS, WANT_TMCUART, WANT_NEOPIXEL, WANT_PULSE_COUNTER,
WANT_HX71X).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:54:27 -04:00
Kevin O'Connor
efc2d9b364 workflows: Update github build-test.yaml to ubuntu-22.04
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:19:54 -04:00
Kevin O'Connor
d96bb6ca82 test: Disable optional features in atmega328 build
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:19:54 -04:00
Kevin O'Connor
8087200ffe Makefile: Don't disable gcc's use-linker-plugin option
This option seems to be confusing ld's region usage checks (builds
that could fit in small chips are being reported as not fitting).  The
option was disabled back in commit 4e8674d5 because it showed worse
results.  However, recent versions of gcc seem to produce the same
results even if this option is enabled, so change the build to avoid
disabling that option on newer versions of gcc (those that have the
-ffat-lto-objects option - which is needed to ensure
compile_time_requests sections can be extracted with objcopy).

The PRU build is dependent on -fuse-linker-plugin, so enable that
option explicitly in its build.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-16 13:17:19 -04:00
Kevin O'Connor
61c0c8d2ef docs: Note the release of v0.13.0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-11 21:07:28 -04:00
Kevin O'Connor
ce7657e537 docs: Update Features.md to reflect recent work
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-11 21:07:28 -04:00
Kevin O'Connor
037377b927 led: Fix off-by-one bug in SET_LED_TEMPLATE INDEX parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-11 12:00:34 -04:00
Kevin O'Connor
5493bdfb48 ci-install: Use prebuilt pru gcc binaries
Don't build the pru binaries directly in the build test cases, instead
use the upstream binaries provided.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 23:34:17 -04:00
Kevin O'Connor
4b9cb36247 force_move: Make sure to use lower() on SET_KINEMATIC_POSITION CLEAR_HOMED
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 23:30:08 -04:00
Kevin O'Connor
f3e89e25c5 force_move: Support a SET_HOMED parameter to SET_KINEMATIC_POSITION
Commit 70838797 added support for clearing the homing state in
SET_KINEMATIC_POSITION commands.  However, it can be difficult to use
that support as the default for SET_KINEMATIC_POSITION is to set all
axes as homed.

Add a new SET_HOMED parameter to allow one to explicitly request which
axes to consider in a homed state.

Also introduce a CLEAR_HOMED parameter and prefer that to the existing
CLEAR parameter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 23:23:05 -04:00
Kevin O'Connor
655861cf12 i2c_software: Fix i2c_delay()
The i2c_delay() function did not properly handle counter rollovers.
It also performed an expensive run-time divide.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 10:10:25 -04:00
Kevin O'Connor
050bc33241 docs: Fixup G-Codes.md so that sections are sorted alphabetically
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-07 15:26:56 -04:00
Maksim Bolgov
46ee920b93
axis_twist_compensation: Fix AttributeError on klippy connect state (#6881)
Object 'configfile' has no attribute 'error'

Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
2025-04-05 21:36:35 -04:00
Timofey Titovets
3a9e9a4bef temperature_combined: avoid crash with temperature monitors
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-05 21:27:37 -04:00
Timofey Titovets
3beb465247 temperature_combined: delay initialization
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-05 21:27:37 -04:00
MRX8024
2ec69ae361 docs: Add icm20948 description
Signed-off-by: Maksim Bolgov maksim8024@gmail.com
2025-04-03 14:08:23 -04:00