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

Timeout error when setting a parameter #12

Closed
wsilva32 opened this Issue Oct 20, 2014 · 5 comments

Comments

Projects
None yet
5 participants
@wsilva32
Collaborator

wsilva32 commented Oct 20, 2014

When I try to set a parameter (for example RC1_TRIM) in my python script I receive the following message after a 2 second delay:

timeout setting RC1_TRIM to 1500.000000

However, when I check the value in MAVProxy the value has been set correctly. I found that this message is generated by mavset() in mavparm.py in pymavlink, so perhaps it is a bug there. For now I have commented out these lines (24-35) in mavparm.py to avoid having to wait 2 seconds for each parameter set.

@themfx

This comment has been minimized.

Show comment
Hide comment
@themfx

themfx Jan 23, 2015

Hi, I'm having the same issue at the moment. Did you have any luck solving it?

I am trying to limit the throttle (using v.parameter['THR_MAX'] = 0). This gives the same timeout error as you've written, although it does actually change THR_MAX to 0. However, future identical commands do not work (e.g. setting THR_MAX back to 100) - the code just hangs when you ask it to make the change.

themfx commented Jan 23, 2015

Hi, I'm having the same issue at the moment. Did you have any luck solving it?

I am trying to limit the throttle (using v.parameter['THR_MAX'] = 0). This gives the same timeout error as you've written, although it does actually change THR_MAX to 0. However, future identical commands do not work (e.g. setting THR_MAX back to 100) - the code just hangs when you ask it to make the change.

@hamishwillee

This comment has been minimized.

Show comment
Hide comment
@hamishwillee

hamishwillee May 6, 2015

Contributor

@mrpollo I am assigning this to you. I detected the same problem when attempting to get parameter-change notification in #78

Contributor

hamishwillee commented May 6, 2015

@mrpollo I am assigning this to you. I detected the same problem when attempting to get parameter-change notification in #78

@mrpollo mrpollo assigned tcr3dr and unassigned mrpollo Jul 8, 2015

@tcr3dr tcr3dr modified the milestones: v1.3.2, v2.0.0 Jul 8, 2015

@tcr3dr

This comment has been minimized.

Show comment
Hide comment
@tcr3dr

tcr3dr Jul 9, 2015

Contributor

I investigated the issue. I'm almost positive this is caused by race conditions caused by threading. Spin-waiting on two separate threads for parameter confirmation causes a lot of "BAD DATA" messages to pop out nondeterministically.

A fix for this is targeted for the next major DKPY release, which should fix our threading situation.

Contributor

tcr3dr commented Jul 9, 2015

I investigated the issue. I'm almost positive this is caused by race conditions caused by threading. Spin-waiting on two separate threads for parameter confirmation causes a lot of "BAD DATA" messages to pop out nondeterministically.

A fix for this is targeted for the next major DKPY release, which should fix our threading situation.

@tcr3dr

This comment has been minimized.

Show comment
Hide comment
@tcr3dr

tcr3dr Jul 14, 2015

Contributor

Once this is fixed, test_12.py should be improved with the relevant asserts.

Contributor

tcr3dr commented Jul 14, 2015

Once this is fixed, test_12.py should be improved with the relevant asserts.

@hamishwillee

This comment has been minimized.

Show comment
Hide comment
@hamishwillee

hamishwillee Oct 15, 2015

Contributor

This is fixed in DKPY2 - tested on 2.0.0b5

Contributor

hamishwillee commented Oct 15, 2015

This is fixed in DKPY2 - tested on 2.0.0b5

@tcr3dr tcr3dr closed this in 6447c7f Oct 20, 2015

tcr3dr added a commit that referenced this issue Oct 20, 2015

Merge pull request #345 from dronekit/tcr-test12time
Tests that parameter setting is less than 1s. Closes #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment