weixin_39526185
weixin_39526185
2020-11-22 00:42

Change the name of the mavlink message.

In the latest version, the reception of RC channels with PX4 autopilot did not work. This commit repairs bad mavlink message name and adds support for more (18) channels. Tested with PX4

该提问来源于开源项目:dronekit/dronekit-python

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39526185 weixin_39526185 5月前

    Dear , I fixed the above bugs and added backward compatibility for old messages.

    点赞 评论 复制链接分享
  • weixin_39526185 weixin_39526185 5月前

    the new message also provides RSSI. I'm wondering if i should also add RSSI to this field to channels dictionary.

    点赞 评论 复制链接分享
  • weixin_39776239 weixin_39776239 5月前

    -dvorak tests need to pass.

    You can run the failing one with nosetests -v -v ./dronekit/test/sitl/test_channels.py

    This patch seems to be required:

    
    --- a/dronekit/__init__.py
    +++ b/dronekit/__init__.py
    @@ -1142,8 +1142,7 @@ class Vehicle(HasObservers):
             # All keys are strings.
             self._channels = Channels(self, 8)
    
    -        .on_message('RC_CHANNELS_RAW')
    -        .on_message('RC_CHANNELS')
    +        .on_message(['RC_CHANNELS', 'RC_CHANNELS_RAW'])
             def listener(self, name, m):
    

    ... and past that there's an assertion on the number of channels...

    点赞 评论 复制链接分享
  • weixin_39526185 weixin_39526185 5月前

    Are any further edits required for this pull request?

    点赞 评论 复制链接分享
  • weixin_39776239 weixin_39776239 5月前

    -dvorak Merged, thanks!

    点赞 评论 复制链接分享

相关推荐