Compare commits

...

492 Commits

Author SHA1 Message Date
Arne Schwabe e681c876e6 First version of multi module support for Taranis
Since DSM2 uses the same framing/serial protocol (Serial with 125k)
the multi module code heavily reuses that code and depends on it being enabled.

This first version only implements the protocol on the taranis.

Telemetry code is currently untested.
2016-01-03 18:40:22 +01:00
Damjan Adamic a4e6c90d1d Jenkins scripts latest state from the server 2016-01-03 16:58:24 +01:00
Damjan Adamic c5e0eb84b8 Fixes #3130: remove /lib paths from RPM (ported from master) 2016-01-03 16:52:55 +01:00
Damjan Adamic b045b979cd Fixes #2974: Hardware/Calibration tab split int two tabs: Calibration (using table widget, all calibration values shown) and Hardware (ported from master) 2016-01-03 12:21:38 +01:00
Bertrand Songis 93fde17526 Compilation fix 2016-01-03 11:56:25 +01:00
Bertrand Songis dc6d9aca3a Compilation fix 2016-01-03 11:44:07 +01:00
Bertrand Songis 77772287fe Sky9x added to CMakeLists.txt 2016-01-03 11:06:15 +01:00
Damjan Adamic 8809a64d57 Fixed: same BMP was loaded over and over 2016-01-02 20:26:34 +01:00
Damjan Adamic 1b177ba8b8 Fixed: OpenTX Bootloader bin2lbm conversion error (last partial chunk was missing) 2015-12-28 21:45:37 +01:00
Bertrand Songis 450bd77f67 Merge pull request #3176 from opentx/dsbeach/next-issue3141-fx-key-to-reload-scripts
Next branch fixes #3141 Fx key to reload scripts
2015-12-27 20:56:46 +01:00
David S. Beach 3e409a0371 Next branch fixes #3141 Fx key to reload scripts 2015-12-27 11:53:29 -05:00
Bertrand Songis b778c5e469 Windows package fix 2015-12-27 10:21:25 +01:00
Damjan Adamic 86c5c31293 Fixes #3040: Application Setting 'Enable automatic backup before writing firmware' was not saved (ported from master) 2015-12-26 20:59:01 +01:00
Damjan Adamic 400a6c2034 Fixes #3146: fixed Fahrenheit temperature conversion error (if PREC was not 0) (ported from master) 2015-12-26 19:40:58 +01:00
Bertrand Songis 9db8005f71 [Horus] UI continued 2015-12-26 17:58:50 +01:00
Bertrand Songis ba2d03b3ad [Taranis] Navigation bug (was introduced in 2.2 refactoring) 2015-12-26 17:58:50 +01:00
Bertrand Songis e3281ddade [Companion] All binaries written at the root of the build directory to simplify things 2015-12-26 17:58:49 +01:00
Bertrand Songis a4343d8e8c [Taranis] It was impossible to select the [Range Check] button on LR12 in EU mode 2015-12-26 17:58:49 +01:00
Damjan Adamic 2518ed9a74 Fixes #3121: Companion telemetry sensors Ratio and Offset value increment/decrement ignores precision (ported from master) 2015-12-26 16:08:10 +01:00
projectkk2glider 117e28db16 Fixes #3156: Outputs Subtrim, Min and Max values rounding problem fixed (ported from master) 2015-12-26 16:08:04 +01:00
Damjan Adamic d734e3465d Fixes #3117: Telemetry sensor Ratio parameter rounding problem fixed (ported from master) 2015-12-26 16:08:03 +01:00
Bertrand Songis e9f23b2109 [Companion] stamp target removed 2015-12-25 12:31:20 +01:00
Bertrand Songis 2d9aa72c23 VC++ compilation 2015-12-24 15:16:02 +01:00
Bertrand Songis 49d8242faf VC++ compilation 2015-12-24 15:10:50 +01:00
Bertrand Songis c5c1475bc9 VC++ compilation 2015-12-24 14:50:09 +01:00
Bertrand Songis e01d5a31c1 VC++ compilation 2015-12-24 14:26:24 +01:00
Bertrand Songis c70236cbad VC++ compilation 2015-12-24 13:39:24 +01:00
Bertrand Songis 908fce110b VC++ compilation 2015-12-24 12:33:28 +01:00
Bertrand Songis b2b09b4b04 Update Jenkins compilation script 2015-12-24 11:16:34 +01:00
Bertrand Songis 4c8b760022 Update Jenkins compilation script 2015-12-24 11:12:51 +01:00
Bertrand Songis e41ef3fa5d Cosmetics 2015-12-24 11:03:14 +01:00
Bertrand Songis d5cbf57e1b VC++ compilation 2015-12-24 11:01:20 +01:00
Andre Bernet cc40d1e611 Revert "Better placement for companion build output"
This reverts commit d82cf058f7.
2015-12-24 10:11:59 +04:00
Andre Bernet 316d42b5b6 Mixers monitor option was missing 2015-12-24 10:09:10 +04:00
Andre Bernet d82cf058f7 Better placement for companion build output 2015-12-24 09:52:59 +04:00
Bertrand Songis 2df68d1579 VC++ compilation 2015-12-23 23:45:56 +01:00
Bertrand Songis 1e15b711bb Companion binaries and libs built into the same directory 2015-12-23 22:28:54 +01:00
Bertrand Songis 97d59cfa56 Copyright script applied to all sources in the radio directory 2015-12-23 19:57:13 +01:00
Bertrand Songis 0f1ccc993e Include guard script applied to all headers in the radio directory 2015-12-23 19:47:10 +01:00
Bertrand Songis b818c0df6b [Horus] Segfault when a curve goes out of the screen 2015-12-23 19:40:04 +01:00
Bertrand Songis 42473d6868 Target make flash added 2015-12-23 19:22:29 +01:00
Bertrand Songis 31d4340ce7 Merge pull request #3169 from opentx/bsongis/Switch_to_CMake
Switch to CMake
2015-12-23 19:16:39 +01:00
Bertrand Songis 2d4d6ffe48 [Taranis] Strange bug in bootloader fixed by changing the files order in link. TODO added to understand why... 2015-12-23 19:08:46 +01:00
Bertrand Songis 1a308b0a53 Horus board tested OK 2015-12-23 18:59:16 +01:00
Bertrand Songis d02d0f26db Switch to CMake - Taranis bootloader added. Tests done. 2015-12-23 18:39:02 +01:00
Bertrand Songis 356faefb6d Ignore list updated 2015-12-23 09:11:56 +01:00
Bertrand Songis 0c78c60dc9 Switch to CMake continued 2015-12-23 00:42:05 +01:00
Bertrand Songis 88841f63ca Switch to CMake 2015-12-21 23:43:18 +01:00
Bertrand Songis c8358d7e37 VC++ compilation fix 2015-12-21 09:08:20 +01:00
Bertrand Songis c819814d94 Merge pull request #3165 from opentx/projectkk2glider/crossfire_port_to_next
Projectkk2glider/crossfire port to next
2015-12-20 23:44:10 +01:00
Bertrand Songis bccea3594c Merge pull request #3166 from opentx/projectkk2glider/powerbox_port_to_next
Projectkk2glider/powerbox port to next
2015-12-20 23:43:29 +01:00
Bertrand Songis 05c29d320c [Powerbox] 0xOB20 field added. Radio translations 2015-12-20 17:21:34 +01:00
Bertrand Songis 7789fd0b38 [Powerbox sensor] First tests done. It remains the 0x0B20 to add 2015-12-20 17:21:27 +01:00
Bertrand Songis b00ef6a9b3 [S.PORT] Powerbox fields added 2015-12-20 17:21:16 +01:00
Bertrand Songis 739f19d450 Again 16 channels for Crossfire.
I hope they won't change their mind again
2015-12-20 17:13:04 +01:00
Bertrand Songis cc8bd03d8a Crossfire support added to Companion 2015-12-20 17:12:51 +01:00
Bertrand Songis 816b22fd9d Crossfire protocol now accepts 12 channels instead of 16 2015-12-20 17:11:21 +01:00
Bertrand Songis 0504e848ed Crossfire has 16 channels (fixed) 2015-12-20 17:11:10 +01:00
Bertrand Songis 5250f5eb4c Crossfire has 16 channels (fixed) 2015-12-20 17:10:51 +01:00
Damjan Adamic 91e80d446a #2894 - Crossfire (inverted serial) sent on S.PORT pin in the module bay (ported from master f7044a20ec)
16 channels sent every 2.5ms now @ 200KBauds with CRC
2015-12-20 17:10:32 +01:00
Damjan Adamic e8983250ca [Taranis] LR12 is now EU compatible (ported from master ce3d5dbac) 2015-12-20 16:54:18 +01:00
Damjan Adamic 493130504b Re #3160: fixed Windows compilation, help/warnings shown in a message box (they were not visible on Windows) (ported from master) 2015-12-19 19:33:25 +01:00
Damjan Adamic 0db5072bed Fixes #3160: command line options support added to standalone simulator (radio type and eeprom file) (ported from master) 2015-12-18 22:44:17 +01:00
Bertrand Songis cf4fa51019 cli command "set rtc" added
syntax: set rtc <year> <month> <day> <hour> <minute> <second>"
2015-12-16 22:27:09 +01:00
Bertrand Songis 8942115f33 Fixes #3150 2015-12-16 07:11:51 +01:00
Bertrand Songis d7cbd78edf Merge pull request #3153 from mikeller/mikeller/invert_serial_rx_next
Graft of 'invert_serial_rx' onto next.
2015-12-16 07:04:30 +01:00
mikeller 90a62b00f0 Fixed compile error when building simulator. 2015-12-15 19:39:01 +13:00
Michael Keller d165a22a54 Fixup from merge. 2015-12-15 12:06:16 +13:00
Michael Keller 1f59f04070 Merge branch 'mikeller/invert_serial_rx_next' of https://github.com/mikeller/opentx into mikeller/invert_serial_rx_next 2015-12-15 12:04:03 +13:00
mikeller 01fa6471c7 Graft of serial port inversion option onto 'next'. 2015-12-15 12:03:21 +13:00
Bertrand Songis a60522df18 Merge pull request #3149 from opentx/dsbeach/next-issue3147-telem-sim-aspd-as-knots
Changes to send ASpd as knots
2015-12-14 22:27:09 +01:00
Damjan Adamic 9e237c9e46 Re #3127 and #2921: getFlightMode() can now return specified flight mode data 2015-12-14 20:40:27 +01:00
David S. Beach 9a114c903c Changes to send ASpd as knots 2015-12-14 11:53:04 -05:00
mikeller 551ef10d6f Graft of serial port inversion option onto 'next'. 2015-12-15 02:08:16 +13:00
Andre Bernet 92704687cf Ignore list updated 2015-12-14 10:31:04 +04:00
Andre Bernet 3cab898225 Case change fix 2015-12-14 10:22:28 +04:00
Bertrand Songis e103d6fc24 Merge pull request #3144 from flacjacket/python2-3_next
Python 2/3 compatibility and PEP8 on next
2015-12-14 07:16:57 +01:00
Sean Vig 4bd90d79d0 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-13 18:57:36 -06:00
Sean Vig 82c3230981 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-13 18:55:03 -06:00
Sean Vig 5f698d2b17 PEP8 radio/util/translate.py
Remove unused imports, fix whitespace, fix undefined variable
2015-12-13 18:55:03 -06:00
Sean Vig 4bfcfd0fc8 PEP8 radio/util/taranisicons.py
Remove unused imports, fix whitespace, fix indentation
2015-12-13 18:55:02 -06:00
Sean Vig bcc7982b3b PEP8 radio/util/sportparse.py
Remove unused import, fix whitespace, indentation, and comments
2015-12-13 18:55:02 -06:00
Sean Vig 0743785126 PEP8 radio/util/sinus.py
Fix whitespace
2015-12-13 18:55:02 -06:00
Sean Vig 196dbb1d39 PEP8 radio/util/parse.py
Fix whitespace and indentation
2015-12-13 18:55:02 -06:00
Sean Vig fa0ded50fe PEP8 radio/util/luaexport.py
Fix indentation
2015-12-13 18:55:02 -06:00
Sean Vig 2968b25cfa PEP8 radio/util/include-guard.py
Split imports, fix whitespace
2015-12-13 18:55:02 -06:00
Sean Vig 39ee317190 PEP8 radio/util/img2lbm.py
Fix whitespace
2015-12-13 18:54:55 -06:00
Sean Vig 710482e821 PEP8 radio/util/font2png.py
Fix whitespace and indentations, remove semicolons
2015-12-13 18:39:02 -06:00
Sean Vig 73f9dac120 PEP8 radio/util/fat12.py
Fix indentation and whitespace
2015-12-13 18:32:54 -06:00
Sean Vig 7dcd96d258 PEP8 radio/util/dsm2.py
Fix indentation and whitespace
2015-12-13 18:32:54 -06:00
Sean Vig 9d13484291 PEP8 radio/util/copyright.py
Remove unused imports, fix whitespace, fix comments
2015-12-13 18:32:54 -06:00
Sean Vig be154140b3 PEP8 radio/util/codecs.py
Fix white space
2015-12-13 18:32:53 -06:00
Sean Vig 054952edcb PEP8 radio/util/capitalize.py
Split imports, fix indentation
2015-12-13 18:32:53 -06:00
Sean Vig 3d6533c88b PEP8 radio/util/bin2lbm.py
Fix indentation
2015-12-13 18:32:53 -06:00
Sean Vig a0f6b0e913 PEP8 radio/util/addtr.py
Split imports, fix indentation
2015-12-13 18:32:53 -06:00
Sean Vig 50d8e21533 PEP8 radio/util/add-issue-links.py
Remove unused imports, fix indentation
2015-12-13 18:32:53 -06:00
Sean Vig b8800ed30e 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-13 18:31:50 -06:00
Sean Vig 5efa5d47d3 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-13 18:28:44 -06:00
Damjan Adamic b3d52e3525 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:25 +01:00
Damjan Adamic aa2ca4f729 Fixes #3043: unit for Air speed sensor set to knots 2015-12-13 20:39:28 +01:00
Damjan Adamic 034221a78e Inputs were not exported as Lua fields 2015-12-13 19:30:36 +01:00
Bertrand Songis f63dcfb778 Merge pull request #3142 from opentx/dsbeach/next-issue2919-telemetry-sensors-simulator
Ported simulator enhancements to next
2015-12-13 18:43:07 +01:00
David S. Beach 3ebc6bb86c Ported simulator enhancements to next 2015-12-13 11:22:33 -05:00
Bertrand Songis b8ac51564e Compilation fix 2015-12-11 15:12:50 +01:00
Bertrand Songis 5554540630 Lowercase again in all directories to simplify things 2015-12-11 10:00:03 +01:00
Bertrand Songis 1edc1fe316 Compilation fix 2015-12-11 09:29:01 +01:00
Bertrand Songis 00100c0c86 Cosmetics 2015-12-10 23:44:56 +01:00
Andre Bernet 8bdce4e213 Support language-specific chars in notes 2015-12-09 12:00:30 +04:00
Andre Bernet 4edbfcb834 AR9X firmware flashing fallback was wrong 2015-12-08 11:27:51 +04:00
Damjan Adamic 9eeb2dd6a2 More layout changes (1366 ms with table layout) 2015-12-07 18:03:46 +01:00
Damjan Adamic 49016498a3 Resize policy back (586 ms with grid layout, 1347 ms with table layout) 2015-12-07 18:03:41 +01:00
Damjan Adamic e37dcabd95 timing code (796 ms with grid layout, 1394 ms with table layout) 2015-12-07 18:03:36 +01:00
Damjan Adamic 191e37f29c TableWidget only used if -D TABLE_LAYOUT=yes compile option is defined 2015-12-07 18:03:30 +01:00
Damjan Adamic 1dcc660f31 Fixes #2921: Lua getFlightMode() function added 2015-12-07 18:01:37 +01:00
Bertrand Songis 618dd279fc Merge branch 'next' of https://github.com/opentx/opentx into next 2015-12-06 23:12:00 +01:00
Bertrand Songis 13927800e2 Compilation fix 2015-12-06 23:11:42 +01:00
Bertrand Songis 384bfea9f9 Update README.md 2015-12-06 22:58:00 +01:00
Bertrand Songis 1e2130de53 [Horus] Lua model scripts added 2015-12-06 22:54:43 +01:00
Damjan Adamic 9d29b483c5 Lua export fixes ported from master
Cmake Horus font dependencies fixed
Jenkins build scripts added and fixed
2015-12-06 11:26:07 +01:00
Damjan Adamic 75c1f9f3f7 Compilation fix 2015-11-30 20:04:28 +01:00
Damjan Adamic af6ea012bb Lua documentation update 2015-11-30 18:53:33 +01:00
Damjan Adamic 5492c18a01 Lua exports fixes (ported from master 5d7cc79d):
* X9E fields were missing
 * inputs were missing
 * renamed X9E center sliders, which name collided with logical switches
2015-11-30 18:45:13 +01:00
Bertrand Songis fd554cf013 Merge pull request #3115 from HakanBastedt/HakanBastedt/More_Swedish_translation_issues_3113
Swedish translation now up-to-date and in sync with EN #3113
2015-11-28 22:49:32 +01:00
Håkan Båstedt 9bc63c7421 Fixed messed-up line breaks 2015-11-28 22:08:55 +01:00
Håkan Båstedt 5169892d39 Swedish translation now up-to-date and in sync with EN 2015-11-28 14:43:47 +01:00
Bertrand Songis bca9866675 [Horus] A few SD card / Models storage fixes 2015-11-27 21:33:02 +01:00
Bertrand Songis 787d2ffa92 [Horus] Freeze when invalid (or no) model bitmap 2015-11-26 22:59:06 +01:00
Damjan Adamic d2155ef089 Fixes for Windows build 2015-11-26 21:40:28 +01:00
Bertrand Songis f80a788754 Merge pull request #3112 from opentx/projectkk2glider/issue_2469_lua_keys_for_next_part2
Re #2469: part2: keys accesible to Lua telemetry scripts (Taranis only)
2015-11-26 21:19:39 +01:00
Bertrand Songis 7c1634c00d Horus simu compilation fix 2015-11-26 20:40:13 +01:00
Damjan Adamic 1cbd0ec4b4 Compilation fix for git ID (another try) 2015-11-26 20:33:05 +01:00
Damjan Adamic dc2d2e1f2e Compilation fix for git ID 2015-11-26 20:21:33 +01:00
Damjan Adamic 98d5966946 stamp.h should be PHONY target 2015-11-26 20:10:30 +01:00
Damjan Adamic f184e9bed3 Re #2469: part2: keys accesible to Lua telemetry scripts (Taranis only) (ported #3087 from master commits 3186a5d99..94d8b8b0e8d) 2015-11-26 19:40:32 +01:00
Bertrand Songis cbe244fc6c Fixes Horus compilation 2015-11-26 19:35:07 +01:00
Bertrand Songis f8201844d7 Merge pull request #3111 from opentx/projectkk2glider/issue_2469_lua_keys_for_next_part1
Re #2469: part1: Menu system renaming of variables and refactoring
2015-11-26 18:35:41 +01:00
Damjan Adamic 51b8f9b054 Re #2469: part1: Menu system renaming of variables and refactoring (ported #3087 from master commits 3186a5d99..94d8b8b0e8d) 2015-11-26 18:29:20 +01:00
Andre Bernet ab99740e1b Swedish TTS fixes by HakanBastedt 2015-11-26 13:07:41 +04:00
Bertrand Songis f19815ee26 Cosmetics 2015-11-25 23:15:29 +01:00
Bertrand Songis 84bd62bdce Merge pull request #3105 from opentx/projectkk2glider/lua_additions_for_next
Lua addition ported from master to next
2015-11-25 22:56:36 +01:00
Damjan Adamic efc57d4cf2 Spaces removed 2015-11-25 22:44:22 +01:00
Bertrand Songis d101a6d181 Compilation fix 2015-11-25 21:58:51 +01:00
Bertrand Songis 71f08998dd [Horus] No more errors in Lua interface compilation 2015-11-25 21:50:12 +01:00
Bertrand Songis 791b1173e3 Another couple of functions renamed
And nothing else this time!
2015-11-25 21:24:20 +01:00
Damjan Adamic 7538fcfb51 Git commit ID added to stamp
Fixes #2921: getValue() now also returns pilot position
Fixes #3062: Close any Lua open files when radio powers off
Fixes #3095: Lua string library added (only 6k bytes of flash used)
Re #3095: luaGetVersion() also returns version as numbers
(Ported from master 7ef790d3..4d0bd14ad and squashed into one commit)
2015-11-25 18:00:44 +01:00
Bertrand Songis 7e6dc610ac Compilation fix 2015-11-25 07:40:15 +01:00
Bertrand Songis 765ff269f9 Compilation fix 2015-11-24 22:48:16 +01:00
Bertrand Songis 01187e60c2 Some more LCD functions renamed 2015-11-24 22:09:22 +01:00
Damjan Adamic f92b71c0b8 RRe #2861: Use new TableLayout for Logical switches, Outputs and Special functions (ported from master 731faa8 and squashed into one commit) 2015-11-23 18:56:38 +01:00
Damjan Adamic edab80e6af A FAT12 dump script that got left behing in some old master branch (was used in #1793) 2015-11-22 18:11:49 +01:00
Damjan Adamic 18e36657f8 Re #3026: add Clear to the flight mode (context menu on the Name label) (ported from master b0d3ae26) 2015-11-22 18:11:29 +01:00
Bertrand Songis 683f6e22e2 [Horus] MODELSEL screen continued 2015-11-21 11:35:35 +01:00
Damjan Adamic 0db2013d24 Lua documentation update (ported from master 682fa5d) 2015-11-20 21:25:40 +01:00
Bertrand Songis 6f0de32ba8 [Horus] Menu CurveOne improved 2015-11-20 20:19:38 +01:00
Bertrand Songis 170a2b2612 Should fix the latest compilation error on Visual Studio 2015-11-19 19:52:52 +01:00
Damjan Adamic f05058252f mainmenu.lbm removed from Taranis. Cmake dependencies fixed. 2015-11-19 18:31:44 +01:00
Damjan Adamic 32d0e3890a Additonal stamp.h fixes 2015-11-19 18:16:58 +01:00
David S. Beach ee95c973e9 Fixes #3024: Companion 2.1 (windows) - Lua 'execute' fails in non-root directory (ported from master, re #3025) 2015-11-19 17:57:33 +01:00
dsbeach a1bb31b521 Modifications to luaCompileAndSave() - as scripts are loaded it will check for existing file <file>.lua.src and compile it to <file>.lua if found. (ported from master, re #3079) 2015-11-19 17:50:07 +01:00
Damjan Adamic e1cf90d6d4 Stamp fix 2015-11-19 15:48:19 +01:00
Damjan Adamic cc836a049b Re #3053: clean translations/*.h (original author griebd) 2015-11-19 15:45:41 +01:00
Michele d66b55707d Update it.h.txt (ported from master, re #3036) 2015-11-19 15:38:07 +01:00
Damjan Adamic fd73adc68b Cmake fixes 2015-11-19 00:02:15 +01:00
Bertrand Songis b7c09d703c [Horus] UI continued 2015-11-18 22:07:48 +01:00
Bertrand Songis 22a24d67c9 Cosmetics 2015-11-17 22:52:57 +01:00
Bertrand Songis 821cdff3e6 [Horus] Telemetry menu review 2015-11-17 22:51:36 +01:00
Bertrand Songis e979768445 [Horus] Menu calibration review 2015-11-17 22:51:36 +01:00
Bertrand Songis f238e4d737 Merge pull request #3081 from indavis/next
Update flasheepromdialog.ui, Fixed backupBeforeWrite toolTip.
2015-11-17 19:53:18 +01:00
indavis e3825ed542 Update flasheepromdialog.ui
Updating the backupBeforeWrite toolTip. It was incorrectly set to the checkFirmwareCompatibility text.
2015-11-17 02:15:32 -06:00
Damjan Adamic 788035b0e3 Lua documentation update 2015-11-16 22:46:07 +01:00
Damjan Adamic d1e9bf8e98 Lua documentation update 2015-11-16 19:52:59 +01:00
Bertrand Songis 86b5e36925 Merge pull request #3076 from opentx/Horus
Horus
2015-11-16 18:14:46 +01:00
Bertrand Songis 072204756c Indentation problem 2015-11-16 18:13:21 +01:00
Bertrand Songis e76478f27a [Horus] Merge of Telemetry menu 2015-11-16 18:08:58 +01:00
Damjan Adamic db4ac954ba Better makefile recipe for lua_exports.inc target 2015-11-16 10:22:12 +01:00
Damjan Adamic 6f230c4fc7 Fixed lua_exports.inc target 2015-11-16 07:20:08 +01:00
Bertrand Songis de733579d5 Merge remote-tracking branch 'origin/next' into Horus
# Conflicts:
#	companion/src/CMakeLists.txt
#	companion/src/firmwares/opentx/opentxinterface.cpp
#	companion/src/firmwares/opentx/simulator/CMakeLists.txt
#	companion/src/firmwares/opentx/stamp-opentx.h.in
#	radio/src/Makefile
#	radio/src/cli.cpp
#	radio/src/gui/Taranis/helpers.cpp
#	radio/src/gui/Taranis/lcd.cpp
#	radio/src/gui/Taranis/menu_model_setup.cpp
#	radio/src/gui/Taranis/view_main.cpp
#	radio/src/lua_api.cpp
#	radio/src/main_avr.cpp
#	radio/src/myeeprom.h
#	radio/src/opentx.cpp
#	radio/src/pulses/pxx_arm.cpp
#	radio/src/storage/eeprom_conversions.cpp
#	radio/src/targets/Horus/adc_driver.cpp
#	radio/src/targets/Horus/board_horus.cpp
#	radio/src/targets/Horus/board_horus.h
#	radio/src/targets/Horus/diskio.cpp
#	radio/src/targets/Horus/hal.h
#	radio/src/targets/Horus/haptic_driver.cpp
#	radio/src/targets/Horus/i2c_driver.cpp
#	radio/src/targets/Horus/keys_driver.cpp
#	radio/src/targets/Horus/lcd_driver.cpp
#	radio/src/targets/Horus/led_driver.cpp
#	radio/src/targets/Horus/pulses_driver.cpp
#	radio/src/targets/Horus/pwr_driver.c
#	radio/src/targets/Horus/sdio_sd.c
#	radio/src/targets/Horus/sdio_sd.h
#	radio/src/targets/Horus/serial2_driver.cpp
#	radio/src/targets/Horus/telemetry_driver.cpp
#	radio/src/targets/Horus/usb_conf.h
#	radio/src/targets/Horus/usbd_desc.c
#	radio/src/targets/Horus/usbd_storage_msd.cpp
2015-11-15 23:08:34 +01:00
Bertrand Songis d3915a78fd Fixes #2902 2015-11-15 20:02:20 +01:00
Bertrand Songis f8f5dde24e Horus drivers fixes 2015-11-15 20:02:20 +01:00
Bertrand Songis e76cebbc66 Horus drivers 2015-11-15 20:02:20 +01:00
Bertrand Songis 8ba13e5685 EEPROM v217->v218 conversions (on board + Companion) 2015-11-15 20:02:20 +01:00
Bertrand Songis 116dcf93e0 Fixes #2902 2015-11-15 20:02:20 +01:00
Bertrand Songis 18e128ef55 EEPROM structure changes to allow more switches (9bits instead of 8bits) 2015-11-15 20:02:20 +01:00
Bertrand Songis 11fe3d41f8 Version moved to 2.2.0 2015-11-15 20:02:20 +01:00
Bertrand Songis d0d7135db4 Merge pull request #3068 from opentx/projectkk2glider/lua_split_files
Projectkk2glider/lua split files
2015-11-15 19:44:48 +01:00
Bertrand Songis 1ce0b71c5c Merge pull request #3073 from opentx/projectkk2glider/issue_3071
Fixes #3071: wrong telemetry unit and precision was used for V2 in lo…
2015-11-15 19:41:45 +01:00
Damjan Adamic 109faf8989 Fixes #3071: wrong telemetry unit and precision was used for V2 in logical switches (radios with ARM CPU other than Taranis) 2015-11-15 17:58:10 +01:00
Damjan Adamic 754b875d81 Re #3054: Lua byte-code of every loaded script is dumped to a file if LUA_COMPILER=YES is defined (only for simu target. Original code author (dsbeach) 2015-11-15 16:32:12 +01:00
Damjan Adamic 2572ed0eba Removed unnecessary FILINFO 2015-11-15 16:20:32 +01:00
Bertrand Songis 404a1934c5 [Horus] GVARS Menu 2015-11-15 14:18:43 +01:00
Damjan Adamic feac6d000f Companion build fixed (stamp duplication removed) 2015-11-15 13:19:26 +01:00
Bertrand Songis 77ebe3caec Wrong address for updates 2015-11-15 12:54:29 +01:00
Bertrand Songis e71b53964b [Horus] For the moment no better solution for Windows :( 2015-11-15 12:52:36 +01:00
Damjan Adamic 4a60c8aa6e Lua exports moved to lua dir 2015-11-15 12:12:24 +01:00
Damjan Adamic d54f25ccba Lua api and interface lua_api.cpp moved to lua dir and split into several files 2015-11-15 12:05:53 +01:00
Bertrand Songis 2f03e2c4ad Update DONATIONS.txt 2015-11-15 10:03:54 +01:00
Damjan Adamic c92d88b664 Lua documentation update 2015-11-15 09:50:53 +01:00
Bertrand Songis 11cff7a63b [Horus] Mouse middle button used for [Enter] 2015-11-15 00:28:22 +01:00
Bertrand Songis 07ca8319ad [Horus] Simulator buttons modelized 2015-11-14 21:15:28 +01:00
Bertrand Songis 2f54e85421 VERSION_FAMILY dynamic string introduced 2015-11-14 19:17:34 +01:00
Bertrand Songis b666892da4 Merge pull request #3065 from opentx/projectkk2glider/autogen_lua_docs_2
Projectkk2glider/autogen lua docs 2
2015-11-14 18:47:18 +01:00
Bertrand Songis edf1dbc0b7 Windows compilation fix 2015-11-14 18:24:51 +01:00
Bertrand Songis 7f991ea7f9 Next compilation fixes 2015-11-14 18:02:54 +01:00
Bertrand Songis f0753fe51c Next compilation fixes 2015-11-14 17:55:08 +01:00
Bertrand Songis 7f4abd7c83 [Horus] Windows compilation errors 2015-11-14 17:50:52 +01:00
Bertrand Songis 52809b51b9 Update DONATIONS.txt 2015-11-14 17:20:11 +01:00
Bertrand Songis ed2f66aedd [Horus] UI continued 2015-11-14 17:19:20 +01:00
Damjan Adamic 1a399a649d Typos 2015-11-13 20:00:46 +01:00
Damjan Adamic 0f246d2f39 More docs 2015-11-13 19:48:32 +01:00
Damjan Adamic e5ef862729 Docs added 2015-11-13 18:50:43 +01:00
Damjan Adamic e6546af9b1 Fixes #2947: luaGetVersion() upgraded to also return the radio type.
Start of Lua API documentation that can be parsed with a custom script that generates gitbook documentation
2015-11-13 18:50:43 +01:00
Andre Bernet feb98816ec Hide switch field for FM0 2015-11-13 19:37:27 +04:00
Andre Bernet 71411fcb62 LR12 protocol actually doesn't support remote failsafe configuration 2015-11-13 19:26:34 +04:00
Damjan Adamic d5824f5719 Re #3043: Air speed unit typo corrected in parser 2015-11-13 00:19:08 +01:00
Bertrand Songis f32231cab2 [Horus] Small optimization 2015-11-12 22:22:31 +01:00
Bertrand Songis f875aec72b Update DONATIONS.txt 2015-11-12 19:29:25 +01:00
Bertrand Songis 1b7e62a1f0 Merge pull request #3060 from opentx/projectkk2glider/issue_3059_speed_conversions
Fixes #3059: added unit conversions from km/h
2015-11-12 18:53:02 +01:00
Damjan Adamic ef5746de11 Re #3043: added Air speed parser 2015-11-12 18:47:32 +01:00
Damjan Adamic 454a664d01 Re #3059: table lookup used for unit conversion, saved some 50 bytes of FLASH 2015-11-12 14:53:00 +01:00
Damjan Adamic 58edcc3af8 Fixes #3059: added unit conversions from km/h 2015-11-12 13:55:24 +01:00
Bertrand Songis 09846ca917 Update DONATIONS.txt 2015-11-11 21:43:12 +01:00
Bertrand Songis 2b2f34af29 Release note for 2.1.6 updated 2015-11-11 10:42:20 +01:00
Bertrand Songis a06d405a2c Update DONATIONS.txt 2015-11-11 10:26:55 +01:00
Bertrand Songis 429490eb86 Switch to 2.1.6 2015-11-11 10:24:58 +01:00
Bertrand Songis c73a8bac25 [Taranis X9E] Problem of impossible shutdown on some radios 2015-11-11 10:23:53 +01:00
Bertrand Songis 86f1363d0a [Horus] Compilation fix 2015-11-11 10:12:09 +01:00
Bertrand Songis c4d7feaa9b [Horus] Simulator graphics 2015-11-11 10:02:12 +01:00
Bertrand Songis 312c370162 [Horus] DMA2D more used. Some graphics are really faster. 2015-11-10 21:57:41 +01:00
Bertrand Songis a9603cbdb7 [Horus] More timings 2015-11-10 21:57:41 +01:00
Damjan Adamic f854442c79 Fixes #3047:
* negative altitude on top bar was displayed wrong (same bug affected vertical speed)
* add ability to select an altitude sensor with ft unit for top bar
* display actual sensor unit for top bar altitude
2015-11-10 18:01:42 +01:00
mhotar 922141fcf7 simulator slices 2015-11-09 23:29:49 +01:00
Bertrand Songis 34fef4fefe [Horus] Some LCD timings added in comments 2015-11-09 20:02:08 +01:00
Bertrand Songis d74092d6eb Compilation failure 2015-11-08 20:56:37 +01:00
Bertrand Songis 5445e506a6 Simulator bitmaps moved to different directories 2015-11-08 20:56:23 +01:00
Andre Bernet a1d44d4d9f Telemetry custom screen changes didn't emit modified signal (Fix #3029) 2015-11-07 21:14:48 +01:00
Andre Bernet cc2fcce559 Hide D8/LR12 in companion when eu firmware option is selected 2015-11-07 08:35:47 +01:00
Bertrand Songis 3a740907bb Analog_values renamed to adcValues 2015-11-06 18:46:37 +01:00
Bertrand Songis b1f5ea115c [Horus] ADC driver by Mike
+ new CLI command repeat <interval> <other command>
2015-11-06 18:40:35 +01:00
Bertrand Songis a4869cdb8a Update releasenotes.txt 2015-11-05 19:01:08 +01:00
Bertrand Songis 333d7f1ac1 Update releasenotes.txt 2015-11-05 19:00:40 +01:00
martin 380f435cf2 CZ translations 2015-11-04 23:19:50 +01:00
Andre Bernet 5805c0904a French translations 2015-11-04 21:27:56 +01:00
Damjan Adamic cd2be28aab Typo in release notes 2015-11-04 19:23:54 +01:00
Damjan Adamic d038a0379b Release notes updated, release set to 2015-11-04 2015-11-04 19:14:51 +01:00
Bertrand Songis bca18f5938 Compilation fix 2015-11-03 21:36:22 +01:00
Bertrand Songis 62e6e30481 [Horus] Massstorage working now
Still a problem on Windows which doesn't want to format the SD card.
Also it seems I am not able to rename the card. It reminds me some issue
we already had on Taranis.
2015-11-03 21:02:28 +01:00
Bertrand Songis a556c50956 [Horus] Next round of screen changes + refactoring 2015-11-03 19:53:55 +01:00
Bertrand Songis 8f4c161dc0 [Horus] Massstorage (still not working) 2015-11-03 18:45:59 +01:00
Bertrand Songis aa24bd72ff Merge pull request #3022 from opentx/kilrah/protocol_fixes
Kilrah/protocol fixes
2015-11-02 00:42:39 +01:00
Andre Bernet a11884522a Missing else 2015-11-01 14:16:27 +04:00
Andre Bernet 58216ec8b0 Add channel names on companion failsafe sliders (fix #3021), remove redundant stuff 2015-11-01 14:06:49 +04:00
Andre Bernet 1641db873d Had forgotten to add the shift in channel names on failsafe setup page 2015-11-01 14:03:19 +04:00
Andre Bernet b1ec421b02 Disable trainer/battery compartment if UART mode not appropriate (#
2994)
2015-11-01 13:00:36 +04:00
Andre Bernet 5119448170 Companion support for Taranis internal PPM, remove disabled DJT choice for stock board 2015-11-01 12:26:15 +04:00
Andre Bernet 0d6d309362 Move available protocol list from EEPROMinterface to Firmware class 2015-11-01 12:22:36 +04:00
Damjan Adamic b56e107e25 Release notes updated 2015-10-31 20:22:14 +01:00
Bertrand Songis 473ddcb56d Update DONATIONS.txt 2015-10-31 18:49:57 +01:00
Bertrand Songis 484583106c Merge pull request #3011 from opentx/projectkk2glider/lua_io_issues
Projectkk2glider/lua io issues
2015-10-31 18:48:53 +01:00
Bertrand Songis 7138c7c0e4 Merge pull request #3019 from opentx/jtaylor2/issue_3012
Remove __CYGWIN__ from Issue 3012 Windows pathing fix because Cygwin
2015-10-31 18:48:25 +01:00
jtaylor2 dcebac87b9 Remove __CYGWIN__ from Issue 3012 Windows pathing fix because Cygwin
uses posix pathing and not Windows pathing.
2015-10-31 10:22:11 -04:00
Andre Bernet 8b419770e2 Harmonise module default channel count 2015-10-31 11:25:35 +04:00
Andre Bernet 3d29b8e7e5 Missing default for internal module type (Fix #3017) 2015-10-31 11:24:05 +04:00
Andre Bernet 22c429a1a7 Also search for simulators in companion.exe path on Windows (Fix #3012) 2015-10-31 10:17:43 +04:00
Damjan Adamic 3b4a6fb49b Fixes #3016: Changing the trainer port setting did not set the model modified flag 2015-10-30 22:01:19 +01:00
Damjan Adamic 3dc7e66ba7 Small fix in cli: main stack size reported wrong 2015-10-30 18:20:05 +01:00
Bertrand Songis fbc2def259 Update DONATIONS.txt 2015-10-30 14:59:45 +01:00
Andre Bernet 08ff104d26 Correct failsafe mapping (fix #2975) 2015-10-30 13:08:26 +04:00
martin a2c50ce2f8 font extra 15x17 2015-10-30 00:17:52 +01:00
Bertrand Songis b65fa29e1d Update DONATIONS.txt 2015-10-29 18:03:23 +01:00
Bertrand Songis b3073e104b Update DONATIONS.txt 2015-10-28 18:21:57 +01:00
Andre Bernet 22b17c64ff Semantics 2015-10-28 20:04:06 +04:00
Damjan Adamic 2e068044c6 Fixes #3003: Lua io.write() did not support numbers 2015-10-27 23:59:18 +01:00
Damjan Adamic d3e2a00cd2 Re #3001: f_open() did not support append mode (in simulator only) 2015-10-27 23:59:18 +01:00
Damjan Adamic 2feb5ac894 Fixes #3001: Lua io.open() could not create new files 2015-10-27 23:59:18 +01:00
Bertrand Songis 6f30718745 Update DONATIONS.txt 2015-10-27 18:44:53 +01:00
Bertrand Songis 16e7dbbb94 [Taranis X9E] Trainer cable always considered as plugged 2015-10-26 19:47:57 +01:00
Bertrand Songis 942148fc5c Another attempt to fix #2722 2015-10-26 19:20:53 +01:00
Bertrand Songis 088f4d5e3f [Taranis] The trainer icon will be shown only if valid PPM is received 2015-10-26 19:19:49 +01:00
Bertrand Songis 03fabd95ac [Horus] Model Selection menu started 2015-10-26 19:15:54 +01:00
Bertrand Songis 7e5374f31d Should fix Travis builds 2015-10-26 18:16:44 +01:00
Bertrand Songis 756441bc50 [9XR-PRO] Battgraph reduced (seemed not 100% when battery full) 2015-10-26 07:21:36 +01:00
Bertrand Songis 7c0767144f [9XR-PRO] Bug when searching EEPROM Fat 2015-10-25 23:25:18 +01:00
Bertrand Songis 95040234b3 Another attempt to fix #2722 2015-10-25 21:57:25 +01:00
Andre Bernet 01226b612a No PPM options are available if trainer mode is master (fix #2994) 2015-10-25 23:32:21 +04:00
Damjan Adamic 4605f9d61d Companion settings moved to 2.2 directory 2015-10-25 20:09:44 +01:00
Bertrand Songis fcb845a6b2 [Horus] Warning started. No transparency for now 2015-10-25 18:02:46 +01:00
Bertrand Songis 0e34c24d96 For Travis ... 2015-10-25 14:37:28 +01:00
Bertrand Songis 47ea418d5b Fix for #2722. Needs tests. 2015-10-25 12:36:46 +01:00
Bertrand Songis 2aa2b41f3a Fixes #2989 2015-10-25 11:49:29 +01:00
Bertrand Songis 85a5554922 [Taranis] Scrollbar wrong position sometimes in Model Setup 2015-10-25 11:09:08 +01:00
martin 543123a169 asterisk 2015-10-25 02:55:11 +02:00
martin b96f882866 asterisk 2015-10-25 02:18:55 +02:00
martin f0039129e9 library icons 2015-10-25 00:04:44 +02:00
dsbeach 6cbe780d57 Adding include for dirent.h for MSVC builds 2015-10-24 15:57:30 -04:00
Damjan Adamic cd4d6afff8 findTrueFileName() memory leak fixed 2015-10-24 20:33:14 +02:00
Bertrand Songis 9cd0cbf417 Test for the Travis server ... 2015-10-24 20:17:41 +02:00
Damjan Adamic 2a54bee20b Simulators and firmwares unregistered when application ends (fixes memory leaks) 2015-10-24 20:10:17 +02:00
Damjan Adamic ee4ea18a3e Re #2987: read_file_system_list() return value memory leak fixed 2015-10-24 19:53:41 +02:00
Bertrand Songis 0673663427 [Horus] Simulator refactoring. This one should be nice :) 2015-10-24 19:47:44 +02:00
Damjan Adamic d38cf06b07 File stripping disabled to improve user trace-backs 2015-10-24 19:09:29 +02:00
Damjan Adamic 54891af0d2 Move to 2.1.5 (we are skipping 2.1.4 to differentiate from the FrSky's 2.1.4) 2015-10-24 18:59:45 +02:00
Bertrand Songis 6f774eb61a [Horus] Companion simulator 2015-10-24 16:08:29 +02:00
Bertrand Songis ab0272c16c [Horus] Refactoring continued 2015-10-24 11:27:34 +02:00
Damjan Adamic 022bd2d3da Re #1915: "Start Logs" changed to "SD Logs" (again) 2015-10-24 10:26:18 +02:00
Bertrand Songis dd88490d00 Update DONATIONS.txt 2015-10-22 23:10:10 +02:00
Bertrand Songis fb371cf5b7 [Horus] Continued ... 2015-10-22 20:18:55 +02:00
Bertrand Songis e18e6f9c41 [Horus] Refactoring continued 2015-10-22 20:04:54 +02:00
Bertrand Songis c8f77fceec [Horus] SD Storage started. UI continued.
+ Some boyscout work on LCD functions
2015-10-22 07:10:19 +02:00
JivaroFAD 018a022c35 M2560 PPM_IN correction + bootloader source 2015-10-21 17:47:13 +02:00
JivaroFAD 1668507114 Cosmetics after pull #2828 2015-10-21 13:48:15 +02:00
Bertrand Songis 580dc6d2de Merge pull request #2983 from opentx/driver33/PL_TR
Translation up to date
2015-10-21 07:14:25 +02:00
Bertrand Songis ebe4ed19c5 Update DONATIONS.txt 2015-10-21 07:12:15 +02:00
Franck Aguerre bc08d95576 Merge pull request #2828 from tmrttmrt/tmrttmrt/Fixes#2750__Mega2560_ST7920_mixer_freq_too_slow
Tmrttmrt/fixes#2750  mega2560 st7920 mixer freq too slow
2015-10-20 23:22:35 +02:00
mhotar d353f3c388 round scale image 2015-10-20 20:14:10 +02:00
driver33 319b8695d5 Translation up to date 2015-10-20 16:54:27 +02:00
mhotar cad1cc4432 timer graprics 2015-10-19 20:26:12 +02:00
Bertrand Songis 768b255d7d Update DONATIONS.txt 2015-10-19 19:36:32 +02:00
Bertrand Songis aa88651e0a [9XR-PRO] Missing delay in LCD initialization. Will it fix #2852?
I need confirmation from a 9XR-PRO user. I had the bug one time
yesterday but I cannot reproduce ...
2015-10-19 19:35:37 +02:00
Bertrand Songis 9463f49ba1 Fixes #2797 - Model Restore broken on Sky9X / 9XR-PRO
It seems I am not allowed to write the 4bytes header separately. It's
overwritten by 4 zeroes at the next write.
2015-10-19 07:56:10 +02:00
Bertrand Songis cee3559aac Merge pull request #2979 from opentx/projectkk2glider/telemetryItems_protection
Out of bounds protection for telemetryItems[] array access and some c…
2015-10-18 18:00:43 +02:00
Damjan Adamic 082ba0893d Out of bounds protection for telemetryItems[] array access and some code refactoring for telemetry value precision 2015-10-18 12:06:25 +02:00
Damjan Adamic 4ef9913f76 Re #2956: Voltage symbol changed to upper case (ported from 2.0) 2015-10-18 09:46:08 +02:00
Bertrand Songis 8a3de9184b [Horus] Main view continued 2015-10-17 11:12:35 +02:00
Bertrand Songis 4f5ce6b0f0 [Horus] Main view added 2015-10-16 23:09:26 +02:00
Bertrand Songis 719ecc8473 [Horus] A lot of GUI fixes 2015-10-16 17:26:42 +02:00
martin 76b5143dd4 some more Horus graprics 2015-10-15 22:21:01 +02:00
Bertrand Songis 21a67b82d4 Update DONATIONS.txt 2015-10-15 20:28:17 +02:00
Bertrand Songis b458b79bed [Horus] make clean also cleans the font bitmap files 2015-10-14 23:47:52 +02:00
martin b3979d9fff reduced index size and icon spacing to fit all 12 icons 2015-10-14 23:47:52 +02:00
Bertrand Songis 8c337b721b [Horus] Now a fake main view 2015-10-14 23:47:52 +02:00
Bertrand Songis 7982c9d5c7 [Horus] Radio icons now displayed 2015-10-14 23:47:52 +02:00
Bertrand Songis 06c0ccf86a [Horus] Radio icons added 2015-10-14 23:47:52 +02:00
Bertrand Songis 8dc402d119 [Horus] Bitmaps definitions moved to a new file 2015-10-14 23:47:52 +02:00
Bertrand Songis 8c0f69746f Code simplification 2015-10-14 23:47:52 +02:00
martin 8f5b844e23 index cosmetics 2015-10-14 23:47:51 +02:00
Bertrand Songis df698e9ff2 Cosmetics 2015-10-14 23:47:51 +02:00
martin 907336722d index masks 2015-10-14 23:47:51 +02:00
Bertrand Songis e0fa546b10 Quick and dirty - I will rewrite this commit later 2015-10-14 23:47:51 +02:00
Bertrand Songis ddaf6237b9 Makefile fixes 2015-10-14 23:47:51 +02:00
Bertrand Songis ce2f7b61e9 New Horus masks added 2015-10-14 23:47:51 +02:00
Bertrand Songis e25115b104 Compilation fixes 2015-10-14 23:47:51 +02:00
Bertrand Songis c92909f7c5 A little bit code cleaning... 2015-10-14 23:47:51 +02:00
Bertrand Songis 2902ae1887 Horus simulator should now be OK 2015-10-14 23:47:51 +02:00
Bertrand Songis 34be811622 Horus drivers updated 2015-10-14 23:47:51 +02:00
Bertrand Songis aeed0e34a9 Horus bitmaps 2015-10-14 23:47:51 +02:00
Bertrand Songis c2dade2133 Horus fonts / bitmaps tools updated 2015-10-14 23:47:51 +02:00
Bertrand Songis 3d74f2b437 Horus drivers fixes 2015-10-14 23:47:27 +02:00
Bertrand Songis 78bcc4d582 Horus drivers 2015-10-14 23:47:26 +02:00
Bertrand Songis 1df45cbfc2 EEPROM v217->v218 conversions (on board + Companion) 2015-10-14 23:47:26 +02:00
Bertrand Songis 0bf2a204e2 Fixes #2902 2015-10-14 23:47:26 +02:00
Bertrand Songis d0f6c59b8a EEPROM structure changes to allow more switches (9bits instead of 8bits) 2015-10-14 23:47:26 +02:00
Bertrand Songis 3083269f30 Version moved to 2.2.0 2015-10-14 23:47:26 +02:00
Bertrand Songis 701082f012 [S.Port] New IDs for FrSky Powerbox 2015-10-14 20:52:29 +02:00
Andre Bernet dad1a06344 Remove redundant init (done in pwrInit()) 2015-10-14 10:30:52 +04:00
Bertrand Songis 8976afe3bc VC++ compilation fix 2015-10-14 07:13:29 +02:00
Bertrand Songis e326cb8515 Update DONATIONS.txt 2015-10-13 19:41:07 +02:00
Damjan Adamic dc4a434076 Release notes updated 2015-10-13 19:22:53 +02:00
Bertrand Songis 9ae7aea7bb Fixes #2837 2015-10-13 15:46:37 +02:00
Bertrand Songis dcbc20f1c0 Fixes #2876 2015-10-13 15:14:21 +02:00
Bertrand Songis 1acd23bf8c Fixes #2942 - Needs more tests
This bug was introduced when fixing #2787, I would like to be sure I
don't reintroduce a bug there now...
2015-10-13 15:04:59 +02:00
Bertrand Songis f98bf5e678 Update DONATIONS.txt 2015-10-13 12:04:05 +02:00
Bertrand Songis 60eca69bfe Fixes #2961 2015-10-12 23:29:52 +02:00
Bertrand Songis 7297669c4b Fixes #2951 2015-10-12 23:17:18 +02:00
Bertrand Songis ad63f7e7f7 Cosmetics 2015-10-12 23:02:53 +02:00
Bertrand Songis da8c0297c4 [CLI] Function "print time" added 2015-10-12 23:02:13 +02:00
Damjan Adamic cd16b4da0e Compilation fix for X9E 2015-10-12 22:52:57 +02:00
Damjan Adamic 94efa965da pass[] data type optimization 2015-10-12 22:30:21 +02:00
Damjan Adamic cb5bb83067 Fixes #2945: fixed bad alignment of modulePulsesData 2015-10-12 22:21:45 +02:00
Bertrand Songis 98abd4ec08 Merge pull request #2955 from ptsneves/master
Corrected ambiguity in ZSTR_TEMP referring to both TEMP1_ID and TEMP2…
2015-10-12 19:16:06 +02:00
Bertrand Songis 1cc3fedaf2 Update DONATIONS.txt 2015-10-12 19:14:53 +02:00
Executive 2f378d83d6 Corrected ambiguity in ZSTR_TEMP referring to both TEMP1_ID and TEMP2_ID. 2015-10-12 14:13:43 +01:00
Bertrand Songis 22f4f18071 Merge pull request #2965 from opentx/driver33/PL_TR
Up to date translation
2015-10-12 07:31:57 +02:00
driver33 268fc43fbd Up to date translation 2015-10-12 00:08:45 +02:00
Bertrand Songis 637d20a66d Compilation fix 2015-10-11 23:25:58 +02:00
Bertrand Songis 48a11f63ea [Taranis] DEBUG=YES without CLI=YES didn't compile 2015-10-11 22:39:38 +02:00
Bertrand Songis 30f5b1b275 Fixes #2913 2015-10-11 12:50:10 +02:00
Bertrand Songis e8680c32b0 Merge pull request #2957 from opentx/projectkk2glider/issue_2936_sh_sf_two_pos
Fixes #2936: 3POS type removed from SH and SF switches (hw only suppo…
2015-10-11 00:19:33 +02:00
Damjan Adamic 21760a3960 Fixes #2936: 3POS type removed from SH and SF switches (hw only supports 2POS type) 2015-10-10 16:38:04 +02:00
Damjan Adamic a30ddb7437 Fixes #2934: shortened screen-shot file name (screen-2013-01-01-123540.bmp), also affects EEPROM backup which uses same time-stamp generation function. 2015-10-10 12:48:49 +02:00
Bertrand Songis f4dc2caedf Update DONATIONS.txt 2015-10-10 07:46:42 +02:00
Bertrand Songis 0d9f011a4e Update DONATIONS.txt 2015-10-08 19:50:12 +02:00
Bertrand Songis 03ff929ef7 Update DONATIONS.txt 2015-10-07 18:55:51 +02:00
Bertrand Songis 3849121098 Update DONATIONS.txt 2015-10-06 23:42:37 +02:00
Bertrand Songis 66f473b8b6 Update DONATIONS.txt 2015-10-05 19:12:00 +02:00
Bertrand Songis 6af4d09345 Update DONATIONS.txt 2015-10-05 07:09:02 +02:00
Bertrand Songis e3dee13cb3 Update DONATIONS.txt 2015-10-03 12:20:52 +02:00
Bertrand Songis 7a01f04f49 Update DONATIONS.txt 2015-10-02 07:06:26 +02:00
Bertrand Songis b46fd48de6 Update DONATIONS.txt 2015-10-02 07:06:10 +02:00
Bertrand Songis d7d38cd076 Update DONATIONS.txt 2015-10-01 19:45:24 +02:00
Tomaz Mertelj 8e0adbe602 Merge branch 'master' of https://github.com/tmrttmrt/opentx into tmrttmrt/Fixes#2750__Mega2560_ST7920_mixer_freq_too_slow 2015-09-30 22:09:16 +02:00
tmertelj 11753450ae Fixes#2750__Mega2560_ST7920_mixer_freq_too_slow 2015-09-30 21:28:30 +02:00
Bertrand Songis bb1d368c03 Merge pull request #2933 from hrenz/patch-11
Patch 11 for 9XR-Pro with XJT-Modul and Telemetrie some Strings changed
2015-09-27 11:12:42 +02:00
hrenz 3231c0506f update for 9XR-Pro and some strings changed 2015-09-27 09:47:28 +02:00
hrenz 1b74d5a061 update only for X9R-pro somen strings changed 2015-09-27 08:01:32 +02:00
Bertrand Songis 7ec4f508ee Merge pull request #2930 from opentx/bsongis/issue1914_by_dsbeach
Bsongis/issue1914 by dsbeach
2015-09-26 10:07:51 +02:00
Bertrand Songis 60f2535212 Fixes #1914 2015-09-26 09:00:36 +02:00
Bertrand Songis 3f6e1d0b3a Lua error display function reused 2015-09-26 09:00:36 +02:00
David S. Beach e57361f7e1 2.1.x implementation of displayLuaScriptError() 2015-09-26 09:00:36 +02:00
Bertrand Songis 436b5003d9 Update README.md 2015-09-26 08:16:39 +02:00
Bertrand Songis 1dfa03d77d Update README.md 2015-09-26 08:14:24 +02:00
Markus Sattler 1d6adcc25a Fixes #2870 2015-09-26 07:59:04 +02:00
Bertrand Songis b48946b3aa Revert "Unused string removed"
This reverts commit b50c452500.
2015-09-25 17:02:22 +02:00
Bertrand Songis b50c452500 Unused string removed 2015-09-25 16:48:03 +02:00
Bertrand Songis e55466894c Merge pull request #2929 from opentx/projectkk2glider/issue_2925_lcd_line_fixes
Fixes #2925: added coordinate check in lcd_line()
2015-09-25 16:36:43 +02:00
Damjan Adamic a38e9f6d3a Fixes #2925: added coordinate check in lcd_line() 2015-09-25 13:13:21 +02:00
Andre Bernet de4a5c586d Navigation bug (should fix #2924) 2015-09-25 11:56:33 +02:00
Andre Bernet 455f9bfde2 Some defaults missing when changing telemetry formula, update propagation issues (fix #2928) 2015-09-25 10:47:46 +02:00
Bertrand Songis 9f25c7a0b6 Cosmetics 2015-09-25 07:22:34 +02:00
Bertrand Songis 02dbe6bcac Fixes #1905 2015-09-25 07:22:21 +02:00
Bertrand Songis 6fe12ba625 Cosmetics 2015-09-24 18:31:30 +02:00
Bertrand Songis cd794e986a Merge pull request #2926 from opentx/driver33/PL_TR
1. Translation up to date. 2. Fixes in sound grammar file - time values
2015-09-24 07:09:03 +02:00
driver33 3aba306de9 1. Translation up to date. 2. Fixes in sound grammar file - time values 2015-09-23 23:50:35 +02:00
Bertrand Songis 412d8131f7 Merge pull request #2922 from opentx/projectkk2glider/issue_2912_fr_tts_missing_sounds
Fixes #2912: added missing "midtrim" and "endtrim" to FR
2015-09-23 19:27:26 +02:00
Bertrand Songis daac7e6bf2 Merge pull request #2923 from opentx/projectkk2glider/issue_2920_translations_fixes
Projectkk2glider/issue 2920 translations fixes
2015-09-23 19:26:45 +02:00
Bertrand Songis b7bf6c5be7 Update DONATIONS.txt 2015-09-23 19:01:14 +02:00
Damjan Adamic cc28219760 Re #2912: translated trim strings 2015-09-23 15:21:16 +02:00
Damjan Adamic 5d9f168003 Re #2920: dropped obsolete translations 2015-09-23 15:13:10 +02:00
Damjan Adamic d1dbe6efce Re #2920: translations updated 2015-09-23 15:07:36 +02:00
Damjan Adamic 22a50041e3 Fixes #2920: typo in "Slow" 2015-09-23 15:07:20 +02:00
Damjan Adamic ea74e31841 Fixes #2912: added missing "midtrim" and "endtrim" to FR 2015-09-23 14:47:13 +02:00
Bertrand Songis cdc66a7d01 Wrong constant used in trainer driver (actually it is the same value) 2015-09-23 07:20:54 +02:00
Bertrand Songis a5f94e17eb Update DONATIONS.txt 2015-09-23 07:05:18 +02:00
Bertrand Songis be84af5f84 Merge pull request #2911 from opentx/bsongis/issue2753_missing_functions_in_companion
Fixes #2753 - Missing functions in Companion
2015-09-22 22:29:42 +02:00
Bertrand Songis 02b72befdb Update DONATIONS.txt 2015-09-22 07:05:48 +02:00
Bertrand Songis 5f343b4a6e Update DONATIONS.txt 2015-09-21 20:47:18 +02:00
Bertrand Songis 7f8211ada5 Fixes #2753 - Missing functions in Companion 2015-09-21 07:17:56 +02:00
Bertrand Songis a3584e56f4 Merge pull request #2910 from opentx/projectkk2glider/issue_2908_frsky_d_refactoring
Projectkk2glider/issue 2908 frsky d refactoring
2015-09-20 20:38:18 +02:00
Damjan Adamic 106702342d Re #2908: Companion build fixed 2015-09-20 19:13:54 +02:00
Damjan Adamic 701af4984b Re #2908: compiler warnings treated as errors (use build option WARNINGS_AS_ERRORS=YES), enabled in commit tests for several platforms (where it passes) 2015-09-20 13:38:35 +02:00
Damjan Adamic bfc01f9504 Re #2908: frsky_d.cpp split into ARM and nonARM files, ARM Frsky alarms code removed completely 2015-09-20 13:08:41 +02:00
Bertrand Songis 18ffe9f503 Merge pull request #2909 from opentx/projectkk2glider/issue_2905_mavlink_broken
Fixes #2950: Mavlink build option was not working
2015-09-20 12:02:35 +02:00
Damjan Adamic 407289e1d1 Fixes #2950: Mavlink build option was not working 2015-09-20 11:47:21 +02:00
Bertrand Songis 6bffe4aa80 Merge pull request #2897 from opentx/driver33/PL_TR
Keeping translation clean and up to date
2015-09-20 11:41:11 +02:00
Bertrand Songis 1aa5143677 Merge pull request #2899 from opentx/bsongis/issue2880_ppm_center_for_dsm2
Fixes #2880 - PPM_CENTER should be ok now with DSM2 pulses
2015-09-20 11:40:35 +02:00
Bertrand Songis 0f6bee2273 Merge pull request #2907 from opentx/bsongis/commit_tests_moved_to_travis
Commit tests moved to Travis
2015-09-20 10:33:02 +02:00
Bertrand Songis 71aa066b99 Commit tests moved to Travis 2015-09-20 10:08:56 +02:00
Damjan Adamic 96a2e18833 Release notes updated 2015-09-19 21:38:37 +02:00
Bertrand Songis d63ac41b6a Merge pull request #2901 from opentx/projectkk2glider/issue_2896_curves_without_files
Fixes #2896: draw curves without using temporary disk files
2015-09-19 20:41:56 +02:00
Damjan Adamic 365d2b6c58 Fixes #2896: draw curves without using temporary disk files 2015-09-19 18:19:08 +02:00
Bertrand Songis 6389f977bc Fixes #2880 - PPM_CENTER should be ok now with DSM2 pulses 2015-09-19 10:44:55 +02:00
Bertrand Songis 7134f38ad5 Update DONATIONS.txt 2015-09-18 23:47:04 +02:00
driver33 aab8fc8a96 Keeping translation clean and up to date 2015-09-18 14:59:40 +02:00
Bertrand Songis 0c39ed3488 Next VC++ errors fixed 2015-09-18 07:15:45 +02:00
Bertrand Songis a142a74c36 Next VC++ errors fixed 2015-09-17 22:50:12 +02:00
Bertrand Songis 9f8a1d5f97 Try to fix VC++ errors 2015-09-17 22:37:53 +02:00
Bertrand Songis e65c131c75 Fixes #2843 2015-09-17 18:23:18 +02:00
Bertrand Songis 552e730065 Update DONATIONS.txt 2015-09-17 18:06:06 +02:00
Bertrand Songis dbc0d764e1 Merge pull request #2887 from opentx/bsongis/issue2850_top_lcd_timer_configuration
Fixes #2850
2015-09-17 07:32:08 +02:00
Bertrand Songis 5cebe43306 Merge pull request #2890 from opentx/griebd/refactoring_between_eeprom_and_gui_2778
New interface between eeprominterface and gui.
2015-09-17 07:13:03 +02:00
Grieb 646cc937ac Fixes #2778. 2015-09-16 22:29:34 -03:00
Grieb 6d52039266 Refactoring to have messages in Companion when opening eeprom. 2015-09-16 22:29:28 -03:00
Bertrand Songis 14967b6a94 Update DONATIONS.txt 2015-09-16 21:59:39 +02:00
Bertrand Songis b9ce8df5b6 Fixes #2850 2015-09-16 21:47:47 +02:00
Bertrand Songis cae807499b Jenkins compilation fix 2015-09-16 20:45:16 +02:00
Bertrand Songis df0c0808b0 Warnings removed 2015-09-16 20:44:08 +02:00
Bertrand Songis 064c58d858 Gtests false positive
SYSTEM_RESET function added to avoid this kind of error
2015-09-16 20:35:37 +02:00
Bertrand Songis 9af87b228c Fixes #2855 again. Now with a non regression test ;) 2015-09-16 19:24:39 +02:00
Bertrand Songis 9eae49eed3 Merge pull request #2886 from opentx/driver33/polish_translation
Translation fixes
2015-09-16 19:13:13 +02:00
driver33 92310fff5f Translation fixes 2015-09-16 18:58:55 +02:00
Bertrand Songis 3d7c71d3ce Update DONATIONS.txt 2015-09-16 18:44:19 +02:00
Bertrand Songis cd0f24fd8c Update README.md 2015-09-16 18:41:56 +02:00
Bertrand Songis c1c3289b02 Integration with Travis 2015-09-16 18:38:24 +02:00
Bertrand Songis b13b3467af Merge pull request #2883 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-09-15 20:13:57 +02:00
The Gitter Badger 0569d5b880 Add Gitter badge 2015-09-15 18:05:54 +00:00
Bertrand Songis 80bf502b11 Fixes #2736 2015-09-15 07:07:37 +02:00
Bertrand Songis fbb5adcebb Fixes #2875 2015-09-14 21:35:02 +02:00
Bertrand Songis 3aac623a4b Update DONATIONS.txt 2015-09-14 20:14:28 +02:00
Bertrand Songis 10f5bd211b Fixes compilation in 'next' 2015-09-14 20:12:22 +02:00
Bertrand Songis 3387395932 Fixes #2855 2015-09-14 06:40:35 +02:00
Bertrand Songis c269b2ceff Merge pull request #2865 from hrenz/patch-10
update German openTx for V2.1.4  at 12.09.2015
2015-09-12 09:00:14 +02:00
hrenz 20c6edd58e update German openTx for V2.1.4 at 12.09.2015
only some strings changed for
X9D X9E 9XR-pro
2015-09-12 08:12:44 +02:00
Bertrand Songis 4854ffa683 Fixes #2855 2015-09-11 16:45:00 +02:00
Bertrand Songis 0baad9e393 Update DONATIONS.txt 2015-09-10 23:52:41 +02:00
Bertrand Songis 3ddcd3050e --version argument in companion 2015-09-09 17:45:40 +02:00
Bertrand Songis ed86c5e16c Move to 2.1.4 2015-09-09 17:45:40 +02:00
Bertrand Songis 2030bf7599 Update DONATIONS.txt 2015-09-09 15:25:40 +02:00
Bertrand Songis 4571ed2438 Fixes #2855 - Logical Switches now
Test needed please!
2015-09-09 15:20:43 +02:00
Andre Bernet b46bb9b5cf Companion translations 2015-09-09 11:07:37 +02:00
Bertrand Songis 2d4db9604a Translations problem in print model functions 2015-09-09 11:02:45 +02:00
Andre Bernet b65d716029 Release notes updated 2015-09-09 10:51:39 +02:00
Bertrand Songis 259a42bfdc Fixes #2855 2015-09-09 09:33:25 +02:00
Bertrand Songis 562c879751 Jenkins commit tests now stored in the repo 2015-09-09 09:03:33 +02:00
Bertrand Songis 746dbe22b8 Inversion between TIMER_MIN and TIMER_MAX!!! 2015-09-08 20:34:10 +02:00
Bertrand Songis 2a49e98a80 Update DONATIONS.txt 2015-09-08 20:15:04 +02:00
Bertrand Songis 20ee2318cd Fixes #2851 2015-09-08 20:13:17 +02:00
Bertrand Songis 21ac2eca88 Should fix #2848 - Worst case fixes a warning. 2015-09-08 19:29:11 +02:00
Bertrand Songis afdff355de Switch to 2.1.3 2015-09-08 19:22:16 +02:00
Bertrand Songis 3f14a25852 Warning removed 2015-09-08 19:19:38 +02:00
Bertrand Songis abc48390ca Fixes #2847 2015-09-08 19:09:16 +02:00
Andre Bernet 8dd5ebf053 Release notes updated Added note about throttle source 2015-09-08 10:03:06 +02:00
Tomaz Mertelj 8a6ba0eb8e Merge branch 'master' of https://github.com/tmrttmrt/opentx into tmrttmrt/Fixes#2750__Mega2560_ST7920_mixer_freq_too_slow 2015-09-03 20:36:00 +02:00
tmertelj 87df5766f0 tmrttmrt/Fixes#2750__Mega2560_ST7920_mixer_freq_too_slow 2015-09-03 20:32:23 +02:00
901 changed files with 95538 additions and 58976 deletions
+4
View File
@@ -1,3 +1,4 @@
/.idea/
/.*project
/.settings
/.autotools
@@ -6,3 +7,6 @@ radio/src/bootloader/bootloader_ramBoot*
*.lbm
*.o
/doc/
*.stamp
radio/src/lua/lua_fields_*.txt
radio/src/lua/lua_exports_*.txt
+14
View File
@@ -0,0 +1,14 @@
language: cpp
before_install:
- sudo apt-get remove cmake cmake-data --yes
- sudo add-apt-repository ppa:george-edison55/precise-backports --yes
- sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded --yes
- 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
script:
- radio/util/commit-tests.sh
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS .. && cmake --build .
+22
View File
@@ -0,0 +1,22 @@
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})
+42 -4
View File
@@ -26,7 +26,6 @@ Chris Guy
Adrien Gravouille
Thomas Black
Marc Lucht
Michel Baily
Zdenek Trojanek
Martin Hotar
Stefan Grundevik
@@ -113,7 +112,6 @@ Erhard Werner
Stig Jøran Moen
Keith Hertzog
Christophe Dauvergne
Michel Baily
Tauno Rautakorpi
Sven Assmus
Paul Dittman
@@ -417,7 +415,6 @@ Andrea Montefusco
Paul Luby
Donald L Webster
Kenneth Frehafer
Peter McHenry
Matthias Hase
Markus Wolf
Andrew Fazio
@@ -588,7 +585,6 @@ Dietmar Drees
Jürgen Monden
David Morgan
Andrew Fernie
Michel Baily
Donald Burke
Ronald Donker
Fredie Singh
@@ -812,3 +808,45 @@ John Mathison
Richard Duczmal
Gregory Barron
Marcel Fischer
Klas Mälman
Viljo Liukku
Eric Smith
Sven Assmus
Luke Mole
NorthSide
Hannes Mössler
James Kaufman
Ravi Gupta
Lexington S Morley
Ralph Segar
Frédéric Devillard
Cory Theurer
Valentinos Zachariou
Garrett Paquette
Heung Jin Choi
Kerry Cochrell
Doug Miller
Andrzej Weydmann
Chair-man.nl
Eric Beier
Jay Warren
Marian Matej
Alastair Smith
Timothy Senecal
Dietmar Drees
Bruce Jones
Adil Busaidy
Herman Hofman
Jean Paul Michel
Peter McHenry
Julien lecoquierre
Jean-Marie Clay
Robert Nicoll
Dan Nixon
Ewald Moehring
Giovanni Carnesecchi
Paul Dumsday
Tadeusz Adamowski
Andrew Newton
Neil Horne
Kerstin Appelqvist
+6 -2
View File
@@ -1,5 +1,9 @@
##OpenTX 2.1 Branch
##OpenTX 2.2 Branch
The ongoing development on 2.1.x is done in this 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.
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
@@ -0,0 +1,25 @@
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
@@ -0,0 +1,38 @@
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)
+41
View File
@@ -1,3 +1,44 @@
<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>
</ul>
<h2>Version 2.1.5 / 2015-11-05</h2>
Notice: version 2.1.4 was skipped by the OpenTX team to avoid confusion with FrSky's release of OpenTX 2.1.4
<ul>
<li>Fixed: changing any setting on the telemetry panel does not set the file as being modified (<a href=https://github.com/opentx/opentx/issues/2875>#2875</a>)</li>
<li>Print model fix for "Play value.... not on startup" (<a href=https://github.com/opentx/opentx/issues/2736>#2736</a>)</li>
<li>Top LCD Timer could not be selected for X9E (<a href=https://github.com/opentx/opentx/issues/2850>#2850</a>)</li>
<li>More informative error/info messages when openin eepe files (<a href=https://github.com/opentx/opentx/issues/2778>#2778</a>)</li>
<li>Print model fix for curves (<a href=https://github.com/opentx/opentx/issues/2896>#2896</a>)</li>
<li>Added missing special functions (bind, range check, set failsafe) (<a href=https://github.com/opentx/opentx/issues/2753>#2753</a>)</li>
<li>Some defaults missing when changing telemetry formula, update propagation issues (<a href=https://github.com/opentx/opentx/issues/2928>#2928</a>)</li>
<li>Fixed wrong import of Logical switches from OpenTX 2.0.x version (<a href=https://github.com/opentx/opentx/issues/2942>#2942</a>)</li>
<li>Fixed a problem with updates path on Windows (<a href=https://github.com/opentx/opentx/issues/2876>#2876</a>)</li>
<li>Edge representation unified (changed from "no release" to "instant") (<a href=https://github.com/opentx/opentx/issues/2837>#2837</a>)</li>
<li>Added channel names on failsafe sliders (<a href=https://github.com/opentx/opentx/issues/3021>#3021</a>)</li>
<li>Corrected failsafe mapping when using Custom failsafe mode, D16 protocol and channel range different from from 1-8.
Users with such setups are advised to re-check their failsafe settings (<a href=https://github.com/opentx/opentx/issues/2975>#2975</a>)</li>
<li>Various texts and translations corrections</li>
<li>Various small bug-fixes: <a href=https://github.com/opentx/opentx/issues/2994>#2994</a>,
<a href=https://github.com/opentx/opentx/issues/3016>#3016</a>,
<a href=https://github.com/opentx/opentx/issues/3012>#3012</a>
</li>
</ul>
<h2>Version 2.1.3 / 2015-09-09</h2>
<ul>
<li>Fix missing translations in inputs/mixes tabs, print and compare dialogs (<a href=https://github.com/opentx/opentx/issues/2847>#2847</a>)</li>
</ul>
<h2>Version 2.1.2 / 2015-09-07</h2>
<ul>
+236 -261
View File
@@ -1,117 +1,115 @@
PROJECT( companion )
include(Macros)
SET(C9X_VERSION_MAJOR "2")
SET(C9X_VERSION_MINOR "1")
SET(C9X_VERSION_REVISION "2")
SET(C9X_VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
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 ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION}${C9X_VERSION_SUFFIX})
MESSAGE(STATUS "OpenTX Companion ${C9X_VERSION}")
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)
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
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)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
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)
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 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()
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 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(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)
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()
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()
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 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()
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 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()
message(STATUS "Looking for QT lupdate ")
find_package(Lupdate)
if(LUPDATE_FOUND)
message("QT lupdate: " ${LUPDATE_EXECUTABLE})
else()
message("QT lupdate not found!")
endif()
FIND_PACKAGE(Qt4 4.8.4 REQUIRED)
SET( QT_USE_QTNETWORK True )
SET( QT_USE_QTXML True )
INCLUDE( ${QT_USE_FILE} )
add_definitions(-DQXT_STATIC)
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_CUSTOM_COMMAND(
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)
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")
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()
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
set(SIMU_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/simulation)
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR})
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)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/../..
${PROJECT_SOURCE_DIR}/shared
${COMPANION_SRC_DIRECTORY}
${COMPANION_SRC_DIRECTORY}/shared
${SIMU_SRC_DIRECTORY}
${XSD_INCLUDE_DIR}
${COMPANION_SRC_DIRECTORY}/qxtcommandoptions
)
add_subdirectory(shared)
@@ -120,6 +118,7 @@ add_subdirectory(generaledit)
add_subdirectory(simulation)
add_subdirectory(firmwares/opentx/simulator)
add_subdirectory(qcustomplot)
add_subdirectory(qxtcommandoptions)
set(common_SRCS
eeprominterface.cpp
@@ -138,7 +137,7 @@ set(common_SRCS
firmwares/opentx/opentxinterface.cpp
file.cpp
appdata.cpp
)
)
qt4_wrap_cpp(common_SRCS)
@@ -183,7 +182,7 @@ set(companion_SRCS
radionotfound.cpp
wizarddata.cpp
wizarddialog.cpp
)
)
set(companion_MOC_HDRS
apppreferencesdialog.h
@@ -213,7 +212,9 @@ set(companion_MOC_HDRS
radionotfound.h
helpers.h
wizarddialog.h
)
modelprinter.h
multimodelprinter.h
)
set(companion_UIS
mdichild.ui
@@ -233,78 +234,51 @@ set(companion_UIS
flashfirmwaredialog.ui
flasheepromdialog.ui
radionotfound.ui
)
)
set(companion_RCS
companion.qrc
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
)
)
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)
today(DATE)
now(TIME)
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)
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)
TODAY(DATE)
NOW(TIME)
if(WIN32)
set(companion_SRCS ${companion_SRCS} icon.rc)
if(NOT MSVC)
set(CMAKE_EXE_LINKER_FLAGS -mwindows)
endif()
endif()
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}/firmwares/opentx/stamp-opentx.h.in ${CMAKE_CURRENT_BINARY_DIR}/stamp-opentx.h @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)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR})
IF( WIN32 )
SET( companion_SRCS ${companion_SRCS} icon.rc )
IF ( NOT MSVC )
SET(CMAKE_EXE_LINKER_FLAGS -mwindows)
ENDIF( )
ENDIF( )
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)
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
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})
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 )
add_definitions(-DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}")
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( )
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})
@@ -314,14 +288,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)
@@ -334,136 +308,137 @@ else()
add_executable(${SIMULATOR_NAME} WIN32 ${simu_SRCS})
endif()
target_link_libraries(${SIMULATOR_NAME} simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ${OPENTX_SIMULATOR_LIBS})
target_link_libraries(${SIMULATOR_NAME} simulation common qxtcommandoptions ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ${OPENTX_SIMULATOR_LIBS})
############# 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} ${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)
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)
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-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/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}/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_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_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( )
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()
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()
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
if(LUPDATE_FOUND)
add_custom_target(translations
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -ts ${companion_TS}
)
ELSE()
ADD_CUSTOM_TARGET( translations
COMMAND ${LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${companion_TS}
)
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)
SET( CPACK_STRIP_FILES TRUE )
# 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)
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}_${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)
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)
else(DPKG_PROGRAM)
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_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_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib /lib/udev /lib/udev/rules.d")
endif(DPKG_PROGRAM)
INCLUDE(CPack)
include(CPack)
+22 -2
View File
@@ -604,8 +604,28 @@ 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");
@@ -737,7 +757,7 @@ AppData::AppData()
getset( _updatesDir, "lastUpdatesDir" ,"" );
getset( _outputDisplayDetails, "outputDisplayDetails" ,false );
getset( _enableBackup, "backupEnable" ,false );
getset( _enableBackup, "enableBackup" ,false );
getset( _backupOnFlash, "backupOnFlash" ,true );
getset( _checkHardwareCompatibility, "checkHardwareCompatibility" ,true );
+1 -1
View File
@@ -25,7 +25,7 @@
#include <QSettings>
#define COMPANY "OpenTX"
#define PRODUCT "Companion 2.1"
#define PRODUCT "Companion 2.2"
#define MAX_PROFILES 15
#define MAX_JOYSTICKS 8
+6 -6
View File
@@ -627,7 +627,7 @@ Mode 4:
<item row="10" column="2" colspan="2">
<widget class="QPushButton" name="sdPathButton">
<property name="text">
<string>Open Folder</string>
<string>Select Folder</string>
</property>
</widget>
</item>
@@ -637,7 +637,7 @@ Mode 4:
<string>The profile specific folder, if set, will override general Backup folder</string>
</property>
<property name="text">
<string>Open Folder</string>
<string>Select Folder</string>
</property>
</widget>
</item>
@@ -854,7 +854,7 @@ Mode 4:
<item row="12" column="2" colspan="2">
<widget class="QPushButton" name="backupPathButton">
<property name="text">
<string>Open Folder</string>
<string>Select Folder</string>
</property>
</widget>
</item>
@@ -874,14 +874,14 @@ Mode 4:
<item row="0" column="2" colspan="2">
<widget class="QPushButton" name="ge_pathButton">
<property name="text">
<string>Find Executable</string>
<string>Select Executable</string>
</property>
</widget>
</item>
<item row="16" column="2" colspan="2">
<widget class="QPushButton" name="libraryPathButton">
<property name="text">
<string>Open Folder</string>
<string>Select Folder</string>
</property>
</widget>
</item>
@@ -1001,7 +1001,7 @@ Mode 4:
<item row="0" column="3">
<widget class="QPushButton" name="snapshotPathButton">
<property name="text">
<string>Open Folder</string>
<string>Select Folder</string>
</property>
<property name="flat">
<bool>false</bool>
+10 -1
View File
@@ -53,6 +53,7 @@
#undef main
#endif
#include "mainwindow.h"
#include "version.h"
#include "eeprominterface.h"
#include "appdata.h"
@@ -87,6 +88,13 @@ int main(int argc, char *argv[])
app.setOrganizationDomain("open-tx.org");
app.setAttribute(Qt::AA_DontShowIconsInMenus, false);
QStringList strl = QApplication::arguments();
if (strl.contains("--version")) {
printf("%s\n", VERSION);
fflush(stdout);
exit(0);
}
#ifdef __APPLE__
app.setStyle(new MyProxyStyle);
#endif
@@ -148,7 +156,8 @@ int main(int argc, char *argv[])
delete splash;
delete mainWin;
unregisterFirmwares();
unregisterSimulators();
unregisterOpenTxFirmwares();
unregisterEEpromInterfaces();
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
+1 -1
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Companion @C9X_VERSION@
Name=Companion @VERSION@
GenericName=Transmitter Companion App
Comment=The Ultimate Transmitter Companion
Icon=@COMPANION_NAME@
+60 -45
View File
@@ -5,39 +5,54 @@
<file>../../CREDITS.txt</file>
<file>../../DONATIONS.txt</file>
<file>../releasenotes.txt</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/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/screenshot.png</file>
<file>images/splash-9x.png</file>
<file>images/splash-9xrpro.png</file>
@@ -47,18 +62,18 @@
<file>images/maps.png</file>
<file>images/track.png</file>
<file>images/track0.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/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/taranison.png</file>
<file>images/wizard/ailerons.png</file>
<file>images/wizard/airbrakes.png</file>
+1 -1
View File
@@ -101,7 +101,7 @@ void CompareDialog::dropEvent(QDropEvent *event)
if (model1Valid && model2Valid) {
multimodelprinter.setModel(0, model1);
multimodelprinter.setModel(1, model2);
ui->textEdit->setHtml(multimodelprinter.print());
ui->textEdit->setHtml(multimodelprinter.print(ui->textEdit->document()));
}
}
+4 -2
View File
@@ -11,7 +11,9 @@ enum BoardEnum {
BOARD_AR9X,
BOARD_TARANIS,
BOARD_TARANIS_PLUS,
BOARD_TARANIS_X9E
BOARD_TARANIS_X9E,
BOARD_FLAMENCO,
BOARD_HORUS
};
#define C9X_MAX_MODELS 60
@@ -25,7 +27,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 32 // number of custom switches
#define C9X_NUM_CSW 64 // 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
Executable → Regular
+4 -1
View File
@@ -26,8 +26,11 @@ bool convertEEprom(const QString &sourceEEprom, const QString &destinationEEprom
sourceFile.close();
QSharedPointer<RadioData> radioData = QSharedPointer<RadioData>(new RadioData());
if (!loadEEprom(*radioData, (uint8_t *)eeprom.data(), eeprom_size) || !currentFirmware->saveEEPROM((uint8_t *)eeprom.data(), *radioData, variant, version))
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEeprom(*radioData, (uint8_t *)eeprom.data(), eeprom_size));
if (!errors.test(NO_ERROR)
|| !currentFirmware->saveEEPROM((uint8_t *)eeprom.data(), *radioData, variant, version)) {
return false;
}
QFile destinationFile(destinationEEprom);
if (!destinationFile.open(QIODevice::WriteOnly))
Executable → Regular
View File
+120 -45
View File
@@ -475,13 +475,6 @@ 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("----");
}
@@ -508,7 +501,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 logicalSwitches[index];
return QObject::tr("L%1").arg(index+1);
case SOURCE_TYPE_CYC:
return QObject::tr("CYC%1").arg(index+1);
case SOURCE_TYPE_PPM:
@@ -528,7 +521,7 @@ QString RawSource::toString(const ModelData * model) const
return CHECK_IN_ARRAY(telemetry, index);
}
case SOURCE_TYPE_GVAR:
return QObject::tr("GV%1").arg(index+1);
return QObject::tr("GV%1").arg(index+1);
default:
return QObject::tr("----");
}
@@ -536,15 +529,15 @@ QString RawSource::toString(const ModelData * model) const
bool RawSource::isPot() const
{
return (type == SOURCE_TYPE_STICK &&
index >= NUM_STICKS &&
return (type == SOURCE_TYPE_STICK &&
index >= NUM_STICKS &&
index < NUM_STICKS+GetCurrentFirmware()->getCapability(Pots));
}
bool RawSource::isSlider() const
{
return (type == SOURCE_TYPE_STICK &&
index >= NUM_STICKS+GetCurrentFirmware()->getCapability(Pots) &&
return (type == SOURCE_TYPE_STICK &&
index >= NUM_STICKS+GetCurrentFirmware()->getCapability(Pots) &&
index < NUM_STICKS+GetCurrentFirmware()->getCapability(Pots)+GetCurrentFirmware()->getCapability(Sliders));
}
@@ -590,13 +583,6 @@ 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")
};
@@ -634,7 +620,7 @@ QString RawSwitch::toString() const
else
return CHECK_IN_ARRAY(switches9X, index-1);
case SWITCH_TYPE_VIRTUAL:
return CHECK_IN_ARRAY(logicalSwitches, index-1);
return QObject::tr("L%1").arg(index);
case SWITCH_TYPE_MULTIPOS_POT:
return CHECK_IN_ARRAY(multiposPots, index-1);
case SWITCH_TYPE_TRIM:
@@ -797,7 +783,7 @@ QString CustomFunctionData::funcToString() const
else if (func == FuncPlayScript)
return QObject::tr("Play Script");
else if (func == FuncLogs)
return QObject::tr("Start Logs");
return QObject::tr("SD Logs");
else if (func == FuncVolume)
return QObject::tr("Volume");
else if (func == FuncBacklight)
@@ -810,6 +796,18 @@ QString CustomFunctionData::funcToString() const
return QObject::tr("Background Music Pause");
else if (func >= FuncAdjustGV1 && func <= FuncAdjustGVLast)
return QObject::tr("Adjust GV%1").arg(func-FuncAdjustGV1+1);
else if (func == FuncSetFailsafeInternalModule)
return QObject::tr("SetFailsafe Int. Module");
else if (func == FuncSetFailsafeExternalModule)
return QObject::tr("SetFailsafe Ext. Module");
else if (func == FuncRangeCheckInternalModule)
return QObject::tr("RangeCheck Int. Module");
else if (func == FuncRangeCheckExternalModule)
return QObject::tr("RangeCheck Ext. Module");
else if (func == FuncBindInternalModule)
return QObject::tr("Bind Int. Module");
else if (func == FuncBindExternalModule)
return QObject::tr("Bind Ext. Module");
else {
return QString("???"); // Highlight unknown functions with output of question marks.(BTW should not happen that we do not know what a function is)
}
@@ -858,7 +856,7 @@ void CustomFunctionData::populatePlaySoundParams(QStringList & qs)
qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ;
}
void CustomFunctionData::populateHapticParams(QStringList & qs)
void CustomFunctionData::populateHapticParams(QStringList & qs)
{
qs << "0" << "1" << "2" << "3";
}
@@ -892,7 +890,7 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
int pos = cb.findData(param);
if (pos >= 0)
return cb.itemText(pos);
else
else
return QObject::tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if ((func==FuncVolume)|| (func==FuncPlayValue)) {
@@ -924,12 +922,15 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
QString CustomFunctionData::repeatToString() const
{
if (repeatParam==0) {
if (repeatParam == -1) {
return QObject::tr("played once, not during startup");
}
else if (repeatParam == 0) {
return "";
}
else {
unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 1 : 10;
return QObject::tr("repeat") + QString("(%1").arg(step*repeatParam) + QObject::tr("s") + ")";
return QObject::tr("repeat(%1s)").arg(step*repeatParam);
}
}
@@ -1605,7 +1606,7 @@ void registerEEpromInterfaces()
eepromInterfaces.push_back(new OpenTxEepromInterface(BOARD_SKY9X));
eepromInterfaces.push_back(new OpenTxEepromInterface(BOARD_9XRPRO));
eepromInterfaces.push_back(new OpenTxEepromInterface(BOARD_TARANIS));
eepromInterfaces.push_back(new OpenTxEepromInterface(BOARD_TARANIS_PLUS));
eepromInterfaces.push_back(new OpenTxEepromInterface(BOARD_TARANIS_PLUS));
eepromInterfaces.push_back(new OpenTxEepromInterface(BOARD_TARANIS_X9E));
eepromInterfaces.push_back(new Gruvin9xInterface(BOARD_STOCK));
eepromInterfaces.push_back(new Gruvin9xInterface(BOARD_GRUVIN9X));
@@ -1619,7 +1620,7 @@ void unregisterEEpromInterfaces()
foreach(EEPROMInterface * intf, eepromInterfaces) {
// qDebug() << "UnregisterEepromInterfaces(): deleting " << QString::number( reinterpret_cast<uint64_t>(intf), 16 );
delete intf;
}
}
OpenTxEepromCleanup();
}
@@ -1627,42 +1628,116 @@ QList<Firmware *> firmwares;
Firmware * default_firmware_variant;
Firmware * current_firmware_variant;
void unregisterFirmwares()
void ShowEepromErrors(QWidget *parent, const QString &title, const QString &mainMessage, unsigned long errorsFound)
{
foreach (Firmware * f, firmwares) {
delete f;
std::bitset<NUM_ERRORS> errors((unsigned long long)errorsFound);
QStringList errorsList;
errorsList << QT_TRANSLATE_NOOP("EepromInterface", "Possible causes for this:");
if (errors.test(UNSUPPORTED_NEWER_VERSION)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is from a newer version of OpenTX"); }
if (errors.test(NOT_OPENTX)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is not from OpenTX"); }
if (errors.test(NOT_TH9X)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is not from Th9X"); }
if (errors.test(NOT_GRUVIN9X)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is not from Gruvin9X"); }
if (errors.test(NOT_ERSKY9X)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is not from ErSky9X"); }
if (errors.test(NOT_ER9X)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is not from Er9X"); }
if (errors.test(WRONG_SIZE)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom size is invalid"); }
if (errors.test(WRONG_FILE_SYSTEM)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom file system is invalid"); }
if (errors.test(UNKNOWN_BOARD)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is from a unknown board"); }
if (errors.test(WRONG_BOARD)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom is from the wrong board"); }
if (errors.test(BACKUP_NOT_SUPPORTED)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Eeprom backup not supported"); }
if (errors.test(UNKNOWN_ERROR)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Something that couldn't be guessed, sorry"); }
if (errors.test(HAS_WARNINGS)) {
errorsList << QT_TRANSLATE_NOOP("EepromInterface", "Warning:");
if (errors.test(WARNING_WRONG_FIRMWARE)) { errorsList << QT_TRANSLATE_NOOP("EepromInterface", "- Your radio probably uses a wrong firmware,\n eeprom size is 4096 but only the first 2048 are used"); }
}
QMessageBox msgBox(parent);
msgBox.setWindowTitle(title);
msgBox.setIcon(QMessageBox::Critical);
msgBox.setText(mainMessage);
msgBox.setInformativeText(errorsList.join("\n"));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.exec();
}
bool loadEEprom(RadioData &radioData, const uint8_t *eeprom, const int size)
void ShowEepromWarnings(QWidget *parent, const QString &title, unsigned long errorsFound)
{
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
if (eepromInterface->load(radioData, eeprom, size))
return true;
}
std::bitset<NUM_ERRORS> errors((unsigned long long)errorsFound);
QStringList warningsList;
if (errors.test(WARNING_WRONG_FIRMWARE)) { warningsList << QT_TRANSLATE_NOOP("EepromInterface", "- Your radio probably uses a wrong firmware,\n eeprom size is 4096 but only the first 2048 are used"); }
if (errors.test(OLD_VERSION)) { warningsList << QT_TRANSLATE_NOOP("EepromInterface", "- Your eeprom is from an old version of OpenTX, upgrading!\n You should 'save as' to keep the old file as a backup."); }
return false;
QMessageBox msgBox(parent);
msgBox.setWindowTitle(title);
msgBox.setIcon(QMessageBox::Warning);
msgBox.setText(QT_TRANSLATE_NOOP("EepromInterface", "Warnings!"));
msgBox.setInformativeText(warningsList.join("\n"));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.exec();
}
bool loadBackup(RadioData &radioData, uint8_t *eeprom, int size, int index)
unsigned long LoadEeprom(RadioData &radioData, const uint8_t *eeprom, const int size)
{
std::bitset<NUM_ERRORS> errors;
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
if (eepromInterface->loadBackup(radioData, eeprom, size, index))
return true;
std::bitset<NUM_ERRORS> result((unsigned long long)eepromInterface->load(radioData, eeprom, size));
if (result.test(NO_ERROR)) {
return result.to_ulong();
}
else {
errors |= result;
}
}
return false;
if (errors.none()) {
errors.set(UNKNOWN_ERROR);
}
return errors.to_ulong();
}
unsigned long LoadBackup(RadioData & radioData, uint8_t * eeprom, int size, int index)
{
std::bitset<NUM_ERRORS> errors;
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
std::bitset<NUM_ERRORS> result((unsigned long long)eepromInterface->loadBackup(radioData, eeprom, size, index));
if (result.test(NO_ERROR)) {
return result.to_ulong();
}
else {
errors |= result;
}
}
if (errors.none()) {
errors.set(UNKNOWN_ERROR);
}
return errors.to_ulong();
}
bool loadEEpromXml(RadioData &radioData, QDomDocument &doc)
unsigned long LoadEepromXml(RadioData & radioData, QDomDocument & doc)
{
std::bitset<NUM_ERRORS> errors;
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
if (eepromInterface->loadxml(radioData, doc))
return true;
std::bitset<NUM_ERRORS> result((unsigned long long)eepromInterface->loadxml(radioData, doc));
if (result.test(NO_ERROR)) {
return result.to_ulong();
}
else {
errors |= result;
}
}
return false;
if (errors.none()) {
errors.set(UNKNOWN_ERROR);
}
return errors.to_ulong();
}
QString getBoardName(BoardEnum board)
+65 -12
View File
@@ -24,6 +24,7 @@
#include <QtXml>
#include <QComboBox>
#include <iostream>
#include <bitset>
#include "constants.h"
#include "simulatorinterface.h"
@@ -597,6 +598,12 @@ enum AssignFunc {
FuncBackgroundMusicPause,
FuncAdjustGV1,
FuncAdjustGVLast = FuncAdjustGV1+C9X_MAX_GVARS-1,
FuncSetFailsafeInternalModule,
FuncSetFailsafeExternalModule,
FuncRangeCheckInternalModule,
FuncRangeCheckExternalModule,
FuncBindInternalModule,
FuncBindExternalModule,
FuncCount,
FuncReserve = -1
};
@@ -748,6 +755,22 @@ enum TelemetryCurrentSources {
TELEMETRY_CURRENT_SOURCE_FAS
};
enum UartModes {
UART_MODE_NONE,
UART_MODE_TELEMETRY_MIRROR,
UART_MODE_TELEMETRY,
UART_MODE_SBUS_TRAINER,
UART_MODE_DEBUG
};
enum TrainerMode {
TRAINER_MODE_MASTER_TRAINER_JACK,
TRAINER_MODE_SLAVE,
TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE,
TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE,
TRAINER_MODE_MASTER_BATTERY_COMPARTMENT,
};
class FrSkyData {
public:
FrSkyData() { clear(); }
@@ -818,6 +841,7 @@ enum PulsesProtocol {
PULSES_PXX_XJT_D8,
PULSES_PXX_XJT_LR12,
PULSES_PXX_DJT,
PULSES_CROSSFIRE,
PULSES_PROTOCOL_LAST
};
@@ -841,7 +865,7 @@ class ModuleData {
int failsafeChannels[C9X_NUM_CHNOUT];
int ppmDelay;
bool ppmPulsePol; // false = positive
bool ppmOutputType; // false = open drain, true = push pull
bool ppmOutputType; // false = open drain, true = push pull
int ppmFrameLength;
void clear() { memset(this, 0, sizeof(ModuleData)); }
QString polarityToString() const { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
@@ -1041,6 +1065,8 @@ class ModelData {
SensorData sensorData[C9X_MAX_SENSORS];
unsigned int toplcdTimer;
void clear();
bool isEmpty() const;
void setDefaultInputs(const GeneralSettings & settings);
@@ -1275,7 +1301,6 @@ enum Capability {
HasExpoNames,
HasNoExpo,
HasMixerNames,
HasChNames,
HasCvNames,
HasPxxCountry,
HasPPMStart,
@@ -1317,6 +1342,7 @@ enum Capability {
LCDWidth,
GetThrSwitch,
HasDisplayText,
HasTopLcd,
GlobalFunctions,
VirtualInputs,
TrainerInputs,
@@ -1336,7 +1362,8 @@ enum Capability {
HasInputDiff,
HasMixerExpo,
MixersMonitor,
HasBatMeterRange
HasBatMeterRange,
DangerousFunctions,
};
class SimulatorInterface;
@@ -1353,11 +1380,11 @@ class EEPROMInterface
inline BoardEnum getBoard() { return board; }
virtual bool load(RadioData &radioData, const uint8_t *eeprom, int size) = 0;
virtual unsigned long load(RadioData &radioData, const uint8_t *eeprom, int size) = 0;
virtual bool loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index) = 0;
virtual unsigned long loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index) = 0;
virtual bool loadxml(RadioData &radioData, QDomDocument &doc) = 0;
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc) = 0;
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0) = 0;
@@ -1365,8 +1392,6 @@ class EEPROMInterface
virtual int getSize(const GeneralSettings &) = 0;
virtual int isAvailable(PulsesProtocol proto, int port=0) = 0;
virtual const int getEEpromSize() = 0;
virtual const int getMaxModels() = 0;
@@ -1478,11 +1503,37 @@ inline void applyStickModeToModel(ModelData &model, unsigned int mode)
void registerEEpromInterfaces();
void unregisterEEpromInterfaces();
void registerOpenTxFirmwares();
void unregisterFirmwares();
void unregisterOpenTxFirmwares();
bool loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index);
bool loadEEprom(RadioData &radioData, const uint8_t *eeprom, int size);
bool loadEEpromXml(RadioData &radioData, QDomDocument &doc);
enum EepromLoadErrors {
NO_ERROR,
UNKNOWN_ERROR,
UNSUPPORTED_NEWER_VERSION,
WRONG_SIZE,
WRONG_FILE_SYSTEM,
NOT_OPENTX,
NOT_TH9X,
NOT_GRUVIN9X,
NOT_ERSKY9X,
NOT_ER9X,
UNKNOWN_BOARD,
WRONG_BOARD,
BACKUP_NOT_SUPPORTED,
HAS_WARNINGS,
OLD_VERSION,
WARNING_WRONG_FIRMWARE,
NUM_ERRORS
};
void ShowEepromErrors(QWidget *parent, const QString &title, const QString &mainMessage, unsigned long errorsFound);
void ShowEepromWarnings(QWidget *parent, const QString &title, unsigned long errorsFound);
unsigned long LoadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index);
unsigned long LoadEeprom(RadioData &radioData, const uint8_t *eeprom, int size);
unsigned long LoadEepromXml(RadioData &radioData, QDomDocument &doc);
struct Option {
const char * name;
@@ -1576,6 +1627,8 @@ class Firmware {
virtual bool isTelemetrySourceAvailable(int source) = 0;
virtual int isAvailable(PulsesProtocol proto, int port=0) = 0;
public:
QList<const char *> languages;
QList<const char *> ttslanguages;
+5 -10
View File
@@ -36,7 +36,6 @@ 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)
@@ -122,20 +121,16 @@ PACK(struct EepromFileHeader
bool RleFile::searchFat()
{
int bestFatIndex = -1;
eepromFatHeader = NULL;
uint32_t bestFatIndex = 0;
for (int i=0; i<EEPROM_ZONE_SIZE/EEPROM_FAT_SIZE; i++) {
EepromHeader * header = (EepromHeader *)(eeprom+i*EEPROM_FAT_SIZE);
if (header->mark == EEPROM_MARK && (int)header->index >= bestFatIndex) {
bestFatIndex = i;
eepromFatHeader = header;
bestFatIndex = header->index;
}
}
if (bestFatIndex >= 0) {
eepromFatHeader = (EepromHeader *)(eeprom+bestFatIndex*EEPROM_FAT_SIZE);;
return true;
}
else {
return false;
}
return (eepromFatHeader != NULL);
}
bool RleFile::EeFsOpen(uint8_t *eeprom, int size, BoardEnum board)
View File
View File
+27 -12
View File
@@ -89,14 +89,17 @@ inline void applyStickModeToModel(Er9xModelData & model, unsigned int mode)
model.swashCollectiveSource = applyStickMode(model.swashCollectiveSource, mode);
}
bool Er9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
unsigned long Er9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
{
std::cout << "trying er9x xml import... ";
std::bitset<NUM_ERRORS> errors;
Er9xGeneral er9xGeneral;
memset(&er9xGeneral,0,sizeof(er9xGeneral));
if(!loadGeneralDataXML(&doc, &er9xGeneral)) {
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
} else {
radioData.generalSettings=er9xGeneral;
std::cout << "version " << (unsigned int)er9xGeneral.myVers << " ";
@@ -111,21 +114,26 @@ bool Er9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
}
}
std::cout << "ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
bool Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
unsigned long Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
{
std::cout << "trying er9x import... ";
std::bitset<NUM_ERRORS> errors;
if (size != getEEpromSize()) {
std::cout << "wrong size\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) {
std::cout << "wrong file system\n";
return false;
errors.set(WRONG_FILE_SYSTEM);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
@@ -133,7 +141,8 @@ bool Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
if (efile->readRlc1((uint8_t*)&er9xGeneral, 1) != 1) {
std::cout << "no\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
std::cout << "version " << (unsigned int)er9xGeneral.myVers << " ";
@@ -151,13 +160,16 @@ bool Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
break;
default:
std::cout << "not er9x\n";
return false;
errors.set(NOT_ER9X);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
if (!efile->readRlc1((uint8_t*)&er9xGeneral, sizeof(Er9xGeneral))) {
std::cout << "ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
radioData.generalSettings = er9xGeneral;
@@ -174,12 +186,15 @@ bool Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
}
std::cout << "ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
bool Er9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
unsigned long Er9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
int Er9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
+13 -13
View File
@@ -1,6 +1,6 @@
/*
* 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
@@ -29,21 +29,21 @@ class Er9xInterface : public EEPROMInterface
virtual ~Er9xInterface();
virtual const char * getName();
virtual const int getEEpromSize();
virtual const int getMaxModels();
virtual bool load(RadioData &, const uint8_t * eeprom, int size);
virtual unsigned long load(RadioData &, const uint8_t * eeprom, int size);
virtual bool loadBackup(RadioData &, uint8_t * eeprom, int esize, int index);
virtual bool loadxml(RadioData &radioData, QDomDocument &doc);
virtual unsigned long loadBackup(RadioData &, uint8_t * eeprom, int esize, int index);
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
virtual int save(uint8_t * eeprom, RadioData & radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(const ModelData &);
virtual int getSize(const GeneralSettings &settings);
virtual int isAvailable(PulsesProtocol proto, int port=0);
@@ -54,17 +54,17 @@ class Er9xInterface : public EEPROMInterface
private:
void appendTextElement(QDomDocument * qdoc, QDomElement * pe, QString name, QString value);
void appendNumberElement(QDomDocument * qdoc, QDomElement * pe,QString name, int value, bool forceZeroWrite = false);
void appendCDATAElement(QDomDocument * qdoc, QDomElement * pe,QString name, const char * data, int size);
QDomElement getGeneralDataXML(QDomDocument * qdoc, Er9xGeneral * tgen); //parse out data to XML format
QDomElement getModelDataXML(QDomDocument * qdoc, Er9xModelData * tmod, int modelNum, int mdver); //parse out data to XML format
bool loadGeneralDataXML(QDomDocument * qdoc, Er9xGeneral * tgen); // get data from XML
bool loadModelDataXML(QDomDocument * qdoc, Er9xModelData * tmod, int modelNum = -1); // get data from XML
};
@@ -172,8 +172,7 @@ bool Er9xSimulator::timer10ms()
uint8_t * Er9xSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
return (::uint8_t *)simuLcdBuf;
}
bool Er9xSimulator::lcdChanged(bool & lightEnable)
@@ -54,8 +54,14 @@ class Er9xSimulator : public SimulatorInterface {
virtual void sendTelemetry(uint8_t * data, unsigned int len) {};
virtual uint8_t getSensorInstance(uint16_t id) { return 0; };
virtual uint16_t getSensorRatio(uint16_t id) { return 0; };
virtual void setTrainerInput(unsigned int inputNumber, int16_t value) {};
virtual void setLuaStateReloadPermanentScripts() {};
protected:
Er9xInterface * er9xInterface;
@@ -15,7 +15,6 @@
*/
#include <iostream>
#include <QMessageBox>
#include "ersky9xinterface.h"
#include "ersky9xeeprom.h"
#include "simulator/ersky9xsimulator.h"
@@ -120,14 +119,17 @@ inline void applyStickModeToModel(Ersky9xModelData_v11 & model, unsigned int mod
model.swashCollectiveSource = applyStickMode(model.swashCollectiveSource, mode);
}
bool Ersky9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
unsigned long Ersky9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
{
std::cout << "trying ersky9x xml import... ";
std::bitset<NUM_ERRORS> errors;
Ersky9xGeneral ersky9xGeneral;
memset(&ersky9xGeneral,0,sizeof(ersky9xGeneral));
if(!loadGeneralDataXML(&doc, &ersky9xGeneral)) {
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
else {
radioData.generalSettings=ersky9xGeneral;
@@ -137,32 +139,39 @@ bool Ersky9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
if (ersky9xGeneral.myVers == 10) {
if (!loadModelDataXML<Ersky9xModelData_v10>(&doc, &radioData.models[i], i, radioData.generalSettings.stickMode+1)) {
std::cout << "ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
else {
if (!loadModelDataXML<Ersky9xModelData_v11>(&doc, &radioData.models[i], i, radioData.generalSettings.stickMode+1)) {
std::cout << "ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
}
std::cout << "ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
bool Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
unsigned long Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
{
std::cout << "trying ersky9x import... ";
std::bitset<NUM_ERRORS> errors;
if (size != EESIZE_SKY9X) {
std::cout << "wrong size\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_SKY9X)) {
std::cout << "wrong file system\n";
return false;
errors.set(WRONG_FILE_SYSTEM);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
@@ -170,7 +179,8 @@ bool Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int siz
if (efile->readRlc2((uint8_t*)&ersky9xGeneral, 1) != 1) {
std::cout << "no\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
std::cout << "version " << (unsigned int)ersky9xGeneral.myVers << " ";
@@ -182,12 +192,14 @@ bool Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int siz
break;
default:
std::cout << "not ersky9x\n";
return false;
errors.set(NOT_ERSKY9X);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
if (!efile->readRlc2((uint8_t*)&ersky9xGeneral, sizeof(Ersky9xGeneral))) {
std::cout << "ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
radioData.generalSettings = ersky9xGeneral;
@@ -218,12 +230,15 @@ bool Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int siz
}
std::cout << "ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
bool Ersky9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
unsigned long Ersky9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
int Ersky9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
@@ -34,11 +34,11 @@ class Ersky9xInterface : public EEPROMInterface
virtual const int getMaxModels();
virtual bool load(RadioData &, const uint8_t * eeprom, int size);
virtual unsigned long load(RadioData &, const uint8_t * eeprom, int size);
virtual bool loadBackup(RadioData &, uint8_t * eeprom, int esize, int index);
virtual unsigned long loadBackup(RadioData &, uint8_t * eeprom, int esize, int index);
virtual bool loadxml(RadioData &radioData, QDomDocument &doc);
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
virtual int save(uint8_t * eeprom, RadioData & radioData, uint32_t variant=0, uint8_t version=0);
@@ -194,8 +194,7 @@ bool Ersky9xSimulator::timer10ms()
uint8_t * Ersky9xSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
return (::uint8_t *)simuLcdBuf;
}
bool Ersky9xSimulator::lcdChanged(bool & lightEnable)
@@ -54,8 +54,14 @@ class Ersky9xSimulator : public SimulatorInterface {
virtual void sendTelemetry(uint8_t * data, unsigned int len) {};
virtual uint8_t getSensorInstance(uint16_t id) { return 0; };
virtual uint16_t getSensorRatio(uint16_t id) { return 0; };
virtual void setTrainerInput(unsigned int inputNumber, int16_t value) {};
virtual void setLuaStateReloadPermanentScripts() {};
protected:
Ersky9xInterface * ersky9xInterface;
@@ -93,24 +93,30 @@ bool Gruvin9xInterface::loadGeneral(GeneralSettings &settings, int version)
return false;
}
bool Gruvin9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
unsigned long Gruvin9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
bool Gruvin9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
unsigned long Gruvin9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
{
std::cout << "trying " << getName() << " import... ";
std::bitset<NUM_ERRORS> errors;
if (size != this->getEEpromSize()) {
std::cout << "wrong size\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) {
std::cout << "wrong file system\n";
return false;
errors.set(WRONG_FILE_SYSTEM);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
@@ -118,14 +124,16 @@ bool Gruvin9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int si
uint8_t version;
if (efile->readRlc2(&version, 1) != 1) {
std::cout << "no\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
if (version == 0) {
efile->openRd(FILE_GENERAL);
if (efile->readRlc1(&version, 1) != 1) {
std::cout << "no\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
@@ -145,25 +153,33 @@ bool Gruvin9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int si
break;
default:
std::cout << "not gruvin9x\n";
return false;
errors.set(NOT_GRUVIN9X);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
if (version == 5) {
if (!loadGeneral<Gruvin9xGeneral_v103>(radioData.generalSettings, 1))
return false;
if (!loadGeneral<Gruvin9xGeneral_v103>(radioData.generalSettings, 1)) {
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
else if (version < 104) {
if (!loadGeneral<Gruvin9xGeneral_v103>(radioData.generalSettings))
return false;
if (!loadGeneral<Gruvin9xGeneral_v103>(radioData.generalSettings)) {
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
else if (version <= 106) {
if (!loadGeneral<Gruvin9xGeneral_v104>(radioData.generalSettings))
return false;
if (!loadGeneral<Gruvin9xGeneral_v104>(radioData.generalSettings)) {
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
else {
std::cout << "ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
for (int i=0; i<getMaxModels(); i++) {
@@ -185,17 +201,21 @@ bool Gruvin9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int si
}
else {
std::cout << "ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
std::cout << "ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
bool Gruvin9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
unsigned long Gruvin9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
int Gruvin9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
@@ -1,6 +1,6 @@
/*
* 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
@@ -30,21 +30,22 @@ class Gruvin9xInterface : public EEPROMInterface
virtual ~Gruvin9xInterface();
virtual const char * getName();
virtual const int getEEpromSize();
virtual const int getMaxModels();
virtual bool load(RadioData &, const uint8_t *eeprom, int size);
virtual unsigned long load(RadioData &, const uint8_t *eeprom, int size);
virtual bool loadBackup(RadioData &, uint8_t *eeprom,int esize, int index);
virtual bool loadxml(RadioData &radioData, QDomDocument &doc);
virtual unsigned long loadBackup(RadioData &, uint8_t *eeprom,int esize, int index);
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(const ModelData &);
virtual int getSize(const GeneralSettings & settings);
virtual int isAvailable(PulsesProtocol proto, int port=0);
+133 -40
View File
@@ -22,12 +22,13 @@
#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_CUSTOM_SWITCHES(board, version) (IS_ARM(board) ? 32 : ((IS_DBLEEPROM(board, version) && version<217) ? 15 : 12))
#define MAX_LOGICAL_SWITCHES(board, version) (IS_ARM(board) ? (version >= 218 ? 64 : 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))
@@ -100,7 +101,7 @@ class SwitchesConversionTable: public ConversionTable {
}
}
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val+offset);
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -125,7 +126,7 @@ class SwitchesConversionTable: public ConversionTable {
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++);
}
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -263,21 +264,24 @@ class SourcesConversionTable: public ConversionTable {
addConversion(RawSource(SOURCE_TYPE_SWITCH, i), val++);
}
}
for (int i=0; i<MAX_CUSTOM_SWITCHES(board, version); i++) {
for (int i=0; i<MAX_LOGICAL_SWITCHES(board, version); i++) {
addConversion(RawSource(SOURCE_TYPE_CUSTOM_SWITCH, i), val++);
}
}
if (!afterrelease21March2013) {
for (int i=0; i<3; i++)
for (int i=0; i<3; i++) {
addConversion(RawSource(SOURCE_TYPE_CYC, i), val++);
}
}
for (int i=0; i<NUM_PPM_INPUTS(board, version); i++)
for (int i=0; i<NUM_PPM_INPUTS(board, version); i++) {
addConversion(RawSource(SOURCE_TYPE_PPM, i), val++);
}
for (int i=0; i<MAX_CHANNELS(board, version); i++)
for (int i=0; i<MAX_CHANNELS(board, version); i++) {
addConversion(RawSource(SOURCE_TYPE_CH, i), val++);
}
if (!(flags & FLAG_NOTELEMETRY)) {
if (IS_ARM(board) && version >= 217) {
@@ -296,8 +300,9 @@ class SourcesConversionTable: public ConversionTable {
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++)
for (int i=0; i<MAX_GVARS(board, version); i++) {
addConversion(RawSource(SOURCE_TYPE_GVAR, i), val++);
}
}
}
@@ -387,8 +392,8 @@ template <int N>
class SwitchField: public ConversionField< SignedField<N> > {
public:
SwitchField(RawSwitch & sw, BoardEnum board, unsigned int version, unsigned long flags=0):
ConversionField< SignedField<N> >(_switch, SwitchesConversionTable::getInstance(board, version, flags), "Switch",
"Switch "+ sw.toString()+" cannot be exported on this board!"),
ConversionField< SignedField<N> >(_switch, SwitchesConversionTable::getInstance(board, version, flags), QObject::tr("Switch").toAscii(),
QObject::tr("Switch ").toAscii()+ sw.toString()+ QObject::tr(" cannot be exported on this board!").toAscii()),
sw(sw),
_switch(0)
{
@@ -779,7 +784,7 @@ class FlightModeField: public TransformedField {
index(index),
board(board),
version(version),
rotencCount(IS_ARM(board) ? 1 : (IS_2560(board) ? 2 : 0))
rotencCount(ROTENC_COUNT(board, version))
{
if (board == BOARD_STOCK || (board==BOARD_M128 && version>=215)) {
// On stock we use 10bits per trim
@@ -799,13 +804,21 @@ class FlightModeField: public TransformedField {
internalField.Append(new SignedField<16>(trimBase[i]));
}
}
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 >= 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));
}
if (IS_ARM(board) && version >= 214) {
internalField.Append(new UnsignedField<8>(phase.fadeIn));
internalField.Append(new UnsignedField<8>(phase.fadeOut));
@@ -918,7 +931,25 @@ class MixField: public TransformedField {
version(version),
model(model)
{
if (IS_TARANIS(board) && version >= 217) {
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) {
internalField.Append(new UnsignedField<8>(_destCh));
internalField.Append(new UnsignedField<9>(mix.flightModes));
internalField.Append(new UnsignedField<2>((unsigned int &)mix.mltpx));
@@ -1186,7 +1217,21 @@ class InputField: public TransformedField {
board(board),
version(version)
{
if (IS_TARANIS(board) && version >= 217) {
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) {
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"));
@@ -1591,7 +1636,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_CUSTOM_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val);
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -1602,7 +1647,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_CUSTOM_SWITCHES(board, version); i++) {
for (int i=1; i<=MAX_LOGICAL_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val);
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
@@ -1667,7 +1712,16 @@ class LogicalSwitchField: public TransformedField {
v2(0),
v3(0)
{
if (IS_ARM(board) && version >= 217) {
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) {
internalField.Append(new ConversionField< UnsignedField<6> >(csw.func, &functionsConversionTable, "Function"));
internalField.Append(new SignedField<10>(v1));
internalField.Append(new SignedField<16>(v2));
@@ -1679,12 +1733,6 @@ class LogicalSwitchField: public TransformedField {
internalField.Append(new SignedField<16>(v3));
internalField.Append(new ConversionField< UnsignedField<8> >(csw.func, &functionsConversionTable, "Function"));
}
else if (IS_ARM(board) && version >= 216) {
internalField.Append(new SignedField<8>(v1));
internalField.Append(new SignedField<16>(v2));
internalField.Append(new SignedField<16>(v3));
internalField.Append(new ConversionField< UnsignedField<8> >(csw.func, &functionsConversionTable, "Function"));
}
else if (IS_ARM(board) && version >= 215) {
internalField.Append(new SignedField<16>(v1));
internalField.Append(new SignedField<16>(v2));
@@ -1708,7 +1756,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) {
if (version >= 214 && version <= 217) {
internalField.Append(new ConversionField< SignedField<8> >((int &)csw.andsw, andswitchesConversionTable, "AND switch"));
}
}
@@ -1785,7 +1833,7 @@ class LogicalSwitchField: public TransformedField {
}
}
else if (csw.func != LS_FN_OFF) {
if (IS_ARM(board)) {
if (IS_ARM(board) && version >= 217) {
sourcesConversionTable->importValue((uint32_t)v1, csw.val1);
}
else {
@@ -1919,9 +1967,12 @@ class CustomFunctionsConversionTable: public ConversionTable {
val++;
if (IS_ARM(board)) {
addConversion(FuncVolume, val++);
addConversion(FuncReserve, val++);
addConversion(FuncReserve, val++);
addConversion(FuncReserve, val++);
addConversion(FuncSetFailsafeInternalModule, val);
addConversion(FuncSetFailsafeExternalModule, val++);
addConversion(FuncRangeCheckInternalModule, val);
addConversion(FuncRangeCheckExternalModule, val++);
addConversion(FuncBindInternalModule, val);
addConversion(FuncBindExternalModule, val++);
}
addConversion(FuncPlaySound, val++);
addConversion(FuncPlayPrompt, val++);
@@ -2028,8 +2079,14 @@ class ArmCustomFunctionField: public TransformedField {
{
memset(_param, 0, sizeof(_param));
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 (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")));
}
if (IS_TARANIS(board) && version >= 216)
internalField.Append(new CharField<8>(_param, false));
@@ -2080,6 +2137,21 @@ class ArmCustomFunctionField: public TransformedField {
*((uint8_t *)(_param+3)) = fn.func - FuncSetTimer1;
}
}
else if (fn.func >= FuncSetFailsafeInternalModule && fn.func <= FuncSetFailsafeExternalModule) {
if (version >= 216) {
*((uint16_t *)_param) = fn.func - FuncSetFailsafeInternalModule;
}
}
else if (fn.func >= FuncRangeCheckInternalModule && fn.func <= FuncRangeCheckExternalModule) {
if (version >= 216) {
*((uint16_t *)_param) = fn.func - FuncRangeCheckInternalModule;
}
}
else if (fn.func >= FuncBindInternalModule && fn.func <= FuncBindExternalModule) {
if (version >= 216) {
*((uint16_t *)_param) = fn.func - FuncBindInternalModule;
}
}
else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic || fn.func == FuncPlayScript) {
memcpy(_param, fn.paramarm, sizeof(_param));
}
@@ -2889,8 +2961,21 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
for (int i=0; i<MAX_TIMERS(board, version); i++) {
internalField.Append(new SwitchField<8>(modelData.timers[i].mode, board, version, true));
if (IS_ARM(board) && version >= 217) {
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 UnsignedField<24>(modelData.timers[i].val));
internalField.Append(new SignedField<24>(modelData.timers[i].pvalue));
internalField.Append(new UnsignedField<2>(modelData.timers[i].countdownBeep));
@@ -2903,6 +2988,7 @@ 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));
@@ -2911,6 +2997,7 @@ 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));
@@ -2924,6 +3011,7 @@ 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));
@@ -2983,7 +3071,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_CUSTOM_SWITCHES(board, version); i++)
for (int i=0; i<MAX_LOGICAL_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))
@@ -2992,8 +3080,9 @@ 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));
@@ -3177,6 +3266,10 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
internalField.Append(new SensorField(modelData.sensorData[i], board, version));
}
}
if (IS_TARANIS_X9E(board)) {
internalField.Append(new UnsignedField<8>(modelData.toplcdTimer));
}
}
void OpenTxModelData::beforeExport()
@@ -81,6 +81,9 @@ class ProtocolsConversionTable: public ConversionTable
addConversion(PULSES_DSM2, val++);
addConversion(PULSES_DSMX, val++);
}
if (IS_TARANIS(board)) {
addConversion(PULSES_CROSSFIRE, val++);
}
}
};
@@ -23,8 +23,8 @@
#include "file.h"
#include "appdata.h"
#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 OPENTX_FIRMWARE_DOWNLOADS "http://downloads-22.open-tx.org/firmware"
#define OPENTX_NIGHT_FIRMWARE_DOWNLOADS "http://downloads-22.open-tx.org/nightly/firmware"
#define FILE_TYP_GENERAL 1
#define FILE_TYP_MODEL 2
@@ -75,6 +75,10 @@ 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";
}
@@ -98,6 +102,8 @@ 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;
@@ -307,15 +313,19 @@ bool OpenTxEepromInterface::saveModel(unsigned int index, ModelData &model, unsi
return (sz == eeprom.size());
}
bool OpenTxEepromInterface::loadxml(RadioData &radioData, QDomDocument &doc)
unsigned long OpenTxEepromInterface::loadxml(RadioData &radioData, QDomDocument &doc)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
bool OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
unsigned long OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
{
std::cout << "trying " << getName() << " import...";
std::bitset<NUM_ERRORS> errors;
if (size != getEEpromSize()) {
if (size==4096) {
int notnull=false;
@@ -326,21 +336,25 @@ bool OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *eeprom, in
}
if (notnull) {
std::cout << " wrong size (" << size << ")\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
else {
QMessageBox::warning(NULL, "companion", QObject::tr("Your radio probably uses a wrong firmware,\n eeprom size is 4096 but only the first 2048 are used"));
errors.set(HAS_WARNINGS);
errors.set(WARNING_WRONG_FIRMWARE);
size=2048;
}
} else {
std::cout << " wrong size (" << size << "/" << getEEpromSize() << ")\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
}
if (!efile->EeFsOpen((uint8_t *)eeprom, size, board)) {
std::cout << " wrong file system\n";
return false;
errors.set(WRONG_FILE_SYSTEM);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
@@ -348,30 +362,39 @@ bool OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *eeprom, in
uint8_t version;
if (efile->readRlc2(&version, 1) != 1) {
std::cout << " no\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
std::cout << " version " << (unsigned int)version;
if (!checkVersion(version)) {
EepromLoadErrors version_error = checkVersion(version);
if (version_error == OLD_VERSION) {
errors.set(version_error);
errors.set(HAS_WARNINGS);
} else if (version_error == NOT_OPENTX) {
std::cout << " not open9x\n";
return false;
errors.set(version_error);
return errors.to_ulong();
}
if (!loadGeneral<OpenTxGeneralData>(radioData.generalSettings, version)) {
std::cout << " ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
std::cout << " variant " << radioData.generalSettings.variant;
for (int i=0; i<getMaxModels(); i++) {
if (!loadModel(version, radioData.models[i], NULL, i, radioData.generalSettings.variant, radioData.generalSettings.stickMode+1)) {
std::cout << " ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
std::cout << " ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
int OpenTxEepromInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
@@ -386,7 +409,9 @@ int OpenTxEepromInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t
case BOARD_SKY9X:
case BOARD_AR9X:
case BOARD_9XRPRO:
version = 217;
case BOARD_FLAMENCO:
case BOARD_HORUS:
version = 218;
break;
case BOARD_GRUVIN9X:
case BOARD_MEGA2560:
@@ -561,8 +586,6 @@ int OpenTxFirmware::getCapability(const Capability capability)
return (IS_TARANIS(board) ? 10 : 6);
case GvarsName:
return (IS_9X(board) ? 0 : 6);
case HasChNames:
return (IS_TARANIS(board) ? 1 : 0);
case GvarsInCS:
case HasFAIMode:
return 1;
@@ -574,7 +597,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case OffsetWeight:
return (IS_ARM(board) ? 500 : 245);
case Timers:
return (IS_ARM(board) ? 3 : 2);
return ((IS_ARM(board) && id.contains("timer3")) ? 3 : 2);
case TimersName:
return (IS_TARANIS(board) ? 8 : (IS_ARM(board) ? 3 : 0));
case PermTimers:
@@ -621,7 +644,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
return id.contains("nooverridech") ? 0 : 1;
case LogicalSwitches:
if (IS_ARM(board))
return 32;
return 64;
else
return 12;
case CustomAndSwitches:
@@ -711,7 +734,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case HasFailsafe:
return (IS_ARM(board) ? 32 : 0);
case NumModules:
return (IS_ARM(board) && !IS_9XRPRO(board)) ? 2 : 1;
return (IS_ARM(board) ? 2 : 1);
case HasPPMStart:
return (IS_ARM(board) ? true : false);
case HastxCurrentCalibration:
@@ -736,6 +759,8 @@ int OpenTxFirmware::getCapability(const Capability capability)
return (IS_TARANIS(board) ? SWITCH_SF1 : SWITCH_THR) ;
case HasDisplayText:
return IS_ARM(board) ? 1 : 0;
case HasTopLcd:
return IS_TARANIS_X9E(board) ? 1 : 0;
case GlobalFunctions:
return IS_ARM(board) ? 64 : 0;
case VirtualInputs:
@@ -780,7 +805,9 @@ int OpenTxFirmware::getCapability(const Capability capability)
case MixersMonitor:
return id.contains("mixersmon") ? 1 : 0;
case HasBatMeterRange:
return (IS_TARANIS(board) ? true : false);
return (IS_TARANIS(board) ? true : id.contains("battgraph"));
case DangerousFunctions:
return id.contains("danger") ? 1 : 0;
default:
return 0;
}
@@ -797,7 +824,7 @@ bool OpenTxFirmware::isTelemetrySourceAvailable(int source)
return true;
}
int OpenTxEepromInterface::isAvailable(PulsesProtocol proto, int port)
int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
{
if (IS_TARANIS(board)) {
switch (port) {
@@ -805,9 +832,12 @@ int OpenTxEepromInterface::isAvailable(PulsesProtocol proto, int port)
switch (proto) {
case PULSES_OFF:
case PULSES_PXX_XJT_X16:
case PULSES_PXX_XJT_D8:
case PULSES_PXX_XJT_LR12:
return 1;
case PULSES_PXX_XJT_D8:
return id.contains("eu") ? 0 : 1;
case PULSES_PPM:
return id.contains("internalppm") ? 1 : 0;
default:
return 0;
}
@@ -823,6 +853,7 @@ int OpenTxEepromInterface::isAvailable(PulsesProtocol proto, int port)
case PULSES_LP45:
case PULSES_DSM2:
case PULSES_DSMX:
case PULSES_CROSSFIRE:
return 1;
default:
return 0;
@@ -874,7 +905,7 @@ int OpenTxEepromInterface::isAvailable(PulsesProtocol proto, int port)
case PULSES_DSMX:
case PULSES_LP45:
case PULSES_DSM2:
case PULSES_PXX_DJT:
// case PULSES_PXX_DJT: // Unavailable for now
case PULSES_PPM16:
case PULSES_PPMSIM:
return 1;
@@ -889,73 +920,60 @@ size_t getSizeA(T (&)[SIZE]) {
return SIZE;
}
bool OpenTxEepromInterface::checkVersion(unsigned int version)
EepromLoadErrors OpenTxEepromInterface::checkVersion(unsigned int version)
{
switch(version) {
case 201:
// first version
break;
case 202:
// channel order is now always RUD - ELE - THR - AIL
// changes in timers
// ppmFrameLength added
// thrTraceSrc added
break;
case 203:
// mixers changed (for the trims use for change the offset of a mix)
// telemetry offset raised to -127 +127
// function switches now have a param on 4 bits
break;
case 204:
// telemetry changes (bars)
break;
case 205:
// mixer changes (differential, negative curves)...
break;
// case 206:
case 207:
// V4: Rotary Encoders position in FlightModes
break;
case 208:
// Trim value in 16bits
// FrSky A1/A2 offset on 12bits
// ARM: More Mixers / Expos / CSW / FSW / CHNOUT
break;
case 209:
// Add TrmR, TrmE, TrmT, TrmA as Mix sources
// Trims are now OFF / ON / Rud / Ele / Thr / Ail
break;
case 210:
// Add names in Mixes / Expos
// Add a new telemetry screen
// Add support for Play Track <filename>
break;
case 211:
// Curves big change
break;
case 212:
// Big changes in mixers / limitse
break;
case 213:
// GVARS / Variants introduction
break;
case 214:
// Massive EEPROM change!
break;
case 215:
// M128 revert because too much RAM used!
break;
case 216:
// A lot of things (first github release)
break;
case 217:
// 3 logical switches removed on M128 / gruvin9x boards
return OLD_VERSION;
case 218:
break;
default:
return false;
return NOT_OPENTX;
}
return true;
return NO_ERROR;
}
bool OpenTxEepromInterface::checkVariant(unsigned int version, unsigned int variant)
@@ -991,13 +1009,16 @@ bool OpenTxEepromInterface::checkVariant(unsigned int version, unsigned int vari
return true;
}
bool OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
unsigned long OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
{
std::bitset<NUM_ERRORS> errors;
std::cout << "trying " << getName() << " backup import...";
if (esize < 8 || memcmp(eeprom, "o9x", 3) != 0) {
std::cout << " no\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
BoardEnum backupBoard = (BoardEnum)-1;
@@ -1013,12 +1034,14 @@ bool OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, in
break;
default:
std::cout << " unknown board\n";
return false;
errors.set(UNKNOWN_BOARD);
return errors.to_ulong();
}
if (backupBoard != board) {
std::cout << " not right board\n";
return false;
errors.set(WRONG_BOARD);
return errors.to_ulong();
}
uint8_t version = eeprom[4];
@@ -1028,29 +1051,38 @@ bool OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, in
std::cout << " version " << (unsigned int)version << " ";
if (!checkVersion(version)) {
EepromLoadErrors version_error = checkVersion(version);
if (version_error == OLD_VERSION) {
errors.set(version_error);
errors.set(HAS_WARNINGS);
} else if (version_error == NOT_OPENTX) {
std::cout << " not open9x\n";
return false;
errors.set(version_error);
return errors.to_ulong();
}
if (size > esize-8) {
std::cout << " wrong size\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
if (bcktype=='M') {
if (!loadModel(version, radioData.models[index], &eeprom[8], size, variant)) {
std::cout << " ko\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
}
else {
std::cout << " backup type not supported\n";
return false;
errors.set(BACKUP_NOT_SUPPORTED);
return errors.to_ulong();
}
std::cout << " ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
QString OpenTxFirmware::getFirmwareBaseUrl()
@@ -1346,7 +1378,7 @@ void registerOpenTxFirmwares()
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* ar9x board */
firmware = new OpenTxFirmware("opentx-ar9x", QObject::tr("ar9x board / 9X"), BOARD_AR9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
@@ -1410,7 +1442,21 @@ 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;
}
void unregisterOpenTxFirmwares()
{
foreach (Firmware * f, firmwares) {
delete f;
}
}
@@ -1,6 +1,6 @@
/*
* 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
@@ -33,25 +33,23 @@ class OpenTxEepromInterface : public EEPROMInterface
virtual const int getMaxModels();
virtual bool load(RadioData &, const uint8_t *eeprom, int size);
virtual unsigned long load(RadioData &, const uint8_t *eeprom, int size);
virtual bool loadBackup(RadioData &, uint8_t *eeprom, int esize, int index);
virtual bool loadxml(RadioData &radioData, QDomDocument &doc);
virtual unsigned long loadBackup(RadioData &, uint8_t *eeprom, int esize, int index);
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(const ModelData &);
virtual int getSize(const GeneralSettings &);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
const char * getName();
bool checkVersion(unsigned int version);
EepromLoadErrors checkVersion(unsigned int version);
bool checkVariant(unsigned int version, unsigned int variant);
@@ -112,7 +110,7 @@ class OpenTxFirmware: public Firmware {
}
virtual Firmware * getFirmwareVariant(const QString & id);
virtual QString getStampUrl();
virtual QString getReleaseNotesUrl();
@@ -122,7 +120,9 @@ class OpenTxFirmware: public Firmware {
virtual int getCapability(const Capability);
virtual bool isTelemetrySourceAvailable(int source);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
QString getFirmwareBaseUrl();
@@ -130,5 +130,6 @@ class OpenTxFirmware: public Firmware {
};
void registerOpenTxFirmwares();
void unregisterOpenTxFirmwares();
#endif
@@ -1,38 +1,19 @@
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
today(DATE)
now(TIME)
git_id(GIT_STR)
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)
add_custom_target(lua_exports
make PCB=TARANIS lua_exports.inc
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${RADIO_SRC_DIRECTORY}/stamp.h @ONLY)
set(OPENTX_SRC_FILES
opentxsimulator.cpp
)
)
include_directories(
${CMAKE_BINARY_DIR}/radio/src
${CMAKE_CURRENT_BINARY_DIR}
${RADIO_BIN_DIRECTORY}
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/firmwares/opentx
${COMPANION_SRC_DIRECTORY}/firmwares/opentx
${RADIO_SRC_DIRECTORY}
${RADIO_SRC_DIRECTORY}/fonts/std
${RADIO_SRC_DIRECTORY}/lua/src
@@ -56,21 +37,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})
@@ -84,19 +65,24 @@ 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})
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_exports)
add_dependencies(opentx-taranisplus${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
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)
set(OPENTX_LIBRARIES
opentx-9x${SUFFIX}-simulator
@@ -111,75 +97,81 @@ 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/stock)
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 EEPROM_RLC ${COMMON_DEFINITIONS})
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_link_libraries(opentx-9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega64
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_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_link_libraries(opentx-9xr${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9X with ATmega128
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_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_link_libraries(opentx-9x128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega128
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_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_link_libraries(opentx-9xr128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Gruvin9x
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_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_link_libraries(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Mega2560
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_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_link_libraries(opentx-mega2560${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Sky9x
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_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_link_libraries(opentx-sky9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR-PRO
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_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_link_libraries(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# AR9X
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_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_link_libraries(opentx-ar9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis standard
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_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_link_libraries(opentx-taranis${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis Plus
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_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_link_libraries(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis X9E
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_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_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)
@@ -195,7 +187,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})
@@ -40,7 +40,11 @@
#define AUTOSWITCH
#define GRAPHICS
#define CURVES
#if defined(PCBTARANIS)
#if defined(PCBFLAMENCO)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
#elif defined(PCBTARANIS) || defined(PCBHORUS)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
@@ -91,21 +95,26 @@ namespace NAMESPACE {
#include "radio/src/telemetry/telemetry.cpp"
#include "radio/src/telemetry/frsky_sport.cpp"
#include "radio/src/sbus.cpp"
#include "radio/src/crc16.cpp"
#else
#include "radio/src/main_avr.cpp"
#include "radio/src/audio_avr.cpp"
#include "radio/src/pulses/pulses_avr.cpp"
#endif
#include "radio/src/eeprom_common.cpp"
#include "radio/src/storage/storage_common.cpp"
#if defined(EEPROM_RLC)
#include "radio/src/eeprom_rlc.cpp"
#else
#include "radio/src/eeprom_raw.cpp"
#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"
#endif
#if defined(PCBTARANIS) || defined(PCBSKY9X)
#include "radio/src/eeprom_conversions.cpp"
#include "radio/src/storage/eeprom_conversions.cpp"
#endif
#include "radio/src/opentx.cpp"
@@ -124,85 +133,159 @@ namespace NAMESPACE {
#include "radio/src/vario.cpp"
#include "radio/src/trainer_input.cpp"
#if defined(PCBTARANIS)
#if defined(PCBHORUS)
#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/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"
#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)
@@ -221,7 +304,27 @@ namespace NAMESPACE {
#include "radio/src/buzzer.cpp"
#endif
#if defined(PCBTARANIS)
#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)
#include "radio/src/targets/taranis/board_taranis.cpp"
#include "radio/src/targets/taranis/keys_driver.cpp"
#include "radio/src/targets/taranis/audio_driver.cpp"
@@ -252,7 +355,11 @@ namespace NAMESPACE {
#elif defined(PCBMEGA2560)
#include "radio/src/targets/mega2560/board_mega2560.cpp"
#else
#include "radio/src/targets/stock/board_stock.cpp"
#include "radio/src/targets/9x/board_stock.cpp"
#endif
#if defined(CPUARM)
#include "radio/src/gui/gui_helpers.cpp"
#endif
#include "radio/src/keys.cpp"
@@ -260,7 +367,11 @@ namespace NAMESPACE {
#include "radio/src/targets/simu/simpgmspace.cpp"
#include "radio/src/translations.cpp"
#include "radio/src/telemetry/frsky.cpp"
#include "radio/src/telemetry/frsky_d.cpp"
#if defined(CPUARM)
#include "radio/src/telemetry/frsky_d_arm.cpp"
#else
#include "radio/src/telemetry/frsky_d.cpp"
#endif
#include "radio/src/translations/tts_en.cpp"
#if defined(CPUARM)
@@ -278,7 +389,10 @@ namespace NAMESPACE {
#endif
#if defined(LUA)
#include "radio/src/lua_api.cpp"
#include "radio/src/lua/interface.cpp"
#include "radio/src/lua/api_general.cpp"
#include "radio/src/lua/api_lcd.cpp"
#include "radio/src/lua/api_model.cpp"
#include "radio/src/thirdparty/Lua/src/lapi.c"
#include "radio/src/thirdparty/Lua/src/lcode.c"
#include "radio/src/thirdparty/Lua/src/lctype.c"
@@ -309,6 +423,7 @@ namespace NAMESPACE {
#include "radio/src/thirdparty/Lua/src/ltablib.c"
#include "radio/src/thirdparty/Lua/src/lcorolib.c"
#include "radio/src/thirdparty/Lua/src/liolib.c"
#include "radio/src/thirdparty/Lua/src/lstrlib.c"
#endif
int16_t g_anas[NUM_STICKS+NUM_POTS];
@@ -371,8 +486,7 @@ bool OpenTxSimulator::timer10ms()
::uint8_t * OpenTxSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
return (::uint8_t *)simuLcdBuf;
}
bool OpenTxSimulator::lcdChanged(bool & lightEnable)
@@ -452,11 +566,16 @@ void OpenTxSimulator::getTrims(Trims & trims)
void OpenTxSimulator::wheelEvent(int steps)
{
#if defined(REV9E)
if (steps == 255)
x9de_rotenc -= 2;
#if defined(PCBHORUS) || defined(PCBFLAMENCO)
if (steps > 0)
rotencValue -= 2;
else
x9de_rotenc += 2;
rotencValue += 2;
#elif defined(REV9E)
if (steps == 255)
rotencValue -= 2;
else
rotencValue += 2;
#elif defined(PCBSKY9X) && !defined(REVX)
g_rotenc[0] += steps*4;
#elif defined(PCBGRUVIN9X)
@@ -489,12 +608,49 @@ void OpenTxSimulator::sendTelemetry(::uint8_t * data, unsigned int len)
#endif
}
uint8_t OpenTxSimulator::getSensorInstance(uint16_t id)
{
#if defined(FRSKY_SPORT)
for (int i = 0; i<MAX_SENSORS; i++) {
if (isTelemetryFieldAvailable(i)) {
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
if (sensor->id == id) {
return sensor->instance;
}
}
}
#endif
return 0;
}
uint16_t OpenTxSimulator::getSensorRatio(uint16_t id)
{
#if defined(FRSKY_SPORT)
for (int i = 0; i<MAX_SENSORS; i++) {
if (isTelemetryFieldAvailable(i)) {
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
if (sensor->id == id) {
return sensor->custom.ratio;
}
}
}
#endif
return 0;
}
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;
@@ -519,7 +675,11 @@ class OpenTxSimulatorFactory: public SimulatorFactory
virtual BoardEnum type()
{
#if defined(PCBTARANIS)
#if defined(PCBHORUS)
return BOARD_HORUS;
#elif defined(PCBFLAMENCO)
return BOARD_FLAMENCO;
#elif defined(PCBTARANIS)
return BOARD_TARANIS;
#else
return BOARD_STOCK;
@@ -19,7 +19,15 @@
#include "simulatorinterface.h"
#if defined(PCBTARANIS) && defined(REV9E)
#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)
#define FLAVOUR "taranisx9e"
#define NAMESPACE TaranisX9E
#define EEPROM_VARIANT 0x8000
@@ -122,9 +130,15 @@ class DLLEXPORT OpenTxSimulator : public SimulatorInterface {
virtual void sendTelemetry(uint8_t * data, unsigned int len);
virtual uint8_t getSensorInstance(uint16_t id);
virtual uint16_t getSensorRatio(uint16_t id);
virtual void setTrainerInput(unsigned int inputNumber, int16_t value);
virtual void installTraceHook(void (*callback)(const char *));
virtual void setLuaStateReloadPermanentScripts();
};
}
@@ -1,4 +0,0 @@
// Automatically generated file (CMake) - do not edit
#define DATE_STR "@DATE@"
#define TIME_STR "@TIME@"
#define VERS_STR "@C9X_VERSION@"
@@ -175,8 +175,7 @@ bool Th9xSimulator::timer10ms()
uint8_t * Th9xSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
return (::uint8_t *)simuLcdBuf;
}
bool Th9xSimulator::lcdChanged(bool & lightEnable)
+23 -11
View File
@@ -57,23 +57,29 @@ const int Th9xInterface::getMaxModels()
return 16;
}
bool Th9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
unsigned long Th9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
bool Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
unsigned long Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
{
std::cout << "trying th9x import... ";
std::bitset<NUM_ERRORS> errors;
if (size != getEEpromSize()) {
std::cout << "wrong size\n";
return false;
errors.set(WRONG_SIZE);
return errors.to_ulong();
}
if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) {
std::cout << "wrong file system\n";
return false;
errors.set(WRONG_FILE_SYSTEM);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
@@ -81,7 +87,8 @@ bool Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
if (efile->readRlc2((uint8_t*)&th9xGeneral, 1) != 1) {
std::cout << "no\n";
return false;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
std::cout << "version " << (unsigned int)th9xGeneral.myVers << " ";
@@ -91,14 +98,16 @@ bool Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
break;
default:
std::cout << "not th9x\n";
return false;
errors.set(NOT_TH9X);
return errors.to_ulong();
}
efile->openRd(FILE_GENERAL);
int len = efile->readRlc2((uint8_t*)&th9xGeneral, sizeof(Th9xGeneral));
if (len != sizeof(Th9xGeneral)) {
std::cout << "not th9x\n";
return false;
errors.set(NOT_TH9X);
return errors.to_ulong();
}
radioData.generalSettings = th9xGeneral;
@@ -114,12 +123,15 @@ bool Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
}
std::cout << "ok\n";
return true;
errors.set(NO_ERROR);
return errors.to_ulong();
}
bool Th9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
unsigned long Th9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
{
return false;
std::bitset<NUM_ERRORS> errors;
errors.set(UNKNOWN_ERROR);
return errors.to_ulong();
}
int Th9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version)
+3 -3
View File
@@ -34,11 +34,11 @@ class Th9xInterface : public EEPROMInterface
virtual const int getMaxModels();
virtual bool load(RadioData &, const uint8_t *eeprom, int size);
virtual unsigned long load(RadioData &, const uint8_t *eeprom, int size);
virtual bool loadBackup(RadioData &, uint8_t *eeprom, int esize, int index);
virtual unsigned long loadBackup(RadioData &, uint8_t *eeprom, int esize, int index);
virtual bool loadxml(RadioData &radioData, QDomDocument &doc);
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0);
+6 -4
View File
@@ -104,7 +104,7 @@ int FlashEEpromDialog::getEEpromVersion(const QString &filename)
QByteArray eeprom(EESIZE_MAX, 0);
int fileType = getFileType(filename);
#if 0
if (fileType==FILE_TYPE_XML) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -125,7 +125,8 @@ int FlashEEpromDialog::getEEpromVersion(const QString &filename)
bool xmlOK = doc.setContent(&file);
if (xmlOK) {
RadioData * radioData = new RadioData();
if (!loadEEpromXml(*radioData, doc)) {
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEepromXml(*radioData, doc));
if (!errors.test(NO_ERROR)) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings File %1").arg(filename));
}
else {
@@ -160,7 +161,8 @@ int FlashEEpromDialog::getEEpromVersion(const QString &filename)
}
RadioData * radioData = new RadioData();
if (eeprom_size == 0 || !loadEEprom(*radioData, (const uint8_t *)eeprom.data(), eeprom_size)) {
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEeprom(*radioData, (const uint8_t *)eeprom.data(), eeprom_size));
if (eeprom_size == 0 || !errors.test(NO_ERROR)) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings file %1").arg(filename));
}
else {
@@ -303,7 +305,7 @@ void FlashEEpromDialog::on_burnButton_clicked()
backupPath = g.profile[g.id()].pBackupDir();
if (backupPath.isEmpty()) {
backupPath=g.backupDir();
}
}
backupFilename = backupPath + "/backup-" + QDateTime().currentDateTime().toString("yyyy-MM-dd-HHmmss") + ".bin";
}
else if (ui->checkFirmwareCompatibility->isChecked()) {
View File
+1 -1
View File
@@ -110,7 +110,7 @@
</sizepolicy>
</property>
<property name="toolTip">
<string>Allows Companion to write to older version of the firmware</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Saves a dated copy of your eeprom to the backup folder you specified in the Companion settings before writing the current model to the radio.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Backup before Write</string>
View File
View File
View File
+3 -1
View File
@@ -4,13 +4,15 @@ set(generaledit_NAMES
generaledit
generalsetup
trainer
calibration
hardware
)
set(generaledit_SRCS
calibration.cpp
)
set(generaledit_HDRS
calibration.h
)
set(generaledit_UIS
+74 -413
View File
@@ -1,429 +1,90 @@
#include <QVBoxLayout>
#include <QHeaderView>
#include <QSpinBox>
#include "calibration.h"
#include "ui_calibration.h"
void CalibrationPanel::setupSwitchConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type)
{
bool enabled = false;
if (IS_TARANIS(firmware->getBoard())) {
if (IS_TARANIS_X9E(firmware->getBoard())) {
enabled = true;
type->addItem(tr("None"), GeneralSettings::SWITCH_NONE);
}
else if (index < 8) {
enabled = true;
}
}
if (enabled) {
type->addItem(tr("2 Positions Toggle"), GeneralSettings::SWITCH_TOGGLE);
type->addItem(tr("2 Positions"), GeneralSettings::SWITCH_2POS);
type->addItem(tr("3 Positions"), GeneralSettings::SWITCH_3POS);
name->setField(generalSettings.switchName[index], 3, this);
type->setField(generalSettings.switchConfig[index], this);
}
else {
label->hide();
name->hide();
type->hide();
}
}
void CalibrationPanel::setupPotConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type)
{
bool enabled = false;
if (IS_TARANIS_X9E(firmware->getBoard()) && index < 4) {
label->setText(RawSource(SOURCE_TYPE_STICK, index+NUM_STICKS).toString());
enabled = true;
}
else if (IS_TARANIS_PLUS(firmware->getBoard()) && index < 3) {
enabled = true;
}
else if (IS_TARANIS(firmware->getBoard()) && index < 2) {
enabled = true;
}
if (enabled) {
type->addItem(tr("None"), GeneralSettings::POT_NONE);
type->addItem(tr("Pot with detent"), GeneralSettings::POT_WITH_DETENT);
type->addItem(tr("Multipos switch"), GeneralSettings::POT_MULTIPOS_SWITCH);
type->addItem(tr("Pot without detent"), GeneralSettings::POT_WITHOUT_DETENT);
name->setField(generalSettings.potName[index], 3, this);
type->setField(generalSettings.potConfig[index], this);
}
else {
label->hide();
name->hide();
type->hide();
}
}
void CalibrationPanel::setupSliderConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type)
{
bool enabled = false;
if (IS_TARANIS(firmware->getBoard()) && index < 2) {
type->setEnabled(false);
enabled = true;
}
else if (IS_TARANIS_X9E(firmware->getBoard()) && index < 4) {
enabled = true;
}
if (IS_TARANIS_X9E(firmware->getBoard())) {
label->setText(RawSource(SOURCE_TYPE_STICK, index+NUM_STICKS+4).toString());
}
if (enabled) {
type->addItem(tr("None"), GeneralSettings::SLIDER_NONE);
type->addItem(tr("Slider with detent"), GeneralSettings::SLIDER_WITH_DETENT);
name->setField(generalSettings.sliderName[index], 3, this);
type->setField(generalSettings.sliderConfig[index], this);
}
else {
label->hide();
name->hide();
type->hide();
}
}
CalibrationPanel::CalibrationPanel(QWidget * parent, GeneralSettings & generalSettings, Firmware * firmware):
GeneralPanel(parent, generalSettings, firmware),
ui(new Ui::Calibration)
GeneralPanel(parent, generalSettings, firmware)
{
ui->setupUi(this);
if (!firmware->getCapability(MultiposPots)) {
ui->potsTypeSeparator->hide();
tableWidget = new QTableWidget();
QVBoxLayout * layout = new QVBoxLayout();
layout->addWidget(tableWidget);
layout->setContentsMargins(0, 0, 0, 0);
this->setLayout(layout);
tableWidget->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
tableWidget->setColumnCount(3);
tableWidget->setShowGrid(false);
tableWidget->setSelectionMode(QAbstractItemView::NoSelection);
tableWidget->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
tableWidget->setStyleSheet("QTableWidget {background-color: transparent;}");
QStringList headerLabels;
headerLabels << QObject::tr("Negative span") << QObject::tr("Mid value") << QObject::tr("Positive span");
tableWidget->setHorizontalHeaderLabels(headerLabels);
int rows = NUM_STICKS + GetCurrentFirmware()->getCapability(Pots) + GetCurrentFirmware()->getCapability(Sliders);
tableWidget->setRowCount(rows);
for(int i = 0; i < rows; ++i) {
QTableWidgetItem *newItem = new QTableWidgetItem(AnalogString(i));
newItem->setTextAlignment(Qt::AlignLeft);
tableWidget->setVerticalHeaderItem(i, newItem);
for(int j = 0; j < 3; ++j) {
QSpinBox * newItem = new QSpinBox();
newItem->setMinimum(-9999);
newItem->setMaximum(9999);
newItem->setSingleStep(1);
newItem->setValue(getCalibrationValue(i, j));
newItem->setProperty("row", i);
newItem->setProperty("column", j);
tableWidget->setCellWidget(i, j, newItem);
connect(newItem, SIGNAL(valueChanged(int)), this, SLOT(onCellChanged(int)));
}
}
if (IS_TARANIS(firmware->getBoard())) {
ui->rudName->setField(generalSettings.stickName[0], 3, this);
ui->eleName->setField(generalSettings.stickName[1], 3, this);
ui->thrName->setField(generalSettings.stickName[2], 3, this);
ui->ailName->setField(generalSettings.stickName[3], 3, this);
}
else {
ui->rudLabel->hide();
ui->rudName->hide();
ui->eleLabel->hide();
ui->eleName->hide();
ui->thrLabel->hide();
ui->thrName->hide();
ui->ailLabel->hide();
ui->ailName->hide();
}
setupPotConfig(0, ui->pot1Label, ui->pot1Name, ui->pot1Type);
setupPotConfig(1, ui->pot2Label, ui->pot2Name, ui->pot2Type);
setupPotConfig(2, ui->pot3Label, ui->pot3Name, ui->pot3Type);
setupPotConfig(3, ui->pot4Label, ui->pot4Name, ui->pot4Type);
setupSliderConfig(0, ui->lsLabel, ui->lsName, ui->lsType);
setupSliderConfig(1, ui->rsLabel, ui->rsName, ui->rsType);
setupSliderConfig(2, ui->ls2Label, ui->ls2Name, ui->ls2Type);
setupSliderConfig(3, ui->rs2Label, ui->rs2Name, ui->rs2Type);
setupSwitchConfig(0, ui->saLabel, ui->saName, ui->saType);
setupSwitchConfig(1, ui->sbLabel, ui->sbName, ui->sbType);
setupSwitchConfig(2, ui->scLabel, ui->scName, ui->scType);
setupSwitchConfig(3, ui->sdLabel, ui->sdName, ui->sdType);
setupSwitchConfig(4, ui->seLabel, ui->seName, ui->seType);
setupSwitchConfig(5, ui->sfLabel, ui->sfName, ui->sfType);
setupSwitchConfig(6, ui->sgLabel, ui->sgName, ui->sgType);
setupSwitchConfig(7, ui->shLabel, ui->shName, ui->shType);
setupSwitchConfig(8, ui->siLabel, ui->siName, ui->siType);
setupSwitchConfig(9, ui->sjLabel, ui->sjName, ui->sjType);
setupSwitchConfig(10, ui->skLabel, ui->skName, ui->skType);
setupSwitchConfig(11, ui->slLabel, ui->slName, ui->slType);
setupSwitchConfig(12, ui->smLabel, ui->smName, ui->smType);
setupSwitchConfig(13, ui->snLabel, ui->snName, ui->snType);
setupSwitchConfig(14, ui->soLabel, ui->soName, ui->soType);
setupSwitchConfig(15, ui->spLabel, ui->spName, ui->spType);
setupSwitchConfig(16, ui->sqLabel, ui->sqName, ui->sqType);
setupSwitchConfig(17, ui->srLabel, ui->srName, ui->srType);
int potsCount = GetCurrentFirmware()->getCapability(Pots);
if (potsCount == 3) {
ui->ana8Neg->hide();
ui->ana8Mid->hide();
ui->ana8Pos->hide();
}
if (IS_TARANIS(firmware->getBoard())) {
ui->serialPortMode->setCurrentIndex(generalSettings.hw_uartMode);
}
else {
ui->serialPortMode->hide();
ui->serialPortLabel->hide();
}
if (!IS_SKY9X(firmware->getBoard())) {
ui->txCurrentCalibration->hide();
ui->txCurrentCalibrationLabel->hide();
}
if (IS_TARANIS_X9E(firmware->getBoard())) {
ui->bluetoothEnable->setChecked(generalSettings.bluetoothEnable);
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
}
else {
ui->bluetoothLabel->hide();
ui->bluetoothEnable->hide();
ui->bluetoothName->hide();
}
disableMouseScrolling();
setValues();
}
CalibrationPanel::~CalibrationPanel()
void CalibrationPanel::onCellChanged(int value)
{
delete ui;
}
QSpinBox * sb = qobject_cast<QSpinBox*>(sender());
int row = sb->property("row").toInt();
int column = sb->property("column").toInt();
/*void CalibrationPanel::update()
if (value != getCalibrationValue(row, column)) {
setCalibrationValue(row,column, value);
qDebug() << "CalibrationPanel::onCellChanged" << row << column << "to" << value;
emit modified();
}
}
int CalibrationPanel::getCalibrationValue(int row, int column)
{
switch(column) {
case 0:
return generalSettings.calibSpanNeg[row];
case 1:
return generalSettings.calibMid[row];
case 2:
return generalSettings.calibSpanPos[row];
}
return 0;
}
*/
void CalibrationPanel::on_PPM_MultiplierDSB_editingFinished()
void CalibrationPanel::setCalibrationValue(int row, int column, int value)
{
generalSettings.PPM_Multiplier = (int)(ui->PPM_MultiplierDSB->value()*10)-10;
emit modified();
}
void CalibrationPanel::on_PPM1_editingFinished()
{
generalSettings.trainer.calib[0] = ui->PPM1->value();
emit modified();
}
void CalibrationPanel::on_PPM2_editingFinished()
{
generalSettings.trainer.calib[1] = ui->PPM2->value();
emit modified();
}
void CalibrationPanel::on_PPM3_editingFinished()
{
generalSettings.trainer.calib[2] = ui->PPM3->value();
emit modified();
}
void CalibrationPanel::on_PPM4_editingFinished()
{
generalSettings.trainer.calib[3] = ui->PPM4->value();
emit modified();
}
void CalibrationPanel::on_txCurrentCalibration_editingFinished()
{
generalSettings.txCurrentCalibration = ui->txCurrentCalibration->value();
emit modified();
}
void CalibrationPanel::on_bluetoothEnable_stateChanged(int)
{
generalSettings.bluetoothEnable = ui->bluetoothEnable->isChecked();
emit modified();
}
void CalibrationPanel::setValues()
{
ui->txVoltageCalibration->setValue((double)generalSettings.txVoltageCalibration/10);
ui->txCurrentCalibration->setValue((double)generalSettings.txCurrentCalibration);
ui->ana1Neg->setValue(generalSettings.calibSpanNeg[0]);
ui->ana2Neg->setValue(generalSettings.calibSpanNeg[1]);
ui->ana3Neg->setValue(generalSettings.calibSpanNeg[2]);
ui->ana4Neg->setValue(generalSettings.calibSpanNeg[3]);
ui->ana5Neg->setValue(generalSettings.calibSpanNeg[4]);
ui->ana6Neg->setValue(generalSettings.calibSpanNeg[5]);
ui->ana7Neg->setValue(generalSettings.calibSpanNeg[6]);
ui->ana8Neg->setValue(generalSettings.calibSpanNeg[7]);
ui->ana1Mid->setValue(generalSettings.calibMid[0]);
ui->ana2Mid->setValue(generalSettings.calibMid[1]);
ui->ana3Mid->setValue(generalSettings.calibMid[2]);
ui->ana4Mid->setValue(generalSettings.calibMid[3]);
ui->ana5Mid->setValue(generalSettings.calibMid[4]);
ui->ana6Mid->setValue(generalSettings.calibMid[5]);
ui->ana7Mid->setValue(generalSettings.calibMid[6]);
ui->ana8Mid->setValue(generalSettings.calibMid[7]);
ui->ana1Pos->setValue(generalSettings.calibSpanPos[0]);
ui->ana2Pos->setValue(generalSettings.calibSpanPos[1]);
ui->ana3Pos->setValue(generalSettings.calibSpanPos[2]);
ui->ana4Pos->setValue(generalSettings.calibSpanPos[3]);
ui->ana5Pos->setValue(generalSettings.calibSpanPos[4]);
ui->ana6Pos->setValue(generalSettings.calibSpanPos[5]);
ui->ana7Pos->setValue(generalSettings.calibSpanPos[6]);
ui->ana8Pos->setValue(generalSettings.calibSpanPos[7]);
ui->PPM1->setValue(generalSettings.trainer.calib[0]);
ui->PPM2->setValue(generalSettings.trainer.calib[1]);
ui->PPM3->setValue(generalSettings.trainer.calib[2]);
ui->PPM4->setValue(generalSettings.trainer.calib[3]);
ui->PPM_MultiplierDSB->setValue((qreal)(generalSettings.PPM_Multiplier+10)/10);
}
void CalibrationPanel::on_txVoltageCalibration_editingFinished()
{
generalSettings.txVoltageCalibration = ui->txVoltageCalibration->value()*10;
emit modified();
}
void CalibrationPanel::on_ana1Neg_editingFinished()
{
generalSettings.calibSpanNeg[0] = ui->ana1Neg->value();
emit modified();
}
void CalibrationPanel::on_ana2Neg_editingFinished()
{
generalSettings.calibSpanNeg[1] = ui->ana2Neg->value();
emit modified();
}
void CalibrationPanel::on_ana3Neg_editingFinished()
{
generalSettings.calibSpanNeg[2] = ui->ana3Neg->value();
emit modified();
}
void CalibrationPanel::on_ana4Neg_editingFinished()
{
generalSettings.calibSpanNeg[3] = ui->ana4Neg->value();
emit modified();
}
void CalibrationPanel::on_ana5Neg_editingFinished()
{
generalSettings.calibSpanNeg[4] = ui->ana5Neg->value();
emit modified();
}
void CalibrationPanel::on_ana6Neg_editingFinished()
{
generalSettings.calibSpanNeg[5] = ui->ana6Neg->value();
emit modified();
}
void CalibrationPanel::on_ana7Neg_editingFinished()
{
generalSettings.calibSpanNeg[6] = ui->ana7Neg->value();
emit modified();
}
void CalibrationPanel::on_ana8Neg_editingFinished()
{
generalSettings.calibSpanNeg[7] = ui->ana8Neg->value();
emit modified();
}
void CalibrationPanel::on_ana1Mid_editingFinished()
{
generalSettings.calibMid[0] = ui->ana1Mid->value();
emit modified();
}
void CalibrationPanel::on_ana2Mid_editingFinished()
{
generalSettings.calibMid[1] = ui->ana2Mid->value();
emit modified();
}
void CalibrationPanel::on_ana3Mid_editingFinished()
{
generalSettings.calibMid[2] = ui->ana3Mid->value();
emit modified();
}
void CalibrationPanel::on_ana4Mid_editingFinished()
{
generalSettings.calibMid[3] = ui->ana4Mid->value();
emit modified();
}
void CalibrationPanel::on_ana5Mid_editingFinished()
{
generalSettings.calibMid[4] = ui->ana5Mid->value();
emit modified();
}
void CalibrationPanel::on_ana6Mid_editingFinished()
{
generalSettings.calibMid[5] = ui->ana6Mid->value();
emit modified();
}
void CalibrationPanel::on_ana7Mid_editingFinished()
{
generalSettings.calibMid[6] = ui->ana7Mid->value();
emit modified();
}
void CalibrationPanel::on_ana8Mid_editingFinished()
{
generalSettings.calibMid[7] = ui->ana8Mid->value();
emit modified();
}
void CalibrationPanel::on_ana1Pos_editingFinished()
{
generalSettings.calibSpanPos[0] = ui->ana1Pos->value();
emit modified();
}
void CalibrationPanel::on_ana2Pos_editingFinished()
{
generalSettings.calibSpanPos[1] = ui->ana2Pos->value();
emit modified();
}
void CalibrationPanel::on_ana3Pos_editingFinished()
{
generalSettings.calibSpanPos[2] = ui->ana3Pos->value();
emit modified();
}
void CalibrationPanel::on_ana4Pos_editingFinished()
{
generalSettings.calibSpanPos[3] = ui->ana4Pos->value();
emit modified();
}
void CalibrationPanel::on_ana5Pos_editingFinished()
{
generalSettings.calibSpanPos[4] = ui->ana5Pos->value();
emit modified();
}
void CalibrationPanel::on_ana6Pos_editingFinished()
{
generalSettings.calibSpanPos[5] = ui->ana6Pos->value();
emit modified();
}
void CalibrationPanel::on_ana7Pos_editingFinished()
{
generalSettings.calibSpanPos[6] = ui->ana7Pos->value();
emit modified();
}
void CalibrationPanel::on_ana8Pos_editingFinished()
{
generalSettings.calibSpanPos[7] = ui->ana8Pos->value();
emit modified();
}
void CalibrationPanel::on_serialPortMode_currentIndexChanged(int index)
{
generalSettings.hw_uartMode = index;
emit modified();
switch(column) {
case 0:
generalSettings.calibSpanNeg[row] = value;
break;
case 1:
generalSettings.calibMid[row] = value;
break;
case 2:
generalSettings.calibSpanPos[row] = value;
break;
}
}
+6 -47
View File
@@ -1,6 +1,7 @@
#ifndef CALIBRATION_H
#define CALIBRATION_H
#include <QTableWidget>
#include "generaledit.h"
namespace Ui {
@@ -17,58 +18,16 @@ class CalibrationPanel : public GeneralPanel
public:
CalibrationPanel(QWidget *parent, GeneralSettings & generalSettings, Firmware * firmware);
virtual ~CalibrationPanel();
// virtual void update();
virtual ~CalibrationPanel() {};
private slots:
void on_txVoltageCalibration_editingFinished();
void on_PPM1_editingFinished();
void on_PPM2_editingFinished();
void on_PPM3_editingFinished();
void on_PPM4_editingFinished();
void on_PPM_MultiplierDSB_editingFinished();
void on_txCurrentCalibration_editingFinished();
void on_bluetoothEnable_stateChanged(int);
void on_ana1Neg_editingFinished();
void on_ana2Neg_editingFinished();
void on_ana3Neg_editingFinished();
void on_ana4Neg_editingFinished();
void on_ana5Neg_editingFinished();
void on_ana6Neg_editingFinished();
void on_ana7Neg_editingFinished();
void on_ana8Neg_editingFinished();
void on_ana1Mid_editingFinished();
void on_ana2Mid_editingFinished();
void on_ana3Mid_editingFinished();
void on_ana4Mid_editingFinished();
void on_ana5Mid_editingFinished();
void on_ana6Mid_editingFinished();
void on_ana7Mid_editingFinished();
void on_ana8Mid_editingFinished();
void on_ana1Pos_editingFinished();
void on_ana2Pos_editingFinished();
void on_ana3Pos_editingFinished();
void on_ana4Pos_editingFinished();
void on_ana5Pos_editingFinished();
void on_ana6Pos_editingFinished();
void on_ana7Pos_editingFinished();
void on_ana8Pos_editingFinished();
void on_serialPortMode_currentIndexChanged(int index);
protected:
void setupPotConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type);
void setupSliderConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type);
void setupSwitchConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type);
void onCellChanged(int value);
private:
Ui::Calibration *ui;
QTableWidget * tableWidget;
void setValues();
int getCalibrationValue(int row, int column);
void setCalibrationValue(int row, int column, int value);
};
#endif // CALIBRATION_H
+3 -1
View File
@@ -8,6 +8,7 @@
#include "generalsetup.h"
#include "trainer.h"
#include "calibration.h"
#include "hardware.h"
#include "../modeledit/customfunctions.h"
#include "verticalscrollarea.h"
@@ -42,7 +43,8 @@ GeneralEdit::GeneralEdit(QWidget * parent, RadioData & radioData, Firmware * fir
addTab(new CustomFunctionsPanel(this, NULL, generalSettings, firmware), tr("Global Functions"));
}
addTab(new TrainerPanel(this, generalSettings, firmware), tr("Trainer"));
addTab(new CalibrationPanel(this, generalSettings, firmware), tr("Hardware / Calibration"));
addTab(new HardwarePanel(this, generalSettings, firmware), tr("Hardware"));
addTab(new CalibrationPanel(this, generalSettings, firmware), tr("Calibration"));
ui->tabWidget->setCurrentIndex( g.generalEditTab() );
}
+241
View File
@@ -0,0 +1,241 @@
#include "hardware.h"
#include "ui_hardware.h"
void HardwarePanel::setupSwitchConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type, bool threePos = true)
{
bool enabled = false;
if (IS_TARANIS(firmware->getBoard())) {
if (IS_TARANIS_X9E(firmware->getBoard())) {
enabled = true;
type->addItem(tr("None"), GeneralSettings::SWITCH_NONE);
}
else if (index < 8) {
enabled = true;
}
}
if (enabled) {
type->addItem(tr("2 Positions Toggle"), GeneralSettings::SWITCH_TOGGLE);
type->addItem(tr("2 Positions"), GeneralSettings::SWITCH_2POS);
if (threePos) type->addItem(tr("3 Positions"), GeneralSettings::SWITCH_3POS);
name->setField(generalSettings.switchName[index], 3, this);
type->setField(generalSettings.switchConfig[index], this);
}
else {
label->hide();
name->hide();
type->hide();
}
}
void HardwarePanel::setupPotConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type)
{
bool enabled = false;
if (IS_TARANIS_X9E(firmware->getBoard()) && index < 4) {
label->setText(RawSource(SOURCE_TYPE_STICK, index+NUM_STICKS).toString());
enabled = true;
}
else if (IS_TARANIS_PLUS(firmware->getBoard()) && index < 3) {
enabled = true;
}
else if (IS_TARANIS(firmware->getBoard()) && index < 2) {
enabled = true;
}
if (enabled) {
type->addItem(tr("None"), GeneralSettings::POT_NONE);
type->addItem(tr("Pot with detent"), GeneralSettings::POT_WITH_DETENT);
type->addItem(tr("Multipos switch"), GeneralSettings::POT_MULTIPOS_SWITCH);
type->addItem(tr("Pot without detent"), GeneralSettings::POT_WITHOUT_DETENT);
name->setField(generalSettings.potName[index], 3, this);
type->setField(generalSettings.potConfig[index], this);
}
else {
label->hide();
name->hide();
type->hide();
}
}
void HardwarePanel::setupSliderConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type)
{
bool enabled = false;
if (IS_TARANIS(firmware->getBoard()) && index < 2) {
type->setEnabled(false);
enabled = true;
}
else if (IS_TARANIS_X9E(firmware->getBoard()) && index < 4) {
enabled = true;
}
if (IS_TARANIS_X9E(firmware->getBoard())) {
label->setText(RawSource(SOURCE_TYPE_STICK, index+NUM_STICKS+4).toString());
}
if (enabled) {
type->addItem(tr("None"), GeneralSettings::SLIDER_NONE);
type->addItem(tr("Slider with detent"), GeneralSettings::SLIDER_WITH_DETENT);
name->setField(generalSettings.sliderName[index], 3, this);
type->setField(generalSettings.sliderConfig[index], this);
}
else {
label->hide();
name->hide();
type->hide();
}
}
HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings, Firmware * firmware):
GeneralPanel(parent, generalSettings, firmware),
ui(new Ui::Hardware)
{
ui->setupUi(this);
if (IS_TARANIS(firmware->getBoard())) {
ui->rudName->setField(generalSettings.stickName[0], 3, this);
ui->eleName->setField(generalSettings.stickName[1], 3, this);
ui->thrName->setField(generalSettings.stickName[2], 3, this);
ui->ailName->setField(generalSettings.stickName[3], 3, this);
}
else {
ui->rudLabel->hide();
ui->rudName->hide();
ui->eleLabel->hide();
ui->eleName->hide();
ui->thrLabel->hide();
ui->thrName->hide();
ui->ailLabel->hide();
ui->ailName->hide();
}
setupPotConfig(0, ui->pot1Label, ui->pot1Name, ui->pot1Type);
setupPotConfig(1, ui->pot2Label, ui->pot2Name, ui->pot2Type);
setupPotConfig(2, ui->pot3Label, ui->pot3Name, ui->pot3Type);
setupPotConfig(3, ui->pot4Label, ui->pot4Name, ui->pot4Type);
setupSliderConfig(0, ui->lsLabel, ui->lsName, ui->lsType);
setupSliderConfig(1, ui->rsLabel, ui->rsName, ui->rsType);
setupSliderConfig(2, ui->ls2Label, ui->ls2Name, ui->ls2Type);
setupSliderConfig(3, ui->rs2Label, ui->rs2Name, ui->rs2Type);
setupSwitchConfig(0, ui->saLabel, ui->saName, ui->saType);
setupSwitchConfig(1, ui->sbLabel, ui->sbName, ui->sbType);
setupSwitchConfig(2, ui->scLabel, ui->scName, ui->scType);
setupSwitchConfig(3, ui->sdLabel, ui->sdName, ui->sdType);
setupSwitchConfig(4, ui->seLabel, ui->seName, ui->seType);
setupSwitchConfig(5, ui->sfLabel, ui->sfName, ui->sfType, false); //switch does not support 3POS
setupSwitchConfig(6, ui->sgLabel, ui->sgName, ui->sgType);
setupSwitchConfig(7, ui->shLabel, ui->shName, ui->shType, false); //switch does not support 3POS
setupSwitchConfig(8, ui->siLabel, ui->siName, ui->siType);
setupSwitchConfig(9, ui->sjLabel, ui->sjName, ui->sjType);
setupSwitchConfig(10, ui->skLabel, ui->skName, ui->skType);
setupSwitchConfig(11, ui->slLabel, ui->slName, ui->slType);
setupSwitchConfig(12, ui->smLabel, ui->smName, ui->smType);
setupSwitchConfig(13, ui->snLabel, ui->snName, ui->snType);
setupSwitchConfig(14, ui->soLabel, ui->soName, ui->soType);
setupSwitchConfig(15, ui->spLabel, ui->spName, ui->spType);
setupSwitchConfig(16, ui->sqLabel, ui->sqName, ui->sqType);
setupSwitchConfig(17, ui->srLabel, ui->srName, ui->srType);
if (IS_TARANIS(firmware->getBoard())) {
ui->serialPortMode->setCurrentIndex(generalSettings.hw_uartMode);
}
else {
ui->serialPortMode->hide();
ui->serialPortLabel->hide();
}
if (!IS_SKY9X(firmware->getBoard())) {
ui->txCurrentCalibration->hide();
ui->txCurrentCalibrationLabel->hide();
}
if (IS_TARANIS_X9E(firmware->getBoard())) {
ui->bluetoothEnable->setChecked(generalSettings.bluetoothEnable);
ui->bluetoothName->setField(generalSettings.bluetoothName, 10, this);
}
else {
ui->bluetoothLabel->hide();
ui->bluetoothEnable->hide();
ui->bluetoothName->hide();
}
disableMouseScrolling();
setValues();
}
HardwarePanel::~HardwarePanel()
{
delete ui;
}
void HardwarePanel::on_PPM_MultiplierDSB_editingFinished()
{
generalSettings.PPM_Multiplier = (int)(ui->PPM_MultiplierDSB->value()*10)-10;
emit modified();
}
void HardwarePanel::on_PPM1_editingFinished()
{
generalSettings.trainer.calib[0] = ui->PPM1->value();
emit modified();
}
void HardwarePanel::on_PPM2_editingFinished()
{
generalSettings.trainer.calib[1] = ui->PPM2->value();
emit modified();
}
void HardwarePanel::on_PPM3_editingFinished()
{
generalSettings.trainer.calib[2] = ui->PPM3->value();
emit modified();
}
void HardwarePanel::on_PPM4_editingFinished()
{
generalSettings.trainer.calib[3] = ui->PPM4->value();
emit modified();
}
void HardwarePanel::on_txCurrentHardware_editingFinished()
{
generalSettings.txCurrentCalibration = ui->txCurrentCalibration->value();
emit modified();
}
void HardwarePanel::on_bluetoothEnable_stateChanged(int)
{
generalSettings.bluetoothEnable = ui->bluetoothEnable->isChecked();
emit modified();
}
void HardwarePanel::setValues()
{
ui->txVoltageCalibration->setValue((double)generalSettings.txVoltageCalibration/10);
ui->txCurrentCalibration->setValue((double)generalSettings.txCurrentCalibration);
ui->PPM1->setValue(generalSettings.trainer.calib[0]);
ui->PPM2->setValue(generalSettings.trainer.calib[1]);
ui->PPM3->setValue(generalSettings.trainer.calib[2]);
ui->PPM4->setValue(generalSettings.trainer.calib[3]);
ui->PPM_MultiplierDSB->setValue((qreal)(generalSettings.PPM_Multiplier+10)/10);
}
void HardwarePanel::on_txVoltageHardware_editingFinished()
{
generalSettings.txVoltageCalibration = ui->txVoltageCalibration->value()*10;
emit modified();
}
void HardwarePanel::on_serialPortMode_currentIndexChanged(int index)
{
generalSettings.hw_uartMode = index;
emit modified();
}
+46
View File
@@ -0,0 +1,46 @@
#ifndef HARDWARE_H
#define HARDWARE_H
#include "generaledit.h"
namespace Ui {
class Hardware;
}
class QLabel;
class AutoLineEdit;
class AutoComboBox;
class HardwarePanel : public GeneralPanel
{
Q_OBJECT
public:
HardwarePanel(QWidget *parent, GeneralSettings & generalSettings, Firmware * firmware);
virtual ~HardwarePanel();
private slots:
void on_txVoltageHardware_editingFinished();
void on_PPM1_editingFinished();
void on_PPM2_editingFinished();
void on_PPM3_editingFinished();
void on_PPM4_editingFinished();
void on_PPM_MultiplierDSB_editingFinished();
void on_txCurrentHardware_editingFinished();
void on_bluetoothEnable_stateChanged(int);
void on_serialPortMode_currentIndexChanged(int index);
protected:
void setupPotConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type);
void setupSliderConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type);
void setupSwitchConfig(int index, QLabel *label, AutoLineEdit *name, AutoComboBox *type, bool threePos);
private:
Ui::Hardware *ui;
void setValues();
};
#endif // HARDWARE_H
File diff suppressed because it is too large Load Diff
+99 -2
View File
@@ -12,6 +12,8 @@
#include "simulatorinterface.h"
#include "firmwareinterface.h"
Stopwatch gStopwatch("global");
const QColor colors[C9X_MAX_CURVES] = {
QColor(0,0,127),
QColor(0,127,0),
@@ -173,7 +175,7 @@ void GVarGroup::valuesChanged()
else if (sb)
weight = sb->value();
else
weight = dsb->value()/step;
weight = round(dsb->value()/step);
}
}
@@ -788,7 +790,13 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
}
BoardEnum board = GetCurrentFirmware()->getBoard();
SimulatorDialog * sd;
if (IS_TARANIS(board)) {
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)) {
for (int i=0; i<GetCurrentFirmware()->getCapability(Pots); i++) {
if (radioData.generalSettings.isPotAvailable(i)) {
flags |= (SIMULATOR_FLAGS_S1 << i);
@@ -995,3 +1003,92 @@ QStringList extractLatLon(const QString & position)
}
return result;
}
TableLayout::TableLayout(QWidget * parent, int rowCount, const QStringList & headerLabels)
{
#if defined(TABLE_LAYOUT)
tableWidget = new QTableWidget(parent);
QVBoxLayout * layout = new QVBoxLayout();
layout->addWidget(tableWidget);
layout->setContentsMargins(0, 0, 0, 0);
parent->setLayout(layout);
tableWidget->setRowCount(rowCount);
tableWidget->setColumnCount(headerLabels.size());
tableWidget->setShowGrid(false);
tableWidget->verticalHeader()->setVisible(false);
tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
tableWidget->setSelectionMode(QAbstractItemView::NoSelection);
tableWidget->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
tableWidget->setStyleSheet("QTableWidget {background-color: transparent;}");
tableWidget->setHorizontalHeaderLabels(headerLabels);
#else
gridWidget = new QGridLayout(parent);
int col = 0;
foreach(QString text, headerLabels) {
QLabel *label = new QLabel();
label->setFrameShape(QFrame::Panel);
label->setFrameShadow(QFrame::Raised);
label->setMidLineWidth(0);
label->setAlignment(Qt::AlignCenter);
label->setMargin(5);
label->setText(text);
// if (!minimize)
// label->setMinimumWidth(100);
gridWidget->addWidget(label, 0, col++);
}
#endif
}
void TableLayout::addWidget(int row, int column, QWidget * widget)
{
#if defined(TABLE_LAYOUT)
QHBoxLayout * layout = new QHBoxLayout(tableWidget);
layout->addWidget(widget);
addLayout(row, column, layout);
#else
gridWidget->addWidget(widget, row + 1, column);
#endif
}
void TableLayout::addLayout(int row, int column, QLayout * layout)
{
#if defined(TABLE_LAYOUT)
layout->setContentsMargins(1, 3, 1, 3);
QWidget * containerWidget = new QWidget(tableWidget);
containerWidget->setLayout(layout);
tableWidget->setCellWidget(row, column, containerWidget);
#else
gridWidget->addLayout(layout, row + 1, column);
#endif
}
void TableLayout::resizeColumnsToContents()
{
#if defined(TABLE_LAYOUT)
tableWidget->resizeColumnsToContents();
#else
#endif
}
void TableLayout::setColumnWidth(int col, int width)
{
#if defined(TABLE_LAYOUT)
tableWidget->setColumnWidth(col, width);
#else
#endif
}
void TableLayout::pushRowsUp(int row)
{
#if defined(TABLE_LAYOUT)
#else
// Push the rows up
QSpacerItem * spacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
gridWidget->addItem(spacer, row, 0);
#endif
// Push rows upward
// addDoubleSpring(gridLayout, 5, num_fsw+1);
}
+59
View File
@@ -2,6 +2,9 @@
#define HELPERS_H
#include <QtGui>
#include <QTableWidget>
#include <QGridLayout>
#include <QDebug>
#include "eeprominterface.h"
extern const QColor colors[C9X_MAX_CURVES];
@@ -201,4 +204,60 @@ private:
double toDecimalCoordinate(const QString & value);
QStringList extractLatLon(const QString & position);
class TableLayout
{
public:
TableLayout(QWidget * parent, int rowCount, const QStringList & headerLabels);
// ~TableLayout() ;
void addWidget(int row, int column, QWidget * widget);
void addLayout(int row, int column, QLayout * layout);
void resizeColumnsToContents();
void setColumnWidth(int col, int width);
void pushRowsUp(int row);
private:
#if defined(TABLE_LAYOUT)
QTableWidget * tableWidget;
#else
QGridLayout * gridWidget;
#endif
};
class Stopwatch
{
public:
Stopwatch(const QString & name) :
name(name), total(0) {
timer.start();
};
~Stopwatch() {};
void restart() {
total = 0;
timer.restart();
};
void report() {
qint64 elapsed = timer.restart();
total += elapsed;
qDebug() << name << QString("%1 ms [%2 ms]").arg(elapsed).arg(total);
};
void report(const QString & text) {
qint64 elapsed = timer.restart();
total += elapsed;
qDebug() << name << text << QString("%1 ms [%2 ms]").arg(elapsed).arg(total);
};
private:
QString name;
QElapsedTimer timer;
qint64 total;
};
extern Stopwatch gStopwatch;
#endif // HELPERS_H
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.2 MiB

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

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