1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 17:55:19 +03:00
Commit graph

3175 commits

Author SHA1 Message Date
Max Paperno
d864a67c3b [Companion] Restore model drag/drop/compare, many UI improvements to main and sub-windows. (#4769)
* [Companion] Refactor MdiChild & TreeModel, restore drag/drop, and more:
    * Add full drag-and-drop functions to the models list, including model copy, move, and insert actions (also between windows);
    * Add general radio settings copy/paste across file windows;
    * Full MIME support with distinct types for various data (eg. models vs. general settings), also add new type for metadata (header);
    * Copied/cut models can now be inserted in any spot (similar to drop-insert);
    * Deleted/cut models can now be removed entirely (including the empty slot) for all radio types (any models after the removed one move up, like for Horus) (may need to make this an option);
    * Empty model slots can now also be removed (any models after the removed slot move up)  (but total # of slots is still maintained);
    * Default model can be deleted (new default is picked);
    * Completely revamp the actions system (copy/paste/edit/etc) to make it fully functional:
      * Actions exist in the window, not just context menu, therefore all keyboard shortcuts actually work, w/out any duplicated code;
      * Provides access from MainWindow in a comprehensive manner: all actions are available and properly updated based on selections in current editor window, w/out awkward event monitoring;
      * More actions available from context menu, and somewhat reorganized;
      * Also show all actions on mini toolbars right in the MDI window (possibly make optional later);
      * Updated English localization file to account for plurals usage in new action item names (other languages need to be updated);
    * Keyboard navigation in the model list now works/practical;
    * MDI window uses all available height by default;
    * Newly added models/categories are selected and highlighted; Category names are immediately editable; Model editor is/can be launched if wizard is not (need to make option);
    * MainWindow updates:
      * Edit toolbar and menu now showing all available edit actions, with proper context;
      * File menu properly updates with all "general" radio actions: edit/copy/paste settings and simulate radio;
      * Added Windows menu showing list of open windows (eg. to switch when full screen) and tabbed window option (need to make persistent setting);
      * Immediate update of icon size preference;
      * Do not delete toolbars when re-translating UI (they don't lose assigned position);

* [Companion] Restore model compare functionality by using new MIME data exchange system; Add ability to compare any number of models at a time; Multi-model printer now shows custom hardware settings for each dropped model (even from different radios).

* [Companion] Add missing monoblue & monowhite theme sdsync icons.

* [Companion] Model wizard starts with default model name populated.

* [Companion] Properly re-translate UI instead of recreating all the actions/etc.; Tell Mac specifically where to put our actions (seems to make it happier too).

* [Companion] Further improve handling of Window menu items/detection of sub-window changes.

* [Companion] Add file-close action.

* [Companion] Add user options and save preferences:
    * Option to use wizard, open editor, or do nothing on new model creation;
    * Option to remove empty model slots when deleting/moving models (in non-Horus radios);
    * Options to hide toolbars in document windows (r-click on TBs);
    * Save/restore size of document windows, and maximized/tabbed state;
    * Save/restore size/position of model compare window;
    * Add shortcuts for model compare, FW download, log viewer;

* [Companion] Disable being able to "delete" empty model slots (more awkward than helpful).
2017-04-10 19:29:41 +02:00
Max Paperno
ee50096754 [Companion] Fix another possible crash during model conversions (divide by zero). 2017-04-07 04:46:50 -04:00
Max Paperno
629d82fe27 [Simulator] Fix trims issue with AVR simulators (build failure since 57dc015); Fix possible array bounds issue if data is corrupt. 2017-04-07 03:50:40 -04:00
3djc
3a8f9adb4d Enable set binding mode as a firmware option for frsky radios (#4743)
* Enable set binding mode as a firmware option for frsky radios

* Improvements based on Bertrand's comments

* Last feedbacks
2017-04-06 22:36:10 +02:00
Max Paperno
339592d681 [Companion] Fix model setup panel not being populated with data upon initial load (since 4c0dbfc). 2017-04-05 03:56:31 -04:00
Sebastien Charpentier
e264a06670 Updated French translation. (#4740)
* Updated French translation.

* Fixed some mistakes.

* Updated kebyboard shortcut according @mpaperno comment.
2017-04-02 22:24:10 +02:00
Max Paperno
57dc0159d6 [Simulator] Asynchronous SimulatorInterface & a few new features. (#4738)
* [Simulator] Create RadioKeyWidget class for UI buttons & refactor ButtonsWidget; Refactor SimulatedUIWidget (and subtypes) to use new RadioKeyWidgets/ButtonsWidget; Centralize help text for key mappings and get creative with some icons; Simplify some radio UI setups with rectangular buttons.

* [Simulator] Convert all simulator data I/O to signals/slots mechanism:
    * SimulatorInterface/OpenTxSimulator:
       - Now inherits from QObject to allow signal/slot interface;
       - Allows data exchange on a per-item basis (eg. each I/O value is treated separately instead of sending whole arrays or structs of data);
       - Checks for data changes and only emits signals when change is detected (GUI can now assume only new values are being sent);
       - Manages its own 10ms timer (doesn't rely on GUI to do that);
       - Sends "heartbeat" signals @ 1Hz for status monitoring;
    * Simulator GUI:
       - All data is exchanged between GUI elements as well as SimulatorInterface via signals/slots using standardized methods;
       - Data is sent immediately, and only, when actually changed (eg. a control is moved) instead of in bulk at specific time intervals;
       - Similarly, an asynchronous method is used for reading incoming data, w/out timers or loops;
       - Improve VirtualJoystickWidget to be more encapsulated and configurable;
       - Pause telemetry simulator if window is hidden;

* [Simulator] Move SimulatorInterface instance to separate thread, ensure safe asynchronous operations & proper timer interactions; Protect/remove some functions, & reorganize the order (cosmetics).

* [Simulator] Traces are now delivered to OpenTxSimulator and one or more QIODevice(s) can be added as recipient(s); Add SimulatorInterface::getCapability() for compile-time settings; Remove reversed POT1/SLIDER1 mixer exception (Taranis) requirement for SIMU; Fix plus/minus key delay on wheel event w/out encoder.

* [Simulator] Add current knob/slider/trim input value in tool-tips (KnobWidget and SliderWidget).

* [Simulator] Fix trims widget internal value not properly updating, and remove trim influence on virtual joystick X/Y value display (closes #4671).

* [SimulatorInterface] Add handling of transmitter input voltage, including a rough conversion of volts to ADC value for different boards, and default battery volts lookup function; Clear analogs array before starting.

* [Simulator] Add SimulatorInterface::init() method to separate pre-startup tasks; Report actual trim range, not just extended on/off; Change how radio widget states are restored; VirtualJoystickWidget: Connect trim changes directly from simulator, connect joystick events directly, report stick mode directly instead of setting values/constraints externally.

* [Simulator] Calculate default Tx V input based on configured range in radio settings (or warning V+2 for radios which don't support a range).

* [Simulator] Add functional aux. trims for Horus (closes #4699).

* [Companion] Remove problematic QMessageLogContext from AppDebugMessageHandler::messageOutput().

* [Simulator] Prevent trim change via slider if disabled for flight mode (closes #4600).

* [OpenTxSimulator] Fixes for Qt < 5.4.

* [OpenTxSimulator] Fix slot name.
2017-04-02 12:17:37 +02:00
Max Paperno
36bb951314 [Companion] Radio profile/current firmware handling: (#4737)
* 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.
2017-04-02 12:17:06 +02:00
Max Paperno
8b61cd56bc [Simulator] Prevent two possible concurrency issues with FIFOBufferDevice/FilteredTextBuffer. 2017-04-01 20:50:13 -04:00
Max Paperno
5dabe53af4 Minor misc. fixes (#4729)
* [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)
2017-04-01 08:13:24 +02:00
3djc
b22e45cf18 Companion : display warning on eeprom upgrade (#4724)
* Display warning on eeprom upgrade

* Use existing function
2017-04-01 08:10:46 +02:00
Max Paperno
9d3960f0f5 [Simulator] TelemetrySimulator: Fix instance values not being populated with radio settings (also now reloads instance values with rest of radio data). (closes #4711) 2017-03-31 13:19:12 -04:00
3djc
e2722509f7 Instead of copying current profile, start from a blank one (#4714)
* Instead of copying current profile, start from a blank one

* Handle both add profile (which add a new (ie blank) one) and copy current profile which behaves like before (but says it)

* Avoid duplicate code
2017-03-31 16:14:00 +02:00
3djc
b17a6d470f Only allow saving to OTX format (#4727) 2017-03-31 16:13:36 +02:00
Max Paperno
369bac9950 [Companion] Improve handling of non-supported splash image (Horus) in radio profile settings page. (#4720) 2017-03-31 07:56:22 +02:00
Max Paperno
4c0dbfcb6c [Companion] Make simulator startup from ModelEdit panel act the same as simulating a model from the models list widget (that is, including the other radio data as well); Simplify some code, remove automatic signal connections and use new syntax. (#4721) 2017-03-31 07:55:25 +02:00
Arne Schwabe
965849ee41 Small progress on German translations (#4719) 2017-03-31 07:53:40 +02:00
3djc
443d75c0ac Make default category translatable (with dev warning) (#4712) 2017-03-29 15:10:29 -04:00
Arne Schwabe
10c6c9a1ec Add DM002 multipl protocol (#4716) 2017-03-29 15:43:16 +02:00
Andre Bernet
19e3fba836 [companion] Update all translation files 2017-03-28 11:16:07 +02:00
Andre Bernet
02c7ef70ea Add headers to GVAR grid... (Re #4707) 2017-03-28 09:49:31 +02:00
3djc
19688ff924 Add warning for translators 2017-03-28 09:38:40 +02:00
Max Paperno
c8be6d406d [Companion] Replace erroneously removed File menu items (closes #4708). 2017-03-27 23:03:12 -04:00
Bertrand Songis
c9df941ee6 Conversion issues #4570 and #4264 2017-03-27 19:56:55 +02:00
Max Paperno
f5ab145d2f [Companion] Show custom control names throughout the UI (& internal refactoring) (#4693)
* [Companion] Introduce new Boards class to further consolidate hardware metadata and remove some globals.

* [Companion] * RawSource::toString() and RawSwitch::toString() can now return custom hardware names (if given a GeneralSettings object) for the following types (respectively):
    SOURCE_TYPE_STICK, SOURCE_TYPE_SWITCH, SWITCH_TYPE_SWITCH, & SWITCH_TYPE_MULTIPOS_POT;
* RawSource::isPot() and isSlider() can now return their own index position in potConfig[]/sliderConfig[];
* Switch indicator strings can be localized if necessary.

* [Companion] Refactor model printers to use new RawSource/RawSwitch capabilities; Simplify model-to-printer mapping scheme in multimodelprinter; Use const ModelData pointer.

* [Companion] Refactor how RawSource and RawSwitch selection combo boxes are populated, using cache-able data models instead of direct manipulation; Refactor some other Helpers function into their own namespace.

* Cosmetics & forgotten qualifier.
2017-03-27 19:02:19 +02:00
3djc
627347a48c Horus as vario handling too (#4700) 2017-03-27 18:59:34 +02:00
Thibault Jouan
36a6ba24b8 Add firmware update tools location for FreeBSD (#4688)
Add paths for avrdude and dfu-util programs under FreeBSD. SAM-BA does
not exist yet in the FreeBSD port collection.
2017-03-26 20:07:35 +02:00
Max Paperno
1d21309935 [Companion] Speed up loading of model editor (#4689)
* [Companion] Speed up loading of model editor by only displaying Logical Switches and Custom Functions which are actually used.

* [Companion[ Constrain size of Repeat options combo box.

* Missing indent.
2017-03-26 20:06:55 +02:00
Sebastien Charpentier
fc5835a327 Added some tiny cosmetic changes in order to help user to make the link between Companion and the radio menu. (#4694) 2017-03-26 19:51:58 +02:00
mhotar
701125b0ca Images converted to plain SVG #4677 2017-03-25 15:11:29 +01:00
3djc
380024547a Merge pull request #4687 from opentx/LapinFou/FR_Translation
Updated French translation
2017-03-25 13:56:52 +01:00
LapinFou
259f76e1b5 Updated French translation. 2017-03-25 13:53:05 +01:00
LapinFou
0fa50df355 Update French transation. 2017-03-25 13:27:28 +01:00
Max Paperno
dcdbff74b0 [Companion] Translation system improvements. (#4676)
* [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.
2017-03-25 13:06:36 +01:00
Martin Hotar
d5560d68f4 simuicons (#4677)
* simuicons

* exported as plainSVG

* restart icons

* some more of the -active ctates
2017-03-25 13:06:25 +01:00
3djc
98388a7ec8 Used rouding like arm radios (#4683) 2017-03-25 13:04:33 +01:00
Thibault Jouan
1f7dd5a5bc Improve companion CMake programs name condition (#4684)
* Refactor condition to avoid repeating the test in `else' and `endif';
* Suffix programs name with `${C9X_NAME_SUFFIX}' under FreeBSD, as for
  Linux build, else cmake build is failing because a `companion'
  directory already exist in the build directory.
2017-03-25 13:03:52 +01:00
Max Paperno
64e960adc5 [Simulator] Fix startup error in standalone mode when eeprom file does not exist (create file instead, as usual). 2017-03-24 03:40:31 -04:00
Max Paperno
d82244adc0 [Companion] Allow translating some "missing" strings (fixes lupdate warning in multiprotocols.cpp). 2017-03-23 15:27:08 -04:00
Damjan Adamic
93f6abd81a Launchpad changelogs for 2.2.0 RC14 (and compilation fix for trusty) 2017-03-23 19:48:13 +01:00
Max Paperno
d68778ec81 [Simulator] Virtual joystick tweaks. (#4666)
* [Simulator] Create a reusable RadioTrimWidget; Move all trim-related enums to boards.h; Make sure aux trims are accounted for in SimulatorInterface; Trims now use toolbuttons with icons instead of pushbuttons with text.

* [Simulator] New buttons & icons for virtual joystick axis hold/fix toggles; Joystick ball is now slightly scaled to stick area.

* [Simulator] Virtual joystick now "follows" mouse clicks within the stick area (left-click on empty space will attract the control node).
2017-03-22 21:05:27 +01:00
Max Paperno
919e8eb962 [build] Only build companion/simulator resources files once. (#4670)
* [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).
2017-03-22 21:03:17 +01:00
Max Paperno
4faf323aed [Simulator] Fix and refactor Joystick configuration dialog and internal stick-to-radio axis mapping system. Stick was not always showing active in config. dialog, and mappings were sometimes wrong. (#4672) 2017-03-22 21:02:04 +01:00
Arne Schwabe
4f6931faab Fix typo in multi model name (H3 3D instead of H8 3D) 2017-03-22 15:55:37 +01:00
Max Paperno
dc00757cd7 [Simulator] New skin for channel output indicators. (Fix #4638 ) (#4669) 2017-03-22 12:39:02 +01:00
Bertrand Songis
76f5d029a0 Warning when Multiply used on first mix of a channel, fix #4525 (#4647)
* Proposal to fix #4525

* Clearer text

* Companion side

* Translation not needed
2017-03-22 11:39:09 +01:00
Max Paperno
e48b1fd07d {Companion] Unload simulator libraries after each use -- reset all statically initialized firmware variables. (#4655)
* [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.
2017-03-21 19:48:25 +01:00
3djc
f953087311 Merge pull request #4657 from opentx/LapinFou/FR_Translation
French Translation
2017-03-21 14:37:45 +01:00
LapinFou
facbfc7cf8 Small typo. 2017-03-21 13:47:55 +01:00
LapinFou
cfcc120183 Intermediate version. 2017-03-21 13:47:14 +01:00