Skip to content

ZMQ Example: ensure the ramp.c script sends zero thrust after script finishes#737

Merged
evoggy merged 1 commit intobitcraze:masterfrom
logdog:patch-1
Feb 18, 2025
Merged

ZMQ Example: ensure the ramp.c script sends zero thrust after script finishes#737
evoggy merged 1 commit intobitcraze:masterfrom
logdog:patch-1

Conversation

@logdog
Copy link
Copy Markdown
Contributor

@logdog logdog commented Feb 5, 2025

Problem Statement

The ramp.c script was not sending zero thrust as intended after ramping up from 0 to 30% thrust value. As a result, when I ran the example script with my crazyflie bolt 1.1, the motors were left running at 30% thrust after the script had exited.

Solution

Ensure that the sprintf has a float as input (instead of an integer) and then add the fflush and sleep statements to ensure the message is properly sent to zmq before being closed. I verified this solution worked as intended on my crazyflie bolt 1.1

Copy link
Copy Markdown
Member

@evoggy evoggy left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the fix!

@evoggy evoggy merged commit 98e00ff into bitcraze:master Feb 18, 2025
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.

2 participants