Skip to content

Timeout error when setting a parameter #12

Closed

Description

@wsilva32

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.

Activity

  1. themfx commented on Jan 23, 2015

    @themfx

    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.

  2. hamishwillee commented on May 6, 2015

    @hamishwillee
    Contributor

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

  3. assigned and unassigned on Jul 8, 2015
  4. modified the milestones: , v2.0.0 on Jul 8, 2015
  5. tcr3dr commented on Jul 9, 2015

    @tcr3dr
    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.

  6. tcr3dr commented on Jul 14, 2015

    @tcr3dr
    Contributor

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

  7. added a commit that references this issue on Oct 14, 2015
    cbfd2c9
  8. hamishwillee commented on Oct 15, 2015

    @hamishwillee
    Contributor

    This is fixed in DKPY2 - tested on 2.0.0b5

  9. added a commit that references this issue on Oct 15, 2015
    6447c7f
  10. added a commit that references this issue on Oct 20, 2015
    a12897b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions