Dear , I fixed the above bugs and added backward compatibility for old messages.
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/dronekitpython
 点赞
 写回答
 关注问题
 收藏
 复制链接分享
 邀请回答
5条回答

采纳
点赞 评论 复制链接分享

采纳
the new message also provides RSSI. I'm wondering if i should also add RSSI to this field to channels dictionary.
点赞 评论 复制链接分享 
采纳
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...
点赞 评论 复制链接分享 
采纳
Are any further edits required for this pull request?
点赞 评论 复制链接分享 
采纳
dvorak Merged, thanks!
点赞 评论 复制链接分享
提交
相关推荐
 回答 4 已采纳 Problem Description In the country of ALPC , Xiaoqian is a very famous mathematician. She is immersed in calculate, and she want to use the minimum number of coins in every shopping. (The numbers of the shopping include the coins she gave the store and the store backed to her.) And now , Xiaoqian wants to buy T (1 ≤ T ≤ 10,000) cents of supplies. The currency system has N (1 ≤ N ≤ 100) different coins, with values V1, V2, ..., VN (1 ≤ Vi ≤ 120). Xiaoqian is carrying C1 coins of value V1, C2 coins of value V2, ...., and CN coins of value VN (0 ≤ Ci ≤ 10,000). The shopkeeper has an unlimited supply of all the coins, and always makes change in the most efficient manner .But Xiaoqian is a lowpitched girl , she wouldn’t like giving out more than 20000 once. Input There are several test cases in the input. Line 1: Two spaceseparated integers: N and T. Line 2: N spaceseparated integers, respectively V1, V2, ..., VN coins (V1, ...VN) Line 3: N spaceseparated integers, respectively C1, C2, ..., CN The end of the input is a double 0. Output Output one line for each test case like this ”Case X: Y” : X presents the Xth test case and Y presents the minimum number of coins . If it is impossible to pay and receive exact change, output 1. Sample Input 3 70 5 25 50 5 2 1 0 0 Sample Output Case 1: 3
 回答 1 已采纳 Problem Description Cao Cao made up a big army and was going to invade the whole South China. Yu Zhou was worried about it. He thought the only way to beat Cao Cao is to have a spy in Cao Cao's army. But all generals and soldiers of Cao Cao were loyal, it's impossible to convince any of them to betray Cao Cao. So there is only one way left for Yu Zhou, send someone to fake surrender Cao Cao. Gai Huang was selected for this important mission. However, Cao Cao was not easy to believe others, so Gai Huang must leak some important information to Cao Cao before surrendering. Yu Zhou discussed with Gai Huang and worked out N information to be leaked, in happening order. Each of the information was estimated to has ai value in Cao Cao's opinion. Actually, if you leak information with strict increasing value could accelerate making Cao Cao believe you. So Gai Huang decided to leak exact M information with strict increasing value in happening order. In other words, Gai Huang will not change the order of the N information and just select M of them. Find out how many ways Gai Huang could do this. Input The first line of the input gives the number of test cases, T(1≤100). T test cases follow. Each test case begins with two numbers N(1≤N≤103) and M(1≤M≤N), indicating the number of information and number of information Gai Huang will select. Then N numbers in a line, the ith number ai(1≤ai≤109) indicates the value in Cao Cao's opinion of the ith information in happening order. Output For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the ways Gai Huang can select the information. The result is too large, and you need to output the result mod by 1000000007(109+7). Sample Input 2 3 2 1 2 3 3 2 3 2 1 Sample Output Case #1: 3 Case #2: 0
 5年前回答 1 已采纳 Problem Description Garfield has three piles of balls, each pile has unique color of following: yellow, blue, and red. Now we also know Garfield has Y yellow balls, B blue balls, and R red balls. But Garfield just wants to change all the balls to one color. When he puts two balls of different color togather, the balls then change their colors automatically into the rest color. For instance, when Garfield puts a red one and a yellow one togather, the two balls immediately owns blue color, the same to other situations. But the rule doesn’t work when the two balls have the same color. Garfield is not able to estimate the minimal steps to achieve the aim. Can you tell him? Input For each line, there are three intergers Y, B, R(1<=Y,B,R<=1000),indicate the number refered above. Output For each case, tell Garfield the minimal steps to complete the assignment. If not, output the symbol “):”. Sample Input 1 2 3 1 2 2 Sample Output ): 2
 4年前回答 1 已采纳 Worm is an old computer game. There are many versions, but all involve maneuvering a "worm" around the screen, trying to avoid running the worm into itself or an obstacle. We'll simulate a very simplified version here. The game will be played on a 50 x 50 board, numbered so that the square at the upper left is numbered (1, 1). The worm is initially a string of 20 connected squares. Connected squares are adjacent horizontally or vertically. The worm starts stretched out horizontally in positions (25, 11) through (25, 30), with the head of the worm at (25, 30). The worm can move either East (E), West (W), North (N) or South (S), but will never move back on itself. So, in the initial position, a W move is not possible. Thus the only two squares occupied by the worm that change in any move are its head and tail. Note that the head of the worm can move to the square just vacated by the worm's tail. You will be given a series of moves and will simulate the moves until either the worm runs into itself, the worm runs off the board, or the worm successfully negotiates its list of moves. In the first two cases you should ignore the remaining moves in the list. Input There will be multiple problems instances. The input for each problem instance will be on two lines. The first line is an integer n (<100) indicating the number of moves to follow. (A value of n = 0 indicates end of input.) The next line contains n characters (either E, W, N or S), with no spaces separating the letters, indicating the sequence of moves. Output Generate one line of output for each problem instance. The output line should be one of the follow three: The worm ran into itself on move m. The worm ran off the board on move m. The worm successfully made all m moves. Where m is for you to determine and the first move is move 1. Sample Input 18 NWWWWWWWWWWSESSSWS 20 SSSWWNENNNNNWWWWSSSS 30 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 13 SWWWWWWWWWNEE 0 Sample Output The worm successfully made all 18 moves. The worm ran into itself on move 9. The worm ran off the board on move 21. The worm successfully made all 13 moves.
 4年前回答 2 已采纳 We have arrived at the age of the Internet. Many software applications have transformed from standalone to online applications. Computer games are following this trend as well. Online games are becoming more and more popular, not only because they are more intelligent, but also because they can bring great profits. "The computer game industry is developing rapidly in China. Online game revenues amounted to 1.3 billion Yuan last year and are expected to reach 6.7 billion Yuan by 2007." reported by China Daily in 2004. However, good games originate from good programmers. We take for example that there is a RPG (Role Playing Game) and your boss asks you to implement some tasks. For simplicity's sake, we assume there are two kinds of roles in this game: one is player and the other is monster. You should help the player to achieve the goal: reach the place where treasure is positioned as early as possible and get the treasure. The map of the game is a matrix of N * M identical cells. Some cells are passable blocks, and others are nonpassable rocks. At any time, there is at most one role occupying a block. At the beginning, the time is set to 0, and the player is at a certain block. He then moves towards the treasure. At each turn, we have some rules: The player can stay in the same block during the next onesecond time duration, or he can walk or run towards the east, south, west, north, northeast, northwest, southeast, and southwest. With walking, the player can arrive at the corresponding passable blocks around him (See Fig.1). Each move takes 1 second. With running, the player can arrive at the corresponding passable blocks 2 cells away from him (See Fig.2). Each run takes 1 second. As demonstrated in Fig.3, if a neighbor cell is not passable, the player cannot run in that direction. For example, if cell 2 is a rock, running from 1 to 3 is impossible. The monsters are classified into aggressive and nonaggressive. If a monster occupies a cell, the player cannot move into that cell or run through that cell. In addition, the player cannot move into the cells surrounding an aggressive monster, because it will attack the player near it. For example, in Fig.4, if there is an aggressive monster in 5, then the cell 1, 2, 3, 4, 6, 7, 8 and 9 are in its attacking region, so the player cannot stay in or pass through these cells. Monsters change their positions each turn. Each monster appears by its position sequence iteratively. That's to say, given the position sequence of monster i: (x1, y1), (x2, y2), ..., (xs, ys), its initial position is (x1, y1) at time 0, then it appears in (x2, y2) at time 1, and so on. When monster i arrives at (xs, ys) at time s1, it will arrive in (x1, y1) at time s, and start to repeat. At the start of each turn, all the monsters change their positions first (the way of changing is given above). If a monster appears in the player's cell, or if an aggressive monster appears near the player to put him in its attacking region, the player will die, and the goal cannot be achieved. After all the monsters change their positions, the player makes a move or stays in the same cell. In his move, the moving path should not be occupied by any rocks or monsters or in the attacking region of any aggressive monsters. When counting the total time, we can neglect the time between monsters' position change and the player's move. Given the map of the game, the player's starting position, the treasure position and all the monsters' positions in every second, your task is to write a program to find the minimum time that the player gets the treasure. Input The input consists of several test cases. The first line of each case contains two integers N and M (1 <= N, M <= 100), where N is the height of the map and M is the width of the map. This is followed by N lines each containing M characters representing the map. A '#' represents a rock, a '.' is a free block, 'p' is the starting position of the player, 't' is the position of the treasure, 'n' is the initial position of a nonaggressive monster, and an 'a' stands for the initial position of an aggressive monster. The cell (i, j) is the jth cell on the ith row counting from left to right. The rows are counted from 1 to N starting from the first line of the matrix. We can number all the monsters as 1, 2, 3�� according to their initial position, sorting first by row, then by column. The (n+2)th line contains an integer p (0 <= p <= 100), which is the total number of monsters (i.e. the total number of 'n's and 'a's in the matrix). It is followed by p lines each specifying a monster's position sequence in the following format: the ith (1 <= i <= p) line corresponds to monster i, which begins with an integer s (1 <= s <= 100), meaning the length of position sequence. Then s pairs of integers x1, y1, x2, y2, ��, xs, ys are followed, separated by blanks. Each pair is a free block in the map, (i.e. a monster never goes to a rock cell). It is assured that none of the aggressive monsters' initial position is around the player. Two consecutive cases are separated by a blank line. The input is terminated by a line containing a pair of zeros. Output For each test case, output the minimum total time required for the player to get the treasure, in seconds. If it's not possible to get the treasure, or the minimum required time is greater than 100 seconds, please print a line just containing the string "impossible". Two consecutive cases should be separated by a blank line. Sample Input 7 8 #.#####. #.t#..p. #..#.... ..#a.#.# #...##.n .#...... ........ 2 2 4 4 5 4 3 5 8 6 8 5 7 3 3 p#. ##. t.. 0 2 2 #t p# 0 0 0 Sample Output 8 impossible 1
 回答 1 已采纳 Problem Description Dr. Evil has contracted your valuable services to build for him the world's most powerful "laser". Of course before you spend one billion dollars building the thing, you want to run some simulations first to make sure everything will work as designed. For this phase of the project, you will be simulating part of the aiming system which uses mirrors and other optics to change the direction of the laser beam. The simulation consists of a flat square table with mirrors, beam splitters, and beam detectors arranged on the tabletop, and with each object represented by a one dimensional line segment. The list below describes each of the object types in detail: mirror : A mirror object will reflect any laser beam striking its surface. The reflected beam leaves at the same angle of incidence as the incoming beam. Note that both sides of a mirror object are reflective. detector : A detector is an opaque object which absorbs any laser beam striking it. The simulation must also keep track of which detectors are struck by a laser for program output purposes. Note that a laser beam strike on either side of a detector counts as a "hit". splitter : When a laser beam strikes a splitter, it divides into two beams. One of the new beams will reflect from the splitter surface (as with a mirror), and the other beam will pass through the splitter without changing direction. A splitter will function the same way regardless which side of it is struck by a laser beam. See the figures below for examples of a laser beam's interaction with each of the possible object types: For each simulation, a single laser beam enters the tabletop area. The program must compute the path taken by the laser beam (including secondary beams due to splitters), and it must determine which detectors are struck by a laser beam. You can make the following assumptions in the program: 1. The tabletop surface is a 100 by 100 square, and unless otherwise specified all coordinates in the program's input are given as integers within the tabletop area (i.e. between 0 and 100 inclusive). 2. There will be no overlaps between the line 2. segment objects. 3. The laser which enters the tabletop area always starts from the edge of the table. 4. The simulation of each data set ends when all laser beams have either exited the table top area or have terminated at a detector. 5. For each data set there will be no more than 100 total reflections among all laser beams in that data set. 6. A laser beam will never intersect any object on a vertex and will never be collinear with an object's line segment. 7. Each data set will contain at least one detector object. Input Input to this problem will begin with a line containing a single integer N (1 ≤ N ≤ 100) indicating the number of data sets. Each data set consists of the following components: A single line with four numbers "x,y i,j" where x,y is a point along the table edge at which the laser beam enters, and i,j is a vector with integer components(1024 ≤ i,j ≤ 1024) specifying the direction of the incoming laser beam, where i corresponds to the xaxis direction and j corresponds to the yaxis direction. A line with a single integer P (1 ≤ P ≤ 100) giving the total number of objects in this data set. A series of P lines, each representing one object, with the first line describing object 1, the second line describing object 2, and so on. Each line begins with a single letter specifying the object type where a "M" indicates a mirror object, "S" a splitter, and "D" a detector. This is followed by two coordinate pairs of the form "x,y", specifying the two end points of the object's line segment. Output For each data set in the input, output the heading "DATA SET #k" where k is 1 for the first data set, 2 for the second, etc. If in this data set none of the detector objects are struck by any laser beams, output the message "NO BEAMS DETECTED". Otherwise, output the object number, one per line, of each detector struck by a laser beam. The list of detectors should be sorted by their object numbers and output in ascending order. If a detector is struck by more than one laser beam, it should only be listed once in the output. Sample Input 1 50,100 0,1 6 D 0,40 20,20 M 40,20 60,40 D 80,20 100,40 D 0,70 20,90 S 40,90 60,70 D 80,90 100,70 Sample Output DATA SET #1 1 6
 4年前回答 1 已采纳 Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus 1 to any digit. When add 1 to '9', the digit will change to be '1' and when minus 1 to '1', the digit will change to be '9'. You can also exchange the digit with its neighbor. Each action will take one step. Now your task is to use minimal steps to open the lock. Note: The leftmost digit is not the neighbor of the rightmost digit. Input The input file begins with an integer T, indicating the number of test cases. Each test case begins with a four digit N, indicating the initial state of the password lock. Then followed a line with anotther four dight M, indicating the password which can open the lock. There is one blank line after each test case. Output For each test case, print the minimal steps in one line. Sample Input 2 1234 2144 1111 9999 Sample Output 2 4
 回答 2 已采纳 这个页面放在里面是有用的 ![图片说明](https://imgask.csdn.net/upload/201705/03/1493782606_692103.png) 这个页面放reday里面没用，只能放外面 ![图片说明](https://imgask.csdn.net/upload/201705/03/1493782678_441527.png)
 魔城烟雨的博客 移植Mavlink到自己的android项目中1.MAVLinkPacket.java代码2.Parser.java3.Messages文件夹下面的内容1.MAVLinkMessage.java2.MAVLinkPayload.java3.MAVLinkStatus.java 摘要 本节主要记录如何通过ardupilot 为...
 Alvin Peng的博客 前言这里结合之前添加的mavlink消息，梳理下从飞控的物理端口到应用层的消息传递过程； 顺带再把整个框架在梳理了一遍；这里结合Rover来叙述，可能和copter有些区别，先开始吧～libraries这里需要说明下，关于...
 黑很黑特黑超级黑的博客 The computer will analyse this data and determine the distance of the object, and when the car is near to the object the computer will produce an audio alarm to alert the driver that the car is close ...
 lipi37的博客 文章目录 1 引言 2 C 代码生成 3 generate_one 函数分析 4 MAVTemplate 5 generate_mavlink_h 、 generate_version_h 和 generate_main_h 6 generate_message_h 7 generate_testsuite_h 相关： pymavlink 源码剖析...
 诗筱涵的博客 home_position_set = False #Create a message listener for home position fix @vehicle.on_message('HOME_POSITION') def listener(self, name, home_position): global home_position_set home_position_set = ...
 Lin_QC的博客 home_position_set = False #Create a message listener for home position fix @vehicle.on_message('HOME_POSITION') def listener(self, name, home_position): global home_position_set home_position_set = ...
 3年前举头看啊明月的博客 //2000 bytes with no mavlink message. Are we connected to a mavlink capable device? if (!checkedUserNonMavlink) { link>requestReset(); checkedUserNonMavlink = true; } ...
 weixin_39534978的博客 20 [ 1.090603] random: fast init done [ 1.090926] random: crng init done [ 1.102291] OF: graph: no port node found in /ocp/lcdc@4830e000 [ 1.108595] OF: graph: no port node found in /ocp/lcdc@4830...
 yikaiw的博客 Home location: http://python.dronekit.io/guide/vehicle_state_and_parameters.html The Home location isset when a vehicle first gets a good location fix from the GPS. The location isused as the targ
 lipi37的博客 pymavlink 是 MAVLink 协议的Python 实现，同时它还是一个 MAVLink 协议代码实现的自动生成工具，目前支持的语言有 C、C++11、Python、Java、Javascript、Typescript、C#、wlua、ObjC。 如果你对MAVLink 协议还不太...
 AcqinOMG的博客 AVOID_ADSB = 19, // automatic avoidance of obstacles in the macro scale  e.g. fullsized aircraft GUIDED_NOGPS = 20, // guided mode but only accepts attitude and altitude SMART_RTL = 21, // SMART_...
 虾米一代的博客 // we've slipped a whole run of this task! if (_debug > 1) { ::printf("Scheduler slip task[%u%s] (%u/%u/%u)\n", (unsigned)i, _tasks[i].name, (unsigned)dt, (unsigned)interval_ticks, (unsigned)...