{"action":"created","issue":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1234","labels_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1234/labels{/name}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1234/comments","events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1234/events","html_url":"https://github.com/mavlink/qgroundcontrol/pull/1234","id":57563520,"number":1234,"title":"Link Configuration Management","user":{"login":"dogmaphobic","id":749243,"avatar_url":"https://avatars.githubusercontent.com/u/749243?v=3","gravatar_id":"","url":"https://api.github.com/users/dogmaphobic","html_url":"https://github.com/dogmaphobic","followers_url":"https://api.github.com/users/dogmaphobic/followers","following_url":"https://api.github.com/users/dogmaphobic/following{/other_user}","gists_url":"https://api.github.com/users/dogmaphobic/gists{/gist_id}","starred_url":"https://api.github.com/users/dogmaphobic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogmaphobic/subscriptions","organizations_url":"https://api.github.com/users/dogmaphobic/orgs","repos_url":"https://api.github.com/users/dogmaphobic/repos","events_url":"https://api.github.com/users/dogmaphobic/events{/privacy}","received_events_url":"https://api.github.com/users/dogmaphobic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-02-13T06:13:53Z","updated_at":"2015-02-14T16:57:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1234","html_url":"https://github.com/mavlink/qgroundcontrol/pull/1234","diff_url":"https://github.com/mavlink/qgroundcontrol/pull/1234.diff","patch_url":"https://github.com/mavlink/qgroundcontrol/pull/1234.patch"},"body":"\r\nThe ultimate goal is to plug a device, set it up and go fly it (or whatever it does) without any fuss.\r\n\r\nThe goal of this first installment is to organize the code a bit so it's more readable, clean up a bit of left over cruft, and manage link configurations (and links in general).\r\n\r\n* Added a concept of Link Configuration where a link configuration (of a given certain type) is created and maintained through the new Manage Links preferences dialog.\r\n* Newly discovered (Serial) PX4 devices are automatically created and configured (if not already configured).\r\n* Link types that now use link configuration are created through the link factory in LinkManager. Unfortunately, 3DR Radio Modems cannot be easily identified as they use run-of-the-mill FTDI UART/USB chips and look no different than any other device using these chips. Eventually I want to *listen* to these unidentified serial ports and look for something speaking MAVLink.\r\n* Links are not mandated to use link configuration. You can still create link classes in the old fashion and handle them as usual. This is the case for link types I have yet to migrate, such as TCPLink, XBeeLink, etc.\r\n* Link configuration are saved and restored through QSettings.\r\n* Fixed several issues with the Serial Link. In addition, now all settings are manipulated through the link configuration instance, instead of directly interacting with the link instance. With that said, the Serial Link still needs quite a bit of TLC.\r\n* I made the call to remove ancient baud rates from the serial configuration. I just assumed this would be pretty useless on a 50 baud connection. HF packet radio link?\r\n* With UPDLink, you can now maintain the target hosts through its settings' UI as these have been moved to the link configuration. Its QGCUDPLinkConfiguration settings dialog has been re-written from scratch.\r\n* Added a MockConfiguration to the MockLink class. As the name implies, it’s a mock with no settings other than the name (base class settings).\r\n* Added code to properly save and restore last used connection. This is used for when the auto connect flag is set and it will now load and connect a real configuration, instead of some random Serial port.\r\n* Remove the serial port “Baud Rate” drop down box from the main tool bar. It no longer makes sense.\r\n* Replaced the Link drop down box (the one that only had serial ports and *UDP*) with a Link Configuration drop down box. You select the configuration you want to connect and hit the connect button. You can also invoke the *Manage Links* from it. Note that when you first run QGC, it will automatically create and populate this with any PX4 it finds.\r\n* Added a method to the settings dialog, which allows to invoke it and go straight into one of its panes. \r\n* Added a size spacer to QGCMessageBox to enlarge the message dialogs a bit under Mac OS. By default, they were too narrow and there was no way to change the width.\r\n* Minor coding style guideline fixes wherever I touched.\r\n* Forcing no proxy for UDP connections. This came through google groups and as the change is right where I'd been working, I added it here to avoid collision.\r\n* I noticed that some times, the disconnect signal would get to the updateConnect button (tool bar) before the link was physically disconnected. That would cause it to count it as a still connected link and get the connect button logic out of sync.\r\n\r\n\r\nNote that this supersedes PR #1147, which should be discarded if this is accepted."},"comment":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/comments/74382620","html_url":"https://github.com/mavlink/qgroundcontrol/pull/1234#issuecomment-74382620","issue_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1234","id":74382620,"user":{"login":"Susurrus","id":206363,"avatar_url":"https://avatars.githubusercontent.com/u/206363?v=3","gravatar_id":"","url":"https://api.github.com/users/Susurrus","html_url":"https://github.com/Susurrus","followers_url":"https://api.github.com/users/Susurrus/followers","following_url":"https://api.github.com/users/Susurrus/following{/other_user}","gists_url":"https://api.github.com/users/Susurrus/gists{/gist_id}","starred_url":"https://api.github.com/users/Susurrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Susurrus/subscriptions","organizations_url":"https://api.github.com/users/Susurrus/orgs","repos_url":"https://api.github.com/users/Susurrus/repos","events_url":"https://api.github.com/users/Susurrus/events{/privacy}","received_events_url":"https://api.github.com/users/Susurrus/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T16:57:48Z","updated_at":"2015-02-14T16:57:48Z","body":"@DonLakeFlyer I'm pretty certain the MavlinkDecoder should be a singleton. Only problem there is that I think the datastream is decoded twice and 2 different decoders are used. Could be thinking of an old version of the code however."}}