1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-25 09:15:21 +03:00
Commit graph

74 commits

Author SHA1 Message Date
Max Paperno
a60e080ce1 [Simulator] Cosmetics: rename SimulatorDialog -> SimulatorWidget. 2017-02-08 00:37:07 -05:00
Max Paperno
c4acbf6054 [Simulator] LCD screenshot file name now includes radio type; Remove unnecessary class dependence in SimulatedUIWidget initializer; Show exit status debug; Cosmetics. 2017-02-08 00:02:34 -05: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
5309b527a5 [Simulator] Add X9E radio skin. 2017-02-06 22:16:48 -05:00
Max Paperno
b28bd82515 [Simulator] Improve radio UI keyboard shortcut handling for commonly used keys (pg. up/down, arrows); Cosmetics. 2017-02-06 22:16:48 -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
Bertrand Songis
40ece81de2 X10 (#4377)
[X10] New radio supported!
2017-02-04 10:42:50 +01:00
Max Paperno
9c6a543434 [Simulator] Make sure a default Data File is always suggested in startup dialog; Fix silent exit upon startup if no file/data was provided. 2017-02-01 04:04:51 -05: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
Max Paperno
de68db0905 [Simulator] Further improvements (reload radio, momentary switches, etc.) (#4303)
* [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.
2017-01-28 13:43:56 +01:00
Max Paperno
8c9f574f92 [Simulator] Fix the Lua Reload button and help text which was shown/hidden for wrong radio types (the actual reload still worked using F7 key). 2017-01-26 00:25:56 -05:00
Max Paperno
efcfdf171d [Simulator] Fix keymap help text (closes #4289). 2017-01-25 23:43:14 -05: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
Damjan Adamic
36928b7b60 Cosmetics 2017-01-24 11:26:19 +01:00
Damjan Adamic
6d2ea5c801 Changes to allow compilation with Qt5.2 2017-01-24 10:19:20 +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
Max Paperno
992c4c4822 [Simulator] Remove keyboard grabbing, causing issues in Linux. 2017-01-17 02:47:54 -05: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
Max Paperno
5bf7a6c28d Simulator key/mouse mapping improvements (#4175)
* [simulator] Keyboard and mouse control adjustments:
  ~ Make kay/mouse navigation more consistent between radios and ensure keyboard events are always properly detected (eg. after clicking on a control);
  * Fix mouse wheel direction for rotary encoder emulation (fixes https://github.com/opentx/opentx/issues/4160);
  * Fix page up/down buttons on Horus (also #4160);
  ~ Horus rotary encoder can now be controlled with +/- keys (also keeps X/C, otherwise supersedes https://github.com/opentx/opentx/pull/4087 );
  ~ DEL key now another alternative for ESC/BKSP (brings all controls to number pad);
  ~ "=" key now acts same as "+" key (+ requires SHIFT in main row on most US keyboards);
  * Fix controls direction when using mouse wheel over RC switches;
  + Add help text showing keyboard mappings for each radio type (activate on F1 key).

* [simulator] Enable mouse wheel scrolling on radios w/out a rotary encoder (acts as +/- keys on X9D, PU/DN keys on 9X).
2016-12-30 22:36:29 +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
Damjan Adamic
fd01376f1e Reduced Companion simulator CPU usage by a factor of 5. (#4167) 2016-12-27 22:00:23 +01:00
Max Paperno
b0de35f57d Reduce width of all simulator windows (#4154)
* [simu] Reduce width of all simulator windows and also height of Horus window. (https://github.com/opentx/opentx/issues/3135)

* [simu] New vertical channel outputs layout for all simulators, all outputs in one window and horizontally scrollable. Consolidate outputs and gvars widgets to one code base for all sims. Make simulator dialog re-sizable.

* [simu] Make simulation dialog resizable, and greatly reduce minimum size requirements of all simulators. Introduces new VirtualJoystickWidget class with all controls. Simplifies every simulator dialog UI form.
2016-12-23 23:56:28 +01:00
joaquins
d9981b25d9 Fixes #4085: Horus simulator rotary control improvements (#4087)
* Fix for issue with trackpad & mouse wheel: Small movements up or down send delta=0, causing always events in the same direction.
* Changed keys to X,C
2016-12-23 20:13:00 +01:00
Bertrand Songis
d5e4f7b6e9 [Companion] Unix format used everywhere 2016-11-23 16:42:24 +01:00
Bertrand Songis
b0f5b646af [Companion] Copyright added to all files 2016-11-23 16:40:47 +01:00
David S. Beach
3e409a0371 Next branch fixes #3141 Fx key to reload scripts 2015-12-27 11:53:29 -05:00
Bertrand Songis
5445e506a6 Simulator bitmaps moved to different directories 2015-11-08 20:56:23 +01:00
Bertrand Songis
0673663427 [Horus] Simulator refactoring. This one should be nice :) 2015-10-24 19:47:44 +02:00
Bertrand Songis
6f774eb61a [Horus] Companion simulator 2015-10-24 16:08:29 +02:00
Damjan Adamic
b67dfbd086 Cosmetics 2015-07-28 21:15:33 +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
bsongis
8365a8dbaf Constants renamed (so that Taranis hal is now nice) 2015-06-09 21:15:10 +02:00
Damjan Adamic
67cd321400 Re #2260: class Profile dependency removed from simulatorinterface 2015-06-01 21:37:25 +02:00
Damjan Adamic
70ff6b06ed Fixes #2260: added volumeGain in simulator (ported from master) 2015-05-31 15:59:31 +02:00
bsongis
5e7ef29083 Bad use of signal / slot in 9X simulator 2015-05-25 23:40:09 +02:00
bsongis
274303a658 Fixes #1917 2015-05-10 12:36:24 +02:00
Romolo Manfredini
1ecbd4fc33 Improve readability of gvar tab in the simulator 2015-04-26 18:48:34 +02:00
bsongis
2817866ad2 Directories FatFS / CoOS / STM32 libs moved to thirdparty 2015-03-14 11:56:24 +01:00
Andre Bernet
24d67c44ea MENU key shortcut was broken on Taranis since approximately forever 2015-03-09 23:56:36 +04:00
Damjan Adamic
5037dff0d4 Re #1489, #1270, Re #1466: Allow only one instance of new dialogs 2015-01-04 20:07:39 +01:00
Damjan Adamic
bb921a0a7f Ported from master to next:
#1489: TRACE() output intercepted and shown in Companion (shortcut F6)
#1270: simple Trainer Simulator (shortcut F5)
#1466: telemetry simulator (shorcut F5)
2015-01-04 20:07:39 +01:00
Damjan Adamic
24e97a78af Fixes #1731: Joystick calibration crash after channel assignment
also additional fixes to stick postion mapping
2014-11-02 18:54:03 +01:00
bsongis
ef7bbea285 Global Functions now integrated inside Companion - Fixes #502 2014-09-18 15:32:55 +02:00
Damjan Adamic
365c2f9e34 Re #1457 - cleanup 2014-07-07 21:38:55 +02:00
Damjan Adamic
a20e5aee3b Re #1457 - added display of channels 17-32 to Companion simulator 2014-07-06 19:50:42 +02:00
bsongis
ed90015503 Fixes #1272 2014-06-19 11:59:18 +02:00