1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-23 00:05:13 +03:00
Commit graph

167 commits

Author SHA1 Message Date
Max Paperno
4aa0c1bbe4 [simulation] Fix some potential crashes & 26 memory leaks, improve LCD redraws. (#4634)
* [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.
2017-03-21 07:43:40 +01:00
Max Paperno
2540e166b0 [Companion][Horus] Add joystick axes (JSx & JSy) and trims T5 & T6 as usable sources. (#4550)
* [Companion][Horus] Add joystick axes (JSx & JSy) to sources list (fixes #4336).

* [Companion][Horus] Add aux trims T5 & T6 and associated switches to respective selector lists. Rename "Joysticks" enum to "MouseAnalogs".
2017-03-05 08:46:27 +01:00
Max Paperno
3a026a80f2 [Simulator] Add ability to update .otx files. (#4422)
* [SimulatorInterface] Add ability to read eeprom data back from simulator instance.

* [Simulator] If started with .otx file, Simulator will now update (or create) the file upon exit using current radio/model data; Consolidate internal startup and shutdown code for handling various data sources.
2017-02-07 22:15:18 +01:00
Max Paperno
2589e35ad5 [Companion] Fix crash when converting radio splash image to RGB32 (closes #4420). 2017-02-07 15:54:29 -05:00
Bertrand Songis
b0eeeb4dbc Fixes #4315 (#4406) 2017-02-05 22:01:44 +01:00
Max Paperno
2f9d9c1a99 [Simulator] New main UI window, debug console, separate outputs window, more. (#4385)
* [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
2017-02-04 11:59:42 +01:00
Max Paperno
fae095ea18 [Simulator] Fix startup when using a new file for radio data (file is now properly created, errors from Storage are ignored); Do not start simulator at all in case of data errors; Fix startup option dialog when finding radio type from profile for first time; Fix RadioOptions struct version control; Cleanup unused WinConsole code; Fix a warning and a missing const reference; Move ~SimulatedUIWidget() to public. 2017-01-28 19:15:46 -05:00
Bertrand Songis
764b18d883 [Companion] Fixes #4288 2017-01-26 07:22:58 +01:00
Max Paperno
6e2474081f [Simulator] Further Simulator improvements. (#4282)
* 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.
2017-01-25 16:20:45 +01:00
Bertrand Songis
de49d155c6 [Companion] Compilation fix 2017-01-24 22:06:28 +01:00
Bertrand Songis
57aafeb062 [Companion] Refactoring - fixes the X9E=>X7 conversion segfault 2017-01-24 20:08:48 +01:00
Max Paperno
17a03e6c18 [Simulator] Dyanamic Simulator virtual hardware generation and many other improvements (#4260)
* 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
2017-01-24 07:54:12 +01:00
Bertrand Songis
1924d28be3 [Companion] Fixes 2017-01-18 15:25:43 +01:00
Bertrand Songis
61e91a9c32 [Companion] All Horus functions now enabled 2017-01-18 10:55:37 +01:00
Damjan Adamic
979de6bfa2 Re #4224: Companion Hours simulator now uses temporary directory for radio/models settings. (#4247) 2017-01-16 21:35:52 +01:00
Bertrand Songis
a65aa3d6c7 [Companion] Work in progress - QTreeView in MdiChild (#4197)
[Companion] QTreeView in MdiChild, Horus and X7 support added, fixes for #4224
2017-01-15 17:45:57 +01:00
Neil Horne
05ca719522 Port #4189 to next (#4235)
Add data modification for su trim, min and max
2017-01-15 15:27:23 +01:00
Max Paperno
52b68c9ea2 [companion] Fix a few reasonable warnings brought up by MSVC /W3. (#4206) 2017-01-07 08:33:56 +01:00
Max Paperno
e204031ef6 Standalone simulator startup options (#4164)
* [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.
2016-12-27 22:04:24 +01:00
Max Paperno
e90bd0fd70 Enable Windows build with Qt5.5+ & MinGW-w64 (#4150)
* [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).
2016-12-24 00:11:07 +01:00
Bertrand Songis
ec56d2dbdb [Companion] MdiChild now use a QTreeWidget instead of a QListWidget (… (#4096)
* [Companion] MdiChild now use a QTreeWidget instead of a QListWidget (for Horus compatibility)

* [Companion] Horus models.txt parsing / writing implemented

* Fix for QT53 (#4109)
2016-12-08 21:26:08 +01:00
3djc
35e199b579 Prep for Nightly (#4089)
* Prep for Nightly

* Compile fix

* Much nicer :)

* One more

* Fix

* Last one

* Cosmetics
2016-12-03 09:36:51 +01:00
Bertrand Songis
8854cf9e87 [Companion] Horus models export for simulation now OK 2016-11-27 00:45:24 +01:00
Bertrand Songis
0ca0785912 [Companion] Another simplification 2016-11-24 07:24:49 +01:00
Bertrand Songis
b0f5b646af [Companion] Copyright added to all files 2016-11-23 16:40:47 +01:00
Bertrand Songis
5f9737fc70 [Companion] Old EEPROM support removed 2016-11-23 16:40:47 +01:00
Bertrand Songis
343d6daf86 [Companion] Some refactoring around the splash image handling (#4067) 2016-11-23 08:46:22 +01:00
Jim Taylor
324addba2c Fix Issue 4057 for X9E also. (#4066) 2016-11-22 18:19:40 +01:00
Jim Taylor
bda86d6e6a Fix issue 4957 Taranis splash screens formatted incorrectly. (#4064) 2016-11-22 07:40:38 +01:00
Bertrand Songis
fb27acf286 Bsongis/x7d companion support (#4028)
[X7D] Companion support added
2016-11-16 12:59:15 +01:00
Damjan Adamic
5157a9f33c Fixes #3843: GPS logging in decimal degrees format. Companion export to Google Earth fixed. 2016-10-05 17:57:02 +02:00
Damjan Adamic
829b86da99 Cosmetics 2016-05-25 22:14:10 +02:00
BenZoFly
0eda971365 Fixes #3518: GVar combobox not being refreshed when GV checkbox (re-)selected (ported from master) 2016-05-25 22:14:10 +02:00
Bertrand Songis
c5a44250fc Fixes #3353 2016-04-09 11:12:50 +02:00
Bertrand Songis
aec2170e7e Move to Qt5 and Qt5Multimedia 2016-03-10 07:12:44 +01:00
projectkk2glider
117e28db16 Fixes #3156: Outputs Subtrim, Min and Max values rounding problem fixed (ported from master) 2015-12-26 16:08:04 +01:00
Damjan Adamic
e37dcabd95 timing code (796 ms with grid layout, 1394 ms with table layout) 2015-12-07 18:03:36 +01:00
Damjan Adamic
191e37f29c TableWidget only used if -D TABLE_LAYOUT=yes compile option is defined 2015-12-07 18:03:30 +01:00
Damjan Adamic
f92b71c0b8 RRe #2861: Use new TableLayout for Logical switches, Outputs and Special functions (ported from master 731faa8 and squashed into one commit) 2015-11-23 18:56:38 +01:00
Bertrand Songis
6f774eb61a [Horus] Companion simulator 2015-10-24 16:08:29 +02:00
Bertrand Songis
ed05174fc8 PrintDialog / CompareDialog refactoring 2015-08-23 09:54:15 +02:00
Damjan Adamic
70d67dd7dd Export to Google Earth now working (only) with the new telemetry fields (GPS, GAlt and GSpd) 2015-08-01 10:53:06 +02:00
Damjan Adamic
4e4d0fe883 Re #1063: Deduplication of code for Inputs, Mixers, Logical Switches and Special Functions 2015-07-28 20:57:06 +02:00
Bertrand Songis
4ea9e5c11f The ':' separator is not a so good idea in Windows installer (ADS) 2015-07-23 21:17:18 +02:00
bsongis
1b6f34069a Previous version-indexes were not anymore supported 2015-07-23 18:42:39 +02:00
bsongis
8d97235f41 #2526 - Firmware nightly builds are now downloadable from Companion -
Tests needed
2015-07-22 22:25:03 +02:00
Damjan Adamic
76791c1961 Unreachable code removed 2015-07-20 21:17:12 +02:00
Damjan Adamic
841f11c21a Fixes #2519: removed telemetry values from available selection in Global Functions for "Play Value" 2015-07-20 20:34:15 +02:00
bsongis
654dac1acc [Companion] ComboBox for audio / scripts list was not cleared before all
itemps inserted
2015-07-18 18:04:44 +02:00
bsongis
90ebaf2d88 Fixes #2465 - A little bit refactoring done while fixing this one 2015-07-18 17:22:26 +02:00