Add a function that returns the minimum amount of time the host needs
to reserve for messages to be sent from host to micro-controller.
Add a function that returns the maximum amount of time (in seconds)
that all micro-controllers should be able to schedule future timers
at.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Separate homing operations (as called from probe:z_virtual_endstop)
from the normal probe command handling.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use the normal probe_session_start(), run_probe(),
pull_probed_results(), and end_probe_session() API from
ProbeSessionHelper. This removes the custom probing_move() callback.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the HomingViaProbeHelper() instance from ProbeSessionHelper to a
new ProbeEndstopSessionHelper class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Currently, `MANUAL_STEPPER STOP_ON_ENDSTOP=1` type commands will move
until hitting the endstop, but it will still always consume the total
amount of move time. That is, following moves can't be started until
the total possible time of the homing move is completed.
Implement "drip moves" so that the code only schedules the movement in
small segments. This allows following movements to be scheduled
without a significant delay.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Implement move checking and trapq loading directly from drip_move().
This simplifies the interactions between these components.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Avoid lookahead.flush() calling back into toolhead._process_moves().
Instead, rename toolhead._process_moves() to
toolhead._process_lookahead(), have it call lookahead.flush(), and
consistently use it when flushing the lookahead queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
`hall_filament_width_sensor` contains a runout sensor object internally.
This exposes those values in the API status result.
```
SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","filament_detected","is_active","Diameter","Raw"]}}}
GOT: b'{"id":123,"result":{"eventtime":199567.823596603,"status":{"hall_filament_width_sensor":{"enabled":true,"filament_detected":true,"is_active":true,"Diameter":1.9499999999999986,"Raw":6113}}}}'
```
The duplication of `is_active` and `enabled` seems confusing, but both
of these can be independently manipulated by GCode:
```
SEND: {"id":123,"method":"gcode/script","params":{"script":"DISABLE_FILAMENT_WIDTH_SENSOR"}}
GOT: b'{"id":123,"result":{}}'
SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}}
GOT: b'{"id":123,"result":{"eventtime":199770.446013297,"status":{"hall_filament_width_sensor":{"enabled":true,"is_active":false}}}}'
SEND: {"id":123,"method":"gcode/script","params":{"script":"SET_FILAMENT_SENSOR SENSOR=hall_filament_width_sensor ENABLE=0"}}
GOT: b'{"id":123,"result":{}}'
SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}}
GOT: b'{"id":123,"result":{"eventtime":199847.927726196,"status":{"hall_filament_width_sensor":{"enabled":false,"is_active":false}}}}'
```
Signed-off-by: Russell Cloran <rcloran@gmail.com>
Commit 70838797 added support for clearing the homing state in
SET_KINEMATIC_POSITION commands. However, it can be difficult to use
that support as the default for SET_KINEMATIC_POSITION is to set all
axes as homed.
Add a new SET_HOMED parameter to allow one to explicitly request which
axes to consider in a homed state.
Also introduce a CLEAR_HOMED parameter and prefer that to the existing
CLEAR parameter.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The output_pin template code has a cache to speed up duplicate
rendering of templates. However, this cache doesn't work if one of
the parameters is a Python list or dictionary. Just disable the cache
in this case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
You can use the 40Mhz crystal oscillator recommended by TI official manual to get the best performance.
refer to: [ldc1612.pdf](https://www.ti.com/cn/lit/ds/symlink/ldc1612.pdf) 7.3.4
Signed-off-by: Xiaokui Zhao <xiaok@zxkxzk.cn>
Add support for "step on both edges" to the main stepper_event_full()
code. This makes that mode of operation available even when the
micro-controller is not compiled for "optimized step on both edges".
It also enables the custom pulse duration support (step_pulse_ticks)
when in "step on both edges" mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Add gram scale features to load_cell
* Convert sensor counts to grams and make this available via unix socket and object status
* Basic GCodes for tearing and reading the load cell
* Guided Calibration
* Diagnostic gcode to check the health of the load cell
* Update load_cell Documentation
* Add API server load_cell/dump_force endpoint
* Update [load_cell] config with calibration fields
* Add G-Code commands for working with load cells
* Add status reference for load_cell objects
Signed-off-by: Gareth Farrington <gareth@waves.ky>
Restores the behavior before #6739 since people seemed to rely on it,
even if the math is not exact.
Signed-off-by: Philippe Daouadi <philippe@ud2.org>
With the introduction of "scanning" probes it has
become common for configurations to generate a large
number of points. This can overwhelm both the log and
the pty when new points are generated.
This patch limits the initial points logged to 50. In
addition points are no longer logged or pushed over
the pty when the mesh configuration changes.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the low-level canbus stops working then it could become impossible
to send messages to and from the canbus bridge node itself. This can
make it difficult to diagnose canbus problems.
Change the canbus bridge code to detect if message transmits become
stalled for 50+ milliseconds and go into a "discarding" state. In
this discarding state, messages destined for the canbus will be
discarded until the canbus becomes active again. In this discarding
state it will therefore be possible to transmit messages to and from
the canbus bridge node.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>