Commit Graph

3379 Commits

Author SHA1 Message Date
uncholowapo 1651b18aea
config: Update generic-bigtreetech-skr-v1.4.cfg (#3419)
Corrected the diag1_pin numbers. Useful for anyone copying and pasting the lines. Its something really easy to look over and can lead to some hair pulling from the time wasted trying to troubleshoot why the tmc diag pin error from Klipper.

Signed-off-by: Juan Moreno <uncholowapo@gmail.com>
2020-10-11 19:22:23 -04:00
bondus 387fceb453 stm32: Fixed CAN bus for STM32F4, there were syntax errors that prevented compilation
Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
2020-10-11 11:24:05 -04:00
Kevin O'Connor 27249dc709 mcu: Increase the time to reset a pwm pin during startup
Some RPi0 users were reporting "timer too close" errors due to pwm pin
resets - increase the time the host has to complete the startup to
avoid this.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-11 11:14:32 -04:00
Kevin O'Connor d317793171 bltouch: Add an extra 200ms delay to the initialization process
On a reset, the mcu.py code may have sent an initialization message to
the bltouch, which needs time to complete.  Add additional time during
the bltouch setup to avoid a race with these two times.  This avoids
some "timer too close" errors that users of fast host machines were
reporting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-11 11:14:32 -04:00
Kevin O'Connor 930317fa2a thermistor: Add support for the board thermistor on the Einsy Rambo
Add in support for the "TDK NTCG104LH104JT1" thermistor.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-08 15:25:09 -04:00
Kevin O'Connor d9af6129ea config: Note TMC drivers specify current in RMS in example-extras.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-10-07 10:56:30 -04:00
Kevin O'Connor 0bf0cb5b54 config: Add a generic-creality-v4.2.7.cfg example config
Reported by @Feche and @yjh0502 .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-29 12:00:09 -04:00
jhpadjustable 48b30e0f5a
display_status: fix M117 checksum trimming (#3377)
The M117 command parser discards the last character of the message
whenever the M117 command does not begin the line and there is no *xx
checksum, e.g.
  N0 M117 Look at me
causes the banner area of the printer screen to display "Look at m".
This patch only trims the checksum when one is found to trim.

Signed-Off-By: Jonathan Pickard <jhp@adjustablelabs.info>
2020-09-28 10:11:05 -04:00
Eric Callahan a8e3afd64a
configfile: report "save_config_pending" via get_status() (#3372)
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-28 00:05:55 -04:00
Kevin O'Connor 4d0d219716 mcu: Fix set_pwm() for hard pwm
Must use self._pwm_max to calculate range for hard pwm updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-27 18:09:53 -04:00
Kevin O'Connor 55e20f2c19 mcu: Add support for changing cycle_time in set_pwm()
Signed-off-by: Guy Shapira <gayuha@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:55:56 -04:00
Guy Shapira 27cefb2b38 gpiocmds: Add soft-pwm frequency modulation support
Signed-off-by: Guy Shapira <gayuha@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:51:38 -04:00
Guy Shapira a79c57ab29 test: Add pwm tests
Signed-off-by: Guy Shapira <gayuha@gmail.com>
2020-09-26 20:26:44 -04:00
Kevin O'Connor 04f9f1b44e chelper: Add missing serialqueue_set_receive_window() def to serialqueue.h
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:15:33 -04:00
Kevin O'Connor 04b822c3aa chelper: Use standard C type definition for pyhelper_logging_callback
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:15:21 -04:00
Kevin O'Connor 73b78af6b2 chelper: Rework check for building C code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-26 20:15:10 -04:00
Kevin O'Connor 08eec0da86 config: Use "restart_method: command" in example stm32f103 ender3 configs
Reported by @jasonttech.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-22 11:12:38 -04:00
Florian Heilmann b8bafcf0ed sample-macros.cfg: Fix action_respond_info
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-09-21 10:58:27 -04:00
Florian Heilmann 3a854cacd1 sample-raspberry-pi.cfg: Fix action_respond_info
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-09-21 10:58:27 -04:00
Kevin O'Connor ad0b76bd4b delta_calibrate: Don't error on an invalid kinematic guess
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 22:41:13 -04:00
Kevin O'Connor 6bba285f8e gcode: Don't log debugging output for unknown commands if command is blank
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 21:46:00 -04:00
Kevin O'Connor 4c14063404 heaters: Disable unused pwm output debugging info
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 02:06:20 -04:00
Kevin O'Connor 1af4a4ae9f reactor: Record time of recent gc collection sweeps
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-17 02:06:20 -04:00
Kevin O'Connor cd23c95760 display: Remove circular references from intermediate context object
Explicilty clear the local context object so that it does not require
a gc sweep to free it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor cb0a8f2ed9 reactor: Add support for explicit Python garbage collection
Add support for performing Python gc work only from the main reactor
thread and only when it appears the main thread is idle.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 73cd8c241c klippy: Call gc.collect() on a "restart" request
Explicitly run the python garbage collector on a restart.  This cleans
up memory from the previous session.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 7d83aed410 reactor: Terminate any greenlets on finalize() call
Make sure to terminate any greenlets that are in a pause() state.
This is necessary to ensure the reactor can be deallocated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 760a0f8df5 reactor: Add explicit finalize() method to clean up reactor state
The existence of a __del__() method prevents deallocation on python2
if there are circular references.  Replace the __del__() method with a
new finalize() call and arrange for it to be called when the main
reactor is released.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor a3fa11ffd4 serialhdl: Setup for serialqueue_free to be automatically called
Use ffi_main.gc() to automatically free the C serialqueue object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 3dc0522870 serialhdl: Don't define a __del__() method
The existence of a __del__() method prevents deallocation on python2
if there are circular references.  Just remove the method as
disconnect() should already be called directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 9814daa999 mcu: Setup for steppersync_free to be automatically called
Use ffi_main.gc() to automatically free the C steppersync object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 2447025fa6 mcu: Don't define a __del__() method
The existence of a __del__() method prevents deallocation on python2
if there are circular references.  Just remove the method as
disconnect() should already be called directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor 3efb424d66 graphstats: Add support for graphing system load
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 21:35:09 -04:00
Kevin O'Connor 1208ec1f52 avrsim: Minor changes so avrsim can run on both Python2 and Python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 12:05:26 -04:00
Arksine 3ac636b33e docs: document additions to BED_MESH_CALIBRATE
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 7ba1a2a749 bed_mesh: add mesh parameters to BED_MESH_CALIBRATE
This allows the generated points to be modified prior to probing the bed.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 9e68105b74 probe: add update_probe_points() method to helper
This allows the consumers of the ProbePoints helper to be reconfigured at runtime.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 6e77fd27cd bed_mesh: move algorithm verification to its own method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Arksine 98931789d8 bed_mesh: move mesh area configuration to _init_mesh_config
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-09-15 20:36:55 -04:00
Kevin O'Connor a92d995727 chelper: Set compiler flags to never use "x387" floating point math
The default on X86 32bit machines is to use 80bit floating point math
(as found in the ancient "387 coprocessor").  This can cause numerical
stability problems.  Set the compiler flags to make sure the newer SSE
math is always used on X86.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-15 17:12:53 -04:00
Dmitry Butyugin 054762da3d avrsim: migrated to Python 3
Note that the latest simulavr 1.1.0 does not support Python 2 anymore.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2020-09-13 11:08:46 -04:00
Kevin O'Connor 063f9a2c02 docs: Fix "QUERY_STATUS" typo in Command_Templates.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 23:11:24 -04:00
Paul McGowan 5a2f406fd1
probe: add get_status wrapper to probe for last_query from query_probe command (#3296)
Add get_status wrapper with last_query status for macros  It is sometimes useful to determine the state of the probe from a macro. If the probe is connected to an endstop pin, the results can be obtained via QUERY_ENDSTOPS but if a physical endstop is in use in addition to the probe the probe state cannot be obtained. This change allows one to use QUERY_PROBE  and then access the printer.probe.last_query object to obtain the state.

Signed-off-by: Paul McGowan <mental405@gmail.com>
2020-09-09 23:10:35 -04:00
rjpatawaran c7ea4b89c9
uc1701: Add x_offset (Used to add horizontal offset on SSD1306/SH1106 displays) (#3284)
Signed-off-by: RJ Patawaran <rjpatawaran@me.com>
2020-09-09 23:07:40 -04:00
Kevin O'Connor 1f5848fc1a adc_scaled: Add support for Duet2 Maestro "vref monitoring"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 22:20:54 -04:00
Kevin O'Connor 9b2816477b graph_temp_sensor: Add support for graphing sensor resistance
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 17:14:09 -04:00
Kevin O'Connor fc85675145 gcode_button: Add support for analog buttons
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 14:21:30 -04:00
Kevin O'Connor 13ee6032ae mcu: Use schedule_pwm_out instead of set_pwm_out on a restart
Some mcu implementations don't like it when the pwm pin is configured
twice, so use the normal schedule_pwm_out implementation to update on
a restart.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-09 13:16:02 -04:00
Kevin O'Connor 9197975625 docs: Note that FORCE_MOVE can lead to "No next step" errors in G-Codes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-08 10:18:28 -04:00
Kevin O'Connor c285f8b6cf klippy: Improve handling of reactor.run() exceptions
Try to invoke a shutdown on an unhandled exception from reactor.run().
If that fails, try to do a clean exit.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-06 12:45:27 -04:00