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

4883 commits

Author SHA1 Message Date
3djc
116d24ec37 Horus : adjust INVERS background for all text sizes (#4755)
* Adjust INVERS background for all text sizes

* More proper fix (I think)
2017-04-08 10:32:30 +02:00
Andre Bernet
87c45beba2 Remove throttle reverse warning for AVR too 2017-04-08 10:32:10 +02:00
Andre Bernet
db48158956 Main view index is now in model settings (fix #4761) 2017-04-07 19:52:28 +02:00
Andre Bernet
f3d56d31c0 Export Horus joystick to lua 2017-04-07 18:45:59 +02: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
Andre Bernet
8794f45816 Check for confirming inversion of throttle channel is no more possible since Virtual Inputs got introduced (Fix #4757) (#4758) 2017-04-06 22:34:11 +02:00
3djc
b291faf7a7 Add unit to lua getFieldInfo (#4750)
* Create getUnit lua function

* Cosmetics

* Expend getFieldInfo instead of creating a new function

* Streamline units table

* @projeckk2glider comments

* Cosmetics

* Use simple division
2017-04-06 22:31:17 +02:00
3djc
537fe906ce Add GVAR handling similar to X9 (#4749) 2017-04-06 22:30:50 +02:00
3djc
0cdff35bd3 More italian plural unit support (that will just say something, since I do not speak italian, don't know if it will be right) 2017-04-03 09:50:53 +02:00
3djc
7e8cec005b Fix #4742 2017-04-03 09:03:07 +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
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
Damjan Adamic
9c7c8244f4 Fixes #4715: model notes were read from the settings path, but should be read from SD card path (#4728) 2017-04-01 08:11:16 +02:00
Damjan Adamic
fa275793ad simpgmspace CoGetOSTime() was returning wrong values (too big) 2017-03-31 19:52:20 +02:00
Damjan Adamic
2aebcb842a Lua docs update: lcd.drawText() added link to fonts 2017-03-31 18:33:48 +02:00
3djc
d1cacc2f0f Use filename when no name is defined (#4726) 2017-03-31 16:12:43 +02:00
3djc
9ff1dab6b8 Hide non working serial2 for Horus 2017-03-31 10:06:34 +02:00
3djc
89bfd6dcf4 Earlier is better 2017-03-30 08:43:50 +02:00
3djc
361b2b707f Do not recompile if firmware is already there
Always print filename on compile error so that the email handler can attach the error log
2017-03-30 08:15:58 +02:00
Max Paperno
3eb39ddac2 [build] Add "all-libsimulators" target to build all simulator flavors at once. (#4710)
* [build] Add "all-libsimulators" target to build all simulator flavors at once.

* [build] Refine the "all simulators" target setup and deal with GNU 'make' parallelism issue (ninja=faster); rename to "all-simu-libs".
2017-03-29 15:46:48 +02:00
Max Paperno
6709c55fea [Simulator] Fix timing issues in all AVR simulators on Windows (MSVC) (#4709)
* [simpgmspace] Fix 2MHz and 16KHz timers on MSVC builds (fixes LCD/key/switch response delay on all AVR simulators); Introduce experimental use of Qt to simplify x-platform code (disabled by default).

* Qt timer scaling fix.
2017-03-29 15:44:51 +02:00
Arne Schwabe
10c6c9a1ec Add DM002 multipl protocol (#4716) 2017-03-29 15:43:16 +02:00
Andre Bernet
061297e9b5 Harmonize play delay across radios 2017-03-28 10:51:09 +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
Bertrand Songis
4086374249 Compilation fixes 2017-03-27 18:43:23 +02:00
Max Paperno
aaaaf1a806 [simulation] Fix reported multi-position switch output being outside of normal range due to SIMU exception in mixer.cpp. 2017-03-27 01:31:59 -04:00
Bertrand Songis
6c28efdd4f Fixes #4695 2017-03-26 20:40:13 +02:00
Damjan Adamic
29018fae9c Keys code cleanup and documentation (#4692) 2017-03-26 20:11:06 +02:00
3djc
bed9f56b9d Fix non overlapping text (#4691) 2017-03-26 20:04:49 +02:00
Damjan Adamic
2bbb704c3e Fixed: AudioQueue::playTone() with 0 frequency caused radio reboot (divide by zero) 2017-03-26 19:16:08 +02:00
Damjan Adamic
5e55a3f5d3 Lua killEvents() docs update 2017-03-25 20:37:05 +01:00
Martin Hotar
e1dac6e58e cz translations - radio part (#4675)
* cz translations

* cz translations
2017-03-23 18:22:32 +01:00
3djc
d586b7cd2b Allow neg value for telem comparison fonctions (#4667)
* Allow neg value for telem comparison fonctions

* Protect avr
2017-03-22 21:57:45 +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
Arne Schwabe
4f6931faab Fix typo in multi model name (H3 3D instead of H8 3D) 2017-03-22 15:55:37 +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
Bertrand Songis
618345a2ef Fixes #4589 (#4644)
Produces a segfault with the telenowa script (missing bitmap)
2017-03-22 09:41:07 +01:00
Andre Bernet
12d231443c Output reset wasn't saved (Fix #4662)
Remove dead code
2017-03-22 08:38:23 +01:00
Bertrand Songis
b81c483be3 Fixes #3795 (#4643)
Multiple bugs found
2017-03-21 20:11:48 +01:00
Bertrand Songis
e0022ac287 Bitmaps with a too big filename were displayed in the selection popup (#4646) 2017-03-21 19:49:58 +01:00
Damjan Adamic
dc89d2d630 Projectkk2glider/performance tests (#4658)
* Transparency and fonts gtests added (Horus)

* Added to CLI: Graphics performance test, memory speed test (Horus)

* Gtests fixes
2017-03-21 19:47:41 +01:00
Arne Schwabe
fc376b3603 Define multi subtype strings in the same way as all other strings (#4656) 2017-03-21 19:40:08 +01:00
3djc
c16256bb8a Fix 4652 (#4653) 2017-03-21 10:06:01 +01:00
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
Damjan Adamic
8375304d61 Several fixes for Lua Widgets and Themes options (#4648) 2017-03-21 07:42:00 +01:00
Damjan Adamic
1f1098e270 Lua getValue() docs updated (fixed source links for 2.2 added) 2017-03-20 17:51:02 +01:00
Damjan Adamic
fab3b96815 Compilation fix for gcc 6.2.0 2017-03-19 22:30:40 +01:00
Max Paperno
1973eaf67c [Simulator] Improve CoGetOSTime() for MSVC. (#4635)
* [Simulator] Increase resolution of CoGetOSTime() on Windows MSVC (possible fix for #4529, ref. #4342).

* Return total time, not delta time.

* Improve efficiency.
2017-03-19 20:07:30 +01:00
3djc
eba95dd227 Allow HAPTIC to be defined for avr too (#4633) 2017-03-19 20:06:31 +01:00