A misplaced sensor or a misconfigured one
can return unreliable results.
Assist with this by refusing to use the too noisy points.
Filter noisy points by the frequency difference to noise ratio.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Arriving of SW PWM out of sync
can cause pulse width distortion - make them longer
Synchronize the update clock to avoid that
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This also enables arbitrary using names for primary carriages
with generic_cartesian kinematics.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* Do not recommend ZV shaper by default if possible
* Try to find more optimal shaper out of more aggressive ones
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Update the "position" status to include extra axes. Export a new
"extra_axes" value that describes the class associated with each
component of the coordinate.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Change "homing_origin" and "position" to support more than 4
components. Export a new "axis_map" value to describe the contents at
each component index.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of passing arguments as parameters, pass them as a list (or
tuple). This simplifies the callers and makes it easier to pass
additional parameters.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This is the only user of the i2c_write inside the init
compatibility layer, so remove it as well.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Update functions could be called within the flush/lookahead context
If the update function internally does pause()
That would lead to the unpredictable execution of time-critical functions
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
It is not valid to pause in the klippy:ready callback, so perform the
sensor startup process in a separate reactor task.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Determine which mcu raised the shutdown from the shutdown details
report. Also, pass shutdown_clock via that details report.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move reactor debugging info from main klippy.py code to error_mcu code
for improved exception handling.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename the event to make it a little more clear what it is intended
for. Also, check for an exception in each event handler.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Step timing is reset when stepper.set_position() is called. Detect
that case and ensure future steps after set_position start on a new
block. This simplifies the timing for users of the data.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that trapq_extract_old() can return upcoming moves, it's possible
for homing to cause confusing results (as these moves can end early).
Avoid this by delaying query responses until after homing completes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow the step compress code to perform regular step+dir+step
filtering even during probing and homing actions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Currently, the LEDHelper() and GCodeRequestQueue() helper classes
require that their callbacks do not block. As a result, the pca9533,
pca9632, and sx1509 devices need to use non-blocking i2c write calls.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Numerically optimized versions of *EI shapers have been tuned
for specific ranges of damping ratios and will show poor stability
outside of these designated ranges.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Implement step generation from 'struct syncemitter' instead of in the
stepcompress code. This simplifies the stepcompress code and
simplifies the overall interface.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move msg_queue allocation from stepcompress to syncemitter. With this
change the pwm_tool module does not need to allocate a stepcompress
object.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Create a new 'struct syncemitter' for each object that can generate
messages for a 'struct steppersync' and store in a regular linked
list.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>