aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gcode: Validate extended g-code command namesKevin O'Connor2024-12-011-0/+4
| | | | | | | Extended g-code command names may only contain A-Z, 0-9, and underscore, and the first two characters may not be digits. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Remove arbitrary constants controlling junction deviationKevin O'Connor2024-11-291-19/+19
| | | | | | | | | | | | | | | | When calculating the junction speed between two moves the code checked for angles greater than 0.999999 or less than -0.999999 to avoid math issues (sqrt of a negative number and/or divide by zero). However, these arbitrary constants could unnecessarily pessimize junction speeds when angles are close to 180 or 0 degrees. Change the code to explicitly check for negative numbers during sqrt and to explicilty check for zero values prior to division. This simplifies the code and avoids unnecessarily reducing some junction speeds. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Use delta_v2 when calculating centripetal forceKevin O'Connor2024-11-291-4/+5
| | | | | | | | | | | As a minor math optimization, it's possible to calculate: .5 * self.move_d * self.accel * tan_theta_d2 using: self.delta_v2 * .25 * tan_theta_d2 because self.delta_v2 is "2. * self.move_d * self.accel". Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add spi0_gpio4_gpio3_gpio2 bus to support fysetc PITB V2 (#6683)Jessica Hunt2024-11-271-3/+24
| | | | | | | | | | | | | | | | The Fysetc PITB V2 board uses a spi bus config that is supported by the RP2040 chip, but not klipper, so this adds the relevant config to the file to allow you to run the tmc5160's on the board via hardware SPI. This resolves the issue of software spi not working on this board, which I was unable to fully understand. I have also seen other users encounter similar bus config issues with the rp2040 setting up things like accelerometers and such with this pin layout. As requested, this also uses the new convention for spi bus naming, while maintaining the old bus names for compatibility. Signed-off-by: Jessica Hunt <hunt.jessica@proton.me>
* docs: Update Measuring Resonances document with LIS2DW/LIS3DH informationWulfsta2024-11-271-8/+11
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* docs: Update config screenshot for rpi235x (#6748)Thijs Triemstra2024-11-271-0/+0
| | | Signed-off-by: Thijs Triemstra <info@collab.nl>
* ci-install: Run 'apt-get update' prior to 'apt-get install'Kevin O'Connor2024-11-221-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: update `Manual_Level.md` referenceEmmanuel Ferdman2024-11-191-1/+1
| | | | Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
* rp2040: Improve indentation in Kconfig fileKevin O'Connor2024-11-141-34/+34
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Add rp2350 to benchmarksKevin O'Connor2024-11-142-7/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add rp2350 bootrom based chipid and reboot to bootloader codeKevin O'Connor2024-11-144-9/+65
| | | | | | | This adds the bootrom code needed to implement "reboot into bootloader" and "chipid" capabilities. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Move chipid reading to bootrom.cKevin O'Connor2024-11-144-108/+120
| | | | | | | | | | | Rewrite chipid.c so that it contains just the USB and canbus id manipulation code. Move the low-level chipid reading to bootrom.c. Also, introduce a new bootrom_reboot_usb_bootloader() function in bootrom.c so that the main.c code does not need to know the specifics of rebooting into the bootrom. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_mcu: Add support for rp2350 MCUsKevin O'Connor2024-11-141-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* flash_usb: Initial support for flashing rp2350 chipsKevin O'Connor2024-11-141-4/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update rp2040_flash code to support rp2350 rebootKevin O'Connor2024-11-141-5/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update rp2040_flash to upstream picotool.git v2.0.0Kevin O'Connor2024-11-149-78/+877
| | | | | | This is in preparation for adding rp2350 flash support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Initial rp2350 supportKevin O'Connor2024-11-146-24/+62
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Use a higher USB PLL internal frequencyKevin O'Connor2024-11-141-1/+5
| | | | | | | The rp2350 chip requires a higher internal frequency, so choose a value that works for both rp2040 and rp2350. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Avoid using memcpy() on USB dpramKevin O'Connor2024-11-141-7/+30
| | | | | | | | Some versions of the system memcpy() may make unaligned memory accesses, which can result in a bus fault when accessing the usb dpram device memory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Rename rp2040_link.lds.S to rpxxxx_link.lds.SKevin O'Connor2024-11-133-3/+3
| | | | | | This is in preparation for rp2350 support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Rename CONFIG_RP2040_yyy Kconfig symbols to CONFIG_RPXXXX_yyyKevin O'Connor2024-11-136-35/+45
| | | | | | | Rename the Kconfig symbols. This is in preparation to adding support for the rp2350 mcu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Support ARM cortex-m33 chipsKevin O'Connor2024-11-133-3/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Add cortex-m33 support files to lib/cmsis-core/Kevin O'Connor2024-11-132-0/+3616
| | | | | | This is in preparation for adding support for rp2350 mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Add rp2350 files to pico-sdkKevin O'Connor2024-11-13107-0/+128556
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update can2040 to support v2.0.0 of pico-sdkKevin O'Connor2024-11-132-10/+10
| | | | | | | A new version of can2040 is needed due to changes in the 2.0.0 release of the pico-sdk. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update lib/rp2040 to v2.0.0 SDK releaseKevin O'Connor2024-11-13139-8309/+13359
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Move lib/rp2040/elf2uf2 to lib/elf2uf2Kevin O'Connor2024-11-134-4/+9
| | | | | | | | Recent versions of the rp2040 sdk no longer contain the elf2uf2 tool. So, move that code to a new dedicated directory. This is in preparation for updating the rp2040 sdk version. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgproto: Fix return type for create_command()Kevin O'Connor2024-11-131-1/+1
| | | | | | | Return an empty list instead of an emptry string if no command found. This improves compatibility within console.py on python3. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* axis_twist_compensation: AXIS_TWIST_COMPENSATION new parameter AUTO for ↵yochiwarez2024-11-124-24/+225
| | | | | | | | autocalibration This commit adds automatic calculation support for compensating X and Y axis twist in the axis_twist_compensation module. Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
* axis_twist_compensation: Implement Y-axis supportyochiwarez2024-11-124-48/+161
| | | | | | | | This commit implements support for the Y-axis in the axis_twist_compensation module. This update enables the module to handle corrections for printers with a twisted Y rail. Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
* configfile: Fix comments on same line as [include xxx.cfg] directiveKevin O'Connor2024-11-121-0/+4
| | | | | | | | Commit 9d4ab862 broke support for '#' style comments on the same line as [include] config directives. Fix by adding back in the check for comments in _parse_config(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* resonance_tester: Fix chips selection, add accel_per_hz selection (#6726)MRX80242024-11-123-14/+16
| | | | | | | | | | Corrected issue where accelerometer names were incorrectly prefixed with "adxl345", preventing the selection of other chip types when running TEST_RESONANCES. Implemented support for selecting the `accel_per_hz` parameter when running TEST_RESONANCES. docs: Update TEST_RESONANCES + SHAPER_CALIBRATE with missing parameters and bracket corrections Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
* config: Add lis3dh to Duet3D 1LC sample configWulfsta2024-11-121-0/+9
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* atsamd: allow i2c rate to be 400kHzWulfsta2024-11-121-4/+10
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* docs: Add lis2dw i2c and lis3dhWulfsta2024-11-121-2/+43
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* sensor_lis2dw: add lis3dh sensor and i2c communicationWulfsta2024-11-126-58/+246
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* config: Added board config for Mellow Fly E3 v2 (#6682)Lieven Vanhercke2024-11-062-0/+233
| | | Signed-off-by: Lieven Vanhercke <lieven.vanh@gmail.com>
* fan_generic: fixes missing logging importPedro Lamas2024-11-011-0/+1
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* configfile: Separate access tracking to new ConfigValidate classKevin O'Connor2024-10-301-38/+73
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Only check for [include file] directives from main printer.cfgKevin O'Connor2024-10-301-37/+52
| | | | | | | Don't look for includes in autosave data nor from the internal menu, display, and temperature configs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Don't read the autosave data if multiple autosave headers presentKevin O'Connor2024-10-301-1/+6
| | | | | | Also, verify new autosave looks valid prior to writing it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Split configfile code into three separate classesKevin O'Connor2024-10-301-160/+203
| | | | | | | | | | | | Separate out the low-level parsing code to a new ConfigFileReader() class. Separate out the auto-save handling code to a new ConfigAutoSave() class. This simplifies the main PrinterConfig() class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Fix Benchmarks.md git revision referencesKevin O'Connor2024-10-281-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add Kconfig definition for SAME51N19 chipKevin O'Connor2024-10-281-2/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Remove references to manufacturers in KconfigKevin O'Connor2024-10-284-17/+17
| | | | | | | | Avoid referring to particular board manufacturers in "make menuconfig". This information becomes rapidly outdated and is sometimes viewed by competing manufacturers as being unfair. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Update Measuring_Resonances.md for some NumPY version issues (#6719)JamesH19782024-10-281-2/+10
| | | | | It has been noted over the last six to eight months that some versions of Numpy have issues with the klipper python environment on some machines. This PR introduces a fixed version that is known to work and a small test for people to do to make sure there are no output issues from the get go. These have been pulled from the pinned posts in the discord, from a time when 1.26 was causing issue, and now it seems v2 is also having some issues, hence the change. Signed-off-by: James Hartley <james@hartleyns.com>
* homing: Log a warning if probe alters stepper kinematic positionsKevin O'Connor2024-10-262-4/+16
| | | | | | | | | After a probe attempt the toolhead position needs to be recalculated to the position that the toolhead ultimately halted at. Check that the position setting wouldn't actually change the internal view of the stepper motor and log a warning if any skew is detected. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trsync: Don't require callers of trsync_do_trigger() to disable irqsKevin O'Connor2024-10-261-3/+6
| | | | | | | | | Disable irqs within trsync_do_trigger(). This fixes a bug in ldc1612 - as that code was calling trsync_do_trigger() without first disabling irqs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Improve timer vs task priority checkKevin O'Connor2024-10-266-11/+15
| | | | | | | | | | | | | | | Rename sched_tasks_busy() to sched_check_set_tasks_busy() and change it to only return true if tasks are active (running or requested) for two consecutive calls. This makes it less likely that timers will yield to tasks except when tasks really are notably backlogged. This also makes it less likely that multiple steppers controlling the same rail will be interrupted by tasks mid-step. This should slightly improve the timing, and make it less likely that a halt during homing/probing will occur with these steppers taking a different number of total steps. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Only warn about mcu clock frequency if drift is more than 1%Kevin O'Connor2024-10-261-1/+2
| | | | | | This reduces the chance of spurious MCU clock configuration warnings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>