Commit Graph
210 Commits
Author SHA1 Message Date
philmozandGitHub 44ea59bf87 fix(simulator): libraries not unloading on closing simulator window (#6059) 2025-04-13 15:33:49 +10:00
Neil HorneandGitHub 00d0384008 fix(sim): libsims not unloading (#6005) 2025-04-01 13:00:02 +10:00
Neil HorneandGitHub 149e1a2df0 feat(cpn): add support for surface radios inc Radiomaster MT12 (#5381) 2024-09-26 20:39:51 +10:00
Peter FeerickandGitHub ca459bb91c chore: replace all instances of outdated header (#5336) 2024-07-29 09:35:40 +10:00
4b917b762c feat: use any source for expo/weight/offset (#5220)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: elecpower <elecpower@users.noreply.github.com>
2024-07-26 20:51:21 +10:00
Neil HorneandGitHub 27f53ff195 enh(cpn): Cloudbuild support - phase 1 (#4856) 2024-05-28 10:50:02 +10:00
a3faf7e9df chore(cpn): update to Qt 5.15.2 and rework application packaging (#4270)
Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
2023-11-10 15:12:28 +10:00
Neil HorneandGitHub d3ed7c12e6 feat(cpn): Play radio-generated audio in global/special function editor (#3910)
* enh(cpn): play sounds in model functions editor

* add recorded radio sounds
2023-09-04 19:52:12 +10:00
50bbea48bd fix(cpn): Radio settings yaml for adc refactor (#3862)
* Remove commented lines

* Restrict calibration to sticks, pots and sliders

* Fix pots and sliders config to support pre and post adc refactor

* fix: pfeerick sucks at rebases

* chore: Add more bits missed during rebase

* chore(cpn): use adc version constant

* fix(cpn): calibration encode mapping

---------

Co-authored-by: elecpower <neilh713@tpg.com.au>
2023-08-16 10:11:31 +10:00
2f253d9139 fix(cpn): Pot and slider post ADC refactor fixes (#3731)
* Semantic version housekeeping

* Fix pots and sliders center beep and warnings yaml for adc refactor

* Fix sliders and pots mapping

* Fix 6POS libsimu

* Fix trims

* Updated 6POS calculation thanks to philmoz

* Fix version adc implemented

---------

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
2023-07-27 14:23:15 +10:00
Neil HorneandGitHub f800447cd5 feat(cpn): Radio types can reference any libsim and/or firmware download id (#3432)
* Radio profiles reference any libsim and/or firmware download id

* Revert files filter for now
2023-05-07 18:01:14 +10:00
Neil HorneandGitHub d952333037 feat(cpn): Status dialog when writing models and settings to radio (#3043) 2023-01-26 13:53:13 +10:00
philmozandGitHub af040c9e2e fix(cpn): Ignore 'Quit' event in main window on MacOS if simulator running (#2874)
Prevents app crashing on exit while the simulator is open.
2022-12-20 21:15:35 +10:00
Neil HorneandGitHub 85c098f11c cpn(fix): Release list order use version when available otherwise use date (#2823) 2022-12-07 09:37:14 +10:00
73861554ec feat: Support for 8s Cell Sensor such as FrSky FLVS ADV (#2302)
* first commit for FrSky 8s Lipo Sensor

FLVS Advanced transfers up to 8 cell voltages for Cels sensor

* correcting mistake made transferring local change to PR

* complementary extension of Companion telemetry simulator to enable simulation of  8 cells

* change to allow selection of cells 7 and 8 in calculated sensor with formula Cell

* (cpn) Add bin and yml conversions and basic semantic version helper

Co-authored-by: elecpower <neilh713@tpg.com.au>
2022-09-27 20:06:26 +10:00
Neil HorneandGitHub dc3b55771f fix: cpn: custom curve edit default points and expand curve tab details column (#1815) 2022-04-14 10:16:57 +10:00
ab15a5a514 chore: Companion - port of OpenTX function switches management (#1694)
* TPro - Port of OpenTX function switches management (https://github.com/opentx/opentx/pull/8847)

* cleanup

* Corrections

* Fix YAML generation and adjusted switches to match TPRO firmware

Co-authored-by: Batam <batam@macbook-pro.home>
2022-03-21 10:43:27 +10:00
Neil HorneandGitHub e0e196a6e6 feat: Companion - New model curve tab layout, curve edit dialog and mix edit curve view (#1484)
Add curve image and double click to edit to input edit, mix edit and outputs
2022-03-08 13:10:13 +10:00
elecpower 1a8502e284 Refactor setup hardware, trainer and calibration 2021-04-16 07:02:09 +10:00
elecpower ad0134d3ce Add gvref data model to value/gv fields in inputs, outputs and mixes 2021-02-27 08:08:35 +11:00
elecpower 19cb9ef441 Model printer use adjust ref toString function 2020-12-13 21:02:28 +11:00
elecpower 83561fe6fe Refactor curve reference 2020-12-05 06:50:43 +11:00
elecpower c15dd90986 Improve memory management 2020-10-22 09:27:34 +11:00
Bertrand Songis edf65f0b28 Version parsing fix 2020-06-13 12:50:44 +02:00
Bertrand Songis 38f6d5772f Change binaries version (origin added: otx / frsky / tbs / radiomaster) 2020-06-09 10:46:22 +02:00
3djcandAndre Bernet 8b49daa455 Fix T16 companion inport warning (#6965)
* Add JumperTX wartning also when reading from radio

* Reuse

* Reword

* Cosmetics

* Cosmetics
2019-10-18 16:15:21 +02:00
Bertrand Songis 725d5606d7 More warnings removed 2019-08-12 15:01:10 +02:00
Neil HorneandBertrand Songis b4175eade3 Companion enhancements for checklist editor, model print and compare (2 3 branch) (#6434)
* Model print and compare include GFs enhancement

* Model print and compare include checklist contents

* Add missing brackets and code tidy up

* Print message if cannot open or read checklist file

* Missing GV label translation
Move some checklist code to helpers

* Refactor to use helpers and add cursor position

* Move improved version of removeAccents to helpers and apply to checklist

* Force fixed width font for edit window
2019-05-20 18:56:23 +02:00
Max Paperno ed255ce1c3 [Companion] Updates to use new RawSource data models in UI. 2018-07-12 13:20:06 -04:00
Max Paperno 63476c03f3 [Companion] Implement application settings import and export via GUI and CLI. 2018-06-29 20:18:35 -04:00
Max PapernoandBertrand Songis 2eec091ac0 Companion custom functions sound playback fixes (#6000)
* [CompanionIcon] Can now add multiple image files to icon for representing different UI states (checked/active/etc).

* [Companion][CustomFunctionsPanel] Fix sound file locked after playback (fixes #5222, fixes #5997); Refactor play button (fixes #4929); Create new QMediaPlayer on each play and load in "LowLatency" mode instead of stream.
2018-06-29 08:04:45 +02:00
3djcandBertrand Songis a9e88c272a Remove misleading RC99 (#5982)
Replace 'release' by 'version' in a few places
2018-06-23 09:07:13 +02:00
Max Paperno 41419b4cee [Companion] Move some single-use functions out of helpers module; cosmetics. 2018-06-04 05:15:16 -04:00
Neil HorneandBertrand Songis 33998c2981 Add Companion Outputs context menu (#5665)
* Start of cut copy paste delete

* Outputs context menu continued

* Mods from testing

* Add tool tip to channel label
2018-03-25 09:44:41 +02:00
Max PapernoandBertrand Songis f018425e12 [Companion] Qualify all translation strings (#5557)
* [Companion] Qualify all remaining QObject translations with proper class/object names; Centralize some common strings into constants.h.

* [Companion] Replace all instances of some common strings with macros from constants.h.

* [Companion] Fix translation warnings from lupdate.
2017-12-25 13:36:34 +01:00
Max PapernoandBertrand Songis 0dbad182e8 [Companion] Radio conversion improvements (#5534)
* Move MultiposPots & MultiposPotsPositions capability lookups and getAnalogInputName() to Boards class.

* Add RawSource::isAvailable() and RawSwitch::isAvailable(); Add board type param to various RawSource lookup functions.

* Add CustomFunctionData::toString(), FlightModeData::toString(), FactoryInstalledPots board capability, MAX_SWITCH_TYPE, & break out GeneralSettings source/switch defaults to own function.

* Add RadioDataConversionState class for tracking conversion actions.

* Implement RadioDataConversionState handler, add conversion process report, and improve/fix conversion issues:
    * Make sure all switches/pots/knobs have default configs for destination board type;
    * Try to move more custom control names, intelligently;
    * Convert model timers and throttle source;
    * Adjust for Horus 6P switch in place of Taranis S2 knob;
    * Adjust for extra sliders on X12 and X9E to move LS and RS to proper slots as needed;
    * Make sure ALL controls are validated, eg. to always account for extra trims/analogs/switches/etc which don't exist on destination;
    * Properly indicate invalid RawSource::toString() items with "???".

* Allow user to cancel out of file conversions & provide ample warnings if switching radio type/profile with unsaved file(s) still open;
Also: Fix bug with some orphaned MdiChild windows never being deleted; Create static bool Storage::isBoardCompatible(b1, b2).

* Add maxLibQt "stub" (will not compile).

* Add ExportableTableView for better presentation of conversion results table.

* Move getFourCC() and isBoardCompatible() to Boards class.
2017-12-18 22:56:39 +01:00
3djc 8dafd4680b Fix 2017-12-01 19:32:12 +01:00
3djcandBertrand Songis 3eccbc2963 Allow RC type version number ( translated 900 to 999) (#5450)
Allow RC type version number (translated 900 to 999)
2017-12-01 15:59:29 +01:00
Bertrand Songis b55070f939 [Companion] Sensor switches support added
+ some refactoring to hide irrelevant switches in the combobox

More refactoring to come:
 - have only one SwitchModel per model instead of one per tab
 - only do the update work if something has changed
2017-07-30 12:12:27 +02:00
Max PapernoandBertrand Songis 72b1ad085f [Companion] Show custom channel, G-Var, and Curve names throughout UI. (#4874)
* [Companion] Move RadioData constructor.

* [Companion] Move getCapability(SwitchPositions) to Boards class.

* [Companion] Show custom channel, g-var, & curve names throughout UI; Remove redundant name formatting and other unused functions in ModelPrinter and Helpers; Add CustomFunctionData::isEmpty().

* [Companion] Add LogicalSwitchData::isEmpty().

* [Companion] Fix small bug in HardwarePanel.

* [Companion] Rename logical switches to "LSw##" in selections lists to avoid confusion with "L#" and "LS" hardware controls; remove unused RotaryEncoderString().
2017-04-29 09:03:53 +02:00
Max PapernoandBertrand Songis 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
Max PapernoandBertrand Songis 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
Max PapernoandBertrand Songis 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
Max PapernoandBertrand Songis 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 PapernoandBertrand Songis 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 PapernoandBertrand Songis 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 SongisandGitHub b0eeeb4dbc Fixes #4315 (#4406) 2017-02-05 22:01:44 +01:00
Max PapernoandBertrand Songis 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