Compare commits

..

237 Commits

Author SHA1 Message Date
Arne Schwabe eefbf6cc21 Copy strings for multimode support from en.h.txt to other languages 2016-03-27 22:46:53 +02:00
Arne Schwabe 0c0d0ded91 Add FY326 protocol 2016-03-27 22:45:24 +02:00
Arne Schwabe cbaae312c9 Implement DSM2/DSMX frame format options 2016-03-27 22:45:21 +02:00
Arne Schwabe b7a4f6632f Implement autobind and low power setting and specifying a custom protocol for the multi module
Specifying a custom prtocol is useful if OpenTX firmware is older than the multi module firmware
and the protocol in question is not yet in the protocol list of the OpenTX firmware.
2016-03-27 22:31:56 +02:00
Arne Schwabe 49c25df507 Multi module support for Taranis
Reuse some of the DSM2 routines to avoid code duplication.

This first version only implements the protocol on the Taranis. (and not

Telemetry code is currently untested and will not work (Polarity mismatch). The main protocols to use telemetry are FrSky protocols and not a high priority on the Taranis.

Patch v3: Fix myeeprom.h, include option value in menu.
Patch v4: Fix identing, name substructs of modeldata
2016-03-27 22:20:41 +02:00
Bertrand Songis 82b82f34fe Update DONATIONS.txt 2016-01-04 22:52:22 +01:00
Damjan Adamic d40a6e52f0 Small fix for nightly-21/release-firmware.sh (ported from next branch) 2016-01-04 22:39:13 +01:00
Bertrand Songis 5d753527f7 Merge pull request #3201 from opentx/projectkk2glider/new_build_scripts
Projectkk2glider/new build scripts
2016-01-04 22:22:59 +01:00
mhotar 21594aa84c CZ translation-minor update 2016-01-04 19:36:04 +01:00
Damjan Adamic 6243b19a8c More changes 2016-01-04 19:09:34 +01:00
Damjan Adamic 7bef0eedbb Revision fetched after the repository update.
Removed unused files.
Unification of nightly and release scripts
Code cosmetics
2016-01-04 19:02:02 +01:00
Bertrand Songis c7874d3d79 Update DONATIONS.txt 2016-01-04 06:38:44 +01:00
Bertrand Songis 6cdec34a3c Update DONATIONS.txt 2016-01-03 22:00:44 +01:00
Bertrand Songis 64aa1f7d9e Release notes updated 2016-01-03 21:57:45 +01:00
Bertrand Songis 74055055af Update DONATIONS.txt 2016-01-03 21:46:18 +01:00
Bertrand Songis 043f35f1d6 Fixes #3103 2016-01-03 21:37:43 +01:00
Damjan Adamic a277d456d9 Release notes updated 2016-01-03 19:38:14 +01:00
Bertrand Songis 60b714ace3 Fixes #3177 2016-01-03 19:31:47 +01:00
Damjan Adamic 083867ea7b Release notes updated 2016-01-03 18:59:29 +01:00
Bertrand Songis e366389c01 Fixes #2917 2016-01-03 18:15:41 +01:00
Damjan Adamic 8fc733a3c6 Version moved to 2.1.7 2016-01-03 17:46:21 +01:00
Damjan Adamic b41031d64d Release notes updated 2016-01-03 17:45:59 +01:00
Damjan Adamic 285731aaf3 Jenkins scripts latest state from the server 2016-01-03 16:57:38 +01:00
Bertrand Songis cfdd572c8f Update DONATIONS.txt 2016-01-03 16:28:57 +01:00
Bertrand Songis d8583906e1 Merge pull request #3186 from opentx/projectkk2glider/issue_3130_rpm_problem_fedora
Fixes #3130: remove /lib paths from RPM
2016-01-03 15:19:43 +01:00
Bertrand Songis 2eba031009 Update DONATIONS.txt 2016-01-03 09:00:38 +01:00
Bertrand Songis 30a3e6db92 Merge pull request #3175 from opentx/projectkk2glider/issue_2974_calibration_gui
Fixes #2974: Hardware/Calibration tab split int two tabs:
2016-01-02 23:17:02 +01:00
Bertrand Songis bb87e907c2 Update DONATIONS.txt 2016-01-02 22:36:22 +01:00
Bertrand Songis 3cffa328d1 Update DONATIONS.txt 2016-01-02 21:37:59 +01:00
Bertrand Songis e9c4735049 Update DONATIONS.txt 2015-12-31 08:40:51 +01:00
Bertrand Songis ed85532e34 Update DONATIONS.txt 2015-12-30 21:29:05 +01:00
Damjan Adamic ad20b96364 Fixes #3130: remove /lib paths from RPM 2015-12-30 20:00:34 +01:00
Damjan Adamic b8cf1ff9a8 Fixed: OpenTX Bootloader bin2lbm conversion error (last partial chunk was missing) 2015-12-28 21:43:50 +01:00
Bertrand Songis 7a91db3d05 Update DONATIONS.txt 2015-12-27 20:57:48 +01:00
Bertrand Songis 7f9299f9e7 Merge pull request #3174 from opentx/dsbeach/issue3141-fx-key-to-reload-scripts
Dsbeach/issue3141 fx key to reload scripts
2015-12-27 10:32:23 +01:00
Damjan Adamic 4c113b6518 Fixes #3040: Application Setting 'Enable automatic backup before writing firmware' was not saved 2015-12-26 20:58:08 +01:00
Damjan Adamic 12e15650e8 Fixes #3146: fixed Fahrenheit temperature conversion error (if PREC was not 0) 2015-12-26 19:39:55 +01:00
Damjan Adamic 1bbe578c71 Fixes #2974: Hardware/Calibration tab split int two tabs: Calibration (using table widget, all calibration values shown) and Hardware 2015-12-26 19:20:13 +01:00
dsbeach f6463b64b3 Fixes #3141 - Fx key to reload scripts
Added PF7 - reload Lua scripts
2015-12-26 11:34:16 -05:00
dsbeach f6808c9adf Fixes #3141 - Fx key to reload scripts
Added PF7 - reload Lua scripts
2015-12-26 11:33:50 -05:00
Damjan Adamic 6017fa7892 Fixes #3121: Companion telemetry sensors Ratio and Offset value increment/decrement ignores precision 2015-12-26 15:05:44 +01:00
projectkk2glider 1494b3db98 Re #3156: VC++ compilation fix 2015-12-26 14:36:42 +01:00
Damjan Adamic a9b3b40352 Fixes #3156: Outputs Subtrim, Min and Max values rounding problem fixed 2015-12-26 13:09:05 +01:00
Damjan Adamic 10d29e93b5 Fixes #3117: Telemetry sensor Ratio parameter rounding problem fixed 2015-12-26 12:38:40 +01:00
Bertrand Songis e2c7f16703 [Taranis] It was impossible to select the [Range Check] button on LR12 in EU mode 2015-12-25 11:43:16 +01:00
Bertrand Songis f6e4a47428 Update DONATIONS.txt 2015-12-22 06:35:05 +01:00
Bertrand Songis c0b2b18654 Update DONATIONS.txt 2015-12-21 06:33:51 +01:00
Damjan Adamic 2e324f7815 Changed line endings to Unix style 2015-12-19 19:35:16 +01:00
Damjan Adamic 414779f35c Re #3160: fixed Windows compilation, help/warnings shown in a message box (they were not visible on Windows) 2015-12-19 19:18:51 +01:00
Bertrand Songis 6364c71ed9 Merge pull request #3163 from opentx/projectkk2glider/issue_3160_simulator_commandline
Projectkk2glider/issue 3160 simulator commandline
2015-12-18 22:25:33 +01:00
Damjan Adamic 93e7619144 Re #3160: better help 2015-12-18 20:39:45 +01:00
Damjan Adamic 0bfcd8450e Fixes #3160: command line options support added to standalone simulator (radio type and eeprom file) 2015-12-18 20:33:49 +01:00
Bertrand Songis d4c0271826 Fixes #3150 2015-12-16 07:13:01 +01:00
Bertrand Songis 583943c207 Update DONATIONS.txt 2015-12-16 07:02:56 +01:00
Bertrand Songis 5e4a585a01 Merge pull request #3148 from opentx/dsbeach/issue3147-telem-sim-aspd-as-knots
Changes to send ASpd as knots
2015-12-14 22:27:40 +01:00
Bertrand Songis 73a82afff1 Merge pull request #3152 from opentx/driver33/pl_tr
PL Translation fixes
2015-12-14 22:25:58 +01:00
driver33 b929000beb PL Translation fixes 2015-12-14 22:05:14 +01:00
Damjan Adamic 1286b7e19c Re #3127 and #2921: getFlightMode() can now return specified flight mode data 2015-12-14 20:39:21 +01:00
Bertrand Songis df909159df Update DONATIONS.txt 2015-12-14 18:32:18 +01:00
David S. Beach 50aa3f7a2f Changes to send ASpd as knots 2015-12-14 11:39:52 -05:00
Andre Bernet a3e7154467 Ignore list updated 2015-12-14 10:17:24 +04:00
Bertrand Songis 05c6d8e9c1 VC++ link error 2015-12-14 07:14:10 +01:00
Bertrand Songis 5e4cd75469 Merge pull request #2946 from flacjacket/python2-3
Python 2/3 compatibility (and PEP 8)
2015-12-13 21:11:25 +01:00
Bertrand Songis 4c6063abb6 Merge pull request #2970 from opentx/bsongis/sport_powerbox
[S.PORT] Powerbox fields added
2015-12-13 21:10:00 +01:00
Bertrand Songis 44f961f2f4 Horus bitmaps removed 2015-12-13 21:08:01 +01:00
Bertrand Songis 2449a0dedb [Powerbox] 0xOB20 field added. Radio translations 2015-12-13 21:04:59 +01:00
Bertrand Songis 857efbc7c5 [Powerbox sensor] First tests done. It remains the 0x0B20 to add 2015-12-13 21:04:59 +01:00
Bertrand Songis 0a0eb942f1 [S.PORT] Powerbox fields added 2015-12-13 21:04:58 +01:00
Damjan Adamic 304b55b8bf Fixes #3061: some wizard lines were not visible anymore (warn users in changelog to copy new wizard to their SD cards) 2015-12-13 20:50:08 +01:00
Damjan Adamic 57e3d1afa5 Fixes #3043: unit for Air speed sensor set to knots 2015-12-13 20:38:04 +01:00
Damjan Adamic 6b8675f486 Inputs were not exported as Lua fields 2015-12-13 19:24:41 +01:00
Bertrand Songis a8c794f4cf Merge pull request #3139 from mikeller/invert_serial_rx
Invert serial rx
2015-12-13 18:46:55 +01:00
Bertrand Songis 98bb86ef5b Merge pull request #3143 from opentx/dsbeach/issue2919-telemetry-sensors-simulator
Dsbeach/issue2919 telemetry sensors simulator
2015-12-13 18:43:48 +01:00
David S. Beach c38173d55e Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-13 11:41:20 -05:00
David S. Beach 8d4bfe48a8 Minor issues discovered during port to next 2015-12-13 11:40:40 -05:00
mikeller 4418b6d334 Changed inversion to a separate option. 2015-12-13 21:19:51 +13:00
Bertrand Songis 3b1ecb21c1 Merge pull request #3124 from opentx/dsbeach/issue2919-telemetry-sensors-simulator
Dsbeach/issue2919 telemetry sensors simulator
2015-12-12 20:56:56 +01:00
Bertrand Songis c581535ceb Again 16 channels for Crossfire.
I hope they won't change their mind again
2015-12-12 20:55:53 +01:00
David S. Beach 18f5c7476a Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-12 10:57:06 -05:00
Bertrand Songis 89339c3d81 Crossfire support added to Companion 2015-12-12 14:45:00 +01:00
Bertrand Songis a2e0ce8304 Ignore list updated 2015-12-12 13:53:13 +01:00
Bertrand Songis 86bc97dc4c Crossfire protocol now accepts 12 channels instead of 16 2015-12-12 13:51:17 +01:00
Bertrand Songis 7592b3d78a Ignore list updated 2015-12-12 13:48:27 +01:00
mikeller 00a44257be Merge branch 'invert_serial_rx' of https://github.com/mikeller/opentx into invert_serial_rx 2015-12-12 23:33:09 +13:00
Michael Keller 12d9c20e0e Reverted Makefile changes, some fixes to FrSky D (inverted) handling. 2015-12-12 23:20:59 +13:00
mikeller bee2d56ac3 Added support for FrSky D with inverted signal for 9XR pro. 2015-12-12 23:20:59 +13:00
Michael Keller 68b0a63952 Reverted Makefile changes, some fixes to FrSky D (inverted) handling. 2015-12-11 12:11:16 +13:00
Bertrand Songis 702562e324 Crossfire has 16 channels (fixed) 2015-12-10 21:01:11 +01:00
Bertrand Songis 7a49d30c7c Crossfire has 16 channels (fixed) 2015-12-10 20:41:22 +01:00
David S. Beach ece3a34faa Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-10 09:31:49 -05:00
mikeller 01a51ade7c Added support for FrSky D with inverted signal for 9XR pro. 2015-12-11 02:39:13 +13:00
mikeller 3610b87912 Reverted changes intended for branch. 2015-12-11 01:08:54 +13:00
Bertrand Songis 9085529a20 Update DONATIONS.txt 2015-12-09 22:11:23 +01:00
Andre Bernet ee4bc74c62 Support language-specific chars in notes 2015-12-09 12:00:00 +04:00
mikeller 50b4453461 Changed Makefile to 9XR pro config. 2015-12-09 18:14:51 +13:00
David S. Beach dc89fd2b91 Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-08 15:17:24 -05:00
dsbeach e56d8c931c Modified dialog layout for linux (forced 8pt fonts)
Added log file timestamp to replay log status info

Fixed crash when logfile format changed mid-day
2015-12-08 15:16:48 -05:00
Andre Bernet 2a10dcc4b5 AR9X firmware flashing fallback was wrong 2015-12-08 11:25:18 +04:00
Sean Vig a28bf112e8 Use with open(...) as ...: context managers
Instead of manually opening and closes file objects, use the context
manager that will properly handle opening and closing files for us, even
in the event of some error
2015-12-07 08:51:09 -06:00
Sean Vig c310a43e1c PEP8 and break up radio/util/tts.py
Break up tts.py so that each language configuration of system and custom
sounds is done in a separate file, also fixing PEP8 problems with
tts.py, mostly whitespace related
2015-12-07 08:51:09 -06:00
Sean Vig d1be972872 PEP8 radio/util/translate.py
Remove unused imports, fix whitespace, fix undefined variable
2015-12-07 08:51:09 -06:00
Sean Vig 03dda8f77e PEP8 radio/util/taranisicons.py
Remove unused imports, fix whitespace, fix indentation
2015-12-07 08:51:09 -06:00
Sean Vig 4e065d0849 PEP8 radio/util/sportparse.py
Remove unused import, fix whitespace, indentation, and comments
2015-12-07 08:51:09 -06:00
Sean Vig 7e57ed4c89 PEP8 radio/util/sinus.py
Fix whitespace
2015-12-07 08:51:09 -06:00
Sean Vig d254b8d3f6 PEP8 radio/util/parse.py
Fix whitespace and indentation
2015-12-07 08:51:09 -06:00
Sean Vig 6868a6a91a PEP8 radio/util/luaexport.py
Fix indentation
2015-12-07 08:51:08 -06:00
Sean Vig 77d6049ea7 PEP8 radio/util/include-guard.py
Split imports, fix whitespace
2015-12-07 08:51:08 -06:00
Sean Vig 6bd93619c3 PEP8 radio/util/img2lbm.py
Fix whitespace
2015-12-07 08:51:08 -06:00
Sean Vig 8a493e4cfb PEP8 radio/util/font2png.py
Fix whitespace and indentations, remove semicolons
2015-12-07 08:51:08 -06:00
Sean Vig f957fa8a62 PEP8 radio/util/fat12.py
Fix indentation and whitespace
2015-12-07 08:51:08 -06:00
Sean Vig dac95f34ad PEP8 radio/util/dsm2.py
Fix indentation and whitespace
2015-12-07 08:51:08 -06:00
Sean Vig efbf0c7016 PEP8 radio/util/copyright.py
Remove unused imports, fix whitespace, fix comments
2015-12-07 08:51:08 -06:00
Sean Vig 0fdcfa5536 PEP8 radio/util/codecs.py
Fix white space
2015-12-07 08:51:08 -06:00
Sean Vig 1a1160f4d2 PEP8 radio/util/capitalize.py
Split imports, fix indentation
2015-12-07 08:51:08 -06:00
Sean Vig c70cdc53ed PEP8 radio/util/bin2lbm.py
Fix indentation
2015-12-07 08:51:08 -06:00
Sean Vig b83786d1ac PEP8 radio/util/addtr.py
Split imports, fix indentation
2015-12-07 08:51:08 -06:00
Sean Vig ec10caaca4 PEP8 radio/util/add-issue-links.py
Remove unused imports, fix indentation
2015-12-07 08:51:07 -06:00
Sean Vig d4ff720bad Remove radio/utils/compile.py
See https://github.com/opentx/opentx/pull/2946#issuecomment-145599720
2015-12-07 08:51:07 -06:00
Sean Vig ee6cd81069 Update Makefile to allow Python 3
We no longer must enforce Python 2, so let Python 3 be run if that is
the system Python
2015-12-07 08:51:04 -06:00
Sean Vig fdfe7a1737 Use Python 2/3 compatible scripts
Almost entirely fixing print statements, but also a couple importing
changes, wrapped in try/excepts, and one case where dict.keys() not
being a list would be a problem.

Also reverts e41139a397

The real fix for #1907
2015-12-07 08:50:27 -06:00
Bertrand Songis e40f936ba1 Merge pull request #3131 from opentx/projectkk2glider/issue_3096_table_layout_optonal
Projectkk2glider/issue 3096 table layout optonal
2015-12-06 22:26:02 +01:00
Bertrand Songis c1e5139e9c Merge pull request #3127 from opentx/projectkk2glider/issue_2921_lua_flight_mode
Fixes #2921: Lua getFlightMode() function added
2015-12-06 22:21:41 +01:00
Damjan Adamic 6de2575539 More layout changes (1366 ms with table layout) 2015-12-06 20:44:03 +01:00
Damjan Adamic c7093a8a7d Resize policy back (586 ms with grid layout, 1347 ms with table layout) 2015-12-06 20:44:02 +01:00
Damjan Adamic eb34c5989e timing code (796 ms with grid layout, 1394 ms with table layout) 2015-12-06 20:44:02 +01:00
Bertrand Songis 4ae719488d Update DONATIONS.txt 2015-12-06 19:52:50 +01:00
Damjan Adamic fc82ffd1d7 TableWidget only used if -D TABLE_LAYOUT=yes compile option is defined 2015-12-06 19:41:11 +01:00
David S. Beach 99cbff143d Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-06 12:56:12 -05:00
dsbeach 0ee86e0c41 Added ratio option for RxBt and finally came up with a reasonable Qt dialog for both Windows and Linux (I hope!). 2015-12-06 12:55:43 -05:00
Damjan Adamic 606c9534fc Jenkins build scripts for nightly-22 removed from master (they are in next branch) 2015-12-06 11:33:08 +01:00
Damjan Adamic 206e30f7fd Typo in Lua docs 2015-12-06 09:28:19 +01:00
Damjan Adamic f00442a1f8 Release notes updated 2015-12-06 09:24:54 +01:00
David S. Beach 4d07ac54d0 Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-05 17:11:25 -05:00
David S. Beach 0b0b8939a3 Addressed some compiler warnings
Added replay log mappings for Ax(V) column headers

Adjusted dialog layout for KDE (still requires 8pt font)
2015-12-05 17:10:59 -05:00
Damjan Adamic 42a62b27d0 Fixes #2921: Lua getFlightMode() function added 2015-12-05 17:29:41 +01:00
Damjan Adamic b1bd638d5d Support simultaneous generation of lua_xports_taranis.inc and lua_exports_taranis_x9e.inc 2015-12-05 17:09:22 +01:00
Damjan Adamic 28b466c5a4 Build script changes ported from nightly-21 to release-21. Lua documentation updated to the new lua_fields files. 2015-12-05 11:15:30 +01:00
Damjan Adamic 1c3d9321df Windows lua exports compilation fix 2015-12-05 10:44:23 +01:00
David S. Beach a09357e866 Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-04 15:15:57 -05:00
dsbeach 2a70eafb02 Added support for A1 and A2 ratio
Fixed issue with attempting to scroll before log file was loaded

Fixed issue with stop button showing depressed during play
2015-12-04 15:15:05 -05:00
Bertrand Songis 39a220f2f5 Merge pull request #3125 from opentx/projectkk2glider/makefile_fixes_for_lua_exports
Fixes to make files for lua exports
2015-12-04 08:29:45 +01:00
Damjan Adamic 567e1602fc Fixes to make files for lua exports 2015-12-03 23:29:44 +01:00
Damjan Adamic 2174c0b6bc Cleanup 2015-12-03 21:13:21 +01:00
Damjan Adamic aa4e136b1e Lua exports fix for release-21 2015-12-03 21:13:21 +01:00
Damjan Adamic 72652e4220 Fixes #2247: Initial state of Jenkins build scripts 2015-12-03 21:13:21 +01:00
dsbeach 35ccff88e2 Renamed dialog fields to match 2.1 default telemetry field names.
Added support for all likely metric and imperial log formats.

Feature complete (hopefully) - time for serious testing.
2015-12-03 14:32:33 -05:00
David S. Beach f70c09e656 Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-12-02 14:29:56 -05:00
dsbeach e7cd70c2f4 All input widgets updated as appropriate
Added labels for input units
2015-12-02 14:29:23 -05:00
Damjan Adamic 3c4324adc5 Compilation fix 2015-11-30 19:38:29 +01:00
Damjan Adamic 13ddbf3ae9 Lua documentation update 2015-11-30 18:42:18 +01:00
Damjan Adamic 5d7cc79db8 Lua exports fixes:
* X9E fields were missing
 * inputs were missing
 * renamed X9E center sliders, which name collided with logical switches
2015-11-30 18:41:31 +01:00
David S. Beach 1e14fbf498 Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-11-29 12:14:56 -05:00
David S. Beach a17416b67a Converted A1 - A4 to spinboxes with log replay support. 2015-11-29 12:14:23 -05:00
Bertrand Songis 638f48e58a Update DONATIONS.txt 2015-11-29 11:23:40 +01:00
Bertrand Songis 08a88f00b9 Update DONATIONS.txt 2015-11-28 22:47:17 +01:00
Bertrand Songis ce3d5dbac5 [Taranis] LR12 is now EU compatible 2015-11-28 21:28:53 +01:00
David S. Beach 26bf88c65b Fixed compiler error 'extra qualification' 2015-11-28 13:58:13 -05:00
David S. Beach 23672a391d Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-11-28 13:20:25 -05:00
David S. Beach fb5f36c5f8 Fixed compiler warning
Refactored log file column mapping to (hopefully) support localization
2015-11-28 13:19:52 -05:00
Bertrand Songis f04385d718 VC++ compilation fix 2015-11-28 13:19:50 -05:00
Bertrand Songis 332785a65d VC++ compilation fix 2015-11-28 13:19:49 -05:00
Bertrand Songis 12f25a6854 VC++ compilation fix 2015-11-28 11:22:09 +01:00
Bertrand Songis 35dafd96be VC++ compilation fix 2015-11-28 09:52:32 +01:00
David S. Beach 7b4676f6ac Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-11-27 16:26:12 -05:00
David S. Beach c79a695eeb Add play() functionality to log playback. 2015-11-27 16:25:24 -05:00
Bertrand Songis 584eea47d5 Merge pull request #3114 from opentx/bsongis/issue2894_crossfire_output_on_sport_pin
#2894 - Crossfire (inverted serial) sent on S.PORT pin in the module bay
2015-11-27 21:39:01 +01:00
Bertrand Songis 7e2a50e990 Update DONATIONS.txt 2015-11-27 17:31:21 +01:00
Damjan Adamic b5db38bacb Re #3087: menuHandlerFunc renamed 2015-11-26 20:58:17 +01:00
Bertrand Songis 89a9eb44a6 Merge pull request #3106 from flaviommedeiros/master
Avoid conditional directives that split up parts of statements.
2015-11-26 18:37:09 +01:00
dsbeach 33765dd033 Initial implementation of log file processing. 2015-11-26 12:23:24 -05:00
David S. Beach 6ba194581d Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-11-26 12:20:38 -05:00
Andre Bernet b9aca7b4c4 Swedish TTS fixes by HakanBastedt 2015-11-26 13:06:47 +04:00
Flavio Medeiros b37c0522c3 Adding a whitespace to better follow the project's guidelines. 2015-11-25 19:06:34 -03:00
Flavio Medeiros 1e7edd072a Removing unnecessary new lines as suggested by @bsongis. 2015-11-25 17:55:09 -03:00
Flavio Medeiros 8c45305b47 More conditional directives that split up parts of statements. 2015-11-25 16:53:48 -03:00
Flavio Medeiros 9f80411fa7 Avoid conditional directives that break statements. 2015-11-25 16:16:09 -03:00
Bertrand Songis 21ed4236fa Update Makefile
The windows server waits for this exact string!
2015-11-25 19:41:57 +01:00
Damjan Adamic d0736b75ce Re #3087: macro used for setting popupMenuFlags 2015-11-25 18:38:11 +01:00
Bertrand Songis d0197ce0bc Merge pull request #3097 from opentx/projectkk2glider/lua_additions
Projectkk2glider/lua additions
2015-11-24 22:25:09 +01:00
Bertrand Songis d464420a1a Merge pull request #3087 from opentx/projectkk2glider/issue_2469_lua_keys
Fixes #2469: Allow usage of PLUS, MINUS, MENU and ENT keys in telemet…
2015-11-24 22:24:05 +01:00
dsbeach 1a172ce103 Changed default telemetry ID to zero
Changed logic for gps telemetry items
2015-11-24 16:10:59 -05:00
David S. Beach c924cc9713 Merge remote-tracking branch 'upstream/master' into dsbeach/issue2919-telemetry-sensors-simulator 2015-11-24 12:43:03 -05:00
David S. Beach 8f3c264c4e telemetry simulator enhancements 2015-11-24 11:42:10 -05:00
Damjan Adamic 4d0bd14ad0 Git commit ID added to stamp 2015-11-24 17:20:10 +01:00
Damjan Adamic 69594ba38b Fixes #2921: getValue() now also returns pilot position 2015-11-23 22:47:18 +01:00
Damjan Adamic 779749aafe Re #3095: added lstrlib.c missing file to Companion 2015-11-23 22:40:08 +01:00
Damjan Adamic 25ef680bf1 Fixes #3062: Close any Lua open files when radio powers off 2015-11-23 21:20:12 +01:00
Damjan Adamic 1659d8ba78 Fixes #3095: Lua string library added (only 6k bytes of flash used) 2015-11-23 21:20:12 +01:00
Damjan Adamic 7ef790d3ef Re #3095: luaGetVersion() also returns version as numbers 2015-11-23 21:20:12 +01:00
David S. Beach 92c02daae0 Modified simulator dialog to query loaded model for used telemetry sensor ids.
NOTE: All sensor id will get default value of 32 if the telemetry sensor dialog is shown before model is fully initialized in the simulator.
2015-11-23 14:39:15 -05:00
Damjan Adamic 94d8b8b0e8 s_warning_info_len renamed 2015-11-23 19:13:42 +01:00
Damjan Adamic 763192d26c s_warning_info_flags renamed 2015-11-23 19:12:24 +01:00
Damjan Adamic a28bc4c70f and renamed to popupMenuFlags 2015-11-23 18:44:34 +01:00
Damjan Adamic f4c13097c1 s_menu_flags back on nonARM platforms 2015-11-23 18:37:17 +01:00
Bertrand Songis 731faa82ad Merge pull request #3091 from opentx/projectkk2glider/issue_2861_header_always_visible
Use new TableLayout for Logical switches, Outputs and Special functions
2015-11-22 21:55:40 +01:00
Damjan Adamic 0236307d8a A FAT12 dump script that got left behing in some old master branch (was used in #1793) 2015-11-22 16:35:48 +01:00
Damjan Adamic b0d3ae2605 Re #3026: add Clear to the flight mode (context menu on the Name label) 2015-11-22 12:37:19 +01:00
Damjan Adamic 446788ae9c Re #2861: Outputs converted to TableLayout 2015-11-22 10:49:37 +01:00
Damjan Adamic 20d36cdfb0 s_noHi renamed 2015-11-21 19:21:17 +01:00
Damjan Adamic 9ae4222a28 s_pgOfs renamed 2015-11-21 19:21:17 +01:00
Damjan Adamic ce90ee2702 Re #3087: code refactoring to allow Lua telemetry scripts to use keys MENU, UP, DOWN, ENT(short) and EXIT(short) 2015-11-21 12:39:46 +01:00
Damjan Adamic b375ba5ac1 Warning menu renaming 2015-11-21 12:39:46 +01:00
Damjan Adamic cf0d489fc4 Main menu renaming 2015-11-21 12:39:46 +01:00
Damjan Adamic 9796eab94d BSS removed on Taranis 2015-11-21 12:39:46 +01:00
Damjan Adamic c3c1d0eb69 Popup menu renaming and refactoring 2015-11-21 12:39:46 +01:00
Damjan Adamic 289d54a3bd Re #2469: EXIT also filtered from the main menu code when in Lua telemetry screen, EXIT LONG added as an exit from the telemetry screen 2015-11-21 12:39:46 +01:00
Damjan Adamic 3186a5d99e Fixes #2469: Allow usage of PLUS, MINUS, MENU and ENT keys in telemetry scripts 2015-11-21 12:39:45 +01:00
Damjan Adamic 682fa5dcf1 Lua documentation update 2015-11-20 20:44:01 +01:00
Bertrand Songis f337655e8d Update DONATIONS.txt 2015-11-20 18:56:33 +01:00
Damjan Adamic b5164a723d Merge pull request #3025 from dsbeach/issue3024
Issue #3024 - Companion 2.1 (windows) - Lua 'execute' fails in non-root directory
2015-11-19 17:55:25 +01:00
Damjan Adamic 6d9f8db165 Merge pull request #3079 from opentx/dsbeach/simu-compile-lua
Modifications to luaCompileAndSave() now <name>.lua.src is the Lua source and compiled code is saved in <name>.lua
2015-11-19 17:47:14 +01:00
Damjan Adamic 70b82622bd Re #3053: clean translations/*.h (original author griebd) 2015-11-19 15:42:54 +01:00
Damjan Adamic 40e9c3714e Merge pull request #3036 from opentx/MicheleVilla/FW_Italian_translation
Update it.h.txt
2015-11-19 15:35:18 +01:00
Bertrand Songis 3c89f7930a Update DONATIONS.txt 2015-11-19 07:11:01 +01:00
Bertrand Songis 03c035ac1b Update DONATIONS.txt 2015-11-17 20:07:41 +01:00
Bertrand Songis ee6deca13a Merge pull request #3077 from indavis/master
Update flasheepromdialog.ui
2015-11-17 07:11:04 +01:00
Damjan Adamic 904c90803c Lua documentation update 2015-11-16 22:45:48 +01:00
indavis 29f7d670f0 Update flasheepromdialog.ui
Put in the markup to make it wrap and look like the other tooltips.
2015-11-16 14:46:29 -06:00
Damjan Adamic 51d0b667f2 Lua documentation update 2015-11-16 19:52:31 +01:00
David S. Beach 27fad56b03 Merge branch 'issue3024' into dsbeach/working 2015-11-16 13:16:58 -05:00
David S. Beach e1e3f26031 Merge branch 'issue2469-Lua-killEvents-not-working' into dsbeach/working 2015-11-16 11:28:07 -05:00
David S. Beach a34f98667f Merge branch 'simu-compile-lua' into dsbeach/working 2015-11-16 11:27:23 -05:00
dsbeach 7790e87619 Modifications to luaCompileAndSave() - as scripts are loaded it will check for existing file <file>.lua.src and compile it to <file>.lua if found. 2015-11-16 11:24:42 -05:00
Damjan Adamic 89f1bf5db7 Better makefile recipe for lua_exports.inc target 2015-11-16 10:21:14 +01:00
Damjan Adamic 10fe9df322 Fixed lua_exports.inc target 2015-11-16 07:19:14 +01:00
indavis 9d27e1d78d Update flasheepromdialog.ui
Corrected the tool tip for the backupBeforeWrite checkbox. It incorrectly had the text from Check Firmware Compatibility.
2015-11-15 23:15:20 -06:00
dsbeach 806bd1da53 Added logic in perMain() to suppress killed events. Fixes #2469 2015-11-10 10:07:17 -05:00
Michele 9e5f400627 Update it.h.txt 2015-11-08 08:29:44 +01:00
Bertrand Songis f7044a20ec #2894 - Crossfire (inverted serial) sent on S.PORT pin in the module bay
16 channels sent every 2.5ms now @ 200KBauds with CRC
2015-11-06 19:32:29 +01:00
David S. Beach a14e8a524f fixes #3024 - one line affected and a few parenthsis for clarity 2015-11-05 09:47:01 -05:00
David S. Beach 40e5657387 Fixes #3024 2015-11-03 08:16:46 -05:00
Damjan Adamic 80af8fe001 Re #2861: Logical switches converted to TableLayout 2015-10-26 21:38:06 +01:00
Damjan Adamic 2b2d6ed9db Re #2861: layout code moved to new class TableLayout 2015-10-26 21:35:41 +01:00
Damjan Adamic d882dc1071 Re #2861: table widget background transparent 2015-10-26 19:15:32 +01:00
Damjan Adamic 4ea4e38ccb Re #2861: reduced padding around controls, removed padding around table widget 2015-10-26 19:04:13 +01:00
Bertrand Songis d5e2cac813 Columns resized (some dynamically, some statically) 2015-10-25 21:48:52 +01:00
Damjan Adamic 4b91f5937d Re #2861: using QTableWidget in order to have the header line always visible 2015-10-25 09:56:49 +01:00
724 changed files with 16893 additions and 69208 deletions
+1 -4
View File
@@ -1,4 +1,3 @@
/.idea/
/.*project
/.settings
/.autotools
@@ -7,6 +6,4 @@ radio/src/bootloader/bootloader_ramBoot*
*.lbm
*.o
/doc/
*.stamp
radio/src/lua/lua_fields_*.txt
radio/src/lua/lua_exports_*.txt
*.inc
+2 -2
View File
@@ -7,8 +7,8 @@ before_install:
- sudo apt-get update
install:
- sudo apt-get install -y xvfb lcov cmake cmake-data bc curl gcc-arm-none-eabi gcc-avr avr-libc avrdude libqtcore4 libqt4-dev qt4-qmake g++ libxerces-c-dev xsdcxx libsdl1.2-dev libusb-1.0-0 libphonon-dev phonon libqtwebkit-dev python-qt4 python-qt4-dev libfox-1.6-dev libgtest-dev
- sudo apt-get install -y lcov cmake cmake-data bc curl gcc-arm-none-eabi gcc-avr avr-libc avrdude libqtcore4 libqt4-dev qt4-qmake g++ libxerces-c-dev xsdcxx libsdl1.2-dev libusb-1.0-0 libphonon-dev phonon libqtwebkit-dev python-qt4 python-qt4-dev libfox-1.6-dev libgtest-dev
script:
- radio/util/commit-tests.sh
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS .. && cmake --build .
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ../companion/src && cmake --build .
-22
View File
@@ -1,22 +0,0 @@
project(OpenTX)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "2")
set(VERSION_REVISION "0")
set(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
message(STATUS "OpenTX ${VERSION}")
cmake_minimum_required(VERSION 2.8)
set(RADIO_DIRECTORY ${PROJECT_SOURCE_DIR}/radio)
set(RADIO_SRC_DIRECTORY ${RADIO_DIRECTORY}/src)
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/companion/src)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
add_subdirectory(${RADIO_SRC_DIRECTORY})
add_subdirectory(${COMPANION_SRC_DIRECTORY})
+38 -3
View File
@@ -48,11 +48,9 @@ R. Scott Page
Johan Cronje
Renato Aranghelovici
Jeffrey Irvin
John Rodgers
Kenneth Crump
Damjan Adamic
Martin Wilson
Joe Street
John Holdsworth
Daniel Schwartz
Dean Church (monthly)
@@ -148,7 +146,6 @@ Mike Matheny
Martin Sniedze
Fernando Rimoldi
Sidney Fisher
Bruce Anderson
John Rodgers
Ed Pare
Thomas Kilduff
@@ -850,3 +847,41 @@ Tadeusz Adamowski
Andrew Newton
Neil Horne
Kerstin Appelqvist
John Curran
Gerald Thiel
Jürg Bingisser
George Emer
Jerzy Manarczyk
Gerard Braakhuis
Nicolas Leblond
Burt Pickard-Richardson
Jiri Petrzelka
RK Custom Homes
David Semeria
Philip Lewis
William Kim
Dean Berg
Tim Spurr
Clifton Hipsher
Mike Frizell
Oliver Jacob
Pawel Stepien
Thomas Kilduff
Barry Fox
Anatoly Bakalenko
Bruce Anderson
Jeremy Cowgar
Edward Hauser
Stuart Brown
Anton Glock
Roger Ritchie
George Carnie
Philippe Stofleth
Tim Dzugan
Illia Izotov
Richard Miles (monthly)
Attila Kapolnai
Gilles Dando
Denis Roussille
Olivier Anken
Michel Motte
+2 -2
View File
@@ -1,9 +1,9 @@
##OpenTX 2.2 Branch
##OpenTX 2.1 Branch
[![Build Status](https://travis-ci.org/opentx/opentx.svg?branch=master)](https://travis-ci.org/opentx/opentx)
[![Join the chat at https://gitter.im/opentx/opentx](https://img.shields.io/badge/%E2%8A%AA%20GITTER%20-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/opentx/opentx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Donate using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJ9MASSKVW8WN)
The ongoing development on 2.2.x is done in this branch.
The ongoing development on 2.1.x is done in this branch.
Refer to the opentx.wiki for information about setting up the tool chains for building OpenTX and OpenTX Companion as well as other development related issues.
-25
View File
@@ -1,25 +0,0 @@
macro(add_bitmaps_target targetname filter width format)
file(GLOB bitmaps ${filter})
foreach(bitmap ${bitmaps})
get_filename_component(target ${bitmap} NAME_WE)
set(target ${target}.lbm)
add_custom_command(
OUTPUT ${target}
COMMAND python ${RADIO_DIRECTORY}/util/img2lbm.py ${bitmap} ${target} ${width} ${format}
DEPENDS ${bitmap}
)
list(APPEND bitmaps_files ${target})
endforeach()
add_custom_target(${targetname} DEPENDS ${bitmaps_files})
endmacro(add_bitmaps_target)
macro(add_truetype_font_target radio name font size bold)
set(target ${RADIO_SRC_DIRECTORY}/fonts/${radio}/font_${name})
add_custom_command(
OUTPUT ${target}.png
OUTPUT ${target}.specs
COMMAND ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${bold} ${target}
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(ttf_${radio}_${name} DEPENDS ${target}.png ${target}.specs)
endmacro(add_truetype_font_target)
-38
View File
@@ -1,38 +0,0 @@
macro(today RESULT)
if(WIN32)
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
elseif(UNIX)
execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(....)-(..)-(..).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})
else(WIN32)
message(SEND_ERROR "date not implemented")
set(${RESULT} 00.00.0000)
endif(WIN32)
endmacro(today)
macro(now RESULT)
if(WIN32)
execute_process(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..):(..).*" "\\1:\\2:00" ${RESULT} ${${RESULT}})
elseif(UNIX)
execute_process(COMMAND "date" "+%H:%M:%S" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..):(..):(..).*" "\\1:\\2:\\3" ${RESULT} ${${RESULT}})
else(WIN32)
message(SEND_ERROR "time not implemented")
set(${RESULT} 00:00:00)
endif(WIN32)
endmacro(now)
macro(git_id RESULT)
if(WIN32)
execute_process(COMMAND "cmd" " /C git --git-dir=${PROJECT_SOURCE_DIR}/.git rev-parse HEAD" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(.*)\n" "\\1" ${RESULT} ${${RESULT}})
elseif(UNIX)
execute_process(COMMAND "git" "--git-dir=${PROJECT_SOURCE_DIR}/.git" "rev-parse" "HEAD" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(.*)\n" "\\1" ${RESULT} ${${RESULT}})
else(WIN32)
message(SEND_ERROR "Git ID implemented")
set(${RESULT} 0)
endif(WIN32)
endmacro(git_id)
+24 -1
View File
@@ -1,5 +1,28 @@
<h2>Version 2.1.7 / 2016-01-04</h2>
<ul>
<li>Lua 'execute' failed in non-root directory (in Simulator) (<a href=https://github.com/opentx/opentx/issues/3024>#3024</a>)</li>
<!-- this is disabled until the speed problem is fixed <li>Header line always visible in Outputs, Logical Switches and Special Functions (<a href=https://github.com/opentx/opentx/issues/2861>#2861</a>)</li> -->
<li>LR12 changes: removed option for remote failsafe configuration, added in EU firmware variant</li>
<li>Added Clear option to the flight mode context menu (right click on the Name label) (<a href=https://github.com/opentx/opentx/issues/3026>#3026</a>)</li>
<li>New features for Telemetry Simulator: log replay, user friendly sensor values (<a href=https://github.com/opentx/opentx/issues/3124>#3124</a>)</li>
<li>Added F7 key to reload LUA permanent scripts in radio simulator (<a href=https://github.com/opentx/opentx/issues/3141>#3141</a>)</li>
<li>AR9X firmware flashing fall-back was wrong</li>
<li>Command line options support added to standalone simulator (try "./simulator21 --help" on Linux and "simulator.exe /help" on Windows for usage) (<a href=https://github.com/opentx/opentx/issues/3160>#3160</a>)</li>
<li>Various rounding problem fixed: Telemetry sensor Ratio parameter (<a href=https://github.com/opentx/opentx/issues/3117>#3117</a>),
Outputs Sub-trim, Min and Max values (<a href=https://github.com/opentx/opentx/issues/3156>#3156</a>)</li>
<li>Fixed: telemetry sensors Ratio and Offset value increment/decrement step (<a href=https://github.com/opentx/opentx/issues/3121>#3121</a>)</li>
<li>Hardware/Calibration tab split int two tabs (<a href=https://github.com/opentx/opentx/issues/2974>#2974</a>)</li>
<li>Fixed Fahrenheit temperature conversion error (if PREC was not 0) (<a href=https://github.com/opentx/opentx/issues/3146>#3146</a>)</li>
<li>Application Setting 'Enable automatic backup before writing firmware' was not saved (<a href=https://github.com/opentx/opentx/issues/3040>#3040</a>)</li>
<li>Fixed RPM package problem on Fedora (<a href=https://github.com/opentx/opentx/issues/3130>#3130</a>)</li>
<li>Fixed conversion errors when loading 2.0.x EEPE (<a href=https://github.com/opentx/opentx/issues/3177>#3177</a>)</li>
<li>Various texts and translations corrections</li>
</ul>
<h2>Version 2.1.6 / 2015-11-11</h2>
[Taranis]
<ul>
<li>Telemetry custom screen changes didn't emit modified signal (<a href=https://github.com/opentx/opentx/issues/3029>#3029</a>)</li>
<li>Hide D8/LR12 when eu firmware option is selected</li>
+273 -226
View File
@@ -1,115 +1,132 @@
include(Macros)
PROJECT( companion )
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
set(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
set(SIMULATOR_NAME "simulator${C9X_NAME_SUFFIX}")
set(SIMULATOR_LIB_PATH ${CMAKE_INSTALL_PREFIX}/lib/companion${C9X_NAME_SUFFIX})
else(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(COMPANION_NAME "companion")
set(SIMULATOR_NAME "simulator")
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(C9X_VERSION_MAJOR "2")
SET(C9X_VERSION_MINOR "1")
SET(C9X_VERSION_REVISION "7")
SET(C9X_VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
option(ALLOW_NIGHTLY_BUILDS "Allow nightly builds download / update") # Disabled by default
if(ALLOW_NIGHTLY_BUILDS)
add_definitions(-DALLOW_NIGHTLY_BUILDS)
endif(ALLOW_NIGHTLY_BUILDS)
SET(C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION}${C9X_VERSION_SUFFIX})
MESSAGE(STATUS "OpenTX Companion ${C9X_VERSION}")
option(DEBUG_IMPORT "Turn on debug output for EEPROM import") # Disabled by default
if(DEBUG_IMPORT)
add_definitions(-DDEBUG_MODEL_IMPORT)
message(STATUS "EEPROM import debugging enabled")
endif(DEBUG_IMPORT)
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
option(TABLE_LAYOUT "Use QTableWidget for grid layouts") # Disabled by default
if(TABLE_LAYOUT)
add_definitions(-DTABLE_LAYOUT)
message(STATUS "Using QTableWidget")
endif(TABLE_LAYOUT)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
message(STATUS "Looking for XercesC ")
find_package(XercesC)
if(XERCESC_FOUND)
include_directories(${XERCESC_INCLUDE_DIR})
set(LidarFormat_LIBRAIRIES ${LidarFormat_LIBRAIRIES} ${XERCESC_LIBRARIES})
else()
message(FATAL_ERROR "XercesC not found! Please set XercesC path ...")
endif()
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(C9X_NAME_SUFFIX ${C9X_VERSION_MAJOR}${C9X_VERSION_MINOR})
SET(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
SET(SIMULATOR_NAME "simulator${C9X_NAME_SUFFIX}")
SET( SIMULATOR_LIB_PATH ${CMAKE_INSTALL_PREFIX}/lib/companion${C9X_NAME_SUFFIX} )
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(COMPANION_NAME "companion")
SET(SIMULATOR_NAME "simulator")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message(STATUS "Looking for Xsd ")
find_package(Xsd)
if(XSD_FOUND)
include_directories(${XSD_INCLUDE_DIR})
message("XSD Include Path: " ${XSD_INCLUDE_DIR})
else()
message(FATAL_ERROR "XSD not found! Please set XSD path ...")
endif()
OPTION(ALLOW_NIGHTLY_BUILDS "Allow nightly builds download / update") # Disabled by default
IF(ALLOW_NIGHTLY_BUILDS)
ADD_DEFINITIONS(-DALLOW_NIGHTLY_BUILDS)
ENDIF(ALLOW_NIGHTLY_BUILDS)
message(STATUS "Looking for SDL ")
find_package(Sdl)
if(SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
add_definitions(-DJOYSTICKS)
add_definitions(-DSIMU_AUDIO)
else()
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
endif()
OPTION(DEBUG_IMPORT "Turn on debug output for EEPROM import") # Disabled by default
IF(DEBUG_IMPORT)
ADD_DEFINITIONS( -DDEBUG_MODEL_IMPORT)
MESSAGE( STATUS "EEPROM import debugging enabled" )
ENDIF(DEBUG_IMPORT)
find_package(Qt4 4.8.1 REQUIRED)
set(QT_USE_QTNETWORK True)
set(QT_USE_QTXML True)
include(${QT_USE_FILE})
OPTION(TABLE_LAYOUT "Use QTableWidget for grid layouts") # Disabled by default
IF(TABLE_LAYOUT)
ADD_DEFINITIONS( -DTABLE_LAYOUT)
MESSAGE( STATUS "Using QTableWidget" )
ENDIF(TABLE_LAYOUT)
message(STATUS "Looking for PHONON ")
find_package(Phonon)
if(PHONON_FOUND)
include_directories(${PHONO_INCLUDE_DIR})
message("PHONON Include Path: " ${PHONON_INCLUDE_DIR})
add_definitions(-DPHONON)
else()
message("PHONON not found!")
endif()
MESSAGE( STATUS "Looking for XercesC " )
FIND_PACKAGE(XercesC)
IF ( XERCESC_FOUND )
INCLUDE_DIRECTORIES( ${XERCESC_INCLUDE_DIR} )
SET(LidarFormat_LIBRAIRIES ${LidarFormat_LIBRAIRIES} ${XERCESC_LIBRARIES})
ELSE()
MESSAGE( FATAL_ERROR "XercesC not found! Please set XercesC path ..." )
ENDIF()
message(STATUS "Looking for QT lupdate ")
find_package(Lupdate)
if(LUPDATE_FOUND)
message("QT lupdate: " ${LUPDATE_EXECUTABLE})
else()
message("QT lupdate not found!")
endif()
MESSAGE( STATUS "Looking for Xsd " )
FIND_PACKAGE(Xsd)
IF ( XSD_FOUND )
INCLUDE_DIRECTORIES( ${XSD_INCLUDE_DIR} )
MESSAGE("XSD Include Path: " ${XSD_INCLUDE_DIR} )
ELSE()
MESSAGE( FATAL_ERROR "XSD not found! Please set XSD path ..." )
ENDIF()
add_definitions(-DQXT_STATIC)
MESSAGE( STATUS "Looking for SDL " )
FIND_PACKAGE(Sdl)
IF ( SDL_FOUND )
INCLUDE_DIRECTORIES( ${SDL_INCLUDE_DIR} )
MESSAGE("SDL Include Path: " ${SDL_INCLUDE_DIR} )
ADD_DEFINITIONS( -DJOYSTICKS )
ADD_DEFINITIONS( -DSIMU_AUDIO )
ELSE()
MESSAGE( "SDL not found! Joysticks support will be disabled. Simulator audio will not work." )
ENDIF()
add_custom_command(
FIND_PACKAGE(Qt4 4.8.1 REQUIRED)
SET( QT_USE_QTNETWORK True )
SET( QT_USE_QTXML True )
INCLUDE( ${QT_USE_FILE} )
MESSAGE( STATUS "Looking for PHONON " )
FIND_PACKAGE(Phonon)
IF ( PHONON_FOUND )
INCLUDE_DIRECTORIES( ${PHONO_INCLUDE_DIR} )
MESSAGE("PHONON Include Path: " ${PHONON_INCLUDE_DIR} )
ADD_DEFINITIONS( -DPHONON )
ELSE()
MESSAGE( "PHONON not found!" )
ENDIF()
MESSAGE( STATUS "Looking for QT lupdate " )
FIND_PACKAGE(Lupdate)
if( LUPDATE_FOUND )
MESSAGE( "QT lupdate: " ${LUPDATE_EXECUTABLE} )
ELSE()
MESSAGE( "QT lupdate not found!" )
ENDIF()
ADD_DEFINITIONS(-DQXT_STATIC)
ADD_CUSTOM_COMMAND(
COMMAND ${XSDCXX_EXECUTABLE} cxx-tree --root-element-all --generate-serialization --output-dir ${PROJECT_BINARY_DIR}/ ${PROJECT_SOURCE_DIR}/radio.xsd
OUTPUT ${PROJECT_BINARY_DIR}/radio.hxx ${PROJECT_BINARY_DIR}/radio.cxx
DEPENDS ${PROJECT_SOURCE_DIR}/radio.xsd
)
if(MSVC)
set(CMAKE_CXX_FLAGS "/EHsc /LD")
include_directories(${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes C:/Programs/dirent/include)
link_directories(C:/Programs/pthreads/Pre-built.2/lib/)
set(PTHREAD_LIBRARY pthreadVC2.lib)
else()
set(PTHREAD_LIBRARY pthread)
add_definitions(-Wall)
link_directories(/usr/local/lib)
endif()
IF( MSVC )
SET(CMAKE_CXX_FLAGS "/EHsc /LD")
set(INTTYPES_INCLUDE_OPTION -IC:/Programs/msinttypes)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes)
LINK_DIRECTORIES( C:/Programs/pthreads/Pre-built.2/lib/ )
SET( PTHREAD_LIBRARY pthreadVC2.lib )
ELSE( )
SET( PTHREAD_LIBRARY pthread )
ADD_DEFINITIONS( -Wall )
LINK_DIRECTORIES( /usr/local/lib )
ENDIF( )
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/radio/src)
set(SIMU_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/companion/src/simulation)
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/companion/src)
IF( MSVC )
MESSAGE( STATUS "Adding include C:/Programs/dirent/include for dirent.h" )
INCLUDE_DIRECTORIES( C:/programs/dirent/include )
ENDIF( )
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
set(SIMU_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/simulation)
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR})
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${COMPANION_SRC_DIRECTORY}
${COMPANION_SRC_DIRECTORY}/shared
${PROJECT_SOURCE_DIR}/../..
${PROJECT_SOURCE_DIR}/shared
${SIMU_SRC_DIRECTORY}
${XSD_INCLUDE_DIR}
${COMPANION_SRC_DIRECTORY}/qxtcommandoptions
${PROJECT_SOURCE_DIR}/qxtcommandoptions
)
add_subdirectory(shared)
@@ -137,7 +154,7 @@ set(common_SRCS
firmwares/opentx/opentxinterface.cpp
file.cpp
appdata.cpp
)
)
qt4_wrap_cpp(common_SRCS)
@@ -182,7 +199,7 @@ set(companion_SRCS
radionotfound.cpp
wizarddata.cpp
wizarddialog.cpp
)
)
set(companion_MOC_HDRS
apppreferencesdialog.h
@@ -214,7 +231,7 @@ set(companion_MOC_HDRS
wizarddialog.h
modelprinter.h
multimodelprinter.h
)
)
set(companion_UIS
mdichild.ui
@@ -234,51 +251,77 @@ set(companion_UIS
flashfirmwaredialog.ui
flasheepromdialog.ui
radionotfound.ui
)
)
set(companion_RCS
companion.qrc
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
)
)
today(DATE)
now(TIME)
MACRO (TODAY RESULT)
IF (WIN32)
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
ELSE (WIN32)
MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} 00.00.0000)
ENDIF (WIN32)
ENDMACRO (TODAY)
configure_file(${COMPANION_SRC_DIRECTORY}/version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY)
configure_file(${COMPANION_SRC_DIRECTORY}/translations.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc @ONLY)
configure_file(${COMPANION_SRC_DIRECTORY}/companion.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop @ONLY)
configure_file(${COMPANION_SRC_DIRECTORY}/simulator.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop @ONLY)
MACRO (NOW RESULT)
IF (WIN32)
EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..):(..).*" "\\1:\\2:00" ${RESULT} ${${RESULT}})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "date" "+%H:%M:%S" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..):(..):(..).*" "\\1:\\2:\\3" ${RESULT} ${${RESULT}})
ELSE (WIN32)
MESSAGE(SEND_ERROR "time not implemented")
SET(${RESULT} 00:00:00)
ENDIF (WIN32)
ENDMACRO (NOW)
if(WIN32)
set(companion_SRCS ${companion_SRCS} icon.rc)
if(NOT MSVC)
set(CMAKE_EXE_LINKER_FLAGS -mwindows)
endif()
endif()
TODAY(DATE)
NOW(TIME)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/translations.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/companion.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simulator.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop @ONLY)
set(LANGUAGES he pl pt ru de fr es it sv cs fi nl)
foreach(language ${LANGUAGES})
set(companion_TS ${companion_TS} translations/companion_${language}.ts)
endforeach(language)
IF( WIN32 )
SET( companion_SRCS ${companion_SRCS} icon.rc )
IF ( NOT MSVC )
SET(CMAKE_EXE_LINKER_FLAGS -mwindows)
ENDIF( )
ENDIF( )
set(companion_SRCS ${companion_SRCS})
qt4_wrap_ui(companion_SRCS ${companion_UIS})
qt4_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})
qt4_add_translation(companion_QM ${companion_TS})
qt4_add_resources(companion_SRCS ${companion_RCS})
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
add_definitions(-DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}")
SET( LANGUAGES he pl pt ru de fr es it sv cs fi nl)
FOREACH( language ${LANGUAGES} )
SET( companion_TS ${companion_TS} translations/companion_${language}.ts )
ENDFOREACH( language )
if(APPLE)
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_QM})
# OS X compiler no longer automatically includes /Library/Frameworks in search path
set(CMAKE_EXE_LINKER_FLAGS -F/Library/Frameworks)
else()
add_executable(${COMPANION_NAME} WIN32 ${companion_SRCS} ${companion_QM})
endif()
set( companion_SRCS ${companion_SRCS} )
QT4_WRAP_UI( companion_SRCS ${companion_UIS} )
QT4_WRAP_CPP( companion_SRCS ${companion_MOC_HDRS} )
QT4_ADD_TRANSLATION( companion_QM ${companion_TS} )
QT4_ADD_RESOURCES( companion_SRCS ${companion_RCS} )
ADD_DEFINITIONS( -DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}" )
IF( APPLE )
ADD_EXECUTABLE( ${COMPANION_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_QM} )
# OS X compiler no longer automatically includes /Library/Frameworks in search path
SET( CMAKE_EXE_LINKER_FLAGS -F/Library/Frameworks )
ELSE( )
ADD_EXECUTABLE( ${COMPANION_NAME} WIN32 ${companion_SRCS} ${companion_QM} )
ENDIF( )
target_link_libraries(${COMPANION_NAME} generaledit modeledit simulation common qcustomplot shared ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
@@ -288,14 +331,14 @@ set(simu_SRCS
modeledit/node.cpp
modeledit/edge.cpp # TODO not needed
simulator.cpp
)
)
set(simu_MOC_HDRS
modeledit/node.h
)
)
set(simu_SRCS ${simu_SRCS})
qt4_wrap_cpp(simu_SRCS ${simu_MOC_HDRS})
set( simu_SRCS ${simu_SRCS} )
qt4_wrap_cpp(simu_SRCS ${simu_MOC_HDRS} )
qt4_add_resources(simu_SRCS companion.qrc) # TODO not needed
if(WIN32)
@@ -312,133 +355,137 @@ target_link_libraries(${SIMULATOR_NAME} simulation common qxtcommandoptions ${QT
############# Packaging ####################
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop)
install(FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
# Linux specific code
set(OperatingSystem "Linux")
else(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(TARGETS ${COMPANION_NAME} DESTINATION ${QT_BINARY_DIR})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
INSTALL( TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
INSTALL( TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop)
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop)
INSTALL( FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg )
INSTALL( FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
# Linux specific code
SET(OperatingSystem "Linux")
ELSE (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
INSTALL( TARGETS ${COMPANION_NAME} DESTINATION ${QT_BINARY_DIR} )
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(WIN32)
if(MSVC)
set(COMPANION_NSI_IN_FILE companion-vs.nsi.in)
set(SIMULATOR_NSI_IN_FILE simulator-vs.nsi.in)
else()
set(COMPANION_NSI_IN_FILE companion-msys.nsi.in)
set(SIMULATOR_NSI_IN_FILE simulator-msys.nsi.in)
endif()
IF( WIN32 )
IF( MSVC )
SET(COMPANION_NSI_IN_FILE companion-vs.nsi.in)
SET(SIMULATOR_NSI_IN_FILE simulator-vs.nsi.in)
ELSE( )
SET(COMPANION_NSI_IN_FILE companion-msys.nsi.in)
SET(SIMULATOR_NSI_IN_FILE simulator-msys.nsi.in)
ENDIF( )
set(SYSDIR "$ENV{windir}/system32")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${COMPANION_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/companion.nsi @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${SIMULATOR_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/simulator.nsi @ONLY)
SET( SYSDIR "$ENV{windir}/system32" )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${COMPANION_NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion.nsi @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${SIMULATOR_NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/simulator.nsi @ONLY)
find_program(NSIS_EXE makensis.exe PATHS
FIND_PROGRAM(NSIS_EXE makensis.exe PATHS
"C:/Program Files/NSIS"
"C:/Program Files (x86)/NSIS"
"C:/Programs/NSIS"
)
)
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/companion/companion-windows.exe
COMMAND "${NSIS_EXE}" ARGS ${PROJECT_BINARY_DIR}/companion/companion.nsi
DEPENDS companion simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion/companion.nsi
COMMENT "Companion Windows NSIS Installer")
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companion-windows.exe
COMMAND "${NSIS_EXE}" ARGS companion.nsi
DEPENDS companion simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion.nsi
COMMENT "Companion Windows NSIS Installer")
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/companion/simulator-install.exe
COMMAND "${NSIS_EXE}" ARGS ${PROJECT_BINARY_DIR}/companion/simulator.nsi
DEPENDS simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion/simulator.nsi
COMMENT "Simulator Windows NSIS Installer")
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/simulator-install.exe
COMMAND "${NSIS_EXE}" ARGS simulator.nsi
DEPENDS simulator opentx-simulators ${PROJECT_BINARY_DIR}/simulator.nsi
COMMENT "Simulator Windows NSIS Installer")
add_custom_target(installer
DEPENDS ${PROJECT_BINARY_DIR}/companion/companion-windows.exe
DEPENDS ${PROJECT_BINARY_DIR}/companion/simulator-windows.exe
SOURCES ${PROJECT_BINARY_DIR}/companion/companion.nsi
SOURCES ${PROJECT_BINARY_DIR}/companion/simulator.nsi
)
endif()
ADD_CUSTOM_TARGET( installer
DEPENDS ${PROJECT_BINARY_DIR}/companion-windows.exe
DEPENDS ${PROJECT_BINARY_DIR}/simulator-windows.exe
SOURCES ${PROJECT_BINARY_DIR}/companion.nsi
SOURCES ${PROJECT_BINARY_DIR}/simulator.nsi
)
ENDIF( )
if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
if(CMAKE_GENERATOR STREQUAL Xcode)
set(WORK_DIR ${CMAKE_BINARY_DIR}/Debug)
else()
set(WORK_DIR ${PROJECT_BINARY_DIR})
endif()
IF( APPLE )
SET(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
IF( CMAKE_GENERATOR STREQUAL Xcode )
SET( WORK_DIR ${CMAKE_BINARY_DIR}/Debug )
ELSE( )
SET( WORK_DIR ${PROJECT_BINARY_DIR} )
ENDIF()
add_custom_target(addframeworks
COMMAND mkdir -p companion.app/Contents/Frameworks
COMMAND mkdir -p companion.app/Contents/Resources
COMMAND mkdir -p companion.app/Contents/translations
COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files
COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../targets/mac/qt_menu.nib companion.app/Contents/Resources/
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync -r ${XSD_INCLUDE_DIR}/.. companion.app/Contents/Frameworks/
COMMAND rsync -r /Library/Frameworks/SDL.framework companion.app/Contents/Frameworks/
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app
COMMAND install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL companion.app/Contents/MacOS/companion
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS ${COMPANION_NAME})
ADD_CUSTOM_TARGET( addframeworks
COMMAND mkdir -p companion.app/Contents/Frameworks
COMMAND mkdir -p companion.app/Contents/Resources
COMMAND mkdir -p companion.app/Contents/translations
COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files
COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../targets/mac/qt_menu.nib companion.app/Contents/Resources/
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync -r ${XSD_INCLUDE_DIR}/.. companion.app/Contents/Frameworks/
COMMAND rsync -r /Library/Frameworks/SDL.framework companion.app/Contents/Frameworks/
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app
COMMAND install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL companion.app/Contents/MacOS/companion
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS ${COMPANION_NAME} )
add_custom_target(makedmg
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app -dmg -no-plugins
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS addframeworks opentx-simulators-bundle)
endif()
ADD_CUSTOM_TARGET( makedmg
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app -dmg -no-plugins
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS addframeworks opentx-simulators-bundle)
ENDIF( )
if(LUPDATE_FOUND)
add_custom_target(translations
ADD_CUSTOM_TARGET( stamp
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/version.h ${CMAKE_SOURCE_DIR}/../companion.stamp
DEPENDS ${CMAKE_BINARY_DIR}/version.h )
IF( LUPDATE_FOUND )
ADD_CUSTOM_TARGET( translations
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${companion_TS}
)
else()
add_custom_target(translations
)
ELSE()
ADD_CUSTOM_TARGET( translations
COMMAND echo "Sorry, QT lupdate was not found."
)
endif()
)
ENDIF()
set(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTx open source firmware")
SET(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTx open source firmware")
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
# The file stripping is deliberately disabled, with the stripped file we get
# very poor trace-backs from the users when they report Companion crash
set(CPACK_STRIP_FILES FALSE)
SET( CPACK_STRIP_FILES FALSE )
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
if(DPKG_PROGRAM)
set(CPACK_GENERATOR "DEB")
SET(CPACK_GENERATOR "DEB")
execute_process(
COMMAND ${DPKG_PROGRAM} --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}_${VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Bertrand Songis <bsongis-nosp@m-gmail.com>")
set(CPACK_DEBIAN_PACKAGE_VERSION ${VERSION})
set(CPACK_DEBIAN_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_DEBIAN_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_DEBIAN_ARCHITECTURE $(CMAKE_SYSTEM_PROCESSOR))
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}_${C9X_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Bertrand Songis <bsongis-nosp@m-gmail.com>")
SET(CPACK_DEBIAN_PACKAGE_VERSION ${C9X_VERSION})
SET(CPACK_DEBIAN_PACKAGE_VERSION_MAJOR ${C9X_VERSION_MAJOR})
SET(CPACK_DEBIAN_PACKAGE_VERSION_MINOR ${C9X_VERSION_MINOR})
SET(CPACK_DEBIAN_ARCHITECTURE $(CMAKE_SYSTEM_PROCESSOR))
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
else(DPKG_PROGRAM)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_VERSION ${VERSION})
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}-${VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_GENERATOR "RPM")
SET(CPACK_RPM_PACKAGE_VERSION ${C9X_VERSION})
SET(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}-${C9X_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib /lib/udev /lib/udev/rules.d")
endif(DPKG_PROGRAM)
include(CPack)
INCLUDE(CPack)
+1 -21
View File
@@ -604,28 +604,8 @@ AppData::AppData()
for (int i=0; i<MAX_JOYSTICKS; i++)
joystick[i].init( i );
// Copy existing 2.0.16 settings if present
QSettings settings(COMPANY, PRODUCT);
// Copy existing 2.1 settings if present
if (profile[0].name().isEmpty())
{
QSettings settings21("OpenTX", "Companion 2.1");
QStringList keys = settings21.allKeys();
for (QStringList::iterator i=keys.begin(); i!=keys.end(); i++)
{
if (settings21.value(*i) != QString("") && settings21.value(*i) != QString("Start Menu Folder"))
{
settings.setValue(*i, settings21.value(*i));
}
}
//Reload profiles
for (int i=0; i<MAX_PROFILES; i++)
profile[i].init( i );
}
// Copy existing 2.0 settings if present
if (profile[0].name().isEmpty())
{
QSettings settings20("OpenTX", "Companion 2.0");
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QSettings>
#define COMPANY "OpenTX"
#define PRODUCT "Companion 2.2"
#define PRODUCT "Companion 2.1"
#define MAX_PROFILES 15
#define MAX_JOYSTICKS 8
+1 -1
View File
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
QStringList strl = QApplication::arguments();
if (strl.contains("--version")) {
printf("%s\n", VERSION);
printf("%s\n", C9X_VERSION);
fflush(stdout);
exit(0);
}
+1 -1
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Companion @VERSION@
Name=Companion @C9X_VERSION@
GenericName=Transmitter Companion App
Comment=The Ultimate Transmitter Companion
Icon=@COMPANION_NAME@
+45 -60
View File
@@ -5,54 +5,39 @@
<file>../../CREDITS.txt</file>
<file>../../DONATIONS.txt</file>
<file>../releasenotes.txt</file>
<file>images/simulator/Horus/middle.png</file>
<file>images/simulator/Horus/left.png</file>
<file>images/simulator/Horus/right.png</file>
<file>images/simulator/Horus/top.png</file>
<file>images/simulator/Horus/bottom.png</file>
<file>images/simulator/Horus/led.png</file>
<file>images/simulator/Horus/border-right.png</file>
<file>images/simulator/Horus/left_btn1.png</file>
<file>images/simulator/Horus/left_btn2.png</file>
<file>images/simulator/Horus/left_scrnsht.png</file>
<file>images/simulator/Horus/right_btnU.png</file>
<file>images/simulator/Horus/right_btnL.png</file>
<file>images/simulator/Horus/right_btnD.png</file>
<file>images/simulator/Horus/right_btnR.png</file>
<file>images/simulator/Horus/right_ent.png</file>
<file>images/simulator/9X/9xdb.png</file>
<file>images/simulator/9X/9xdl.png</file>
<file>images/simulator/9X/9xdr.png</file>
<file>images/simulator/9X/9xdt.png</file>
<file>images/simulator/9X/9xdb-bl.png</file>
<file>images/simulator/9X/9xdl-bl.png</file>
<file>images/simulator/9X/9xdr-bl.png</file>
<file>images/simulator/9X/9xdt-bl.png</file>
<file>images/simulator/9X/9xdb-gr.png</file>
<file>images/simulator/9X/9xdl-gr.png</file>
<file>images/simulator/9X/9xdr-gr.png</file>
<file>images/simulator/9X/9xdt-gr.png</file>
<file>images/simulator/9X/9xdb-or.png</file>
<file>images/simulator/9X/9xdl-or.png</file>
<file>images/simulator/9X/9xdr-or.png</file>
<file>images/simulator/9X/9xdt-or.png</file>
<file>images/simulator/9X/9xdb-yl.png</file>
<file>images/simulator/9X/9xdl-yl.png</file>
<file>images/simulator/9X/9xdr-yl.png</file>
<file>images/simulator/9X/9xdt-yl.png</file>
<file>images/simulator/9X/9xdb-rd.png</file>
<file>images/simulator/9X/9xdl-rd.png</file>
<file>images/simulator/9X/9xdr-rd.png</file>
<file>images/simulator/9X/9xdt-rd.png</file>
<file>images/simulator/9X/9xmenu.png</file>
<file>images/simulator/9X/9xmenumenu.png</file>
<file>images/simulator/9X/9xmenuexit.png</file>
<file>images/simulator/9X/9xcurs.png</file>
<file>images/simulator/9X/9xcursup.png</file>
<file>images/simulator/9X/9xcursplus.png</file>
<file>images/simulator/9X/9xcursmin.png</file>
<file>images/simulator/9X/9xcursdown.png</file>
<file>images/simulator/9X/9xcursphoto.png</file>
<file>images/9xdb.png</file>
<file>images/9xdl.png</file>
<file>images/9xdr.png</file>
<file>images/9xdt.png</file>
<file>images/9xdb-bl.png</file>
<file>images/9xdl-bl.png</file>
<file>images/9xdr-bl.png</file>
<file>images/9xdt-bl.png</file>
<file>images/9xdb-gr.png</file>
<file>images/9xdl-gr.png</file>
<file>images/9xdr-gr.png</file>
<file>images/9xdt-gr.png</file>
<file>images/9xdb-or.png</file>
<file>images/9xdl-or.png</file>
<file>images/9xdr-or.png</file>
<file>images/9xdt-or.png</file>
<file>images/9xdb-yl.png</file>
<file>images/9xdl-yl.png</file>
<file>images/9xdr-yl.png</file>
<file>images/9xdt-yl.png</file>
<file>images/9xdb-rd.png</file>
<file>images/9xdl-rd.png</file>
<file>images/9xdr-rd.png</file>
<file>images/9xdt-rd.png</file>
<file>images/9xmenu.png</file>
<file>images/9xmenumenu.png</file>
<file>images/9xmenuexit.png</file>
<file>images/9xcurs.png</file>
<file>images/9xcursup.png</file>
<file>images/9xcursplus.png</file>
<file>images/9xcursmin.png</file>
<file>images/9xcursdown.png</file>
<file>images/9xcursphoto.png</file>
<file>images/screenshot.png</file>
<file>images/splash-9x.png</file>
<file>images/splash-9xrpro.png</file>
@@ -62,18 +47,18 @@
<file>images/maps.png</file>
<file>images/track.png</file>
<file>images/track0.png</file>
<file>images/simulator/Taranis/x9b0.png</file>
<file>images/simulator/Taranis/x9l0.png</file>
<file>images/simulator/Taranis/x9l1.png</file>
<file>images/simulator/Taranis/x9l2.png</file>
<file>images/simulator/Taranis/x9l3.png</file>
<file>images/simulator/Taranis/x9l4.png</file>
<file>images/simulator/Taranis/x9r0.png</file>
<file>images/simulator/Taranis/x9r1.png</file>
<file>images/simulator/Taranis/x9r2.png</file>
<file>images/simulator/Taranis/x9r3.png</file>
<file>images/simulator/Taranis/x9s0.png</file>
<file>images/simulator/Taranis/x9t0.png</file>
<file>images/x9b0.png</file>
<file>images/x9l0.png</file>
<file>images/x9l1.png</file>
<file>images/x9l2.png</file>
<file>images/x9l3.png</file>
<file>images/x9l4.png</file>
<file>images/x9r0.png</file>
<file>images/x9r1.png</file>
<file>images/x9r2.png</file>
<file>images/x9r3.png</file>
<file>images/x9s0.png</file>
<file>images/x9t0.png</file>
<file>images/taranison.png</file>
<file>images/wizard/ailerons.png</file>
<file>images/wizard/airbrakes.png</file>
+2 -4
View File
@@ -11,9 +11,7 @@ enum BoardEnum {
BOARD_AR9X,
BOARD_TARANIS,
BOARD_TARANIS_PLUS,
BOARD_TARANIS_X9E,
BOARD_FLAMENCO,
BOARD_HORUS
BOARD_TARANIS_X9E
};
#define C9X_MAX_MODELS 60
@@ -27,7 +25,7 @@ enum BoardEnum {
#define C9X_MAX_GVARS 9
#define C9X_MAX_ENCODERS 2
#define C9X_NUM_CHNOUT 32 // number of real output channels
#define C9X_NUM_CSW 64 // number of custom switches
#define C9X_NUM_CSW 32 // number of custom switches
#define C9X_MAX_CUSTOM_FUNCTIONS 64 // number of functions assigned to switches
#define C9X_NUM_MODULES 2
#define NUM_STICKS 4
+16 -2
View File
@@ -475,6 +475,13 @@ QString RawSource::toString(const ModelData * model) const
QObject::tr("ACC"), QObject::tr("GPS Time"),
};
static const QString logicalSwitches[] = {
QObject::tr("L1"), QObject::tr("L2"), QObject::tr("L3"), QObject::tr("L4"), QObject::tr("L5"), QObject::tr("L6"), QObject::tr("L7"), QObject::tr("L8"), QObject::tr("L9"), QObject::tr("L10"),
QObject::tr("L11"), QObject::tr("L12"), QObject::tr("L13"), QObject::tr("L14"), QObject::tr("L15"), QObject::tr("L16"), QObject::tr("L17"), QObject::tr("L18"), QObject::tr("L19"), QObject::tr("L20"),
QObject::tr("L21"), QObject::tr("L22"), QObject::tr("L23"), QObject::tr("L24"), QObject::tr("L25"), QObject::tr("L26"), QObject::tr("L27"), QObject::tr("L28"), QObject::tr("L29"), QObject::tr("L30"),
QObject::tr("L31"), QObject::tr("L32")
};
if (index<0) {
return QObject::tr("----");
}
@@ -501,7 +508,7 @@ QString RawSource::toString(const ModelData * model) const
case SOURCE_TYPE_SWITCH:
return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(switchesX9D, index) : CHECK_IN_ARRAY(switches9X, index));
case SOURCE_TYPE_CUSTOM_SWITCH:
return QObject::tr("L%1").arg(index+1);
return logicalSwitches[index];
case SOURCE_TYPE_CYC:
return QObject::tr("CYC%1").arg(index+1);
case SOURCE_TYPE_PPM:
@@ -583,6 +590,13 @@ QString RawSwitch::toString() const
SwitchUp('R'), QString::fromUtf8("SR-"), SwitchDn('R'),
};
static const QString logicalSwitches[] = {
QObject::tr("L1"), QObject::tr("L2"), QObject::tr("L3"), QObject::tr("L4"), QObject::tr("L5"), QObject::tr("L6"), QObject::tr("L7"), QObject::tr("L8"), QObject::tr("L9"), QObject::tr("L10"),
QObject::tr("L11"), QObject::tr("L12"), QObject::tr("L13"), QObject::tr("L14"), QObject::tr("L15"), QObject::tr("L16"), QObject::tr("L17"), QObject::tr("L18"), QObject::tr("L19"), QObject::tr("L20"),
QObject::tr("L21"), QObject::tr("L22"), QObject::tr("L23"), QObject::tr("L24"), QObject::tr("L25"), QObject::tr("L26"), QObject::tr("L27"), QObject::tr("L28"), QObject::tr("L29"), QObject::tr("L30"),
QObject::tr("L31"), QObject::tr("L32")
};
static const QString flightModes[] = {
QObject::tr("FM0"), QObject::tr("FM1"), QObject::tr("FM2"), QObject::tr("FM3"), QObject::tr("FM4"), QObject::tr("FM5"), QObject::tr("FM6"), QObject::tr("FM7"), QObject::tr("FM8")
};
@@ -620,7 +634,7 @@ QString RawSwitch::toString() const
else
return CHECK_IN_ARRAY(switches9X, index-1);
case SWITCH_TYPE_VIRTUAL:
return QObject::tr("L%1").arg(index);
return CHECK_IN_ARRAY(logicalSwitches, index-1);
case SWITCH_TYPE_MULTIPOS_POT:
return CHECK_IN_ARRAY(multiposPots, index-1);
case SWITCH_TYPE_TRIM:
+1
View File
@@ -36,6 +36,7 @@ eepromFatHeader(NULL)
#define EEPROM_BLOCK_SIZE (4*1024)
#define EEPROM_MARK 0x84697771 /* thanks ;) */
#define EEPROM_ZONE_SIZE (8*1024)
#define EEPROM_BUFFER_SIZE 256
#define EEPROM_FAT_SIZE 128
#define EEPROM_MAX_ZONES (EEPROM_SIZE / EEPROM_ZONE_SIZE)
#define EEPROM_MAX_FILES (EEPROM_MAX_ZONES - 1)
@@ -172,7 +172,8 @@ bool Er9xSimulator::timer10ms()
uint8_t * Er9xSimulator::getLcd()
{
return (::uint8_t *)simuLcdBuf;
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool Er9xSimulator::lcdChanged(bool & lightEnable)
@@ -194,7 +194,8 @@ bool Ersky9xSimulator::timer10ms()
uint8_t * Ersky9xSimulator::getLcd()
{
return (::uint8_t *)simuLcdBuf;
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool Ersky9xSimulator::lcdChanged(bool & lightEnable)
+45 -117
View File
@@ -22,13 +22,12 @@
#define MAX_MIXERS(board, version) (IS_ARM(board) ? 64 : 32)
#define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16)
#define MAX_EXPOS(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 64 : 32) : (IS_DBLRAM(board, version) ? 16 : 14))
#define MAX_LOGICAL_SWITCHES(board, version) (IS_ARM(board) ? (version >= 218 ? 64 : 32) : ((IS_DBLEEPROM(board, version) && version<217) ? 15 : 12))
#define MAX_CUSTOM_SWITCHES(board, version) (IS_ARM(board) ? 32 : ((IS_DBLEEPROM(board, version) && version<217) ? 15 : 12))
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? (version >= 216 ? 64 : 32) : (IS_DBLEEPROM(board, version) ? 24 : 16))
#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : 8)
#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5)
#define MAX_SENSORS(board, version) (32)
#define NUM_PPM_INPUTS(board, version) ((IS_ARM(board) && version >= 216) ? 16 : 8)
#define ROTENC_COUNT(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 218) ? 0 : 1) : (IS_2560(board) ? 2 : 0))
#define IS_AFTER_RELEASE_21_MARCH_2013(board, version) (version >= 214 || (!IS_ARM(board) && version >= 213))
#define IS_AFTER_RELEASE_23_MARCH_2013(board, version) (version >= 214 || (board==BOARD_STOCK && version >= 213))
@@ -101,7 +100,7 @@ class SwitchesConversionTable: public ConversionTable {
}
}
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val+offset);
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -126,7 +125,7 @@ class SwitchesConversionTable: public ConversionTable {
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++);
}
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -264,7 +263,7 @@ class SourcesConversionTable: public ConversionTable {
addConversion(RawSource(SOURCE_TYPE_SWITCH, i), val++);
}
}
for (int i=0; i<MAX_LOGICAL_SWITCHES(board, version); i++) {
for (int i=0; i<MAX_CUSTOM_SWITCHES(board, version); i++) {
addConversion(RawSource(SOURCE_TYPE_CUSTOM_SWITCH, i), val++);
}
}
@@ -297,7 +296,7 @@ class SourcesConversionTable: public ConversionTable {
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, i), val++);
}
}
else {
else {
if (afterrelease21March2013) {
if ((board != BOARD_STOCK && (board!=BOARD_M128 || version<215)) || (variant & GVARS_VARIANT)) {
for (int i=0; i<MAX_GVARS(board, version); i++) {
@@ -306,25 +305,25 @@ class SourcesConversionTable: public ConversionTable {
}
}
for (int i=0; i<TELEMETRY_SOURCE_ACC; i++) {
if (version < 216) {
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPEED || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
if (IS_ARM(board)) {
addConversion(RawSource(SOURCE_TYPE_SPECIAL, 0), val++); // BATT
addConversion(RawSource(SOURCE_TYPE_SPECIAL, 1), val++); // TIME
val += 5;
addConversion(RawSource(SOURCE_TYPE_SPECIAL, 2), val++); // Timer1
addConversion(RawSource(SOURCE_TYPE_SPECIAL, 3), val++); // Timer2
}
else {
for (int i=0; i<TELEMETRY_SOURCE_ACC; i++) {
if (version < 216) {
if (i == TELEMETRY_SOURCE_TX_TIME || i == TELEMETRY_SOURCE_SWR || i == TELEMETRY_SOURCE_A3 ||
i == TELEMETRY_SOURCE_A4 || i == TELEMETRY_SOURCE_ASPEED || i == TELEMETRY_SOURCE_DTE ||
i == TELEMETRY_SOURCE_CELL_MIN || i == TELEMETRY_SOURCE_CELLS_MIN || i == TELEMETRY_SOURCE_VFAS_MIN)
continue;
}
if (i == TELEMETRY_SOURCE_TX_TIME || i == TELEMETRY_SOURCE_SWR || i == TELEMETRY_SOURCE_A3 ||
i == TELEMETRY_SOURCE_A4 || i == TELEMETRY_SOURCE_A3_MIN || i == TELEMETRY_SOURCE_A4_MIN)
continue;
}
if (!IS_ARM(board)) {
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_A3_MIN || i==TELEMETRY_SOURCE_A4_MIN)
continue;
}
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, i), val++);
if (version >= 216 && IS_ARM(board)) {
if (i==TELEMETRY_SOURCE_RSSI_RX)
val += 1;
if (i==TELEMETRY_SOURCE_TX_TIME)
val += 5;
if (i==TELEMETRY_SOURCE_DTE)
val += 5;
if (i==TELEMETRY_SOURCE_POWER_MAX)
val += 5;
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, i), val++);
}
}
}
@@ -784,7 +783,7 @@ class FlightModeField: public TransformedField {
index(index),
board(board),
version(version),
rotencCount(ROTENC_COUNT(board, version))
rotencCount(IS_ARM(board) ? 1 : (IS_2560(board) ? 2 : 0))
{
if (board == BOARD_STOCK || (board==BOARD_M128 && version>=215)) {
// On stock we use 10bits per trim
@@ -804,21 +803,13 @@ class FlightModeField: public TransformedField {
internalField.Append(new SignedField<16>(trimBase[i]));
}
}
if (IS_ARM(board) && version >= 218) {
if (HAS_LARGE_LCD(board))
internalField.Append(new ZCharField<10>(phase.name));
else
internalField.Append(new ZCharField<6>(phase.name));
internalField.Append(new SwitchField<9>(phase.swtch, board, version));
internalField.Append(new SpareBitsField<7>());
}
else {
internalField.Append(new SwitchField<8>(phase.swtch, board, version));
if (HAS_LARGE_LCD(board))
internalField.Append(new ZCharField<10>(phase.name));
else
internalField.Append(new ZCharField<6>(phase.name));
}
internalField.Append(new SwitchField<8>(phase.swtch, board, version));
if (HAS_LARGE_LCD(board))
internalField.Append(new ZCharField<10>(phase.name));
else
internalField.Append(new ZCharField<6>(phase.name));
if (IS_ARM(board) && version >= 214) {
internalField.Append(new UnsignedField<8>(phase.fadeIn));
internalField.Append(new UnsignedField<8>(phase.fadeOut));
@@ -931,25 +922,7 @@ class MixField: public TransformedField {
version(version),
model(model)
{
if (IS_TARANIS(board) && version >= 218) {
internalField.Append(new SignedField<11>(_weight));
internalField.Append(new UnsignedField<5>(_destCh));
internalField.Append(new SourceField<10>(mix.srcRaw, board, version, FLAG_NOTELEMETRY));
internalField.Append(new UnsignedField<1>((unsigned int &)mix.carryTrim));
internalField.Append(new UnsignedField<2>(mix.mixWarn));
internalField.Append(new UnsignedField<2>((unsigned int &)mix.mltpx));
internalField.Append(new SpareBitsField<1>());
internalField.Append(new SignedField<14>(_offset));
internalField.Append(new SwitchField<9>(mix.swtch, board, version));
internalField.Append(new UnsignedField<9>(mix.flightModes));
internalField.Append(new CurveReferenceField(mix.curve, board, version));
internalField.Append(new UnsignedField<8>(mix.delayUp));
internalField.Append(new UnsignedField<8>(mix.delayDown));
internalField.Append(new UnsignedField<8>(mix.speedUp));
internalField.Append(new UnsignedField<8>(mix.speedDown));
internalField.Append(new ZCharField<8>(mix.name));
}
else if (IS_TARANIS(board) && version >= 217) {
if (IS_TARANIS(board) && version >= 217) {
internalField.Append(new UnsignedField<8>(_destCh));
internalField.Append(new UnsignedField<9>(mix.flightModes));
internalField.Append(new UnsignedField<2>((unsigned int &)mix.mltpx));
@@ -1217,21 +1190,7 @@ class InputField: public TransformedField {
board(board),
version(version)
{
if (IS_TARANIS(board) && version >= 218) {
internalField.Append(new UnsignedField<2>(expo.mode, "Mode"));
internalField.Append(new UnsignedField<14>(expo.scale, "Scale"));
internalField.Append(new SourceField<10>(expo.srcRaw, board, version, 0));
internalField.Append(new SignedField<6>(expo.carryTrim, "CarryTrim"));
internalField.Append(new UnsignedField<5>(expo.chn, "Channel"));
internalField.Append(new SwitchField<9>(expo.swtch, board, version));
internalField.Append(new UnsignedField<9>(expo.flightModes));
internalField.Append(new SignedField<8>(_weight, "Weight"));
internalField.Append(new SpareBitsField<1>());
internalField.Append(new ZCharField<8>(expo.name));
internalField.Append(new SignedField<8>(_offset, "Offset"));
internalField.Append(new CurveReferenceField(expo.curve, board, version));
}
else if (IS_TARANIS(board) && version >= 217) {
if (IS_TARANIS(board) && version >= 217) {
internalField.Append(new SourceField<10>(expo.srcRaw, board, version, 0));
internalField.Append(new UnsignedField<14>(expo.scale, "Scale"));
internalField.Append(new UnsignedField<8>(expo.chn, "Channel"));
@@ -1636,7 +1595,7 @@ class AndSwitchesConversionTable: public ConversionTable {
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val);
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++);
}
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val);
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -1647,7 +1606,7 @@ class AndSwitchesConversionTable: public ConversionTable {
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val);
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++);
}
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val);
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -1712,16 +1671,7 @@ class LogicalSwitchField: public TransformedField {
v2(0),
v3(0)
{
if (IS_ARM(board) && version >= 218) {
internalField.Append(new ConversionField< UnsignedField<8> >(csw.func, &functionsConversionTable, "Function"));
internalField.Append(new SignedField<10>(v1));
internalField.Append(new SignedField<10>(v3));
internalField.Append(new ConversionField< SignedField<9> >((int &)csw.andsw, andswitchesConversionTable, "AND switch"));
internalField.Append(new SpareBitsField<1>()); // TODO extra switch mode
internalField.Append(new SpareBitsField<2>());
internalField.Append(new SignedField<16>(v2));
}
else if (IS_ARM(board) && version >= 217) {
if (IS_ARM(board) && version >= 217) {
internalField.Append(new ConversionField< UnsignedField<6> >(csw.func, &functionsConversionTable, "Function"));
internalField.Append(new SignedField<10>(v1));
internalField.Append(new SignedField<16>(v2));
@@ -1756,7 +1706,7 @@ class LogicalSwitchField: public TransformedField {
int scale = (version >= 216 ? 0 : 5);
internalField.Append(new ConversionField< UnsignedField<8> >(csw.delay, 0, scale));
internalField.Append(new ConversionField< UnsignedField<8> >(csw.duration, 0, scale));
if (version >= 214 && version <= 217) {
if (version >= 214) {
internalField.Append(new ConversionField< SignedField<8> >((int &)csw.andsw, andswitchesConversionTable, "AND switch"));
}
}
@@ -2079,14 +2029,8 @@ class ArmCustomFunctionField: public TransformedField {
{
memset(_param, 0, sizeof(_param));
if (version >= 218) {
internalField.Append(new SwitchField<9>(fn.swtch, board, version));
internalField.Append(new ConversionField< UnsignedField<7> >(_func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function")));
}
else {
internalField.Append(new SwitchField<8>(fn.swtch, board, version));
internalField.Append(new ConversionField< UnsignedField<8> >(_func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function")));
}
internalField.Append(new SwitchField<8>(fn.swtch, board, version));
internalField.Append(new ConversionField< UnsignedField<8> >(_func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function")));
if (IS_TARANIS(board) && version >= 216)
internalField.Append(new CharField<8>(_param, false));
@@ -2267,8 +2211,9 @@ class ArmCustomFunctionField: public TransformedField {
}
}
else if (fn.func == FuncPlayValue) {
if (version >= 213)
if (version >= 213) {
sourcesConversionTable->importValue(value, (int &)fn.param);
}
else
SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->importValue(value, (int &)fn.param);
}
@@ -2961,21 +2906,8 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
for (int i=0; i<MAX_TIMERS(board, version); i++) {
if (IS_ARM(board) && version >= 218) {
internalField.Append(new SwitchField<9>(modelData.timers[i].mode, board, version, true));
internalField.Append(new UnsignedField<23>(modelData.timers[i].val));
internalField.Append(new SignedField<24>(modelData.timers[i].pvalue));
internalField.Append(new UnsignedField<2>(modelData.timers[i].countdownBeep));
internalField.Append(new BoolField<1>(modelData.timers[i].minuteBeep));
internalField.Append(new UnsignedField<2>(modelData.timers[i].persistent));
internalField.Append(new SpareBitsField<3>());
if (IS_TARANIS(board))
internalField.Append(new ZCharField<8>(modelData.timers[i].name));
else
internalField.Append(new ZCharField<3>(modelData.timers[i].name));
}
else if (IS_ARM(board) && version >= 217) {
internalField.Append(new SwitchField<8>(modelData.timers[i].mode, board, version, true));
internalField.Append(new SwitchField<8>(modelData.timers[i].mode, board, version, true));
if (IS_ARM(board) && version >= 217) {
internalField.Append(new UnsignedField<24>(modelData.timers[i].val));
internalField.Append(new SignedField<24>(modelData.timers[i].pvalue));
internalField.Append(new UnsignedField<2>(modelData.timers[i].countdownBeep));
@@ -2988,7 +2920,6 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
internalField.Append(new ZCharField<3>(modelData.timers[i].name));
}
else if ((IS_ARM(board) || IS_2560(board)) && version >= 216) {
internalField.Append(new SwitchField<8>(modelData.timers[i].mode, board, version, true));
internalField.Append(new UnsignedField<16>(modelData.timers[i].val));
internalField.Append(new UnsignedField<2>(modelData.timers[i].countdownBeep));
internalField.Append(new BoolField<1>(modelData.timers[i].minuteBeep));
@@ -2997,7 +2928,6 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
internalField.Append(new SignedField<16>(modelData.timers[i].pvalue));
}
else if (afterrelease21March2013) {
internalField.Append(new SwitchField<8>(modelData.timers[i].mode, board, version, true));
internalField.Append(new UnsignedField<12>(modelData.timers[i].val));
internalField.Append(new BoolField<1>((bool &)modelData.timers[i].countdownBeep));
internalField.Append(new BoolField<1>(modelData.timers[i].minuteBeep));
@@ -3011,7 +2941,6 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
}
else {
internalField.Append(new SwitchField<8>(modelData.timers[i].mode, board, version, true));
internalField.Append(new UnsignedField<16>(modelData.timers[i].val));
if (HAS_PERSISTENT_TIMERS(board)) {
internalField.Append(new UnsignedField<1>(modelData.timers[i].persistent));
@@ -3071,7 +3000,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
for (int i=0; i<MAX_EXPOS(board, version); i++)
internalField.Append(new InputField(modelData.expoData[i], board, version));
internalField.Append(new CurvesField(modelData.curves, board, version));
for (int i=0; i<MAX_LOGICAL_SWITCHES(board, version); i++)
for (int i=0; i<MAX_CUSTOM_SWITCHES(board, version); i++)
internalField.Append(new LogicalSwitchField(modelData.logicalSw[i], board, version, variant, &modelData));
for (int i=0; i<MAX_CUSTOM_FUNCTIONS(board, version); i++) {
if (IS_ARM(board))
@@ -3080,9 +3009,8 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
internalField.Append(new AvrCustomFunctionField(modelData.customFn[i], board, version, variant));
}
internalField.Append(new HeliField(modelData.swashRingData, board, version, variant));
for (int i=0; i<MAX_FLIGHT_MODES(board, version); i++) {
for (int i=0; i<MAX_FLIGHT_MODES(board, version); i++)
internalField.Append(new FlightModeField(modelData.flightModeData[i], i, board, version));
}
if (!IS_ARM(board) || version < 216) {
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength));
@@ -23,8 +23,8 @@
#include "file.h"
#include "appdata.h"
#define OPENTX_FIRMWARE_DOWNLOADS "http://downloads-22.open-tx.org/firmware"
#define OPENTX_NIGHT_FIRMWARE_DOWNLOADS "http://downloads-22.open-tx.org/nightly/firmware"
#define OPENTX_FIRMWARE_DOWNLOADS "http://downloads-21.open-tx.org/firmware"
#define OPENTX_NIGHT_FIRMWARE_DOWNLOADS "http://downloads-21.open-tx.org/nightly/firmware"
#define FILE_TYP_GENERAL 1
#define FILE_TYP_MODEL 2
@@ -75,10 +75,6 @@ const char * OpenTxEepromInterface::getName()
return "OpenTX for 9XR-PRO";
case BOARD_AR9X:
return "OpenTX for ar9x board / 9X";
case BOARD_FLAMENCO:
return "OpenTX for Flamenco experimental";
case BOARD_HORUS:
return "OpenTX for FrSky Horus";
default:
return "OpenTX for an unknown board";
}
@@ -102,8 +98,6 @@ const int OpenTxEepromInterface::getEEpromSize()
case BOARD_TARANIS:
case BOARD_TARANIS_PLUS:
case BOARD_TARANIS_X9E:
case BOARD_FLAMENCO:
case BOARD_HORUS:
return EESIZE_TARANIS;
default:
return 0;
@@ -409,9 +403,7 @@ int OpenTxEepromInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t
case BOARD_SKY9X:
case BOARD_AR9X:
case BOARD_9XRPRO:
case BOARD_FLAMENCO:
case BOARD_HORUS:
version = 218;
version = 217;
break;
case BOARD_GRUVIN9X:
case BOARD_MEGA2560:
@@ -644,7 +636,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
return id.contains("nooverridech") ? 0 : 1;
case LogicalSwitches:
if (IS_ARM(board))
return 64;
return 32;
else
return 12;
case CustomAndSwitches:
@@ -964,10 +956,10 @@ EepromLoadErrors OpenTxEepromInterface::checkVersion(unsigned int version)
// M128 revert because too much RAM used!
case 216:
// A lot of things (first github release)
return OLD_VERSION;
break;
case 217:
// 3 logical switches removed on M128 / gruvin9x boards
return OLD_VERSION;
case 218:
break;
default:
return NOT_OPENTX;
@@ -1442,14 +1434,6 @@ void registerOpenTxFirmwares()
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Horus board */
firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS);
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
default_firmware_variant = GetFirmware("opentx-taranisplus-en");
current_firmware_variant = default_firmware_variant;
}
@@ -1,19 +1,46 @@
today(DATE)
now(TIME)
git_id(GIT_STR)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${RADIO_SRC_DIRECTORY}/stamp.h @ONLY)
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
add_custom_target(about_lbm_9x
make lbm PCB=9X
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(about_lbm_taranis
make lbm PCB=TARANIS
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(commondeps
make stamp_header tra
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${RADIO_SRC_DIRECTORY}/stamp-opentx.h)
macro(add_lua_export_target target)
add_custom_command(
OUTPUT ${RADIO_SRC_DIRECTORY}/lua/lua_exports_${target}.inc
COMMAND ${CMAKE_C_COMPILER} -E ${ARGN} -DEXPORT ${INTTYPES_INCLUDE_OPTION} myeeprom.h | grep LEXP > lua_exports_${target}.txt
COMMAND python ../util/luaexport.py ${C9X_VERSION} lua_exports_${target}.txt lua/lua_exports_${target}.inc lua_fields_${target}.txt
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(lua_export_${target} DEPENDS ${RADIO_SRC_DIRECTORY}/lua/lua_exports_${target}.inc)
endmacro(add_lua_export_target)
add_lua_export_target(taranis -DPCBTARANIS -DLUA -DVIRTUALINPUTS)
add_lua_export_target(taranis_x9e -DPCBTARANIS -DREVPLUS -DREV9E -DLUA -DVIRTUALINPUTS)
set(OPENTX_SRC_FILES
opentxsimulator.cpp
)
)
include_directories(
${CMAKE_BINARY_DIR}/radio/src
${CMAKE_CURRENT_BINARY_DIR}
${RADIO_BIN_DIRECTORY}
${PROJECT_SOURCE_DIR}
${COMPANION_SRC_DIRECTORY}/firmwares/opentx
${PROJECT_SOURCE_DIR}/firmwares/opentx
${RADIO_SRC_DIRECTORY}
${RADIO_SRC_DIRECTORY}/fonts/std
${RADIO_SRC_DIRECTORY}/lua/src
@@ -37,21 +64,21 @@ endif()
set(COMMON_DEFINITIONS
${COMMON_DEFINITIONS}
SUFFIX="${SUFFIX}"
SUFFIX="${SUFFIX}"
HELI
GVARS
FLIGHT_MODES
PPM_CENTER_ADJUSTABLE
PPM_LIMITS_SYMETRICAL
OVERRIDE_CHANNEL_FUNCTION
OVERRIDE_CHANNEL_FUNCTION
FAI_CHOICE
)
)
set(COMMON_LIBRARIES
${QT_LIBRARIES}
${PTHREAD_LIBRARY}
${SDL_LIBRARY}
)
)
add_library(opentx-9x${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-9xr${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
@@ -65,24 +92,19 @@ add_library(opentx-ar9x${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranis${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-horus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
set(dependencies_9x 9x_bitmaps firmware_translations)
add_dependencies(opentx-9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xr${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9x128${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xr128${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-gruvin9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-mega2560${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
set(dependencies_taranis taranis_bitmaps firmware_translations)
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis_x9e)
add_dependencies(opentx-horus${SUFFIX}-simulator horus_bitmaps horus_fonts firmware_translations lua_export_horus)
add_dependencies(opentx-9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9xr${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9x128${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9xr128${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-gruvin9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-mega2560${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-sky9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9xrpro${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-ar9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-taranis${SUFFIX}-simulator about_lbm_taranis commondeps lua_export_taranis)
add_dependencies(opentx-taranisplus${SUFFIX}-simulator about_lbm_taranis commondeps lua_export_taranis)
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator about_lbm_taranis commondeps lua_export_taranis_x9e)
set(OPENTX_LIBRARIES
opentx-9x${SUFFIX}-simulator
@@ -97,81 +119,75 @@ set(OPENTX_LIBRARIES
opentx-taranis${SUFFIX}-simulator
opentx-taranisplus${SUFFIX}-simulator
opentx-taranisx9e${SUFFIX}-simulator
opentx-horus${SUFFIX}-simulator
)
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(TARGETS ${OPENTX_LIBRARIES} LIBRARY DESTINATION ${SIMULATOR_LIB_PATH})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# 9X with ATmega64
target_include_directories(opentx-9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_include_directories(opentx-9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega64
target_include_directories(opentx-9xr${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9xr${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM64 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_include_directories(opentx-9xr${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9xr${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM64 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xr${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9X with ATmega128
target_include_directories(opentx-9x128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9x128${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM128 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_include_directories(opentx-9x128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9x128${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM128 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9x128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega128
target_include_directories(opentx-9xr128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9xr128${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM128 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_include_directories(opentx-9xr128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9xr128${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM128 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xr128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Gruvin9x
target_include_directories(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/gruvin9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-gruvin9x${SUFFIX}-simulator PRIVATE PCBGRUVIN9X CPUM2560 EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/gruvin9x)
target_compile_definitions(opentx-gruvin9x${SUFFIX}-simulator PRIVATE PCBGRUVIN9X CPUM2560 EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Mega2560
target_include_directories(opentx-mega2560${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/mega2560 PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-mega2560${SUFFIX}-simulator PRIVATE PCBMEGA2560 CPUM2560 EEPROM EEPROM_RLC SDCARD ROTARY_ENCODERS=2 ${COMMON_DEFINITIONS})
target_include_directories(opentx-mega2560${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/mega2560)
target_compile_definitions(opentx-mega2560${SUFFIX}-simulator PRIVATE PCBMEGA2560 CPUM2560 EEPROM_RLC SDCARD ROTARY_ENCODERS=2 ${COMMON_DEFINITIONS})
target_link_libraries(opentx-mega2560${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Sky9x
target_include_directories(opentx-sky9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-sky9x${SUFFIX}-simulator PRIVATE PCBSKY9X CPUARM VOICE EEPROM SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-sky9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x)
target_compile_definitions(opentx-sky9x${SUFFIX}-simulator PRIVATE PCBSKY9X CPUARM VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-sky9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR-PRO
target_include_directories(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9xrpro${SUFFIX}-simulator PRIVATE PCBSKY9X REVX CPUARM VOICE EEPROM SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x)
target_compile_definitions(opentx-9xrpro${SUFFIX}-simulator PRIVATE PCBSKY9X REVX CPUARM VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# AR9X
target_include_directories(opentx-ar9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-ar9x${SUFFIX}-simulator PRIVATE PCBSKY9X AR9X CPUARM VOICE EEPROM SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-ar9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x)
target_compile_definitions(opentx-ar9x${SUFFIX}-simulator PRIVATE PCBSKY9X AR9X CPUARM VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-ar9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis standard
target_include_directories(opentx-taranis${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/taranis)
target_compile_definitions(opentx-taranis${SUFFIX}-simulator PRIVATE PCBTARANIS CPUARM CPUSTM32 EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-taranis${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
target_compile_definitions(opentx-taranis${SUFFIX}-simulator PRIVATE PCBTARANIS CPUARM CPUSTM32 EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranis${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis Plus
target_include_directories(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/taranis)
target_compile_definitions(opentx-taranisplus${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS CPUARM CPUSTM32 EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
target_compile_definitions(opentx-taranisplus${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS CPUARM CPUSTM32 EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis X9E
target_include_directories(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/taranis)
target_compile_definitions(opentx-taranisx9e${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS REV9E CPUARM CPUSTM32 STM32F40_41xxx EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_include_directories(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
target_compile_definitions(opentx-taranisx9e${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS REV9E CPUARM CPUSTM32 STM32F40_41xxx EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Horus
target_include_directories(opentx-horus${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/horus PRIVATE ${RADIO_SRC_DIRECTORY}/fonts/horus PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/horus)
target_compile_definitions(opentx-horus${SUFFIX}-simulator PRIVATE PCBHORUS CPUARM CPUSTM32 STM32F40_41xxx COLORLCD VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-horus${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
add_custom_target(opentx-simulators
DEPENDS ${OPENTX_LIBRARIES}
)
)
if(APPLE)
set(SIMULATOR_BUNDLES)
@@ -187,7 +203,7 @@ if(APPLE)
COMMAND pwd
COMMAND cp lib${_file}.dylib companion.app/Contents/Resources/
DEPENDS ${_file}
)
)
list(APPEND SIMULATOR_BUNDLES ${SIMULATOR_BUNDLE})
endforeach()
add_custom_target(opentx-simulators-bundle DEPENDS ${SIMULATOR_BUNDLES})
@@ -15,7 +15,6 @@
*/
#include "opentxsimulator.h"
#include <QDebug>
#include <stdio.h>
#include <exception>
#include <map>
@@ -40,11 +39,7 @@
#define AUTOSWITCH
#define GRAPHICS
#define CURVES
#if defined(PCBFLAMENCO)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
#elif defined(PCBTARANIS) || defined(PCBHORUS)
#if defined(PCBTARANIS)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
@@ -102,19 +97,15 @@ namespace NAMESPACE {
#include "radio/src/pulses/pulses_avr.cpp"
#endif
#include "radio/src/storage/storage_common.cpp"
#include "radio/src/eeprom_common.cpp"
#if defined(EEPROM_RLC)
#include "radio/src/storage/eeprom_common.cpp"
#include "radio/src/storage/eeprom_rlc.cpp"
#elif defined(EEPROM)
#include "radio/src/storage/eeprom_common.cpp"
#include "radio/src/storage/eeprom_raw.cpp"
#elif defined(SDCARD)
#include "radio/src/storage/sdcard_raw.cpp"
#include "radio/src/eeprom_rlc.cpp"
#else
#include "radio/src/eeprom_raw.cpp"
#endif
#if defined(PCBTARANIS) || defined(PCBSKY9X)
#include "radio/src/storage/eeprom_conversions.cpp"
#include "radio/src/eeprom_conversions.cpp"
#endif
#include "radio/src/opentx.cpp"
@@ -133,159 +124,85 @@ namespace NAMESPACE {
#include "radio/src/vario.cpp"
#include "radio/src/trainer_input.cpp"
#if defined(PCBHORUS)
#if defined(PCBTARANIS)
#include "radio/src/bmp.cpp"
#include "radio/src/gui/horus/bitmaps.cpp"
#include "radio/src/gui/horus/curves.cpp"
#include "radio/src/gui/horus/fonts.cpp"
#include "radio/src/gui/horus/widgets.cpp"
#include "radio/src/gui/horus/navigation.cpp"
#include "radio/src/gui/horus/popups.cpp"
#include "radio/src/gui/horus/helpers.cpp"
#include "radio/src/gui/horus/menus.cpp"
#include "radio/src/gui/horus/menu_model.cpp"
#include "radio/src/gui/horus/menu_model_select.cpp"
#include "radio/src/gui/horus/menu_model_setup.cpp"
#include "radio/src/gui/horus/menu_model_heli.cpp"
#include "radio/src/gui/horus/menu_model_flightmodes.cpp"
#include "radio/src/gui/horus/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/horus/menu_model_curves.cpp"
#include "radio/src/gui/horus/menu_model_logical_switches.cpp"
#include "radio/src/gui/horus/menu_model_custom_functions.cpp"
#include "radio/src/gui/horus/menu_model_custom_scripts.cpp"
#include "radio/src/gui/horus/menu_model_gvars.cpp"
#include "radio/src/gui/horus/menu_model_limits.cpp"
#include "radio/src/gui/horus/menu_model_telemetry.cpp"
#include "radio/src/gui/horus/menu_general.cpp"
#include "radio/src/gui/horus/menu_general_setup.cpp"
#include "radio/src/gui/horus/menu_general_sdmanager.cpp"
#include "radio/src/gui/horus/menu_general_trainer.cpp"
#include "radio/src/gui/horus/menu_general_version.cpp"
// #include "radio/src/gui/horus/menu_general_hardware.cpp"
#include "radio/src/gui/horus/menu_general_calib.cpp"
#include "radio/src/gui/horus/view_main.cpp"
#include "radio/src/gui/horus/view_statistics.cpp"
#include "radio/src/gui/horus/view_channels.cpp"
#include "radio/src/gui/horus/view_telemetry.cpp"
#include "radio/src/gui/horus/view_text.cpp"
#include "radio/src/gui/horus/view_about.cpp"
#include "radio/src/gui/horus/lcd.cpp"
#include "radio/src/gui/horus/splash.cpp"
#elif defined(PCBFLAMENCO)
#include "radio/src/gui/Flamenco/fonts.cpp"
#include "radio/src/gui/Flamenco/widgets.cpp"
#include "radio/src/gui/Flamenco/navigation.cpp"
#include "radio/src/gui/Flamenco/popups.cpp"
#include "radio/src/gui/Flamenco/helpers.cpp"
#include "radio/src/gui/Flamenco/menus.cpp"
#include "radio/src/gui/Flamenco/menu_model.cpp"
#include "radio/src/gui/Flamenco/menu_model_select.cpp"
#include "radio/src/gui/Flamenco/menu_model_setup.cpp"
#include "radio/src/gui/Flamenco/menu_model_heli.cpp"
#include "radio/src/gui/Flamenco/menu_model_flightmodes.cpp"
#include "radio/src/gui/Flamenco/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/Flamenco/menu_model_curves.cpp"
#include "radio/src/gui/Flamenco/menu_model_logical_switches.cpp"
#include "radio/src/gui/Flamenco/menu_model_custom_functions.cpp"
// #include "radio/src/gui/Flamenco/menu_model_custom_scripts.cpp"
#include "radio/src/gui/Flamenco/menu_model_gvars.cpp"
#include "radio/src/gui/Flamenco/menu_model_limits.cpp"
#include "radio/src/gui/Flamenco/menu_model_telemetry.cpp"
#include "radio/src/gui/Flamenco/menu_general.cpp"
#include "radio/src/gui/Flamenco/menu_general_setup.cpp"
#include "radio/src/gui/Flamenco/menu_general_sdmanager.cpp"
#include "radio/src/gui/Flamenco/menu_general_trainer.cpp"
#include "radio/src/gui/Flamenco/menu_general_version.cpp"
// #include "radio/src/gui/Flamenco/menu_general_hardware.cpp"
#include "radio/src/gui/Flamenco/menu_general_calib.cpp"
#include "radio/src/gui/Flamenco/view_main.cpp"
#include "radio/src/gui/Flamenco/view_statistics.cpp"
#include "radio/src/gui/Flamenco/view_channels.cpp"
#include "radio/src/gui/Flamenco/view_telemetry.cpp"
#include "radio/src/gui/Flamenco/view_text.cpp"
#include "radio/src/gui/Flamenco/view_about.cpp"
#include "radio/src/gui/Flamenco/lcd.cpp"
#include "radio/src/gui/Flamenco/splash.cpp"
#include "radio/src/targets/flamenco/tw8823_driver.cpp"
#elif defined(PCBTARANIS)
#include "radio/src/bmp.cpp"
#include "radio/src/gui/taranis/fonts.cpp"
#include "radio/src/gui/taranis/widgets.cpp"
#include "radio/src/gui/taranis/navigation.cpp"
#include "radio/src/gui/taranis/popups.cpp"
#include "radio/src/gui/taranis/helpers.cpp"
#include "radio/src/gui/taranis/menus.cpp"
#include "radio/src/gui/taranis/menu_model.cpp"
#include "radio/src/gui/taranis/menu_model_select.cpp"
#include "radio/src/gui/taranis/menu_model_setup.cpp"
#include "radio/src/gui/taranis/menu_model_heli.cpp"
#include "radio/src/gui/taranis/menu_model_flightmodes.cpp"
#include "radio/src/gui/taranis/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/taranis/menu_model_curves.cpp"
#include "radio/src/gui/taranis/menu_model_logical_switches.cpp"
#include "radio/src/gui/taranis/menu_model_custom_functions.cpp"
#include "radio/src/gui/taranis/menu_model_custom_scripts.cpp"
#include "radio/src/gui/taranis/menu_model_gvars.cpp"
#include "radio/src/gui/taranis/menu_model_limits.cpp"
#include "radio/src/gui/taranis/menu_model_telemetry.cpp"
#include "radio/src/gui/taranis/menu_general.cpp"
#include "radio/src/gui/taranis/menu_general_setup.cpp"
#include "radio/src/gui/taranis/menu_general_sdmanager.cpp"
#include "radio/src/gui/taranis/menu_general_trainer.cpp"
#include "radio/src/gui/taranis/menu_general_version.cpp"
#include "radio/src/gui/taranis/menu_general_diagkeys.cpp"
#include "radio/src/gui/taranis/menu_general_diaganas.cpp"
#include "radio/src/gui/taranis/menu_general_hardware.cpp"
#include "radio/src/gui/taranis/menu_general_calib.cpp"
#include "radio/src/gui/taranis/view_main.cpp"
#include "radio/src/gui/taranis/view_statistics.cpp"
#include "radio/src/gui/taranis/view_channels.cpp"
#include "radio/src/gui/taranis/view_telemetry.cpp"
#include "radio/src/gui/taranis/view_text.cpp"
#include "radio/src/gui/taranis/view_about.cpp"
#include "radio/src/gui/taranis/lcd.cpp"
#include "radio/src/gui/taranis/splash.cpp"
#include "radio/src/gui/Taranis/fonts.cpp"
#include "radio/src/gui/Taranis/widgets.cpp"
#include "radio/src/gui/Taranis/navigation.cpp"
#include "radio/src/gui/Taranis/popups.cpp"
#include "radio/src/gui/Taranis/helpers.cpp"
#include "radio/src/gui/Taranis/menus.cpp"
#include "radio/src/gui/Taranis/menu_model.cpp"
#include "radio/src/gui/Taranis/menu_model_select.cpp"
#include "radio/src/gui/Taranis/menu_model_setup.cpp"
#include "radio/src/gui/Taranis/menu_model_heli.cpp"
#include "radio/src/gui/Taranis/menu_model_flightmodes.cpp"
#include "radio/src/gui/Taranis/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/Taranis/menu_model_curves.cpp"
#include "radio/src/gui/Taranis/menu_model_logical_switches.cpp"
#include "radio/src/gui/Taranis/menu_model_custom_functions.cpp"
#include "radio/src/gui/Taranis/menu_model_custom_scripts.cpp"
#include "radio/src/gui/Taranis/menu_model_gvars.cpp"
#include "radio/src/gui/Taranis/menu_model_limits.cpp"
#include "radio/src/gui/Taranis/menu_model_telemetry.cpp"
#include "radio/src/gui/Taranis/menu_general.cpp"
#include "radio/src/gui/Taranis/menu_general_setup.cpp"
#include "radio/src/gui/Taranis/menu_general_sdmanager.cpp"
#include "radio/src/gui/Taranis/menu_general_trainer.cpp"
#include "radio/src/gui/Taranis/menu_general_version.cpp"
#include "radio/src/gui/Taranis/menu_general_diagkeys.cpp"
#include "radio/src/gui/Taranis/menu_general_diaganas.cpp"
#include "radio/src/gui/Taranis/menu_general_hardware.cpp"
#include "radio/src/gui/Taranis/menu_general_calib.cpp"
#include "radio/src/gui/Taranis/view_main.cpp"
#include "radio/src/gui/Taranis/view_statistics.cpp"
#include "radio/src/gui/Taranis/view_channels.cpp"
#include "radio/src/gui/Taranis/view_telemetry.cpp"
#include "radio/src/gui/Taranis/view_text.cpp"
#include "radio/src/gui/Taranis/view_about.cpp"
#include "radio/src/gui/Taranis/lcd.cpp"
#include "radio/src/gui/Taranis/splash.cpp"
#else
#include "radio/src/gui/9x/fonts.cpp"
#include "radio/src/gui/9x/widgets.cpp"
#include "radio/src/gui/9x/navigation.cpp"
#include "radio/src/gui/9x/popups.cpp"
#include "radio/src/gui/9x/helpers.cpp"
#include "radio/src/gui/9x/menus.cpp"
#include "radio/src/gui/9x/menu_model.cpp"
#include "radio/src/gui/9x/menu_model_select.cpp"
#include "radio/src/gui/9x/menu_model_setup.cpp"
#include "radio/src/gui/9x/menu_model_heli.cpp"
#include "radio/src/gui/9x/menu_model_flightmodes.cpp"
#include "radio/src/gui/9x/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/9x/menu_model_curves.cpp"
#include "radio/src/gui/9x/menu_model_logical_switches.cpp"
#include "radio/src/gui/9x/menu_model_custom_functions.cpp"
#include "radio/src/gui/9x/menu_model_limits.cpp"
#include "radio/src/gui/9x/menu_model_telemetry.cpp"
#include "radio/src/gui/9x/menu_model_templates.cpp"
#include "radio/src/gui/9x/menu_general.cpp"
#include "radio/src/gui/9x/menu_general_setup.cpp"
#include "radio/src/gui/9X/fonts.cpp"
#include "radio/src/gui/9X/widgets.cpp"
#include "radio/src/gui/9X/navigation.cpp"
#include "radio/src/gui/9X/popups.cpp"
#include "radio/src/gui/9X/helpers.cpp"
#include "radio/src/gui/9X/menus.cpp"
#include "radio/src/gui/9X/menu_model.cpp"
#include "radio/src/gui/9X/menu_model_select.cpp"
#include "radio/src/gui/9X/menu_model_setup.cpp"
#include "radio/src/gui/9X/menu_model_heli.cpp"
#include "radio/src/gui/9X/menu_model_flightmodes.cpp"
#include "radio/src/gui/9X/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/9X/menu_model_curves.cpp"
#include "radio/src/gui/9X/menu_model_logical_switches.cpp"
#include "radio/src/gui/9X/menu_model_custom_functions.cpp"
#include "radio/src/gui/9X/menu_model_limits.cpp"
#include "radio/src/gui/9X/menu_model_telemetry.cpp"
#include "radio/src/gui/9X/menu_model_templates.cpp"
#include "radio/src/gui/9X/menu_general.cpp"
#include "radio/src/gui/9X/menu_general_setup.cpp"
#if defined(SDCARD)
#include "radio/src/gui/9x/menu_general_sdmanager.cpp"
#include "radio/src/gui/9x/view_text.cpp"
#include "radio/src/gui/9X/menu_general_sdmanager.cpp"
#include "radio/src/gui/9X/view_text.cpp"
#endif
#include "radio/src/gui/9x/menu_general_trainer.cpp"
#include "radio/src/gui/9x/menu_general_version.cpp"
#include "radio/src/gui/9x/menu_general_diagkeys.cpp"
#include "radio/src/gui/9x/menu_general_diaganas.cpp"
#include "radio/src/gui/9X/menu_general_trainer.cpp"
#include "radio/src/gui/9X/menu_general_version.cpp"
#include "radio/src/gui/9X/menu_general_diagkeys.cpp"
#include "radio/src/gui/9X/menu_general_diaganas.cpp"
#if defined(CPUARM)
#include "radio/src/gui/9x/menu_general_hardware.cpp"
#include "radio/src/gui/9X/menu_general_hardware.cpp"
#endif
#include "radio/src/gui/9x/menu_general_calib.cpp"
#include "radio/src/gui/9x/view_main.cpp"
#include "radio/src/gui/9x/view_statistics.cpp"
#include "radio/src/gui/9x/view_telemetry.cpp"
#include "radio/src/gui/9X/menu_general_calib.cpp"
#include "radio/src/gui/9X/view_main.cpp"
#include "radio/src/gui/9X/view_statistics.cpp"
#include "radio/src/gui/9X/view_telemetry.cpp"
#if !defined(CPUM64)
#include "radio/src/gui/9x/view_about.cpp"
#include "radio/src/gui/9X/view_about.cpp"
#endif
#include "radio/src/gui/9x/lcd.cpp"
#include "radio/src/gui/9x/splash.cpp"
#include "radio/src/gui/9X/lcd.cpp"
#include "radio/src/gui/9X/splash.cpp"
#endif
#if !defined(VIRTUALINPUTS)
@@ -304,27 +221,7 @@ namespace NAMESPACE {
#include "radio/src/buzzer.cpp"
#endif
#if defined(PCBHORUS)
#include "radio/src/targets/horus/board_horus.cpp"
#include "radio/src/targets/horus/keys_driver.cpp"
#include "radio/src/targets/horus/audio_driver.cpp"
#include "radio/src/targets/horus/telemetry_driver.cpp"
#include "radio/src/targets/horus/haptic_driver.cpp"
#include "radio/src/targets/horus/pulses_driver.cpp"
#include "radio/src/targets/taranis/rtc_driver.cpp"
#include "radio/src/targets/horus/trainer_driver.cpp"
#include "radio/src/targets/horus/serial2_driver.cpp"
#elif defined(PCBFLAMENCO)
#include "radio/src/targets/flamenco/board_flamenco.cpp"
#include "radio/src/targets/flamenco/keys_driver.cpp"
#include "radio/src/targets/flamenco/audio_driver.cpp"
#include "radio/src/targets/flamenco/telemetry_driver.cpp"
#include "radio/src/targets/flamenco/eeprom_driver.cpp"
// #include "radio/src/targets/flamenco/haptic_driver.cpp"
#include "radio/src/targets/flamenco/pulses_driver.cpp"
#include "radio/src/targets/flamenco/rtc_driver.cpp"
#include "radio/src/targets/flamenco/trainer_driver.cpp"
#elif defined(PCBTARANIS)
#if defined(PCBTARANIS)
#include "radio/src/targets/taranis/board_taranis.cpp"
#include "radio/src/targets/taranis/keys_driver.cpp"
#include "radio/src/targets/taranis/audio_driver.cpp"
@@ -355,11 +252,7 @@ namespace NAMESPACE {
#elif defined(PCBMEGA2560)
#include "radio/src/targets/mega2560/board_mega2560.cpp"
#else
#include "radio/src/targets/9x/board_stock.cpp"
#endif
#if defined(CPUARM)
#include "radio/src/gui/gui_helpers.cpp"
#include "radio/src/targets/stock/board_stock.cpp"
#endif
#include "radio/src/keys.cpp"
@@ -486,7 +379,8 @@ bool OpenTxSimulator::timer10ms()
::uint8_t * OpenTxSimulator::getLcd()
{
return (::uint8_t *)simuLcdBuf;
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool OpenTxSimulator::lcdChanged(bool & lightEnable)
@@ -566,16 +460,11 @@ void OpenTxSimulator::getTrims(Trims & trims)
void OpenTxSimulator::wheelEvent(int steps)
{
#if defined(PCBHORUS) || defined(PCBFLAMENCO)
if (steps > 0)
rotencValue -= 2;
else
rotencValue += 2;
#elif defined(REV9E)
#if defined(REV9E)
if (steps == 255)
rotencValue -= 2;
x9de_rotenc -= 2;
else
rotencValue += 2;
x9de_rotenc += 2;
#elif defined(PCBSKY9X) && !defined(REVX)
g_rotenc[0] += steps*4;
#elif defined(PCBGRUVIN9X)
@@ -638,19 +527,20 @@ uint16_t OpenTxSimulator::getSensorRatio(uint16_t id)
return 0;
}
void OpenTxSimulator::setLuaStateReloadPermanentScripts()
{
#if defined(LUA)
luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
#endif
}
void OpenTxSimulator::setTrainerInput(unsigned int inputNumber, ::int16_t value)
{
#define SETTRAINER_IMPORT
#include "simulatorimport.h"
}
void OpenTxSimulator::setLuaStateReloadPermanentScripts()
{
#if defined(LUA)
luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
#endif
}
void OpenTxSimulator::installTraceHook(void (*callback)(const char *))
{
traceCallback = callback;
@@ -675,11 +565,7 @@ class OpenTxSimulatorFactory: public SimulatorFactory
virtual BoardEnum type()
{
#if defined(PCBHORUS)
return BOARD_HORUS;
#elif defined(PCBFLAMENCO)
return BOARD_FLAMENCO;
#elif defined(PCBTARANIS)
#if defined(PCBTARANIS)
return BOARD_TARANIS;
#else
return BOARD_STOCK;
@@ -19,15 +19,7 @@
#include "simulatorinterface.h"
#if defined(PCBHORUS)
#define FLAVOUR "horus"
#define NAMESPACE HORUS
#define EEPROM_VARIANT 0
#elif defined(PCBFLAMENCO)
#define FLAVOUR "flamenco"
#define NAMESPACE FLAMENCO
#define EEPROM_VARIANT 0
#elif defined(PCBTARANIS) && defined(REV9E)
#if defined(PCBTARANIS) && defined(REV9E)
#define FLAVOUR "taranisx9e"
#define NAMESPACE TaranisX9E
#define EEPROM_VARIANT 0x8000
@@ -139,6 +131,7 @@ class DLLEXPORT OpenTxSimulator : public SimulatorInterface {
virtual void installTraceHook(void (*callback)(const char *));
virtual void setLuaStateReloadPermanentScripts();
};
}
@@ -175,7 +175,8 @@ bool Th9xSimulator::timer10ms()
uint8_t * Th9xSimulator::getLcd()
{
return (::uint8_t *)simuLcdBuf;
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool Th9xSimulator::lcdChanged(bool & lightEnable)
+1 -7
View File
@@ -790,13 +790,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
}
BoardEnum board = GetCurrentFirmware()->getBoard();
SimulatorDialog * sd;
if (board == BOARD_HORUS) {
sd = new SimulatorDialogHorus(parent, si, flags);
}
else if (board == BOARD_FLAMENCO) {
sd = new SimulatorDialogFlamenco(parent, si, flags);
}
else if (IS_TARANIS(board)) {
if (IS_TARANIS(board)) {
for (int i=0; i<GetCurrentFirmware()->getCapability(Pots); i++) {
if (radioData.generalSettings.isPotAvailable(i)) {
flags |= (SIMULATOR_FLAGS_S1 << i);

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

+7 -7
View File
@@ -70,8 +70,8 @@
#include "radiointerface.h"
#include "progressdialog.h"
#define OPENTX_COMPANION_DOWNLOADS "http://downloads-22.open-tx.org/companion"
#define OPENTX_NIGHT_COMPANION_DOWNLOADS "http://downloads-22.open-tx.org/nightly/companion"
#define OPENTX_COMPANION_DOWNLOADS "http://downloads-21.open-tx.org/companion"
#define OPENTX_NIGHT_COMPANION_DOWNLOADS "http://downloads-21.open-tx.org/nightly/companion"
#define DONATE_STR "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QUZ48K4SEXDP2"
#ifdef __APPLE__
@@ -278,7 +278,7 @@ void MainWindow::closeUpdatesWaitDialog()
void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply)
{
QByteArray qba = reply->readAll();
int i = qba.indexOf("VERSION");
int i = qba.indexOf("C9X_VERSION");
if (i>0) {
QString version = qba.mid(i+14, qba.indexOf("\"", i+14)-i-14);
@@ -288,7 +288,7 @@ void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply)
int vnum = version2index(version);
QString c9xversion = QString(VERSION);
QString c9xversion = QString(C9X_VERSION);
int c9xver = version2index(c9xversion);
if (c9xver < vnum) {
@@ -822,7 +822,7 @@ void MainWindow::writeBackup()
cd->exec();
}
int MainWindow::getFileType(const QString & fullFileName)
int MainWindow::getFileType(const QString &fullFileName)
{
if(QFileInfo(fullFileName).suffix().toUpper()=="HEX") return FILE_TYPE_HEX;
if(QFileInfo(fullFileName).suffix().toUpper()=="BIN") return FILE_TYPE_BIN;
@@ -899,7 +899,7 @@ void MainWindow::about()
aboutStr.append("<br/><br/>");
aboutStr.append(tr("If you've found this program useful, please support by <a href='%1'>donating</a>").arg(DONATE_STR));
aboutStr.append("<br/><br/>");
aboutStr.append(QString("Version %1, %2").arg(VERSION).arg(__DATE__));
aboutStr.append(QString("Version %1, %2").arg(C9X_VERSION).arg(__DATE__));
aboutStr.append("<br/><br/>");
aboutStr.append(tr("Copyright OpenTX Team") + "<br/>&copy; 2011-2015<br/>");
QMessageBox msgBox(this);
@@ -930,7 +930,7 @@ void MainWindow::updateMenus()
updateLanguageActions();
updateIconSizeActions();
updateIconThemeActions();
setWindowTitle(tr("OpenTX Companion %1 - Radio: %2 - Profile: %3").arg(VERSION).arg(GetCurrentFirmware()->getName()).arg(g.profile[g.id()].name()));
setWindowTitle(tr("OpenTX Companion %1 - Radio: %2 - Profile: %3").arg(C9X_VERSION).arg(GetCurrentFirmware()->getName()).arg(g.profile[g.id()].name()));
}
MdiChild *MainWindow::createMdiChild()
+7 -7
View File
@@ -184,19 +184,19 @@ class MainWindow : public QMainWindow
void updateLanguageActions();
void updateIconThemeActions();
int getFileType(const QString & fullFileName);
int getFileType(const QString &fullFileName);
QString Theme;
QString ISize;
QString strippedName(const QString & fullFileName);
QString strippedName(const QString &fullFileName);
MdiChild *activeMdiChild();
QMdiSubWindow *findMdiChild(const QString & fileName);
QMdiSubWindow *findMdiChild(const QString &fileName);
int getEpromVersion(QString fileName);
bool readEepromFromRadio(const QString & filename);
bool writeEepromToRadio(const QString & filename);
bool readFirmwareFromRadio(const QString & filename);
bool writeFirmwareToRadio(const QString & filename);
bool readEepromFromRadio(const QString &filename);
bool writeEepromToRadio(const QString &filename);
bool readFirmwareFromRadio(const QString &filename);
bool writeFirmwareToRadio(const QString &filename);
QMdiArea *mdiArea;
QSignalMapper *windowMapper;
+1 -5
View File
@@ -1,8 +1,4 @@
include_directories(
${CMAKE_SOURCE_DIR}
${COMPANION_SRC_DIRECTORY}
${CMAKE_CURRENT_BINARY_DIR}
)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(modeledit_NAMES
modeledit
+6 -6
View File
@@ -9,8 +9,6 @@ set(simulation_SRCS
set(simulation_UIS
simulatordialog-9x.ui
simulatordialog-taranis.ui
simulatordialog-horus.ui
simulatordialog-flamenco.ui
telemetrysimu.ui
trainersimu.ui
debugoutput.ui
@@ -18,9 +16,11 @@ set(simulation_UIS
set(simulation_HDRS
simulatordialog.h
# lcdwidget.h
buttonswidget.h
sliderwidget.h
cursorwidget.h
menuwidget.h
xcursorwidget.h
xmenuwidget.h
myslider.h
telemetrysimu.h
trainersimu.h
debugoutput.h
@@ -48,8 +48,8 @@ endif()
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/../..
${COMPANION_SRC_DIRECTORY}
${COMPANION_SRC_DIRECTORY}/simulation
${RADIO_SRC_DIRECTORY}/fonts/std
)
-122
View File
@@ -1,122 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _BUTTONSWIDGET_H_
#define _BUTTONSWIDGET_H_
#include <QWidget>
#include <QtGui>
class ButtonsWidget : public QWidget
{
Q_OBJECT
public:
explicit ButtonsWidget(QWidget * parent):
QWidget(parent)
{
}
virtual void setStyleSheet(const QString & sheet)
{
defaultStyleSheet = sheet;
QWidget::setStyleSheet(sheet);
}
void addArea(int x1, int y1, int x2, int y2, int key, const char * bitmap)
{
QPolygon polygon;
polygon.setPoints(4, x1, y1, x1, y2, x2, y2, x2, y1);
addArea(polygon, key, bitmap);
}
void addArea(const QPolygon & polygon, int key, const char * bitmap)
{
areas.push_back(Area(polygon, key, bitmap));
}
protected:
class Area {
public:
Area(const QPolygon & polygon, int key, const char * bitmap):
polygon(polygon),
key(key),
bitmap(bitmap)
{
}
bool contains(int x, int y)
{
return polygon.containsPoint(QPoint(x, y), Qt::OddEvenFill);
}
public:
QPolygon polygon;
int key;
const char * bitmap;
};
void setBitmap(const char * bitmap)
{
if (bitmap) {
QWidget::setStyleSheet(QString("background:url(:/images/simulator/%1);").arg(bitmap));
}
}
virtual void mousePressEvent(QMouseEvent * event)
{
int x = event->x();
int y = event->y();
setFocus();
if (event->button() == Qt::LeftButton) {
foreach(Area area, areas) {
if (area.contains(x, y)) {
setBitmap(area.bitmap);
emit buttonPressed(area.key);
break;
}
}
}
}
virtual void mouseReleaseEvent(QMouseEvent * event)
{
QWidget::setStyleSheet(defaultStyleSheet);
setFocus();
emit buttonPressed(0);
}
void paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
signals:
void buttonPressed(int button);
protected:
QList<Area> areas;
QString defaultStyleSheet;
};
#endif /* _BUTTONSWIDGET_H_ */
+106
View File
@@ -0,0 +1,106 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef CURSORWIDGET_H
#define CURSORWIDGET_H
#include <QWidget>
#include <QtGui>
class cursorWidget : public QWidget {
Q_OBJECT
public:
explicit cursorWidget(QWidget * parent = 0):
QWidget(parent)
{
}
protected:
virtual void mousePressEvent(QMouseEvent * event)
{
float upx[] = {68,28,51,83,105,68};
float upy[] = {83,45,32,32,45,83};
float minx[] = {74,114,127,127,114,74};
float miny[] = {90,51,80,106,130,90};
float dox[] = {68,28,51,83,105,68};
float doy[] = {98,137,151,151,137,98};
float plusx[] = { 80,20,7,7,20,80};
float plusy[] = {90,51,80,106,130,90};
int x=event->x();
int y=event->y();
setFocus();
if (event->button()==Qt::LeftButton) {
if (pnpoly(6,upx,upy,(float)x,(float)y)==1) {
setStyleSheet("background:url(:/images/9xcursup.png);");
emit buttonPressed(Qt::Key_Up);
}
else if (pnpoly(6,minx,miny,(float)x,(float)y)==1) {
setStyleSheet("background:url(:/images/9xcursmin.png);");
emit buttonPressed(Qt::Key_Right);
}
else if (pnpoly(6,dox,doy,(float)x,(float)y)==1) {
setStyleSheet("background:url(:/images/9xcursdown.png);");
emit buttonPressed(Qt::Key_Down);
}
else if (pnpoly(6,plusx,plusy,(float)x,(float)y)==1) {
setStyleSheet("background:url(:/images/9xcursplus.png);");
emit buttonPressed(Qt::Key_Left);
} else if (sqrt(((float)x-22)*((float)x-22)+((float)y-165)*((float)y-165))<17) {
setStyleSheet("background:url(:/images/9xcursphoto.png);");
emit buttonPressed(Qt::Key_Print);
}
}
// QWidget::mousePressEvent(event);
}
virtual void mouseReleaseEvent(QMouseEvent * event)
{
setStyleSheet("background:url(:/images/9xcurs.png);");
emit buttonPressed(0);
setFocus();
//QWidget::mouseReleaseEvent(event);
}
void paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
inline int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy)
{
int i, j, c = 0;
for (i = 0, j = nvert-1; i < nvert; j = i++) {
if ( ((verty[i]>testy) != (verty[j]>testy)) && (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) )
c = !c;
}
return c;
}
signals:
void buttonPressed(int button);
};
#endif /* CURSORWIDGET_H */

Some files were not shown because too many files have changed in this diff Show More