Commit graph

5985 commits

Author SHA1 Message Date
Torbjørn Ludvigsen
1a7d858e2e Test calc_position 2025-12-01 20:15:04 +01:00
Torbjørn Ludvigsen
90400bda3f Removes unused code 2025-12-01 19:48:35 +01:00
Torbjørn Ludvigsen
7cf1788a42 Implements Hybrid Halley (winch forward transform)
Main logic in kin_winch.c
2025-12-01 19:36:26 +01:00
Torbjørn Ludvigsen
d2470c1431 Adds winch buildup compensation feature 2025-12-01 16:36:24 +01:00
Torbjørn Ludvigsen
971a888fe1 Introduces buildup_factor and uses distances that are relative to the origin.
The buildup compensation is not applied yet, it's just prepared for.
2025-12-01 15:47:05 +01:00
Torbjørn Ludvigsen
c2935a9a04 Updates winch forward transform reference 2025-12-01 15:13:09 +01:00
Torbjørn Ludvigsen
7704348143 Brings back the immediate flex transition 2025-12-01 15:09:48 +01:00
Torbjørn Ludvigsen
e8f7b46b3f Simplifies winch kinematics
Makes behavior more similar to RRF:
 - No immediate movement upon enabling flex compensation
 - Count flex compensation in absolute terms, not relative to the flex at the origin
 - Include a configurable mechanical_advantage
 - Removes old messy attempt at forward transform (calc_position).
2025-12-01 14:59:41 +01:00
Torbjørn Ludvigsen
971754e988 Updates winch forward transform test datasets 2025-12-01 14:16:58 +01:00
Torbjørn Ludvigsen
18529f0548 WIP: Port quadratic forward kinematics to klipper
run with
python ai_docs/klipper_forward_harness.py
2025-11-27 15:43:19 +01:00
Torbjørn Ludvigsen
eff6b300a6 Updated reference motorstepstocartesiantest_quadratic.cpp 2025-11-27 14:52:40 +01:00
Torbjørn Ludvigsen
a81e7c581b Fixes bug in winch forward transform 2025-11-27 11:25:37 +01:00
Torbjørn Ludvigsen
7d6aad7417 Adds reference test harness for quadratic forward transform algo for winch 2025-11-27 09:58:05 +01:00
Torbjørn Ludvigsen
1e59a482d4 Implements quadratic algo forward transform for winch 2025-11-27 09:57:31 +01:00
Torbjørn Ludvigsen
bb20c4b311 Prepares update of winch forward transform by adding some reference code and docs 2025-11-26 19:22:56 +01:00
Torbjørn Ludvigsen
f3bafca35c Updates winch flex tests. 2025-10-17 15:56:24 +02:00
Torbjørn Ludvigsen
6cdc5da62b Fixes stray old tikhonov default 2025-10-17 15:38:08 +02:00
Torbjørn Ludvigsen
fc5355ed21 Merge remote-tracking branch 'upstream/master' 2025-10-17 15:19:43 +02:00
Torbjørn Ludvigsen
ef5c215f85 Remove question from config file 2025-10-17 15:15:19 +02:00
Torbjørn Ludvigsen
903aa5c6fe Removes from config file. Only enable/disable during runtime 2025-10-17 15:14:07 +02:00
Torbjørn Ludvigsen
3eee5140e1 Makes qp the default flex compensation algorithm 2025-10-17 14:32:10 +02:00
Torbjørn Ludvigsen
26453fe526 Builds a softer nullspace projector to tikhonov gradient descent doesn't crash 2025-10-17 13:48:01 +02:00
Torbjørn Ludvigsen
9f7dba6de8 Make M666 F1 produce real queue_step activity instead of just toggling a flag. 2025-10-17 00:23:02 +02:00
Torbjørn Ludvigsen
fb3d8481c2 Just use the flex subtracted from absolute dist 2025-10-17 00:00:57 +02:00
Torbjørn Ludvigsen
3f91ba06b1 Make M666 F1 enable flex compensation without causing stepper timer issues 2025-10-16 23:56:20 +02:00
Torbjørn Ludvigsen
ec55ab9303 Fix typo 2025-10-16 23:53:14 +02:00
Torbjørn Ludvigsen
9bd021bd08 Allow Tikhonov to output negative forces if requested 2025-10-16 23:53:02 +02:00
Torbjørn Ludvigsen
c7c809e4f5 Corrects thikonov/tikhonov spelling err 2025-10-16 14:15:04 +02:00
Torbjørn Ludvigsen
d7906d36a9 WIP: Compiles again 2025-10-16 13:51:37 +02:00
Torbjørn Ludvigsen
c05918eac1 WIP: Integrate Thikonov and QP flex compensation in Winch kinematics 2025-10-16 12:35:09 +02:00
Torbjørn Ludvigsen
8366d5fd87 Replaces "hard" and "soft" with unified flex_compensation_algorithm
Also removes reference to "legacy" algorithm,
updates config/example-winch.cfg and adds more
explanation to config reference.
2025-10-16 11:23:48 +02:00
Torbjørn Ludvigsen
5939a05454 Fix build errors 2025-10-16 11:05:13 +02:00
Torbjørn Ludvigsen
32f505d8db Updates Config_Reference.md with the behavior we're about to implement 2025-10-16 11:00:11 +02:00
Torbjørn Ludvigsen
650c2408ba Removes 'legacy' flex compensation algorithm 2025-10-16 10:59:41 +02:00
Torbjørn Ludvigsen
afabe58d63 Initial integration of thikonov and qp flex compensation 2025-10-15 18:37:28 +02:00
Kevin O'Connor
3fe594ef20 sensor_lis2dw: Read 8 samples at a time from sensor fifo
Some checks failed
Build test / build (push) Has been cancelled
Batch reading of 8 samples (48 bytes) at a time from the sensor.  This
reduces the number of transactions - which can notably improve
performance on i2c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-13 20:36:11 -04:00
JamesH1978
b1dd6a73f7
docs: Update FAQ.md - Typo (#7089)
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
Kliper is not Klipper!

Signed-off-by: James Hartley <james@hartleyns.com>
2025-10-13 13:53:13 -04:00
Kevin O'Connor
e3909fb205 manual_stepper: Remove some unused code
Some checks are pending
Build test / build (push) Waiting to run
klipper3d deploy / deploy (push) Waiting to run
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-12 14:38:07 -04:00
Pedro Lamas
a5c764bbe9 docs: Command parameter fix
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2025-10-12 14:37:35 -04:00
Torbjørn Ludvigsen
5919fd2e10 Winch flex compensation: Prints optimal pretension at the origin 2025-10-12 14:42:59 +02:00
Torbjørn Ludvigsen
c819db6be2 Removes some buggy cache stuff 2025-10-11 02:09:43 +02:00
Torbjørn Ludvigsen
bc9e5b2a0c feat: Flex compensation for Hangprinters 2025-10-10 23:11:43 +02:00
Kevin O'Connor
9117c09037 graphstats: Set MAXBUFFER=1
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-10 11:07:50 -04:00
Kevin O'Connor
84e9a28141 virtual_sdcard: Reduce pause time on busy detection
If there are other users of the gcode mutex then pause for 50ms
(instead of 100ms).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-10 11:07:50 -04:00
Kevin O'Connor
8de426d244 toolhead: Reduce target buffer time to 1 second from 2 seconds
During normal printing the host software would attempt to stay ahead
of the micro-controller by 2 full seconds.  Change that time to 1
second.  This should make the software more responsive to user
requests (such as pause requests).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-10 11:07:50 -04:00
Kevin O'Connor
16fc46fe5f toolhead: Reduce LOOKAHEAD_FLUSH_TIME to 0.150 seconds
The current code is likely to perform a lazy flush of the lookahead
queue around 4 times a second.  Increase that to around 6-7 times a
second.  This change may slightly improve the responsiveness to user
requests mid-print (eg, changing extrusion ratio) and may make a
"print stall" less likely in some corner cases.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-10 11:07:50 -04:00
Kevin O'Connor
50cb362234 toolhead: Make sure to periodically yield to other tasks when buffering moves
Normally the toolhead code will flush the lookahead buffer every
~250ms and will briefly pause to avoid buffering too much data.  That
pause allows other tasks to run.  Make sure to periodically yield to
other tasks on each lookahead buffer flush even if a delay isn't
needed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-10 11:07:50 -04:00
Kevin O'Connor
4415b988c1 toolhead: Clarify priming timer scheduling
Make sure each command gets an additional 100ms before flushing via
the priming timer.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-10 11:07:50 -04:00
Kevin O'Connor
6269dda56b sensor_lis2dw: Fix fifo_empty check on lis2dw chips
Some checks are pending
Build test / build (push) Waiting to run
Fix inverted check for fifo empty.  The fifo is empty when the number
of entries in the fifo is zero.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-09 19:06:44 -04:00
Kevin O'Connor
cba7a285e4 trapq: Extend trapq_extract_old() to also check active moves
Some checks are pending
Build test / build (push) Waiting to run
Support extracting moves from both the "live" trapq->moves as well as
the "history" from trapq->history storage.  Now that moves are flushed
separately from the lookahead queue, there is a good chance that the
current move being processed on the mcus will still be in the active
trapq list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-10-09 13:22:32 -04:00