Upstream sync - #439
Open
VIXIVIXIV wants to merge 45 commits into
Open
Conversation
Update the github workflow lock-threads action in hope that it will fix run failure reports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
STM32H750 only has 128kb of storage so the STM32H7 typical offset of 128kb would be too large, I added it to the 32kb bootloader selections. Signed-off-by: Bill Horan <whoran83@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Bill Horan <whoran83@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Some SD cards will fail to initialize at the 400KHz clock documented in the official specification. Add a "fast speed" option that runs at 4MHz. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Also remove unused "utils" import. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Move the low-level least squares math to a new TapBestFit class and add additional code comments. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The CRC helper took a 16-bit integer and split it into bytes with a _split_bytes() helper based on bit_length(). When the high byte was zero (a common case for in-range temperature and humidity readings) bit_length() reported 8 bits or fewer, so _split_bytes() returned a single byte and the CRC was computed over one byte instead of the two the sensor checksums. The computed CRC then mismatched the sensor's and the reading was logged as a checksum error. Replace the variable-length split with a fixed two-byte split so the checksum is always computed over the full two-byte value, matching the SHT3x datasheet. This also drops the now-unused _split_bytes() helper. Signed-off-by: Kevin Blackburn-Matzen <kmatzen@gmail.com>
The 'z_thermal_adjust' config section example was named and had a maximum deviation property missing. Signed-off-by: Frank Roth <developer@freakydu.de>
Reported by @Old-Ding . Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a slower GENERIC_03H stage2 flash clock option for boards that are unstable with the existing GENERIC_03H CLKDIV 4 setting. Signed-off-by: Orken Koshken <orkenkoshken@gmail.com>
Add CAN serial and USB-to-CAN bridge support on LPC176x chips, including selectable CAN1/CAN2 pin mappings. Signed-off-by: Orken Koshken <orkenkoshken@gmail.com>
Signed-off-by: 丁俊林 <ai.neo.ae86@gmail.com>
Reported by @Old-Ding. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Fix a typo causing the rounding validation check to not actually be run. Reported by @Old-Ding. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This enables the options to reduce code size during "make menuconfig". Reported by @qpzm1258. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The clock 32bit conversion code is distinct from the clock to time conversion code. It is also only needed in the trdispatch.c code, which can calculate a sufficient value for last_clock on its own. This simplifies the serialqueue code. It also reduces the chance of a failure in the trdispatch code if last_clock isn't explicitly updated. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When the generated test sequence ends with a nonzero velocity (which happens whenever a sweeping test is used, e.g. SWEEPING_PERIOD > 0; plain vibration pulses always return to zero), the deceleration-to-stop move computed its distance from last_v2, which by that point holds the velocity from the start of the *previous* segment, not the final one: inside the loop last_v2 is assigned before last_v is updated to the new value. For a test ending at 8.7 mm/s this used 28.2 mm/s instead, about 10x too far. The distance was also unconditionally negative (-.5 * last_v2 / old_max_accel, with last_v2 >= 0 and old_max_accel > 0), i.e. opposite to the direction of motion whenever the final velocity was positive. The in-loop direction-change deceleration a few lines above computes its distance correctly, with the sign taken from the signed segment acceleration. Compute the distance from the actual final velocity instead, signed to continue in the current direction of motion. Signed-off-by: Åsmund Collin <aakjaergaard@gmail.com>
- _parse_axis's arbitrary-direction parsing (AXIS=dx,dy[,dz]) used a bare except around the float() calls, which also swallows unrelated errors (e.g. a bug in a future change) and reports them as a parse error. Narrow it to ValueError, the only exception float() raises on bad input. - MEASURE_AXES_NOISE's MEAS_TIME accepted zero or negative values, which reach toolhead.dwell() and either do nothing or raise a less helpful error further down. Require MEAS_TIME > 0, matching the validation already used for the equivalent parameters elsewhere in this module (e.g. FREQ_START, HZ_PER_SEC). Signed-off-by: Åsmund Collin <aakjaergaard@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Shutdown hook tries to reread the previous and next bytes With upcoming non-blocking reads that will cause a pause in the handler A pause in the handler is forbidden to avoid race conditions. Save the current state to locals and print output later Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Allow to wrap the file with the AIO wrapper Which will pause greenlet upon blocking calls like read/write Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Use threads over underline RawIO Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
The executor is stopped from a "klippy:disconnect" handler, which runs after reactor.run() has returned. Any submit() after that point waits on a completion that nobody can complete - reactor.pause() falls back to a system sleep until NEVER and raises an OverflowError. This is reached by the finalizers of a wrapped file object that is left open at shutdown: the proxied close() ends up in submit() and fails. Perform the call directly when the executor thread is gone. Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
Break up the _handle_clock() function into multiple functions. This is intended to make it more clear there are several distinct processes that _handle_clock() implements (64bit clock conversion, sent_time/clock regression, serialqueue release handling, round-trip-time tracking, and multi-mcu synchronization). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
With METHOD=rapid_scan, if the command got interrupted We have scheduled lookahead callbacks and _gather session is removed at the same time That can end up with access to _gather = None In _rapid_lookahead_cb() Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Introduce a new _check_fd_activity() method and add it to SelectReactor, PollReacator, and EPollReactor. This avoids needing to duplicate _dispatch_loop() in each of those variants. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support setting a callback just prior to the reactor invoking a select() call that will sleep. Move the Python garbage collection code from the main reactor.py and klippy.py code to the garbage_collection.py module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support to the reactor for reporting if a set of callbacks take a long time before returning to the main reactor loop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
…imers The internal reactor code uses internal timers for callbacks and to resume "pause" operations. Support reporting the underlying callback from these timers during high latency reports. This should make the high latency debugging reports more useful. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a start_busy_time parameter to the idle notifier. This makes it possible for the idle notifier to track how long it takes for the reactor to clear all pending events. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When performing batch mode debugging it is possible for the input file to complete before all background work has completed. Add a new 'gcode:debuginput_exit' event so that other modules can signal when they have finished. Add code to virtual_sdcard module to catch this event and use it to wait for any sdcard processing to complete. This fixes the sdcard_loop.test regression test case. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This covers files in the dirs without tracked files: klippy/extras/custom/custom.py Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This covers the case: klippy/extras/custom -> <other directory> Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
The abs() function on AVR only handles 16-bit integers. Implement it manually. Reported by @kmatzen. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit cab2f00 introduced a "statement after label" which some versions of gcc don't like. Add a semicolon to fix it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.