-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub motor test fixes #9243
Sub motor test fixes #9243
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/Vehicle/Vehicle.cc
Outdated
sendMavCommand(_defaultComponentId, MAV_CMD_DO_MOTOR_TEST, true, motor, MOTOR_TEST_THROTTLE_PERCENT, percent, timeoutSecs, 0, MOTOR_TEST_ORDER_BOARD); | ||
// Sub requires periodic motortest messages, and we send them at a high rate to improve responsiveness. | ||
// On higher latency connection, `showError=true` caused lots of "Unable to send command: Waiting on previous response to same command." errors. | ||
bool showError = !sub(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct. This is an ArduSub problem not a "sub" problem isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. What do you think of just exposing showError on the signature void Vehicle::motorTest(int motor, int percent, int timeoutSecs, bool showError)
and letting qml decide it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, updated!
…with showErrors=false
bb7848d
to
16aac36
Compare
Stops the timer when it shouldn't be sending motor tests messages. This fixes some "motor test command failed" after user clicked the motor test toggle to stop the test/disarm, but the vehicle state in qgc hasn't received a disarmed heartbet yet
Disables showError for sub, fixing APM Sub: enabling motor test induces hundreds of mavlink command error popups #9234