{"action":"closed","issue":{"url":"https://api.github.com/repos/diydrones/dronekit-python/issues/78","labels_url":"https://api.github.com/repos/diydrones/dronekit-python/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/diydrones/dronekit-python/issues/78/comments","events_url":"https://api.github.com/repos/diydrones/dronekit-python/issues/78/events","html_url":"https://github.com/diydrones/dronekit-python/issues/78","id":73490760,"number":78,"title":"Vehicle parameter update observer not called, possibly due to timeout","user":{"login":"hamishwillee","id":5368500,"avatar_url":"https://avatars.githubusercontent.com/u/5368500?v=3","gravatar_id":"","url":"https://api.github.com/users/hamishwillee","html_url":"https://github.com/hamishwillee","followers_url":"https://api.github.com/users/hamishwillee/followers","following_url":"https://api.github.com/users/hamishwillee/following{/other_user}","gists_url":"https://api.github.com/users/hamishwillee/gists{/gist_id}","starred_url":"https://api.github.com/users/hamishwillee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamishwillee/subscriptions","organizations_url":"https://api.github.com/users/hamishwillee/orgs","repos_url":"https://api.github.com/users/hamishwillee/repos","events_url":"https://api.github.com/users/hamishwillee/events{/privacy}","received_events_url":"https://api.github.com/users/hamishwillee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/diydrones/dronekit-python/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"mrpollo","id":317648,"avatar_url":"https://avatars.githubusercontent.com/u/317648?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpollo","html_url":"https://github.com/mrpollo","followers_url":"https://api.github.com/users/mrpollo/followers","following_url":"https://api.github.com/users/mrpollo/following{/other_user}","gists_url":"https://api.github.com/users/mrpollo/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpollo/subscriptions","organizations_url":"https://api.github.com/users/mrpollo/orgs","repos_url":"https://api.github.com/users/mrpollo/repos","events_url":"https://api.github.com/users/mrpollo/events{/privacy}","received_events_url":"https://api.github.com/users/mrpollo/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-05-06T02:19:38Z","updated_at":"2015-05-07T01:36:50Z","closed_at":"2015-05-07T01:36:50Z","body":"I am try to observe a change made to a Vehicle.parameter value. The test code at the bottom of this comment registers an observer on THR_MIN. It then reads the value and attempts to change it. The code then writes a different value, sleeps 5 seconds, then prints it again.\r\n\r\nIn all cases, the console reports a timeout setting the parameter. However when the value is next printed it matches the new setting. At no time is the parameter observer called:\r\n```\r\napi start /vagrant/small_demo.py\r\nAUTO> Param THR_MIN: 200.0\r\ntimeout setting THR_MIN to 50.000000\r\nParam: 50.0\r\n```\r\n\r\n@mrpollo Please tell me how to extend the timeout so I can test the parameter observer (and extend it in the API if that is what your investigations reveal)\r\n\r\n```\r\nimport time\r\n\r\n# First get an instance of the API endpoint\r\napi = local_connect()\r\n# get our vehicle - when running with mavproxy it only knows about one vehicle (for now)\r\nv = api.get_vehicles()[0]\r\n\r\n\r\ndef thin_callback(attribute):\r\n    print \"CALLBACK changed: \", v.parameters['THR_MIN']\r\n\t\r\nv.add_attribute_observer('THR_MIN', thin_callback)\r\n\r\n# Print the value of the THR_MIN parameter.\r\nprint \"Param THR_MIN: %s\" % v.parameters['THR_MIN']\r\n\r\n# Change the parameter value to something different.\r\nv.parameters['THR_MIN']=50\r\nv.flush()\r\n\r\n# Print the value of the THR_MIN parameter a bit later\r\nprint \"Param: %s\" % v.parameters['THR_MIN']\r\n\r\n# Change the parameter value to something different.\r\nv.parameters['THR_MIN']=100\r\nprint \"sleeping ...\"\r\ntime.sleep(5)\r\nprint \"awake ...\"\r\nv.flush()\r\nprint \"Param: %s\" % v.parameters['THR_MIN']\r\n\r\n\r\n# Change the parameter value to something different.\r\nv.parameters['THR_MIN']=200\r\nv.flush()\r\nprint \"Param: %s\" % v.parameters['THR_MIN']\r\n```"}}