Commit Graph

3317 Commits

Author SHA1 Message Date
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
Kevin O'Connor 1cdf0d474d sensor_adxl345: Remove unused stop_time parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:18:59 -04:00
Kevin O'Connor 09bc207189 graph_accelerometer: Add tool to graph accelerometer results
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:11:04 -04:00
Kevin O'Connor 3405095f0a adxl345: Add support for adxl345 accelerometer
Add support for taking measurements from an adxl345 accelerometer via
SPI interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-05 09:11:04 -04:00
Kevin O'Connor 2b2b610cff uc1701: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 22:29:55 -04:00
Kevin O'Connor d69a496b83 hd44780: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 22:14:06 -04:00
Kevin O'Connor c3e9999e0c docs: Update OctoPrint and OctoPi versions in Installation.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 21:24:26 -04:00
Kevin O'Connor 166ce06aea buttons: Improve python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 19:33:04 -04:00
Kevin O'Connor 5cce7f4d55 pid_calibrate: Update for improved python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 19:30:18 -04:00
Vladimir Serov 9406baf40b config: fixed update file extension for TronXY X5SA
Signed-off-by: Vladimir Serov <me@cab404.ru>
2020-09-04 19:28:48 -04:00
Kevin O'Connor 3bcb6970f5 probe: Make sure z is homed before probing
Warn if the Z axis is not homed before attempting to probe.  This
improves the error message.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 15:47:52 -04:00
Kevin O'Connor 08adecd226 homing: Prefer printer.command_error() instead of homing.CommandError()
Update callers to use the printer.command_error reference instead of
directly using homing.CommandError() when raising or catching errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 12:10:36 -04:00
Kevin O'Connor f6dd97b784 homing: Remove EndstopError
There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 11:41:57 -04:00