Add optimized gpio functions for stm32h7 - caching the ODR register
can notably improve the performance of the gpio_out_toggle() code.
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>
gpio reset calls are heavy.
gpio state are persistent between calls.
Drop useless calls.
Avoid calls if SDA does not changed.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
On fast MCU software spi may violate maximally supported by TMC driver rate.
Add dynamic limits to overcome that.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This reverts commit 8087200ffe2fbbe62265dd480ce8be67db8349eb.
The change can break the build on some versions of gcc.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support setting individual options instead of one global option (
WANT_BUTTONS, WANT_TMCUART, WANT_NEOPIXEL, WANT_PULSE_COUNTER,
WANT_HX71X).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This option seems to be confusing ld's region usage checks (builds
that could fit in small chips are being reported as not fitting). The
option was disabled back in commit 4e8674d5 because it showed worse
results. However, recent versions of gcc seem to produce the same
results even if this option is enabled, so change the build to avoid
disabling that option on newer versions of gcc (those that have the
-ffat-lto-objects option - which is needed to ensure
compile_time_requests sections can be extracted with objcopy).
The PRU build is dependent on -fuse-linker-plugin, so enable that
option explicitly in its build.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>