* [Simulator] Refactor CLI option parsing to use QCommandLineParser, remove QxtCommandOptions external lib; Add "--sd-path" and "--start-with" options; Qualify all translatable text (SimulatorMain context).
* Add date string to version.
* Fix possible confusion/data corruption when deleting radio profile (closes#4734, ref: #4686);
* Add Delete Profile action to Radio Profiles menu (closes#4736) (but remove from from app prefs. panel);
* Add confirmation prompt before deleting profile;
* Open profile settings dialog when creating/copying a profile (closes#4735);
* Make sure current (global) firmware flavor is properly updated when changing fw type/options in profile;
* Append "-Copy" to name of copied profile;
* Factor out Firmware global vars/functions in favor of static members.
* [Simulator] Remove extraneous format value in microsTimer; Better way to delete SimulatorStartupDialog (in case no event loop starts).
* [Simulator] No helpers dependency for SimulatorStartupDialog.
* [simpgmspace] Rename micros timer function and make externally available.
* [Companion] Fix possible uninitialized value in TreeModel (compiler warning).
* [multi_arm] Fix minor compiler warning (MSVC: "unsafe mix of type 'uint8_t' and type 'bool' in operation").
* [lua] Fix compiler warning ("'data' may be used uninitialized in this function").
* [OpenTxSimulator] Fix analogs array range.
* [Simulator] Auto-start simulator when SimulatorMainWindow is first shown (vs. before it was shown).
* [Simulator] DebugOutput: prevent possible mutex deadlock on buffer overflow (force queued connection for Qt < 5.3).
* [Companion] Display calibration data for Horus joysticks (MOUSE1/MOUSE2)
* [Companion] I18N:
* Introduce new Translations class to centralize all related functionality;
* Add ability to search multiple locations for .qm translation binaries (local folders, resources, system paths);
* Add ability to reload translations dynamically w/out application restart;
* Improve support for loading Qt translations (if available);
* [build][i18n] Look for and include pre-built Qt translations with other translation resources; Generate translations.qrc dynamically with rest of build files; Add EN "translation" file (simpler UI string edits and possible abstractions); Rename ZH translation file to be country-specific.
* [build] Centralize finding all the Qt bits into root CMakeLists; Make sure QT_QMAKE_EXECUTABLE is defined; Disable dysfunctional simulator installer script generation.
* Cosmetics (unused includes).
* [Companion] Make language options menu dynamic based on available translations, and always show native language name; Allow changing language of some elements w/out restarting (esp. menus/toolbar buttons); Simplify menus/actions/handlers for themes and icon sizes.
* [build] Better way to generate translations.qrc using input file again (previous method was generating new qrc for each reconfig); Make sure common library is linked to other modules which may need it; Remove unused script.
* [build] Only build companion/simulator resources files once and include in common lib; Consolidate/cosmetics.
* [build] Fix "missing" translation resource files with some builds (since last commit); move resource file declarations to after app init as recommended; fix name of Qt translation file since v5.3 (this still only works on some systems with Qt installed and on the build machine).
* [simulatormainwindow] Move sub-window destructors to main destructor.
* [simulation] Move SimulatorInterface creation/ownership to SimulatorMainWindow.
* [simulation] Add option to unload simulator libraries after each use (eg. from Companion) so as to properly reset all statically initialized firmware variables; Introduce new SimulatorLoader class.
* [simulation] Hardening: Fix some potential crashes & 26 memory leaks, improve LCD performance.
* [simpgmspace] Init trims; Make sure `REa` is really defined (to match board files).
* [simpgmspace][opentxsimulator] Verify current running state before start/stop; Move rotary enc. init.
* [simpgmspace][LcdWidget] Improve performance by moving LCD content change check to lcdRefresh() & limiting LcdWidget refresh time to 60 fps max.
* [simueeprom] Ensure thread could be started, set default running state to false.
* [simufatfs] Fix paths report trace.
* [eepromimportexport] Fix memory leaks resulting from import debugging scheme being used.
* [customdebug] Introduce new scheme for custom debug output in compliance with Qt recommendations (see docs for QLoggingCategory).
* [opentxeeprom] Fix extra conversion table cache elements being created and also not properly deleted (and hence leaking).
* [opentxinterface] Unregister EEpromInterfaces in unregisterOpenTxFirmwares();
* [storage] Unregister storage factories on exit (fixes leak); create virtual StorageFormat/StorageFactory destructors (prevents warnings).
* [helpers] GVarGroup now emits own signal, no need to pass ModelPanel pointer (removes dependency on modeledit.h)
* [DebugOutput] Clear simulator trace hook before exiting (prevent possible issues); Fix leak and possible bad QString allocations when reading from buffer; Fix leak with combo box event filter.
* [TelemetrySimulator] Fix leak by deleting LogPlaybackController object on exit; Only set up data fields once; convert timers to static.
* [build] Consolidate all Companion/Simulator shared items in `common` library to reduce build time/etc (node & edge still remain awkward).
* [simulatorwidget] Delete removed spacer object (previously-forgotten "26th" leak).
* [DebugOutput] Fix stray trailing characters issue with new text buffer allocation (from previous commit); Increase maximum buffer sizes to better accommodate slower systems.
* Cosmetics.
* [Companion][Simulator] Add custom qDebug message handler/formatter as an option. Keeps support for QT_MESSAGE_PATTERN env. var.
* [Simulator] Show system messages of level qInfo and above in debug console.
* [Simulator] Still capture screenshot to clipboard if path is not accessible (and screenshot results now print to simulator debug console).
* Fix for older CMake.
* [Companion] Do not start debug message handler if app is shutting down, and add null checks before using it; Increase backtrace report depth; Add OTx headers; Add Companion exit status debug; Clean up unused code.
* [Simulator] Add asynchronous FIFO buffer for handling debug output/display more efficiently. (#4488)
(cherry-picked from b12bd7d7be)
* [package] Add QtSvg support DLLs for Windows.
* [Simulator] Add images/css resources for new version; Create SimulatorIcon and SimulatorStyle classes; Build with SVG support, remove unused bitmaps.
* [Simulator] Improve and simplify VirtualJoystickWidget resize event (sticks maintain X/Y position) & improve values layout w/out trims.
* [Simulator] Refactor Trainer simulator to use VirtualJoystickWidget, gains lock/hold buttons and X/Y position readout.
* [Simulator] More compact layout for Telemetry simulator, reduces min. width and adds scrolling columns to allow smaller window sizes.
* [Simulator] Add new SimulatorMainWindow and RadioOutputsWidget UI classes.
* [storage] Add non-persistent sessionId() to AppData for tracking currently active radio profile ID.
* [Simulator] Major UI updates:
* Use a MainWindow interface with dockable/floatable windows, proper toolbar & menu;
* Persistent size/layout state of all windows/docks/etc between uses, per radio profile;
* Completely separate radio Outputs window with configurable layout (also persistent between uses);
* Translations now enabled in standalone Simulator, follows main Companion setting (they need a lot of updates);
* New custom icons throughout, toolbar icon sizes adhere to user preference in Companion.
* [Simulator] Debug Output console updates:
* New filter feature with optional full RegEx support, can work in inclusive or exclusive modes (full help text is included in UI);
* Up to 50 user-defined filters are saved to permanent settings, also a few predefined filters are provided;
* Saves/restores the last filter used and if it was en/disabled;
* Added word wrap and clear screen features;
* Configurable scroll-back buffer size;
* Increased efficiency & performance of the buffering/printing process.
* [Simulator][OSX] Visual UI tweaks for OS X.
* [Simulator] Fix some debug console settings not being restored properly.
* [Simulator] Add ability to hide/show menu bar; Persist view state of menu bar and radio title bar; Reduce font size on OS X; Other small visual tweaks and improvements.
* [build] Add QtSvg to Linux build scripts (a guess for Dockerfile).
* [build] Fix for Qt 5.3.
* Add OpenTx headers to new files.
* [Companion][storage] Update GeneralSettings() initializer to use current sessionId for profile data retrieval, removes workaround for standalone Simulator being started with arbitrary profile; AppData: always update sessionId when global id() changes.
* [X10] Fixes for new simulator
* [Simulator] Add ability to reload all radio data w/out exiting simulator (will also adjust UI for any hardware changes); Refactor how keymap help text is generated.
* [Simulator] Only update channel/logical switch/GVar output displays if the corresponding tab is actually visible (further CPU usage reductions).
* [Simulator] Implement momentary toggle switches with "latch" function.
* [Simulator] Mouse wheel event over multi-position knobs now properly rotates them to detent positions.
* [Simulator] Fix mouse wheel event propagation after multi-position knob rotation; Cosmetics.
* [Simulator] Internals: Greatly improve object cleanup on exit; Refactor SimulatedUIWidget timer event triggering.
* [Simulator] Fix throttle stick position/lock not being set properly upon repeated launches from Companion.
* [Simulator] Fix build w/out SDL. KnobWidget cleanup.
* [Companion] Do NOT delete SimulatorInterface on simulator dialog exit (fix possible crash on dialog close).
* [Simulator] Ensure joystick is NULL at start.
* [Simulator] Fix/improve color blending on 4-bit screens with different BG colors; Cosmetics.
* [Simulator] Fix LCD screenshot folder path; Fix timer slot for Qt backwards compatibility.
* [TravisCI] Set Qt version to 5.3 to match release build servers.
* Fixed segfault when saving setup with no models defined [Horus]
* Fixed radio data import [Horus] (broken in 0f90ff0b65)
* [Simulator] Always keep toggle switch active while held with mouse button.
* Refactor CompStoreObj to use templates. Clean up some formatting.
* [Simulator] Add SimulatorOptions type to replace individual simulator options; Fix storage handler for custom types; Cleanup some redundant code.
* [Simulator][Joystick] Rework the joystick options/calibration dialog. Can now enable/disable/select the Joystick from there. Delay start of calibration until Start is pressed (otherwise looks like last calibration didn't work). And generally refactor a lot of it to be smarter.
* Cosmetics.
* [Simulator] Add state handling for RadioWidget class. Split code to cpp file.
* [Simulator] Add SimulatorStartupDialog as its own UI class.
* [Simulator] Multiple changes and new features:
All Horus data source options are now fully supported with data properly saved after use (SD path, .otx file, or custom data path);
Loading .otx files now works for all radio types (but not saving data back to .otx);
Switch and knob/slider states are now saved to per radio profile;
Joystick configuration/calibration is now available directly from inside Simulator;
Due to refactoring, all previously saved per-profile simulator settings are now invalid;
Further consolidated simulator dialog startup/shutdown, now handles temp. paths internally, etc;
With WIN_USE_CONSOLE defined, Simulator and Companion when started from Windows command line will now use that console for all messages (instead of opening a new one). This allows full debug output to be seen at all stages of execution and after exit.
* [Simulator] Fix build w/out SDL Joystick support.
* [Simulator] Fix bogus throttle warning on simulator start; Add forgotten RadioWidgetState flags to stream handlers; Add debug state saver in SimulatorOptions.
* Move simulator widgets to subfolder (no code changes).
* [Simulator] Major Simulator re-structuring to reduce code redundancies and allow for fully dynamic simulated hardware setup:
SimulatorDialog is no longer sub-classed by individual radio UIs, instead a new class is added which handles just the "skin," LCD, and navigation controls (also makes setting up new models much quicker);
All radio switches/knobs/sliders are populated dynamically based on loaded hardware configuration data (eeprom/bin), including control types and names (in case of no hardware config data, reasonable "factory defaults" are loaded);
Starting Horus sim with alternate path for RADIO and MODEL data folders is now supported (.otx file is WIP);
6-way switch now works properly and various other inconsistencies addressed (eg. some Horus analogs were backwards).
* Add missing OpenTX headers to new files.
* [Simulator] Fix loading of Horus hardware settings from Companion simulation.
* Update Travis CI build environment to Qt 5.7.
* [Simulator] Fix 9X missing colored side LCD images, an #include fix, and some cleanup.
* [TravisCI] Set up for parallel Travis builds and use Qt5.7 (#4263)
* Fix starting Simulator with non-existing file/folder structure (now properly creates new ones as needed, including Horus directories with default radio/model); Temporarily remove option for using .otx file with Horus (until that feature is added).
* Load correct simulator skin for X7 when launching from Companion.
* X7 hardware defaults changed to match production hardware
* Fix minor compiler warning in mdichild.cpp, and some cleanup in eeprominterface.cpp.
* [Simulator] Centralize radio UI flavor determination.
* [Simulator] Updates:
Add X7 UI flavor;
Centralize LCD settings;
Simplify drawing curved UI widgets;
LCD color can be changed for any 1/4-bit display radio;
Slight change on default LCD "off" color;
Refactor LcdWidget to not use globals.
* [Companion] X7 EEPROM import fix
+ cosmetics
+ compilation error fixed on Manjaro
* [Companion] 9XR-PRO EEPROM import fix
+ cosmetics
+ compilation error fixed on Manjaro
* Navigation fix
French translations
* [X7] Main view cosmetics
* Fix switch/ana custom name import
* [Simulator] Add white border above/below X7 bezel, and use white-colored padding on sides; Adjust X7 default LCD color.
* Does this work? (#4269)
Read an Horus SD card produces a temporary .otx file now
* Bsongis/companion warning before automatic conversions (#4271)
* Does this work?
* Warning before automatic conversions
* Force different file name after conversion (#4272)
* Force different file name after conversion
* More detailed instructions
* [Companion] Files automatically named during XXX => Horus conversions
* [simulator] Save and restore Simulator window sizes and positions (based on current radio profile).
* [simulator] Set startup throttle stick lock in standalone sim based on default mode in current Companion radio profile;
Add new flag indicating standalone simulator;
Unique titles for simulator console windows.
* [simulator] New/updated Simulator startup options:
Radio profile used for standalone Simulator can now be separate from Companion;
Allow selecting a radio profile and EEPROM image file (in addition to radio type) at startup via GUI and CLI;
All startup settings are saved between uses.
* [Windows][MinGW] Update some WIN32 macro checks in source code to be MSVC-specific (not needed for GCC-based builds).
* [build] CMakeLists updates:
Adjust for Windows MinGW builds: now fully compatible with Qt5.5+ and MinGW-w64 toolchain (included in Qt installs);
Add option to specify path to required libraries/includes (instead of hard-coding `c:\programs`);
Add package check for Python and use found executable name;
Remove custom FindSdl package handler in favor of stock (and improved) CMake one (still works with Windows);
Do not force SIMU_AUDIO and LUA_COMPILER in SIMU builds (leave it up to user);
Add SIMU_LUA_COMPILER option specifically for SIMU builds (default = ON);
* [build][Windows] Rewrite/Fix Windows Companion `install` target, with two options:
a) just copy supporting Qt and c++ DLLs to build folder so programs can be quickly be run from there (this is default and similar to the old behavior);
b) full installation to CMAKE_INSTALL_PREFIX path, including all binaries, supporting DLLs, language files, and OTx utilities.
Option b) can be selected with new WIN_DO_FULL_INSTALL parameter;
Also cleans up the Linux install a bit and consolidates the OS X parts;
* [simulator][Windows] Add option to build Windows simulator with system console/terminal enabled (both standalone and when launched from Companion). Mostly useful for debug as it gives output messages much sooner in the startup process than the current debug console. Also helpful because you don't have to open it manually on every launch, and it remembers last window position and size. Possible candidate for a user-selectable runtime option in the future.
* [Windows] Fix MSVC build issues.
* [build] More build fixes:
Use a customized FindSDL.cmake script again due to bugs and deficiencies in the official version (based on script from CMake v3.7);
Fixes missing SDL DLL error in NSIS installer);
Use string for Timers option (checkbox in GUI is confusing);
Remove an unused variable.
* [simu][Windows] Fix f_getcwd() cutting off too many characters (fixes SD browser interactions).
FirmwareInterface::getCapability() to know which options are enabled in
the preferences. The Heli tab and the GVars are displayed according to
these options.