Improve move cancellation

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
embedded-iot

Research direction

Start by locating the Python implementation of wait_until_stopped and the firmware code that handles it. Trace the current polling loop and move-blocking configuration before assessing the protocol changes needed. Done means the stop wait supports a timeout and moves can be non-blocking by default without the polling jitter described.

Written by the indexing model from the issue text.

Description

Currently, moves >5000 steps are done non-blocking. This is slightly inelegant, because it involves quite a few queries:

  • Disable blocking moves
  • Start the move
  • LOOP
    • Query if we're moving
    • Wait
  • Re-enable blocking moves

There's also jitter that will come from the Python code waiting in between polls.

A much more elegant way would be to add a timeout to wait_until_stopped (would require firmware update) so that we can long-poll it. I'd be pretty confident that this wouldn't affect the timings noticeably, so we could then make moves non-blocking by default.

Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from labthings/labthings-sangaboard

All issues in labthings/labthings-sangaboard

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.