Change the low-level probe code to return ProbeResult tuples from
probe_session.pull_probed_results(). Also update callers to use the
calculated bed_xyz values found in the tuple instead of calculating
them from the probe's xyz offsets.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Change the ProbePointsHelper class to return ProbeResult tuples.
Callers of this class are also updated so that they use the tuple's
bed_xyz parameters instead of manually calculating these values from
the probe xyz offsets.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Return the manual probe results in a named tuple containing (bed_x,
bed_y, bed_z, test_x, test_y, and test_z) components. For a manual
probe the test_xyz will always be equal to bed_xyz, but these
components may differ when using automated z probes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Previously a querycmd.send() request would silently hang if the code
is run in "file output" mode (that is, it is not communicating with a
real micro-controller). This behavior makes it hard to implement
regression tests and is generally confusing.
Change the code to respond with a dummy response (typically all zeros
and empty strings) instead.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit f04895f5 documented that "{printer.gcode_move.gcode_position}"
may contain more than 4 components, however the code was not actually
updated to export that additional information. (Commit ac6cab91 only
made the change to "homing_origin" and "position".)
Export the information in gcode_position as intended.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Most errors, aside from amplitude, should never happen.
Output them to the log to simplify later debugging.
Count them to aggregate error metrics.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
I2C error means we don't know the sensor status.
Force data output to the host and cancel homing.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
BTT Eddy uses 12MHz clock in frequency.
Coil is oscillating at 3+MHz.
Which is out of spec for LDC1612 sensors.
Division of coil frequency seems to reduce output noise.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
The event handler is registered with an incorrect event name, causing the handler to never be called.
Signed-off-by: Maksim Bolgov maksim8024@gmail.com
Currently, there is no way to adjust the calibration curve.
The existing z_offset infrastructure is not applicable
or disabled here.
To make it possible to fine tune calibration curve.
Reload Z_OFFSET helper for probe_eddy_current.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
It's possible for a motor disable request to occur while processing a
previous motor enable. Use a reactor mutex to ensure the two events
are processed serially.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>