Skip to content

Adding HardSpinner class#23

Open
jviereck wants to merge 1 commit into
masterfrom
jviereck/hard_spinner
Open

Adding HardSpinner class#23
jviereck wants to merge 1 commit into
masterfrom
jviereck/hard_spinner

Conversation

@jviereck

Copy link
Copy Markdown
Contributor

Adds another spinner class. This one is similar to the Spinner class. However, it counts the work done into the time budget when computing the time to sleep. In a picture

     Spinner:     |-----1 ms-----| |-work-| |-----1 ms-----| |-work-|
     HardSpinner: |-|-work-|-----| |-|-work-|-----| |-|-work-|-----|

Comment thread src/hard_spinner.cpp

void HardSpinner::spin()
{
Timer::sleep_until_sec(next_date_sec_);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problem:
is 3 tics are missed this method does sleep for 3 times which in a control loop means sending 3 commands without sleeping. Which might mean a robot communication break down.

@MaximilienNaveau

Copy link
Copy Markdown
Collaborator

@jviereck do you want to finish this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants