This update mainly focuses on solidifying the foundation instead of adding new features. Let’s begin with the bug fixes before we dive into the nitty-gritty.
Fixed
- Added an extra check to see if an input event is triggered instead of an axis. Sometimes an axis could trigger unwanted events. This check will hopefully reduce this in the future.
- WASM module didn’t get installed. The success trigger was hidden behind a stray “{“.
- Coms are being properly transmitted once again (more on this further down).
Under the bonnet
The InputSwitchHandler responsible for all the input handling has been refactored from 2792 lines to a mere 500 without losing any functionality.
Besides these minor fixes, I’ve implemented a significant overhaul of the input handling. The InputSwitchHandler responsible for all the input handling has been refactored from 2792 lines to a mere 500 without losing any functionality. When this project started, we used to add features on the fly, which worked out perfectly fine. After 30 updates, these additions ended up in an enormous bowl of spaghetti. The yoke, rudder, and brakes are, in essence, similar inputs. An axis with a range plotted on a curve converts this curve to ingame events. Before this version, each of these inputs had its dedicated logic, functionality, and algorithms. This meant that a bug fix in one wouldn’t be automatically transferred to the other. I’ve gone back to the drawing board and implemented a unified approach that still considers the uniqueness of these inputs. Spaghetti bowls also restrict others when they want to contribute to the connector. Nobody wants to study a hot mess when they dedicate their free time to an open-source project.
Github/Build improvements
The entire Github repo has been restructured to reflect the project structure better. This should make it easier to find the files needed. I’ve also included everything you’d need to run the project on your own machine without having to download any external tools besides the Qt IDE. All build paths have been altered to be relative, requiring 0 changes on your device.
To improve things even further, I’ve transferred the build method from QMake to CMake. No matter which IDE you’d use (that supports CMake), you are able to run the CMakeList file and instantly start developing.
Tests
Dave, why do my coms display 123 instead of 123.850 is a question I’ve heard at several stages during development. I’d fix it, but every time the bug would re-appear. During the connector’s lifespan, I’ve learned a ton regarding aviation, but I’ve also grown as a developer. I’ve learned hardhandedly that tests can vastly improve the sanity of any developer that needs to develop and maintain software. I’ve added the first check that checks whether coms get converted to the proper format (123850). These tests get executed during every local build of the connector, notifying me if something went wrong. To be fair… The first test is added, but hundreds of tests are still missing. So expect more to come in the future.
Time to side slip into the next update. As always, thank you very much for the support and feedback. I hope to see all of you in Microsoft Flight Simulator 2020.