Code Monkey home page Code Monkey logo

mavtables's People

Contributors

mrshannon avatar severynpolakiewicz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mavtables's Issues

Packets are echoed back over the connection they were received on.

If a packet is received over a connection it will be echoed back over that same connection if that connection contains a system/component combination different from the originating system/component. This causes connections to use more bandwidth than necessary as they bounce packets back and forth.

This was partially fixed in 029a07d which prevents packets from being echoed back when only the originating system/component can be reached on the connection.

0x0D bytes received over serial port connections are translated to 0x0A.

0x0D bytes (carriage return) received over the serial port are translated to 0x0A (line feed). Therefore, the serial port is not in raw binary mode.

This was discovered because the PARAM_VALUE packet is returned to the ground control software from the autopilot with parameters 13, 269, 522, and 781 listed as 10, 266, 522, and 778.

To fix this the ICRNL bit should be cleared in the c_iflag of the termios structure.

Add MAVLink address preloading to serial ports.

Add a preload option to the configuration file for serial ports to add an address to the connection before a heartbeat is sent. This is required when the other end of the serial port is attached to another instance of mavtables. Without this, mavtables will not forward heartbeats to the other instance of mavtables and therefore, they cannot discover systems attached to the other mavtables's instance.

Adding this feature will allow the user to have preset addresses and thus allow heartbeat messages to be transmitted between two connected instances of mavtables (over serial port) and allow discovery of systems across mavtables's instances.

One example where this is necessary is when mavtables is used on both the ground control station and one or more UAVs.

Crashes when an invalid packet is given.

When a packet has an invalid ID mavtables crashes. This is usually undesirable for a long-term running process like a router. It would be better to print to standard error, clear the input buffer, and continue parsing packets.

Change default dialect to ardupilotmega.

Because the most common users of MAVLink are ArduPilot and PX4 and the ArduPilot is a superset of the common dialect used by PX4 the default dialect should be changed to ArduPilot as it works for both systems.

This would correspond to how both QGroundControl and APM Planner support both ArduPilot and PX4 by compiling against the ardupilotmega MAVLink dialect.

Add logging.

Add logging of packets and/or connections list.

One possible solution is to periodically print a summary of packets received from all addresses. Such as

192.168:     50 packets
172.128:      4 packets
  10.10:   4560 packets

Another option is to print every received packet:

2018-04-13 15:37:23 HEARTBEAT (#0) from 127.1 (v2.0)
2018-04-13 15:37:23 PARAM_EXT_REQUEST_LIST (#321) from 0.255 to 32.64 (v2.0)
2018-04-13 15:37:23 ENCAPSULATED_DATA (#131) from 224.255 (v2.0)
2018-04-13 15:37:24 MISSION_SET_CURRENT (#41) from 255.0 to 0.0 (v2.0)
2018-04-13 15:37:25 PING (#4) from 192.168 to 127.1 (v2.0)

A final option, the most verbose, is to print every packet recieved and sent.

2018-04-13 15:37:23 ACCEPT HEARTBEAT (#0) from 127.1 (v2.0) source 127.0.0.1:14550 dest /dev/ttyUSB0
2018-04-13 15:37:23 ACCEPT HEARTBEAT (#0) from 127.1 (v2.0) source 127.0.0.1:14550 dest 127.0.0.1:14500
2018-04-13 15:37:23 ACCEPT PARAM_EXT_REQUEST_LIST (#321) from 0.255 to 32.64 (v2.0) source /dev/ttyUSB0 dest /dev/ttyUSB1
2018-04-13 15:37:23 REJECT ENCAPSULATED_DATA (#131) from 224.255 (v2.0) source 127.0.0.1:14550 dest /dev/ttyUSB0
2018-04-13 15:37:23 ACCEPT ENCAPSULATED_DATA (#131) from 224.255 (v2.0) source 127.0.0.1:14550 dest 127.0.0.1:14500

Or better, yet. Make this three seperate levels of verbosity, such as -v, -vv and -vvv.

Unit tests use deprecated SET_MODE packet.

The SET_MODE packet should be removed from the unit tests because it is deprecated and may eventually be removed from the MAVLink protocol.

The files this effects are:

  • src/If.cpp
  • test/unit_tests/common_Packet.hpp
  • test/unit_tests/test_Accept.cpp
  • test/unit_tests/test_Call.cpp
  • test/unit_tests/test_Chain.cpp
  • test/unit_tests/test_Connection.cpp
  • test/unit_tests/test_GoTo.cpp
  • test/unit_tests/test_If.cpp
  • test/unit_tests/test_mavlink.cpp
  • test/unit_tests/test_PacketQueue.cpp
  • test/unit_tests/test_PacketVersion1.cpp
  • test/unit_tests/test_PacketVersion2.cpp
  • test/unit_tests/test_Reject.cpp
  • test/unit_tests/test_Rule.cpp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.