Compare commits

..

1302 Commits

Author SHA1 Message Date
3djc 740356c4c2 Tested ok on X9E and HORUS dev, more test needed (#3802) 2016-09-14 18:59:08 +02:00
3djc 576c148b9c Add X12S keypad FIRST events to LUA (#3801)
* Add X12S keypad FIRST events to LUA

* X9E fix
2016-09-14 18:57:45 +02:00
3djc 8bafdb1725 3djc/faster local commit tests (#3800)
* Allow passing desired core usage for commit-tests (speed up local execution)

* Cosmetics

* Cosmetics

* Allow make style -j8 as well

* Looks better like this I think
2016-09-14 18:55:37 +02:00
3djc bbb2fe2dbc Merge pull request #3796 from opentx/3djc/Horus-fix-model-setup-pots
Fix model setup screen for Horus of pots and slides checks handling
2016-09-14 08:15:40 +02:00
3djc b4f957a166 Cosmetics 2016-09-14 08:01:07 +02:00
3djc 856cddbc84 Fix model setup screen for Horus of pots and slides checks handling
Note : this fix only the UI, another PR will fix behaviour
2016-09-13 20:21:37 +02:00
Bertrand Songis edee15b21d Typos 2016-09-13 20:16:48 +02:00
Bertrand Songis dbd47737cb Compilation fix 2016-09-13 19:39:23 +02:00
Bertrand Songis c3a07675e4 Compilation fix 2016-09-13 18:48:35 +02:00
Bertrand Songis 2b32abe467 [ARM boards] Model persistent timers / telemetry / pots positions were not always correctly saved 2016-09-13 18:35:03 +02:00
Bertrand Songis 4a88d3477d Fixes #3766 2016-09-13 18:31:57 +02:00
Damjan Adamic acebc53470 Fixes #3782: nl translations updated (by fraternl) 2016-09-12 21:22:53 +02:00
Bertrand Songis d44f98d677 Fixes #3770 2016-09-12 18:32:26 +02:00
3djc 4d44eb97f5 Add rotary encoder support (#3792) 2016-09-12 11:49:58 +02:00
Bertrand Songis 1684256ed2 Merge pull request #3791 from opentx/3djc/LUA-move-evt-to-event_t
Move lua evt param from signed uint8_t to unsigned event_t
2016-09-12 07:41:59 +02:00
3djc d84fd993c9 Move lua evt param from signed uint8_t to unsigned event_t 2016-09-12 07:20:06 +02:00
Bertrand Songis 0f217b3507 Compilation fix 2016-09-11 23:34:49 +02:00
Bertrand Songis 8a31c1d555 Merge pull request #3789 from opentx/projectkk2glider/issue_3771_sd_lockup
Projectkk2glider/issue 3771 sd lockup
2016-09-11 22:36:01 +02:00
Damjan Adamic 038c997b8f Disable GPS messages that are not needed
GPS RTC sync fixes
2016-09-11 21:53:45 +02:00
Damjan Adamic cb08d37369 Interrupts must stay enabled on Horus when pushing audio buffer from audio thread (this affected 1ms interrupt) 2016-09-11 21:53:45 +02:00
Damjan Adamic 0076dd99e0 SDIO timeout fixes 2016-09-11 21:53:44 +02:00
Damjan Adamic e229c8f8e7 Log file moved to RAM and aligned for proper DMA access. Log functions renamed. 2016-09-11 21:37:54 +02:00
Damjan Adamic 6ddb9e414f Getting rid of sdMountPoll() on ARM 2016-09-11 21:37:54 +02:00
Damjan Adamic 183b24086a Trace installed 2016-09-11 21:37:54 +02:00
Bertrand Songis 4d03db1c49 Merge pull request #3787 from opentx/3djc/Horus-fix-hard-setup
Fix column handling
2016-09-11 18:36:19 +02:00
Bertrand Songis c15b35fff2 Merge pull request #3786 from opentx/3djc/TARANIS-Fix-Pots-checks
3djc/taranis fix pots checks
2016-09-11 18:35:51 +02:00
3djc de479fe6fc Fix column handling 2016-09-11 13:50:45 +02:00
Andre Bernet 0d12832d30 Revert "[Horus] Fixes #3770 - needs tests"
This reverts commit f131c79b87.
2016-09-11 13:41:53 +02:00
3djc 5590feac0f Make column handling consistent. Simu tested on x9d, x9d+, x9e 2016-09-11 13:14:03 +02:00
Damjan Adamic 8e3a228fc9 Cleanup 3 2016-09-11 11:21:58 +02:00
Damjan Adamic 8899d70e08 Cleanup 2 2016-09-11 11:05:33 +02:00
Damjan Adamic 3653b06ad9 Cleanup 2016-09-11 10:58:59 +02:00
3djc 60dc0cc68c Fixes 2016-09-11 09:39:06 +02:00
3djc c9b590465c Fix 2016-09-10 20:14:01 +02:00
3djc 3b5e5ebfa3 The 4 sliders are now treated equally :)
WARNING :
-you WILL need to go in hardware menu to add the 2 missing sliders .
definition
- you also NEED to go to calibration (where you will now see the 4 sliders)
2016-09-10 19:31:18 +02:00
mhotar 35ebe455c0 CZ tts updated 2016-09-10 19:00:46 +02:00
Damjan Adamic 294611c457 Fixes #3772: USB Joystick channels were mapped incorrectly on Horus 2016-09-10 12:06:51 +02:00
3djc df7882e14f Yes, commit-check would have been a good idea :s 2016-09-10 11:12:45 +02:00
3djc 19fd1f2556 Finaly working on X9E, tested both man and auto 2016-09-10 10:40:54 +02:00
Bertrand Songis 95fc89ec67 Merge pull request #3779 from opentx/mhotar/fullczcharset
Reduced anf full cz charset for Horus and the others
2016-09-09 21:51:13 +02:00
3djc 42cdf71b8d Change language directly 2016-09-09 20:46:28 +02:00
3djc 77010ee7e3 TRACE test 2016-09-09 20:41:48 +02:00
3djc 6769dab121 NOT HORUS = cz_reduced 2016-09-09 09:13:55 +02:00
Arne Schwabe c0cc4e250e Fix polarity for last pulse with DSM2/Multi
The DSM/Multi timing changed the index to begin with 0 instead of 1 and that broke the putDSM2Flush logic
2016-09-08 23:01:13 +02:00
Bertrand Songis a61c206c38 Merge pull request #3778 from opentx/schwabe/fix_pulses_timing
Fix timing of Multi and DSM2 protocol
2016-09-08 21:26:28 +02:00
Arne Schwabe de3db6eec0 Fix timing of Multi and DSM2 protocol
We send an extra stopbit and the logic for driving the transistor was swapped. Thanks Mike for noticing (http://www.rcgroups.com/forums/showpost.php?p=35671709&postcount=5151)
2016-09-08 20:24:22 +02:00
Arne Schwabe 753b12f886 Compile fix for gcc 5 2016-09-08 20:23:39 +02:00
3djc 833d6a6b27 Add some missing plural forms, increment audio version 2016-09-08 08:52:51 +02:00
Bertrand Songis 4343bd9826 [Crossfire] Tx power enum was displayed instead of real value 2016-09-08 06:43:34 +02:00
Andre Bernet 15f62be1db Cosmetics 2016-09-07 19:19:15 +02:00
mhotar 610762a89d blue theme images 2016-09-06 22:40:17 +02:00
Bertrand Songis f131c79b87 [Horus] Fixes #3770 - needs tests 2016-09-06 20:12:24 +02:00
Bertrand Songis 3156dd3040 [Horus] Display problem in INPUT screen (no scroll) 2016-09-06 19:53:58 +02:00
mhotar f2218fa44d dmg background 2016-09-06 16:50:14 +02:00
Bertrand Songis a5e8deabac Merge pull request #3744 from opentx/schwabe/multi_new_protocols
Add new protocols supported by the DIY Multi module
2016-09-05 22:14:27 +02:00
Bertrand Songis 250bcde474 Merge pull request #3765 from opentx/3djc/Horus-add-timer3
Add timer3 as default on Horus
2016-09-05 22:12:58 +02:00
Bertrand Songis 1ac835d420 Cosmetics 2016-09-05 22:11:48 +02:00
3djc db326b6723 Make timer3 default for all arm boards 2016-09-05 20:20:19 +02:00
Bertrand Songis 9d94f26ed6 Merge pull request #3756 from opentx/projectkk2glider/gps_clock_to_rtc_improvements
Projectkk2glider/gps clock to rtc improvements
2016-09-05 19:44:09 +02:00
Bertrand Songis 5dd46afaac Merge pull request #3767 from opentx/schwabe/pxx_own_struct
[Horus] Give pxx its own substruct instead of using ppm (cosmetics)
2016-09-05 19:34:47 +02:00
Bertrand Songis cc2c2b094e [Horus] S.PORT devices update should work (not tested)
[Horus] SD Manager files renaming fixed (quick & dirty, I would prefer a popup)
2016-09-05 19:33:06 +02:00
Arne Schwabe c16317609f [Horus] Give pxx its own substruct instead of using ppm (cosmetics) 2016-09-05 15:57:27 +02:00
Arne Schwabe 17adab3177 Telemetry on MULTI default to FrSky Hub telemetry, not smartport 2016-09-05 15:47:11 +02:00
3djc 209f8d646c Add timer3 as default on Horus 2016-09-05 10:20:04 +02:00
Bertrand Songis fd138cf22a [X7D] Compilation fix 2016-09-04 22:27:36 +02:00
Bertrand Songis d178982ec5 Cosmetics 2016-09-04 20:10:16 +02:00
Bertrand Songis 9a525f453b [HORUS] Bigger checkboxes 2016-09-04 20:05:51 +02:00
Bertrand Songis 04651784b5 [X9D+] S3 not available if disabled in HARDWARE menu 2016-09-04 20:05:51 +02:00
Bertrand Songis 7100eb990e Merge pull request #3759 from opentx/3djc/Fix#3757
Fix #3757
2016-09-04 20:03:04 +02:00
3djc 3d1a35c41f The simu needs it too 2016-09-04 18:54:20 +02:00
3djc 7be125ee4d Fix #3757 2016-09-04 18:20:38 +02:00
Bertrand Songis 75fe828e21 [X9D+] SH was not working anymore 2016-09-04 16:32:15 +02:00
Bertrand Songis ba74f3e61c [X9D] Fixes #3758 (not tested) 2016-09-04 00:03:32 +02:00
Damjan Adamic 61e6e63856 Missing menu itema and compilation fix 2016-09-02 23:25:05 +02:00
Damjan Adamic 874483ba55 Compilation fixes 2016-09-02 23:07:58 +02:00
Damjan Adamic bbadf9064a Compilation fix 2016-09-02 22:48:20 +02:00
Damjan Adamic 37df6f1968 * GPS sensor date/time now kept in UTC (previous conversion to local time was wrong)
* internal GPS sensor can now set RTC clock [Horus]
2016-09-02 22:35:54 +02:00
Damjan Adamic f9a5c99f29 Code style fixes (uncrustify + manual) 2016-09-02 21:18:19 +02:00
Damjan Adamic d8a00c3f3d * Code refactoring for GPS to RTC clock
* Enabled GPS adjust RTC option for Horus
* Moved sensor ID to the right to allow display of GPS date/time in Telemetry screen
2016-09-02 20:47:56 +02:00
Bertrand Songis 2463a077b6 [Horus] Delay reduced for each step during calibration of the 6POS switch 2016-09-02 19:23:47 +02:00
Bertrand Songis 712be64016 [Horus] Cosmetics 2016-09-02 19:22:53 +02:00
Bertrand Songis b1cf4da7bb [Horus] Optimization for the Model Select screen (proxy design pattern) 2016-09-02 18:55:33 +02:00
Bertrand Songis aecf70158e Cosmetics 2016-09-02 18:54:32 +02:00
Bertrand Songis 3763552f4a Cosmetics 2016-09-02 18:53:36 +02:00
Bertrand Songis 061e163a62 [Horus + Taranis] Navigation improvement in the Trainer menu 2016-09-02 18:51:56 +02:00
Bertrand Songis 6225c048ef [Taranis] Display problem in the Mixer screen 2016-09-02 18:50:55 +02:00
3djc 07c4563764 Adjust languages for DB (#3754) 2016-09-02 17:49:05 +02:00
3djc 7bb5ece2c6 Regenerate sdcard pack only on opentx.sdcard.version change 2016-09-02 17:41:10 +02:00
3djc 580e4e71eb Sound generation change now ready to run 2016-09-02 10:13:54 +02:00
3djc 64b7369a51 FIX 2016-09-02 09:55:00 +02:00
3djc c089be96f5 Fix path on server 2016-09-02 09:52:25 +02:00
3djc 6ea6c2c8f1 Change sound generation for nightly to linux based 2016-09-02 09:46:38 +02:00
3djc 76def1195f Temporary disable sdcard regen on nightly 2016-09-01 23:58:33 +02:00
Andre Bernet 304445cd9d Reenable GPS 2016-09-01 23:57:11 +02:00
Andre Bernet b04452e6f9 [Horus] Fix backlight on beta again 2016-09-01 23:44:09 +02:00
Bertrand Songis 080891db7b [Horus] Better fix for Backlight on BETA boards 2016-09-01 23:26:56 +02:00
Bertrand Songis 98944e9cee [Horus] BL on BETA boards fixed 2016-09-01 23:06:20 +02:00
Bertrand Songis a9fcf514a1 Cosmetics 2016-09-01 22:48:28 +02:00
Bertrand Songis 6872f85c52 [Horus] Warning fixed 2016-09-01 22:46:10 +02:00
mhotar d30c7cc97d One CZ char was duplicated in translate.py 2016-09-01 21:02:08 +02:00
Bertrand Songis 16f2681050 [Horus] BL better like this on BETA boards? 2016-09-01 19:52:03 +02:00
Bertrand Songis c882095a81 Compilation fix 2016-09-01 19:43:29 +02:00
Bertrand Songis d5235d586d Cosmetics 2016-09-01 19:42:55 +02:00
Bertrand Songis 7a6e870f55 [HORUS] Backlight flickering on PROD radios 2016-09-01 19:42:37 +02:00
Bertrand Songis a3f42fb89f [ARM boards] S.PORT GPS was completely broken 2016-09-01 19:01:49 +02:00
Bertrand Songis ed70813e5f [Horus] DBLKEYS implemented (same keys than the 9X) 2016-09-01 19:00:47 +02:00
Bertrand Songis 70846d4add [Horus] GPS display fix 2016-09-01 19:00:12 +02:00
Bertrand Songis bf43aa839e [Horus] CZ font 2016-09-01 18:54:21 +02:00
Arne Schwabe e1a60b801a Add new protocols supported by the DIY Multi module 2016-09-01 13:09:13 +02:00
Andre Bernet caf0fca1c2 Fix #3743 2016-09-01 11:15:28 +02:00
Andre Bernet 723e4bf9c7 Temporarily disable buggy GPS lat/lon and time/date sensors 2016-09-01 08:51:58 +02:00
Andre Bernet 77d85b73bc Available audio files need to be listed again after a mass storage session 2016-09-01 00:18:08 +02:00
Bertrand Songis 4221bfdf74 [Horus] Attempt to fix the problem with some files after a massstorage session 2016-08-31 23:54:43 +02:00
Andre Bernet 76f0b306aa Fix timer display 2016-08-31 23:54:30 +02:00
Bertrand Songis fae55a21c6 [Horus] BOLD on the whole GVAR column (not only refs to other FMs) 2016-08-31 23:30:36 +02:00
Andre Bernet 55b3ea9b42 (untested) Merge remote-tracking branch 'origin/schwabe/fraternl_translation_3788' into next
# Conflicts:
#	radio/src/translations/nl.h.txt
2016-08-31 23:22:19 +02:00
Andre Bernet aaf7f67ebb Add getRAS to Lua interface (#3742)
* Add getRAS lua function

* Add warning

* Return nil is case of bad antenna

* Check for valid SWR

* Typo

* Cosmetic

* Clarify that it is 0x33
2016-08-31 23:12:18 +02:00
Bertrand Songis 830593d62e [Horus] SD hot mount if removed when the radio is ON 2016-08-31 23:06:39 +02:00
Andre Bernet 90e8748e12 Backlight in fatal error screen 2016-08-31 22:59:50 +02:00
Bertrand Songis 77065c7cfb Merge pull request #3740 from craftandtheory/next
Haptic feedback in lua scripts
2016-08-31 22:21:07 +02:00
Bertrand Songis f37c695590 Merge pull request #3741 from opentx/3djc/companion-disable-Horus
3djc/companion disable horus
2016-08-31 22:18:18 +02:00
Andre Bernet f6b43ae40f Don't leave a big dangling array... 2016-08-31 22:11:00 +02:00
floaledm 29642e379f Haptic feedback in lua scripts 2016-08-31 15:01:31 -05:00
Andre Bernet 37a0258b19 No more 2MB array on the stack 2016-08-31 21:57:53 +02:00
Andre Bernet 38886e31a4 Multipos improvements 2016-08-31 21:48:24 +02:00
Bertrand Songis 9639be152d [Horus] CZ fonts 2016-08-31 21:36:09 +02:00
mhotar 7e296db599 full cz charset for horus 2016-08-31 21:33:37 +02:00
Bertrand Songis 9c966515f2 [Horus] Fonts build error 2016-08-31 21:33:05 +02:00
Bertrand Songis 4e576efdd7 [Horus] Pots / Sliders default config was wrong. Is it better? 2016-08-31 19:48:17 +02:00
Andre Bernet c994260c85 Arguably cleaner flash size retrieval 2016-08-31 14:28:14 +02:00
3djc 03c969fa3c MAX_FSIZE moved to Horus max
dfu args adjusted for Horus
2016-08-31 12:28:02 +02:00
3djc 161f3be468 Fix FSIZE for Horus 2016-08-31 12:07:51 +02:00
3djc 842eb3e93a Prevent flash read 2016-08-31 11:09:43 +02:00
Andre Bernet 6bdb40ec81 Recent files fix 2016-08-31 10:50:44 +02:00
3djc fc4b43dfb1 Disable drag drop 2016-08-31 10:38:45 +02:00
3djc 2ebd89159c Recent files fix 2016-08-31 10:23:24 +02:00
3djc 585302d8a9 Disable recent file 2016-08-31 10:00:56 +02:00
3djc a8394b6400 Cosmetic 2016-08-31 09:26:37 +02:00
3djc 8de9f8e826 Disable Horus 2016-08-31 09:26:37 +02:00
Bertrand Songis f97eda2b4f Horus internal GPS: settable baudrate, misc fixes, new cmake options,… (#3736)
* Horus internal GPS: settable baudrate, misc fixes, new cmake options, cosmetics, cli

* Horus internal GPS: cmake changes, more CLI options, ability to send commands to the module

* Compilation fixes
2016-08-31 06:48:28 +02:00
Bertrand Songis e79258d8a2 [Horus] GVARS love 2016-08-31 01:06:25 +02:00
Bertrand Songis ca5c20abe3 getCPUUniqueId moved to STM32 common code 2016-08-31 01:06:00 +02:00
Bertrand Songis 82b9ecc155 [Horus] Refactoring for the new fatal errors 2016-08-31 01:04:11 +02:00
Damjan Adamic 590b0eaab7 Compilation fixes 2016-08-30 21:55:09 +02:00
Damjan Adamic ff37274e64 Horus internal GPS: cmake changes, more CLI options, ability to send commands to the module 2016-08-30 21:23:20 +02:00
Bertrand Songis 855814655e Cosmetics 2016-08-30 18:33:15 +02:00
Arne Schwabe 75b74da2bd Add translations from fraternl 2016-08-30 13:15:06 +02:00
Andre Bernet 7656450597 Fix #3737 2016-08-30 11:50:44 +02:00
Damjan Adamic 1ef91597ca Horus internal GPS: settable baudrate, misc fixes, new cmake options, cosmetics, cli 2016-08-29 23:22:46 +02:00
3djc 931c3f9d6a This fixes #3727 (#3729)
Fixes #3727

* Improve

* Cosmetics

* Cosmetics
2016-08-29 23:11:33 +02:00
Andre Bernet c793b492d2 Translation fixes 2016-08-29 22:27:45 +02:00
Damjan Adamic f0c2f10e27 Serial port SERIAL2 enabled [Horus] 2016-08-29 20:09:59 +02:00
Damjan Adamic 5a9eeaacc1 Added missing interrupt name [Horus] 2016-08-29 20:04:55 +02:00
Damjan Adamic 5cdb1e52d1 Cosmetics 2016-08-29 19:59:12 +02:00
3djc 7d6e96fe0c Add mintrim (#3732) 2016-08-29 15:48:42 +02:00
Andre Bernet 6038c0947f Reenable NL translation 2016-08-29 14:43:16 +02:00
Bertrand Songis 812ce55538 [Horus] SEGFAULT in calibration menu (new tests needed thanks!) 2016-08-29 14:05:25 +02:00
Bertrand Songis 5b9bd52737 [Horus] Warnings removed 2016-08-29 13:51:09 +02:00
Andre Bernet e6ac77a789 [Horus] Fix simu segfault, cosmetics 2016-08-28 18:15:26 +02:00
Damjan Adamic 89e0fd1e1d Re #3724: added smoothing filter for rotary encoder speed/acceleration calculation (#3726) 2016-08-28 18:00:54 +02:00
Andre Bernet 446ed3db59 Translation fixes 2016-08-28 17:55:25 +02:00
Damjan Adamic b71ba5b095 Cosmetics 2016-08-28 16:44:34 +02:00
Damjan Adamic 7522e54c83 More decimal places for small climb rates. 2016-08-28 11:38:38 +02:00
Andre Bernet 30eb2baed9 [Horus] Bitmaps now scaled to fit both dimensions and centered in desired zone 2016-08-28 11:28:29 +02:00
Damjan Adamic 504592ed18 Proper type for STICKS 2016-08-28 11:09:47 +02:00
Damjan Adamic 5446b4707d Wrong PPM_UNIT option value 2016-08-28 11:09:47 +02:00
Damjan Adamic 0c2fb5f7f1 Cosmetics 2016-08-28 11:09:47 +02:00
Bertrand Songis 2a9e299818 [Horus] SD version check simplified 2016-08-28 11:02:09 +02:00
Bertrand Songis 6071b1aa0d Compilation fix 2016-08-28 10:06:37 +02:00
Bertrand Songis 4377815c7b watchdogSetTimeout renamed to watchdogSuspend 2016-08-28 09:26:18 +02:00
Andre Bernet db79e2c53e [Horus] Translations, UI cosmetics 2016-08-28 09:01:53 +02:00
Bertrand Songis 506b24829c [Horus] Disable the WD timer on USB massstorage read/write 2016-08-28 08:47:51 +02:00
Bertrand Songis b105214e32 [Horus] Model name greater than Model99.bin allowed 2016-08-27 21:36:31 +02:00
Andre Bernet 3e960be9ce [Horus] Display model file name on model select screen 2016-08-27 20:46:42 +02:00
Bertrand Songis f5d589d23c [Taranis] EEPROM Conversions issues 2016-08-27 20:07:27 +02:00
Jim Taylor 34441618f8 Skip first record when calculating replay speed and set minimum repla… (#3715)
* Skip first record when calculating replay speed and set minimum replay speed to 100 ms.
Fixes issue 3708

* Cosmetics
2016-08-27 18:36:15 +02:00
Bertrand Songis 1d735f2bd3 [X9E/X7D] Rotary encoder navigation speed implemented (#3724) 2016-08-27 18:19:44 +02:00
Bertrand Songis 3cb64d984a [Taranis] EEPROM async write was disabled 2016-08-27 17:05:56 +02:00
Andre Bernet 508e3e899c Fix SD card version check 2016-08-27 15:11:54 +02:00
Andre Bernet c5346f6846 [Taranis] Fix bootloader freeze on USB disconnect 2016-08-27 13:31:15 +02:00
Bertrand Songis 9e334bfc84 [HORUS] Problem with Logs checkbox in Sensor menu 2016-08-27 11:59:23 +02:00
Bertrand Songis 879ca36fdb Typo 2016-08-27 09:50:11 +02:00
Bertrand Songis 7d1732b314 [HORUS] Curves on outputs were not taken into account 2016-08-27 09:49:37 +02:00
Bertrand Songis 76300ae92d [X9E] Calibration screen display problem 2016-08-27 09:48:04 +02:00
Bertrand Songis b8edea5c05 [X7D] LCD Reset is always needed 2016-08-26 11:36:06 +02:00
3djc 204b1b9627 This fixes #3718 (#3720) 2016-08-25 18:46:50 +02:00
3djc 9d9fdf81b4 Change audio generation files accordingly (#3717)
* Change audio generation files accordingly
New way of working :

units files are ALWAYS named in english based on the names in audio_arm.cpp names.
multiple form (singular, plural(s) are ammended with 0 to 4 suffix, according to languages rules. example : meter1.wav for first form of plural of meter unit,. This filename needs to be the same for all languages (in their respective directories of course)

* Care for gruin9x

* Better form

* Other languages

* Cosmetics
2016-08-24 23:43:56 +02:00
Bertrand Songis b69c2aa41c Cosmetics again ... 2016-08-24 20:39:22 +02:00
Bertrand Songis a95f9b7dde getSystemAudioPath renamed to strAppendSystemAudioPath 2016-08-23 21:07:40 +02:00
Bertrand Songis dd1ca93b70 getStringWithIndex renamed to strAppendStringWithIndex. It returns now the end of the string so that anything can be appended. 2016-08-23 20:51:40 +02:00
Bertrand Songis 643a731979 Cosmetics 2016-08-23 20:07:39 +02:00
Bertrand Songis f34de72e25 Cosmetics 2016-08-23 07:18:26 +02:00
Bertrand Songis 0ff601a3fa EEPROM simplification. Needs tests. (#3713) 2016-08-23 07:14:44 +02:00
Bertrand Songis c16ad94e3a SD card warning modified (fits now in 9X LCD)
Missing #ifdef for TELEMETRY flavours
2016-08-22 19:03:42 +02:00
Bertrand Songis 81c16212e0 Refactoring to prepare things for Horus flash support 2016-08-21 21:14:10 +02:00
Damjan Adamic 7dc75cf73f Debian package generation fixes for simulators (lib files were in the wrong directory, bunch of empty directories were included in package) 2016-08-21 20:51:05 +02:00
Damjan Adamic 9b7d97b441 Cosmetics (missing parts) 2016-08-21 19:43:47 +02:00
Damjan Adamic 64966c7d7d Cosmetics 2016-08-21 19:18:49 +02:00
3djc a043c6f649 fclose and cosmetics 2016-08-21 18:57:12 +02:00
3djc a63657df40 Warn also when control file cannot be opened 2016-08-21 17:42:35 +02:00
3djc 1164f30fd1 3djc/sdcard version check (#3709)
* Checking code

* Strings

* Fix

* Improvement

* Cosmetics
2016-08-21 16:45:04 +02:00
Bertrand Songis b657ca1862 Cosmetics 2016-08-21 12:41:12 +02:00
3djc cd2b6b3864 Horus pcdbrev10 support (#3707)
* Add PCBREV=10 to building options

* Cosmetics
2016-08-21 09:50:48 +02:00
Bertrand Songis d961879e0f [X12S] New test added for HORUS boards revision 1.0 2016-08-20 16:40:29 +02:00
Bertrand Songis 10aefb10db [X12S] GPS now OK 2016-08-20 16:36:32 +02:00
Bertrand Songis 91dc936ef3 [X12S] Crossfire module now OK 2016-08-19 19:26:34 +02:00
Bertrand Songis ed0cc9f1d4 [X12S] Modules on REV13 now OK 2016-08-19 17:13:09 +02:00
Bertrand Songis 0994735035 [X12S] Backlight code splitted from LCD code
[X12S] PCBREV introduction (PCBREV=10 or PCBREV=13)
2016-08-19 12:25:15 +02:00
Arne Schwabe 607e737b32 [X7D] Compilation fix for multi, check for displaysize instead of board. 2016-08-19 11:24:04 +02:00
Bertrand Songis 44e477965e Cosmetics 2016-08-19 11:20:12 +02:00
Bertrand Songis fcce94a868 [X12S] Radio calibration regression fix 2016-08-19 09:51:50 +02:00
Bertrand Songis f940fcdcd0 [X7D] Curve edit screen now OK 2016-08-18 18:49:47 +02:00
Bertrand Songis 3e4f3b2a8e [X12S] GPS low level driver added 2016-08-18 17:23:46 +02:00
Bertrand Songis 5d7f4ebc0b [X7D] Switch warning fix 2016-08-18 15:47:21 +02:00
Bertrand Songis 3160a7d878 Fixes #3704 2016-08-18 15:22:03 +02:00
Bertrand Songis 62071a959c Fixes #3704 2016-08-18 15:19:25 +02:00
Bertrand Songis 59083f4471 Fixes #3704 2016-08-18 13:38:46 +02:00
Bertrand Songis 71a8a69f32 Another fix for #3691 without the extra #ifdef in the main code 2016-08-18 11:54:33 +02:00
Bertrand Songis d3ae3c035d Bsongis/gui refactoring for x7 d (#3701)
* [X7D] New board added
* Cosmetics
2016-08-18 11:49:16 +02:00
3djc 282b856309 3djc/improve widgets (#3696)
* Add color option to Value widget

* Fix color handling
Add shadow effect
2016-08-14 20:36:44 +02:00
3djc 0fa7f6e132 Move default english to american, as english is defective (scottish instead) 2016-08-07 13:39:48 +02:00
3djc d55613aa26 urlencode model string to allow models like x9d+ (#3693) 2016-08-06 21:09:51 +02:00
3djc d62a985dcd Fix double type 2016-08-06 10:00:01 +02:00
Arne Schwabe 6559456534 Fix channel count on dsm2 module, purely cosmetic (closes issue #3673) (#3689)
Taranis menu always use 8 channels as default opposed to 9x and Horus, which use the maximum number as default channel count (which is 6 on dsm2). This commit does not change that logic.
2016-08-04 16:45:23 +02:00
Arne Schwabe d24f60f68b Horus Multi implementation implemented/tested by kilrah, add it to the options for the Horus 2016-08-03 16:29:01 +02:00
3djc f2d2677b2d Add CLI and Mass Storage to horus (#3682) 2016-08-03 16:24:30 +02:00
Arne Schwabe a908d73f1f Fix gcc 5.4 compiler warnings (#3681)
The order preference in flash_driver would evaluate ! before & but I think checking the bit first is what was intended
2016-08-03 16:24:01 +02:00
Arne Schwabe 9ea048f2ad Add the new protocols of v1.1.1 of multi (#3680) 2016-08-03 16:23:28 +02:00
Bertrand Songis 16199194b5 Cosmetics 2016-08-03 05:16:25 +02:00
Arne Schwabe 789a0ee548 Report unknown Spectrum sensors as raw sensors (#3679) 2016-08-03 05:11:43 +02:00
Bertrand Songis 7fbd963b3f Another big refactoring 2016-08-02 22:15:29 +02:00
3djc 52435703a0 3djc/telem rename (#3678)
* Rename EXT option to TELEMETRY

* Change test accordingly

* Rename FRSKY to TELEMETRY_FRSKY

* Rename ARDUPILOT to TELEMETRY_ARDUPILOT

* More renames (JETI, MAVLINK, NMEA)

* Fixes to make commit-test happy

* Further tests added to commit-test

* Cleanup

* Rename EXTSTD to TELEMETRY_NONE
2016-08-02 21:53:25 +02:00
Arne Schwabe 0b67d412a0 Schwabe/multimodule 9x (#3676)
* Fix Multimodule showing up as Crossfire when only multimode and not crossfire is enabled.

* Don't hardcode telemetry to be Frysky on non STM32 arm targets

* Port multi module code to 9X platforms

* Allow Spektrum telemetry protocol to be selected as protocol for the telemetry selection

* Fix infinite loop in spektrum code

* Fix cosmetics

Changes also done for Horus and Taranis UI where appropriate
2016-08-02 18:21:18 +02:00
Bertrand Songis d0527be2c4 Compilation fix 2016-08-02 08:04:03 +02:00
Bertrand Songis 0524f24ac6 hello.wav was not played anymore 2016-08-02 07:37:07 +02:00
Bertrand Songis ba681666a0 [9X with MAVLINK telemetry] Compilation fix 2016-08-02 00:04:52 +02:00
Martin Hotar 9a00f03843 Category images 2016-08-01 22:00:07 +02:00
Bertrand Songis 6d8b938706 Cosmetics 2016-08-01 21:48:49 +02:00
Bertrand Songis 22433a3a13 Compilation fix 2016-08-01 21:37:41 +02:00
Bertrand Songis ddfaa6f393 Compilation fix 2016-08-01 21:29:45 +02:00
Bertrand Songis 4d4b75d283 Compilation fix 2016-08-01 21:24:36 +02:00
Bertrand Songis 2ed742ebb7 Compilation fix 2016-08-01 21:18:37 +02:00
3djc 459ab91f09 Fix compilation warning on Horus. (#3677)
* Fix compilation warning on Horus. The // where added Jan25 as part of https://github.com/opentx/opentx/commit/5c71d74aabcafc0c8874de5970ae5c654ba5d9c1#diff-e7a8e42860fdbdf14bb250f27536fde6

* Better fix ?
2016-08-01 21:17:29 +02:00
Bertrand Songis 337ab74b8b Compilation fix 2016-08-01 20:44:30 +02:00
Bertrand Songis 9f37e7a0fb Macro renamed for #3675 2016-08-01 20:37:04 +02:00
Bertrand Songis ea095b2447 Forgotten files 2016-08-01 20:32:41 +02:00
Bertrand Songis 400faee588 Refactoring 2016-08-01 20:25:20 +02:00
3djc adeb53c726 Fix typo, thx schwabe 2016-08-01 19:00:51 +02:00
Bertrand Songis c5062d8c6a Duplicated bitmaps removed 2016-08-01 18:58:23 +02:00
Bertrand Songis 4df85d1047 Cosmetics 2016-08-01 18:52:29 +02:00
Bertrand Songis 6d2c5a4db6 Radio init / masstorage start / massstorage end / shutdown sequences … (#3674)
* Radio init / masstorage start / massstorage end / shutdown sequences reordering:

- More traces
- Fixes #3642
- Reuses idea of #3662

Still not finished and completely untested

* More traces

* Compilation fix

* Reuses the idea of #3652

* Alarms were checked 2 times on massstorage end
2016-08-01 18:39:34 +02:00
Bertrand Songis 6c34752907 Warnings fixed and remarks from #3666 taken into account 2016-08-01 07:16:33 +02:00
Bertrand Songis f74381bafa Merge branch 'schwabe/ar9x_test_and_fix' into next 2016-08-01 07:03:43 +02:00
Bertrand Songis 67eb04e44c Merge branch 'next' into schwabe/ar9x_test_and_fix 2016-08-01 07:03:17 +02:00
Bertrand Songis 351780bf17 [Horus] Correct alignment for massstorage buffer (increases speed) 2016-07-31 21:34:10 +02:00
3djc c2ed47d5d3 Wrong branch ... 2016-07-31 17:22:55 +02:00
3djc d00472b810 Initial nightly21 push 2016-07-31 17:10:37 +02:00
3djc b44dce4977 Initial 2.1 sdcards rework 2016-07-31 16:55:45 +02:00
3djc 5f06e06c55 Move build number increments to git 2016-07-31 13:44:48 +02:00
3djc ebe36e0154 Complete move nightly22 activities to github 2016-07-31 12:58:12 +02:00
Andre Bernet e72017977c No reason not to allow access to EEPROM when USB=MASSSTORAGE 2016-07-31 12:41:49 +02:00
Bertrand Songis 7bcac84253 rtc_driver moved to common/arm/stm32 2016-07-31 12:10:27 +02:00
Bertrand Songis a33b1d2659 [Horus] Masstorage reboots now gone? Still needed to mount again the SD after USB is unplugged 2016-07-31 11:21:18 +02:00
3djc 3728624486 Initial handling of nightly22 sdcard 2016-07-31 10:27:58 +02:00
Bertrand Songis e76c574439 Cosmetics 2016-07-31 09:46:44 +02:00
Bertrand Songis 319df44188 [Horus] Massstorage still used the cache 2016-07-31 09:45:50 +02:00
Bertrand Songis ba240abe64 Compilation fix 2016-07-31 09:05:25 +02:00
Bertrand Songis 4b2315f56b Compilation fix. Massstorage won't use disk cache anymore 2016-07-31 08:10:46 +02:00
Bertrand Songis 67ebadc9e0 Compilation fix 2016-07-31 07:24:23 +02:00
Bertrand Songis d4a54b5487 [Horus] Massstorage bugfix (read cache beyond end of disk) 2016-07-31 00:26:13 +02:00
Bertrand Songis fcdcccf8f5 [Horus] Massstorage bugfix (read cache beyond end of disk) 2016-07-30 23:30:52 +02:00
Andre Bernet 9d492b4faf Missing rename was causing crash 2016-07-30 21:22:22 +02:00
3djc 5fad5190dc Bring firmware names in line with latests changes (#3672) 2016-07-30 12:28:50 +02:00
3djc 4818efade6 Add some more build options to check more parts of the code (#3671) 2016-07-30 10:27:42 +02:00
Bertrand Songis e900ad6c49 Warnings removed 2016-07-29 21:26:14 +02:00
Bertrand Songis 85f3bd4ed0 [X9E] Massstorage OK? 2016-07-29 20:53:01 +02:00
Bertrand Songis e5bbf6766b USB Massstorage code refactoring 2016-07-29 16:43:39 +02:00
Bertrand Songis 51223a5864 No more REV9E and REVPLUS 2016-07-29 14:44:59 +02:00
3djc 0f740358f2 Streamline naming 2016-07-29 14:44:48 +02:00
3djc 5ac2288782 3djc/move (#3670)
* build-companion is now in /tools
update build-firmware for new targets

* remove PCBREV
2016-07-29 14:40:04 +02:00
3djc aa915e088b Fix compile 2016-07-29 13:45:30 +02:00
3djc 6dedf2ce65 Make +x 2016-07-29 13:29:24 +02:00
3djc 840a3b2a8a Adapt to new targets 2016-07-29 13:12:24 +02:00
Bertrand Songis 83cdd67e6a Bsongis/move everything (#3669)
* Directories moved

* Directories moved

* Directories moved

* Directories moved

* Directories moved

* rename horus directories in gui to 480x272

* Directories moved

* Rename taranis to 212x64

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Fix x9e compile

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Directories moved - TARANIS target removed, it's now X9E / X9D+ / X9D

* Minor improvement of path handling

* Another bunch of files renamed :)

* Another bunch of files renamed :)

* Another bunch of files renamed :)

* Another bunch of files renamed :)

* Another bunch of files renamed :)

* Rename 9x to 128x64

* Compilation fixes

* Compilation fixes

* Compilation fixes

* Compilation fixes

* Compilation fixes

* Compilation fixes
2016-07-29 12:47:20 +02:00
Bertrand Songis e3e0d970a5 Directories moved 2016-07-28 22:26:40 +02:00
Bertrand Songis f88e904009 [Horus] Massstorage under linux, still a problem remaining 2016-07-28 22:20:38 +02:00
Bertrand Songis 7e3cfc9b66 [Horus] No need for a reboot after Massstorage end, no? Unless we have written over the EEPROM, but on Horus it's not needed 2016-07-28 07:42:05 +02:00
Bertrand Songis c307e1987c [Horus] Massstorage again OK 2016-07-27 22:36:05 +02:00
Bertrand Songis ac86ebc229 Cosmetics 2016-07-27 22:35:30 +02:00
Bertrand Songis a3cfef3123 Previous commit reverted 2016-07-27 20:05:14 +02:00
Bertrand Songis b0b6ac2f69 Cosmetics 2016-07-27 19:13:56 +02:00
Bertrand Songis 8169ef92c0 Fixes #3608 2016-07-27 19:04:05 +02:00
Arne Schwabe 893ae215af Fix reading from initialized memory, fix not using fake program space for i2c 2016-07-26 00:14:16 +02:00
Bertrand Songis 3b90b0d6c0 [Crossfire] Lua script continued 2016-07-25 21:56:23 +02:00
Arne Schwabe 00ba66fe20 Readd the spektrum.cpp to arm CMake file that commit e25db7e removed 2016-07-25 21:12:44 +02:00
Arne Schwabe fdcc60b1b9 Fix AR9X build and add it to regular commit tests.
Note that simu still crashes on startup in the readRtc function
2016-07-25 16:49:04 +02:00
Nathan bea0411071 remove i6 code for now (#3663) 2016-07-25 06:53:19 +02:00
Bertrand Songis c97ba2bb83 Warning removed 2016-07-24 13:36:32 +02:00
Bertrand Songis 7e6b9ebf4f Igore list updated, build_all.sh at the root of the project removed
If needed we could move the radio/utils directory to /utils
2016-07-24 11:34:45 +02:00
Bertrand Songis ab6c6babae Cosmetics 2016-07-24 11:31:47 +02:00
Nathan e25db7e9e0 split up the cmakelist by target (#3661)
* split up the cmakelist by target

* new target for the flysky-i6

* organization per @bsongis suggestion
2016-07-24 06:55:58 +02:00
Bertrand Songis 0ad015f3e7 Cosmetics 2016-07-23 19:28:30 +02:00
Andre Bernet dd44da14bc Fix SE translations 2016-07-22 20:21:30 +02:00
Bertrand Songis 43d618a1de Cosmetics 2016-07-22 18:16:50 +02:00
Arne Schwabe 352de89838 Spektrum telemetry implementation (#3659)
* Implementation of Spektrum Telemetry for the DYI Multimodule.

I can only test a subset of sensors and these look okay

* Implement conversion from Fahrenheit to Celsius

* Minor fixes for Spektrum telemetry

* Add some more sensors, show sensor ID instead of instance in the overview
2016-07-22 17:38:11 +02:00
Arne Schwabe a28cbf88f3 Add cmake configuration for Libfox. (#3660)
* Add cmake configuration for Libfox.

CMake on OS X does not find libfox in the homebrew location otherwise

* Fix findpackage(Fox) for case sensitive systems
2016-07-22 17:35:49 +02:00
Andre Bernet 789326d2cd Cosmetics 2016-07-19 11:12:08 +02:00
Andre Bernet a11db7d73f Schedule mixer properly for new multimodule frame rate 2016-07-19 11:11:43 +02:00
Andre Bernet a6ceb56dcd Speed up multimodule output from 22ms to 9ms 2016-07-18 20:18:19 +02:00
Andre Bernet 0a1e913ecd French translations 2016-07-18 20:17:55 +02:00
Andre Bernet e33ae0e1ac Cosmetics, French translations 2016-07-16 14:51:32 +02:00
Andre Bernet 7babf26809 Multimodule ported to Horus (#3657) 2016-07-16 14:21:45 +02:00
Arne Schwabe 04c85942f1 Fix issues with translations of multimodule and make German translation more German 2016-07-16 13:59:29 +02:00
Arne Schwabe b432056698 Fix changing back from custom multi protocol selection to normal protocols 2016-07-16 13:35:29 +02:00
Arne Schwabe e2efe2ac70 [TARANIS] Reset option value to 0 on change of multi protocol, fix string overwriting for option value 2016-07-15 15:33:55 +02:00
Arne Schwabe 66e352d3c0 [Taranis] Multimodule: Fix off by one error that caused to need two presses instead of one when moving across the multimode option lines 2016-07-15 12:51:09 +02:00
Arne Schwabe f06c1e0be7 [Taranis] Fix overlapping strings in Multi module 2016-07-15 11:30:41 +02:00
Bertrand Songis e58bdff8a9 [S6R] ID changed 2016-07-13 18:44:31 +02:00
Andre Bernet a0476f0a7c Translation fix 2016-07-13 07:44:07 +02:00
Bertrand Songis b966db4fa5 [S6R] More fixes 2016-07-11 23:29:10 +02:00
Andre Bernet 78da936536 Compilation fix 2016-07-11 15:10:29 +02:00
Andre Bernet 35afe4c1ea Cosmetics 2016-07-11 13:15:50 +02:00
Bertrand Songis ea18909b46 [Crossfire] More field types supported 2016-07-10 23:37:33 +02:00
Bertrand Songis fed4450a8d [Horus] DE translations by Hrenz, thanks! 2016-07-10 10:58:28 +02:00
Andre Bernet 2dd30c228d No SQT5 font on Horus 2016-07-09 16:37:20 +02:00
Andre Bernet 6e6ff7d313 Compilation fix for nooverridech option 2016-07-09 16:15:27 +02:00
Bertrand Songis 3faa81d799 [Taranis] It's now possible to use killEvents() on PAGE_LONG in Lua standalone scripts 2016-07-09 12:39:54 +02:00
Bertrand Songis 0da921df0d [S6R] Fixes 2016-07-09 10:42:36 +02:00
3djc 2f8effb6d1 Add function name to debug output (#3647)
* Add function name to debug output

* Better english, hopefully :)

* Possible fix for not trying to run background widgets function when it does not exist

* Typos
2016-07-06 18:41:45 +02:00
3djc 53d8a615a0 update function is required if you don't want lua errors when not displayed. it can be empty, but since we have one, let's keep it counting ! (#3646) 2016-07-05 21:55:47 +02:00
Andre Bernet 49839b712b Release note windows had close button disabled (fix #3650) 2016-07-05 13:32:27 +02:00
Bertrand Songis e6c01cd140 [Taranis] The menu arrays were duplicated 2016-07-04 21:34:21 +02:00
Bertrand Songis 1f15636ca4 [Horus] configure_pins completely removed 2016-07-04 21:16:23 +02:00
Bertrand Songis c9b3fb2994 [Horus] Unused variables 2016-07-04 21:13:21 +02:00
3djc e5e02927af Fix colors on the new slowdelay bitmap (#3644)
Optimize code a little
2016-07-04 20:26:11 +02:00
3djc 4148643492 Cosmetics 2016-07-04 19:58:23 +02:00
3djc 9237d6af63 3djc/horus fine tune mixers setup (#3643)
* Optimize display for mixer setup

* Make mixer setup screen full icons

* - Display flighmode in SMLSIZE
- Add icon for it
- Space out things given then gain space

* Introduce SLOW_BLINK (half rate BLINK)
WARNING : code for both DS and single icon 'DS' is here, need cleaning before PR after choice is made

* Introduce snail and hourglass icons
Fine tuning

* Move to single icon column for DS (3 possibles icons)
Space things a little

* delayslow icon

* delayslow icon
2016-07-04 19:54:50 +02:00
Damjan Adamic 646170fe19 Taranis LCD driver: removed some unnecessary lines and cosmetics 2016-07-03 19:40:56 +02:00
Damjan Adamic c8638bae9d Cosmetics 2016-07-03 17:58:35 +02:00
Andre Bernet 88e9e6c6a4 Compilation fix, different definition needed for recommended pthreads version 2016-07-02 14:30:31 +02:00
Bertrand Songis e555cbbdba [Horus] REPEAT_LAST_CURSOR_MOVE did a key beep 2016-07-02 12:03:22 +02:00
Bertrand Songis 30f31450ce Cosmetics 2016-07-02 09:56:16 +02:00
Damjan Adamic 42aa06a166 Re #3635: added missing compound statements (ported from master) 2016-07-01 12:55:28 +02:00
Andre Bernet b48e14eeb9 Compilation fixes, snprintf now supported on VS2015 2016-06-30 23:39:04 +02:00
Bertrand Songis c777af2b72 Compilation error fixed 2016-06-30 23:06:03 +02:00
Bertrand Songis 5f03924b5f Compilation error fixed 2016-06-30 22:44:16 +02:00
3djc fef4bff9fa 3djc/horus cosmetics (#3640)
* Move miscellaneous bitmaps load to a specific function

* Adujst channel monitors colors for Darkblue
2016-06-30 20:36:11 +02:00
Bertrand Songis 9b7a4352d6 [Horus] Cosmetics in MODEL SELECTION screen 2016-06-30 19:32:40 +02:00
3djc e33c56d1eb 3djc/horus improve mixer setup (#3636)
* Rework to display bar on mixers, hence needs a more flexible drawSingleXXBar approach

* First working version
WARNING : displayMixConvertMask() DOES have a bug, do NOT PR without fix

* Fixed displayMixConvertMask() bug
Cosmetics on placement on status bar

* Cosmetics

* Improved graphics by mhotar !

* Fix for multiple lines mixers
Cosmetics

* Fine tune column values to handle more complex mixers lines

* Replace +=, *=, := by icons

* No needs to use mask bitmap

* Remove unwanted png file

* Fix handling and conversion of Mask to Bitmap

* use loadAndConvertMask here too

* Typo

* Screen layout fine tune

* - Move loadMaskOnBackground to framebuffer.cpp
- replace loadMaskAndConvert by loadMaskOnBackground

* Cosmetics

* Move new icons to theme loading

* Fine tune Mixer setup screen on darkblue
2016-06-30 18:53:07 +02:00
Bertrand Songis 2e78dad1a7 [Horus] Custom switch names badly displayed 2016-06-29 19:56:18 +02:00
Bertrand Songis 39c7e56b16 [Horus] Navigation line by line in COLOR widget settings 2016-06-28 23:26:28 +02:00
Bertrand Songis 6d57f55662 PPMCA option is now ON by default 2016-06-28 22:16:57 +02:00
Bertrand Songis 93f21bc18f [Horus] Move models from one category to another 2016-06-28 22:06:21 +02:00
Bertrand Songis ce63768df3 [Horus] Unused string removed 2016-06-28 21:28:27 +02:00
Bertrand Songis 2b845314f5 [Horus] Model move within a category 2016-06-28 20:01:06 +02:00
Damjan Adamic 25aab85c9b Fixes #194: added logging of TX battery voltage 2016-06-28 09:07:34 +02:00
Damjan Adamic 0f8b36fb3d Fixed C compiler warnings about "std=gnu++11" flag 2016-06-28 08:49:43 +02:00
Damjan Adamic 52bb358662 Fixes #2022: Logical switches logged in HEX format with LSW header label 2016-06-28 08:48:17 +02:00
Andre Bernet 7c57512f94 LSs weren't selectable as input source (Fix #3632) 2016-06-27 22:47:53 +02:00
Martin Hotar ad998f5787 Horus multiplex icons 2016-06-27 20:27:20 +02:00
Bertrand Songis 757bb55d81 [Crossfire] Parser improved with date / time 2016-06-27 19:14:44 +02:00
Bertrand Songis 8808c3aae6 [Horus] Trackpoint background 2016-06-27 19:14:15 +02:00
Martin Hotar 46ba761b8d Horus trackpoint background png 2016-06-26 21:48:49 +02:00
3djc 415dc10141 Simplify code (#3630) 2016-06-26 13:32:49 +02:00
3djc 4dcb4a7b10 Simplify code 2016-06-26 10:50:01 +02:00
3djc 0b2f188381 Replace graphics for limits, make them [] instread of ][ (#3629) 2016-06-26 09:36:56 +02:00
Bertrand Songis b0f9d69f7c [Horus] New model selection menu started 2016-06-25 19:39:29 +02:00
Bertrand Songis 4cc49d0d30 [Horus] Mouse analogs now OK 2016-06-25 18:16:05 +02:00
3djc 88511c1ba9 [Horus] Channels Monitor : cosmetics 2016-06-25 14:21:39 +02:00
3djc 1a77d1ffda 3djc/horus chan mon fix mixers limits (#3626)
* Review Channel monitor to handle mixers outside -100/100
Percentage values are now displayed on bar, for both mix and out

* Cosmetics (uncrustify)

* Channels monitor bars color and background now theme driven

* Add TEXT_STATUSBAR_COLOR (was ToDo)
Rename for consistency

* Replace text by graphic caption

* Cosmetics

* Remove unwanted vertical line on chanVal

* Tidy up code a little

* Tidy up

* Change green bar to grey
Introduce a space between outputs and mixers bar

* Partial cosmetics

* Fix bad copy/paste
2016-06-25 14:11:22 +02:00
Bertrand Songis 6861d6c8a4 [Horus] Mouse analogs hex values now OK 2016-06-25 08:36:51 +02:00
Bertrand Songis f69295b8f9 [Horus] Mouse analogs 2016-06-25 00:08:17 +02:00
Bertrand Songis 80291c73c4 [Horus] Nothing on Heartbeat PIN 2016-06-24 21:45:49 +02:00
Martin Hotar f697d36b1c Horus model library mask images and library icons (transparent png) 2016-06-24 11:26:25 +02:00
Andre Bernet 8119da792d VC++ compilation 2016-06-23 15:35:32 +02:00
Andre Bernet e282c02be2 VC++ compilation 2016-06-23 08:08:56 +02:00
Bertrand Songis ddc424de50 [Horus] Use of templates to avoid duplicated code in monitors screens 2016-06-22 23:09:02 +02:00
3djc 3ee9f56423 3djc/test combined mixer output mon (#3622)
* Merge outputs and mixers in a single 'bar'
View 8 per page

* Cosmetics

* Add proper icons for channels3 and 4

* Bars colors now fixed by overwhelmingly popular demand

* Fix outL outR display

* Add bottom line description to avoid confusion between outputs and mixers

* Cosmetics

* Typo
2016-06-22 22:51:11 +02:00
Bertrand Songis 38fdae6f1f Fixes #3609 - ``background()`` function in Lua function scripts 2016-06-22 18:32:51 +02:00
Bertrand Songis 0bcd0a0c09 [Crossfire] Fields update now OK (for text selection) 2016-06-22 07:29:21 +02:00
Bertrand Songis 155656c88a [Crossfire] Shorter traces 2016-06-21 22:50:01 +02:00
Bertrand Songis e64464ff9b [VC++] Compilation fixes 2016-06-21 20:25:17 +02:00
3djc ea562a2502 3djc/ls mon bugfix (#3618)
* First step into fixing the bug. One issue remains, when left encoding, it requires two exist

* Bsongis did magic again !

* Housekeeping
2016-06-20 21:12:46 +02:00
Bertrand Songis 732fea6c23 [Horus] Avoid loading bitmaps at full speed if they don't exist 2016-06-20 07:01:51 +02:00
3djc a26c5461ab Rearange long enter menu (#3614)
* Rearange long enter menu

* Remove duplicate
2016-06-19 14:26:53 +02:00
Andre Bernet 0c49f35687 New chat link 2016-06-19 13:10:40 +02:00
3djc 4ad8c79bc1 3djc/add logicial switches monitor (#3611)
* Prep work for Logic Switches

* Feature complete

* Fixe for sometime needing two RTN to get out of logical switchs monitor
All monitors title bar in upper case for consistency with the rest of OpenTX

* Cosmetics

* Add translations support to the MONITORS screens

* Add the right icon to the logical switch monitor

* Cosmetics

* uncrustify

* Cosmetics
2016-06-19 12:46:51 +02:00
Bertrand Songis d01b427127 [Horus] Improved fix for the BOLD | TINSIZE bug (it takes care of all impossible combinations now) 2016-06-19 08:50:16 +02:00
Damjan Adamic f1bdb931b8 Fixes #3549: disable trim processing in while shutdown is in progress, do no turn of the back-light before the shutdown (#3612) (ported from master) 2016-06-18 22:26:25 +02:00
Bertrand Songis 53b51cac94 Bsongis/crossfire refactoring (#3613)
* Crossfire refactoring

* Crossfire script now displaying fields

* Crossfire script now displaying text selection values
2016-06-18 22:16:50 +02:00
3djc ab58151f2a Fix for TINSIZE | BOLD. If called, BOLD is discarded (#3610) 2016-06-18 22:15:28 +02:00
Bertrand Songis dad37f36ba Cosmetics 2016-06-18 17:13:41 +02:00
Bertrand Songis e80d3ff642 Taranis hangs when compiled in DEBUG mode without CLI 2016-06-18 15:22:50 +02:00
Bertrand Songis 464996d3c3 Small refactoring in View channels 2016-06-18 00:36:41 +02:00
3djc 5ed74f1329 3djc/Mixer monitor (#3606)
* Add menu mechanics for 2 Mixers screens and 2 logical switches screens

* Add two mixer pages. To prevent errors, the Mixer bar are green (as opposed to red for outputs).

Icons for those pages are not yet the right ones

* Ready for mixers monitor PR
2016-06-17 23:54:35 +02:00
Bertrand Songis 4445f7cdec Bsongis/issue 3600 emergency shutdown (#3602)
* [ARM] Fixes #3600 - Emergency shutdown

* Compilation fix

* Function renamed

* Compilation fix

* Compilation fix

* Compilation fix

* Suggestion from projectkk2glider
2016-06-17 07:32:33 +02:00
Bertrand Songis 238943f4a2 Cosmetics 2016-06-16 16:06:12 +02:00
Bertrand Songis 900266be4a [Crossfire] Cosmetics 2016-06-16 15:18:32 +02:00
Bertrand Songis e50aa21dd2 [Crossfire] Devices parameters script started 2016-06-16 11:53:45 +02:00
3djc 98b1029bec 3djc/chan mon improve (#3604)
* Prepare for more flexibility (and a much better look)

* [Horus] Preparation for a new Channels menu

* monitor bar icons added

* Add ICONS structure and populate for MONITOR pages

* Restore old widget (had used it for temp work), will likely update to the newer look later

Functionnal output monitor 1,2, still need extended and overrides

* extended limits

* Overrides are now managed

* Back to Red ;)
Add outL outR to hightlight out of limits values

* Rewrite of posOnBar, as it was getting overly complex
subtrin now fulland more logicaly managed

* Fix overrides

* Center bar drawn last to be always visible

* Limits need to go through extend limits display calculation as well

* remove debug printf

* Add inverted output icon

* Tidy up and cosmetics
2016-06-16 10:14:53 +02:00
Bertrand Songis 9b5b9be50c [Crossfire] Telemetry packets are bigger 2016-06-15 22:19:10 +02:00
Bertrand Songis d51e86b669 [Horus] #3599 - Another emergency message when there is no SD 2016-06-15 19:59:18 +02:00
Bertrand Songis de52ee513c Cosmetics 2016-06-15 19:58:19 +02:00
Bertrand Songis 370f954e10 [Horus] #3599 - Crash in case of 0 model categories in models.txt (which happens at least when SD is not present) 2016-06-15 19:57:35 +02:00
Bertrand Songis d287027502 menu_model_custom_functions renamed to model_special_functions 2016-06-15 19:37:32 +02:00
Bertrand Songis f5a4d51c8f [Horus] Bug in Special functions contextual menu (when the Volume function was used) 2016-06-15 19:23:23 +02:00
Bertrand Songis c172d9727c [Crossfire] Telemetry logs parser 2016-06-14 21:50:50 +02:00
Bertrand Songis c0d53f4506 [Horus] background.bmp renamed to background.png 2016-06-14 21:29:58 +02:00
Andre Bernet 88b655764d [Horus] Encoder speed tweaks 2016-06-14 19:26:41 +02:00
Bertrand Songis 4519dadee4 [Horus] Rotary encoder now has 3 speeds. To be ported to X9E if it's good 2016-06-13 20:56:09 +02:00
Damjan Adamic d5e4f1132b Fixes #3595: show value of persistent sensor after power on, before the telemetry is received 2016-06-13 20:29:00 +02:00
Arne Schwabe 95641d649d [HORUS] Fix compiling Horus with Dangerous module functions 2016-06-12 21:11:10 +02:00
3djc 5a3fc73946 Add scale to lcd.drawBitmap. Scale is like in % (50 divides by two, 200 doubles) (#3592)
Default scale to 0 to allow DMA in target function (thx Bertrand)
2016-06-12 16:01:05 +02:00
Bertrand Songis f415f38ba6 Compilation fix 2016-06-12 15:27:55 +02:00
Bertrand Songis 21075d5a4c Compilation fix 2016-06-12 13:41:50 +02:00
Andre Bernet 4226b7c89b Fix overlap in numbered sound file names 2016-06-12 12:02:51 +02:00
3djc ac953cdcc8 3djc/document lua bitmaps (#3588)
* Create lua doc for previously added Horus bitmaps functions

* Cosmetic
2016-06-12 10:52:02 +02:00
Neil Horne dd12d09c92 Issue 3473 port to next (#3587) 2016-06-12 10:49:59 +02:00
Bertrand Songis 13558214a8 Compilation fix 2016-06-11 23:41:18 +02:00
Martin Hotar db741860c1 companion splash22 (#3586) 2016-06-11 23:41:21 +02:00
Bertrand Songis e219446703 Compilation fix 2016-06-11 23:15:55 +02:00
Bertrand Songis 862fa5525e [Crossfire] Upstream link development started 2016-06-11 20:05:51 +02:00
Andre Bernet 8523a2fdaf Translations cleanup 2016-06-11 19:03:29 +02:00
Bertrand Songis 1f87920fe4 Compilation fix 2016-06-11 18:40:45 +02:00
Bertrand Songis 6fac983c8a EEPROMS directory renamed to EEPROM 2016-06-11 18:24:23 +02:00
Bertrand Songis c5096ff531 Main view index now stored in model settings instead of radio settings 2016-06-11 18:09:18 +02:00
Andre Bernet 22efe664d5 [Horus] Prevent Value widget from being invisible when telemetry isn't available and it's displaying a telemetry value 2016-06-11 17:22:20 +02:00
Bertrand Songis 6db0c0791a [Horus] Current model overwritten in MODEL SELECT when selecting a new model 2016-06-11 13:53:53 +02:00
Bertrand Songis 1db3e1f816 [Horus] Current model overwritten in MODEL SELECT when selecting a new model 2016-06-11 13:30:53 +02:00
Bertrand Songis 99cce1b33f BMP and FIRMWARES renamed to IMAGES and FIRMWARE 2016-06-11 10:23:05 +02:00
Bertrand Songis bdae43c091 menu_general_XXXX should be renamed radio_XXXX
Second file done :)
2016-06-11 10:17:18 +02:00
Bertrand Songis ec2b5d66cb menu_general_XXXX should be renamed radio_XXXX
First file done :)
2016-06-11 10:15:34 +02:00
Bertrand Songis 6fd538f30e [Horus] Months translations 2016-06-11 09:03:51 +02:00
Bertrand Songis d77662b53e [AVR] DSM2 re-added 2016-06-11 08:58:09 +02:00
Bertrand Songis 71e71f8314 New translations 2016-06-11 08:57:31 +02:00
Bertrand Songis 17ab2c83aa [Horus/Taranis] Pulses cosmetics 2016-06-10 23:37:26 +02:00
Bertrand Songis 575eb3d0d1 [Horus] MODEL SELECT bug fixes 2016-06-10 23:35:54 +02:00
Bertrand Songis c22818442e [Horus] Problem when resizing transparent bitmaps 2016-06-10 23:35:16 +02:00
reichi 0c926e5d19 Allow software based volume control (#3556)
* Allow software based volume control
- enable it for AR9X
- rename "HARDWARE_VOLUME" defines to "MASTER_VOLUME"
- adjust build-firmware.py and fwoptions.py

* Software based volume control: Do it right

* whitespace cleanup

* software volume: cleanup/revert some leftovers of undone changes
2016-06-09 22:50:06 +02:00
Neil Horne beb21ab7db Fixes #3547: Flight modes linked trims display value (#3568) (ported from master) 2016-06-09 19:37:22 +02:00
Bertrand Songis a7e1867878 [Horus] Category rename was not saved on SD 2016-06-09 18:20:15 +02:00
Bertrand Songis 0f33b1b0a9 [Horus] Comment from @projectkk2glider taken into account 2016-06-09 18:08:55 +02:00
reichi 8606e75f45 Add Support for the DS3231 RTC and enable it for AR9X, refs #3531 (#3555)
* Add Support for the DS3231 RTC and enable it for AR9X, refs #3531

* fix compile for PCB=sky9x

* rtc ds3231: Add missing OpenTX headers
2016-06-09 17:58:42 +02:00
Bertrand Songis 0c66f520a2 [Horus] Small bug with Trainee 2016-06-08 22:32:11 +02:00
Bertrand Songis f488ebc1f5 [Horus] I forgot this part for PPM pulses ... 2016-06-08 22:19:54 +02:00
Arne Schwabe 5bcde76ca0 Add the ARR change to multi in the same way as for DSM2 in commit 404c5a8 2016-06-08 22:23:45 +02:00
Arne Schwabe 540faa51bf Use __ALIGNED instead of __DMA which is identical to __DMA without the section on Hours 2016-06-08 22:04:40 +02:00
Bertrand Songis 010d9d9629 Warning removed 2016-06-08 20:37:16 +02:00
Bertrand Songis 404c5a8553 [Taranis] Trainer / Trainee again OK. Not tested on Horus 2016-06-08 20:26:30 +02:00
Bertrand Songis 1a7a07dffd [Horus] MODEL SELECT current model refresh bug 2016-06-08 19:45:03 +02:00
Bertrand Songis 4588c0119d [Horus] Cosmetics 2016-06-08 19:44:02 +02:00
Bertrand Songis 43387d1794 Simu SEGFAULT 2016-06-08 19:43:36 +02:00
Bertrand Songis d2180d9429 [Horus] Cosmetics 2016-06-08 19:42:37 +02:00
Bertrand Songis 238ef2be38 [Horus] In MODEL SETUP screen BEEP center settings are visible even when INVERS 2016-06-08 19:41:44 +02:00
3djc 177f672619 Fix #3539 on Next (#3573) 2016-06-07 23:33:27 +02:00
Arne Schwabe 0c525826b4 Fix alignment bug of pulses data array (#3575)
The second element of the modulePulsesData was never forced to be correctly aligned. Without the new
pulses and without the Multimodule code the second element was never misaligned since the PXX pulses
union member was always the largest member and was 4 byte aligned by coincidence, also making the
second modulePulseData array member 4 byte aligned.

With the Multimodule option enabled the dsm pulses struct becomes the largest union member with 607 bytes
and the second modulePulsesData is not aligned to anything anymore which completely screws up the pulses
generation.

Forcing the alignment of the ModulePulsesData fixes this issue.
2016-06-07 23:32:51 +02:00
Bertrand Songis e3d22300ed [Horus] Model Select bugfixes 2016-06-07 20:35:17 +02:00
Bertrand Songis 06bef98a05 [Horus] Model bitmaps can now be either BMP or JPG or BMP 2016-06-07 20:35:17 +02:00
Bertrand Songis 5822cfded1 [Horus] Options in widgets can now have a min and a max defined 2016-06-07 20:35:17 +02:00
Bertrand Songis 3940716b5d [Horus] Cosmetics 2016-06-07 20:35:17 +02:00
Bertrand Songis 8493a393fd Problem with directories in simulator when listing files 2016-06-07 20:35:17 +02:00
Bertrand Songis 5ee95c472a Telemetry units shifted on all AVR boards 2016-06-07 20:35:17 +02:00
Arne Schwabe b6d4442ba1 Fix interrupt handler not handling multiprotocol (Pulses fix) (#3570)
* Fix interrupt handler not handling multiprotocol

* Use proper Macros in driver, remove wrong comment about ppm
2016-06-07 07:31:35 +02:00
Arne Schwabe 36423db252 tell dfu-util to boot the device to boot after flashing (#3571)
Only tested on my X9D+. It allows me to boot the device into the OpenTX firmware by using 'make flash' (on switch must be on), combined with -DUSB=SERIAL and -DCLI=YES and the reboot command I can test a new firmware on the device without removing/plugging the usb cable
2016-06-06 22:22:27 +02:00
Bertrand Songis 0ea133e490 Compilation fix (with gcc 4.9) 2016-06-06 22:07:45 +02:00
Bertrand Songis 4be6cfccab [Taranis] Crossfire "Flight mode" telemetry sensor now OK 2016-06-06 21:59:49 +02:00
Bertrand Songis 14f4eec6f7 [Taranis] Icon in top bar when DEBUG options enabled 2016-06-06 21:58:16 +02:00
Bertrand Songis 01e7c249f6 [Taranis] Cosmetics in SENSOR screen 2016-06-06 21:57:25 +02:00
Bertrand Songis 0eba4596d0 [Horus] Black icon in left top corner when DEBUG options enabled 2016-06-06 21:47:39 +02:00
Arne Schwabe 81733b10cc [Companion] Implement print functions for the hell setup screen (fixes 3430) (#3554)
Fixes #3430: added print functions for the hell setup screen
2016-06-06 21:01:49 +02:00
Bertrand Songis 2cccb99e28 [Telemetry] Shift in telemetry units 2016-06-06 20:43:14 +02:00
Bertrand Songis c20b0b8de4 [Horus] MODEL SELECT screen continued 2016-06-06 20:16:11 +02:00
Bertrand Songis 0cf3a278e8 [Horus] MODEL SELECT screen continued 2016-06-06 19:36:18 +02:00
Bertrand Songis f6b9a0fcdb [Horus] Black icon in the left top corner in case we are in DEBUG mode (WATCHDOG_DISABLE / TELEMETRY_LOGGING) 2016-06-06 19:30:13 +02:00
Bertrand Songis 1be84e3b6d [Horus] Cosmetics in CALIBRATION screen 2016-06-06 19:10:29 +02:00
Bertrand Songis 74fd8fc435 [Horus] Arrow keys disabled in Model Select 2016-06-06 19:09:33 +02:00
Bertrand Songis 3d117efae1 [Horus] Crash when renaming model category 2016-06-06 19:08:46 +02:00
Bertrand Songis 0cf81a7245 [Taranis] ADC DMA moved for X9E 2016-06-06 19:01:09 +02:00
Bertrand Songis 5ff6341a34 [X9E] More constants to hal.h 2016-06-06 18:56:16 +02:00
Bertrand Songis 69f2acca35 [X9E] Compilation fix 2016-06-06 18:48:15 +02:00
Bertrand Songis 6f2ece9cd0 [X9E] I move constants to hal.h first 2016-06-06 18:45:14 +02:00
Bertrand Songis 7ef9992349 Bsongis/horus xjt external module (#3566)
* [Horus] PXX and DSM2 in external module
* [Taranis] Pulses driver refactoring (uses DMA also for PPM in external module and saves 800bytes RAM)
* Cosmetics (Pulses driver splitted)
2016-06-05 22:34:16 +02:00
Bertrand Songis 5767be27b6 [Crossfire] New frame ATTITUDE added 2016-06-04 12:36:37 +02:00
Bertrand Songis 068fa45a06 [Horus] The backlight becomes ON when the PWR button is pressed 2016-06-04 09:30:37 +02:00
Bertrand Songis 348526b5ba [Horus] Just one DMA trace added to the CLI to start with something... 2016-06-04 09:29:40 +02:00
Bertrand Songis a9f518c3a0 [Taranis] Asterisk icon when WDT is disabled or TELEMETRY_LOGGING enabled 2016-06-04 09:28:27 +02:00
Bertrand Songis 8f0a47b724 [Horus] Cosmetics 2016-06-04 09:27:34 +02:00
3djc f6f43ee438 3djc/tiny batt check (#3565)
* Add tiny size for top bar

* Fix volatage with %2.2f format

* There are case where one is better than two :D
2016-06-03 17:08:22 +02:00
3djc 98ee2f8f52 Small fix to allow better display of widget label when selecting widget (#3562) 2016-06-03 09:36:32 +02:00
3djc 90cb89e86a 3djc/improve widget setup (#3557)
* Draw widget name on title bar, posistioning rules will need to be improved !

* Move the name inside the widget and invert it to create like a label

* - Move implemeentation to a 'label' form upper right. Works with all current widgets but Battcheck (that I'll modify acccordingly), moving on, widgets dev know what to expect.
- Possible improvement : fade out label display after 2 secs

* Cosmetics
2016-06-03 08:46:14 +02:00
3djc cfcdf3c3f8 3djc/columns hints (#3561)
* Fix columns trim5 and trim6 for Horus

* - Try a more translator friendly way to deal with the Horus increased columns size

* Fix commit

* Proof of concept

* More languages

* -Introduce HINT()
-Remove HR instead of TR
2016-06-02 23:01:44 +02:00
Bertrand Songis f1d1bc9d95 [Horus] Cosmetics 2016-05-31 20:23:09 +02:00
Bertrand Songis 52e59fc85b SWR now only available in debug screens (not a telemetry sensor) 2016-05-31 20:23:09 +02:00
Bertrand Songis 61420db3ff Cosmetics 2016-05-31 20:23:09 +02:00
Arne Schwabe 3a63c9edea Fixes #3510: Fix heli inversion not correctly shown/saved from Companion on Radios without virtual inputs (#3517) 2016-05-31 19:04:49 +02:00
Bertrand Songis 086632003b [Horus] Column names are back + A small description in the status bar ... 2016-05-30 17:11:10 +02:00
Bertrand Songis 60334a3cf2 [Horus] Cosmetics 2016-05-30 17:04:43 +02:00
3djc f7ba671034 - Improve messages for clarity that FLVSS sensor is neeeded (#3551) 2016-05-30 09:32:51 +02:00
Andre Bernet bbd79f57ee Translation fixes, remove warnings 2016-05-27 11:35:20 +02:00
Andre Bernet ff9278cb0b [Horus] Long press ENTER on mix move/creation would switch weight to GV mode (fix #3539) 2016-05-27 11:14:38 +02:00
Andre Bernet 38cba03556 Compilation fix 2016-05-27 11:04:01 +02:00
Damjan Adamic 79b2015b6e Re #3536: cosmetics 2016-05-26 20:41:48 +02:00
Stephen Street 7dac0ba81b Allow companion to install in non-default location on linux (#3533) 2016-05-26 18:21:13 +02:00
3djc 4fcf8ab7ff Native channel monitor widget (#3530)
* Commit following git issues

* Remove unseless floor()

* Fix cmake resources compile problem

* Better fix for cmake resources compile problem

* - overdraw rectangle on gauge (looks better)
- use divRoundClosest

* Cosmetics
2016-05-26 18:20:48 +02:00
Bertrand Songis d471dc6216 Cosmetics 2016-05-26 18:19:24 +02:00
Bertrand Songis 1246c7d916 Merge branch 'Ingwie-next' into next 2016-05-26 18:18:08 +02:00
Ingwie d1d3f7fa0a MEGA2560 the first PPM pulse in the frame longer. #2938 is missing in next 2016-05-26 12:34:28 +02:00
Ingwie 116802c946 [MEGA2560] KS108+ Voice+Splash "far" (#3534)
+little option (not defined) to reduce encoder resolution
2016-05-26 06:33:09 +02:00
Damjan Adamic 74adc1c7e6 Fix cmake resources compile problem 2016-05-25 23:17:36 +02:00
Damjan Adamic 829b86da99 Cosmetics 2016-05-25 22:14:10 +02:00
BenZoFly 0eda971365 Fixes #3518: GVar combobox not being refreshed when GV checkbox (re-)selected (ported from master) 2016-05-25 22:14:10 +02:00
Bertrand Songis 5f65217124 [MEGA2560] Add KS108 lcd + voice + "far" splash for firmware > 64Kb (#3515) 2016-05-25 21:21:51 +02:00
Bertrand Songis 907b6337fc [Horus] Impossible to remove widgets in layouts 2016-05-25 14:00:48 +02:00
Bertrand Songis c9e9087ec9 Cosmetics 2016-05-25 13:48:10 +02:00
Bertrand Songis 231499e191 [Horus] Bitmap class and lcd.drawBitmap() added 2016-05-25 11:48:38 +02:00
Bertrand Songis b7ad1ea226 [Horus] Impossible to remove widgets in layouts 2016-05-23 21:20:55 +02:00
Bertrand Songis 144710f1f7 S6R bitmaps improved 2016-05-23 19:34:03 +02:00
Damjan Adamic 03b4797073 Compilation fix (DEBUG_INTERRUPTS) 2016-05-23 19:08:16 +02:00
Damjan Adamic 06fce5108e Closes #3505: add fuel quantity sensor in telemetry simulator (#3506) (ported from master)
* Closes #3507: raise max RPM in telemetry simulator to 2147483647 (0x7FFFFFFF)
2016-05-23 18:49:46 +02:00
Arne Schwabe 957bc11135 Also always use the usb id in make flash like Companion does
On my mac the internal usb keyboard also registers as DFU device, making make flash quit with an error that multiple DFU devices are detected
2016-05-23 18:05:57 +02:00
3djc 4765984900 Use only CUSTOM_COLOR, (#3523)
* Use only CUSTOM_COLOR, seem to have no interaction with the rest of the system, albeit issue reports where neither very precise or reproductible

* Fix Xlarge

* Fix medium and large
2016-05-22 20:42:06 +02:00
3djc 8bcbd0f7f6 Give BattCheck a 'selective' memory, that is forget about lowest cell when you change lipo without changing model or turning radio off (#3521) 2016-05-22 11:54:45 +02:00
Bertrand Songis d73e4a6fbf Compilation fix 2016-05-22 11:48:21 +02:00
Bertrand Songis e97fe93a2e [Horus] SBUS trainer mode removed 2016-05-22 11:14:57 +02:00
Bertrand Songis 55c69a4448 [Horus] Trainer driver fix (I tested both master and slave modes) 2016-05-21 20:08:20 +02:00
3djc c614b1ac67 Proper implementation of update to monitor cells when not displayed on screen (#3520) 2016-05-21 19:19:07 +02:00
Bertrand Songis 9b72be1f97 [Horus] Trainer driver fix 2016-05-21 15:19:42 +02:00
Bertrand Songis 36df7900af [Horus] Trainer driver fix 2016-05-21 15:06:03 +02:00
3djc d1e7b66f1a 3djc/batt check widget (#3519)
* Completely rewrite drawing sections to allow MUCHO easier size or position change.

* First take at large widget, missing fine tuning of displayed item, and background data collection

* Comparing lower cell with their live counterparts is so much better

* Make use of newly introduced update() function

* Tidy up
2016-05-21 14:15:39 +02:00
Bertrand Songis cfbec2cad9 Option DBLKEYS (default=enabled) added on all boards, except 9XR and 9XR-PRO 2016-05-21 11:27:17 +02:00
Bertrand Songis 7a2c0b3b88 [Horus] Widget::update added to the Lua interface (called when options are modified) 2016-05-21 11:08:01 +02:00
Damjan Adamic 0fad67a8ea Switch warning fix for Horus (#3516) 2016-05-20 23:05:32 +02:00
Bertrand Songis f3d6dfea94 Revert a quick & dirty change -std=gnu++11 2016-05-19 22:33:45 +02:00
3djc e032215186 Add widget not configured management (#3511)
Widget size 1/2 now available also
2016-05-19 18:08:26 +02:00
Bertrand Songis 32576b6f72 LUA option added to automatic builds 2016-05-19 07:00:27 +02:00
Bertrand Songis 7a98a85bc5 Cosmetics 2016-05-19 06:43:52 +02:00
Damjan Adamic 29a139559d Re #2999: More strict SBUS frame check (only allow 25 byte frames, ch… (#3501)
* Re #2999: More strict SBUS frame check (only allow 25 byte frames, check end byte)

* SBUS fixes
2016-05-19 06:30:19 +02:00
Bertrand Songis 7eba760797 Compilation fix 2016-05-18 22:21:44 +02:00
Bertrand Songis 6f8bfa8da5 Compilation fix 2016-05-18 22:04:41 +02:00
Bertrand Songis 9056e76460 [Taranis] RIGHT attribute added + TELEMETRY page splitted 2016-05-18 21:52:16 +02:00
Bertrand Songis 5d42c437a8 S6R Lua script fixes 2016-05-18 21:50:17 +02:00
Bertrand Songis 633af68fa9 [Horus] background function added to widgets 2016-05-18 18:49:06 +02:00
Bertrand Songis 1da69e4066 Dockerfile updated (zip needed for sd packs) 2016-05-17 23:52:47 +02:00
Bertrand Songis c13b5d064c [Taranis] S6R script splitted into 3 pages, bitmaps added, calibration added (still no answer from X6R) 2016-05-17 23:43:13 +02:00
Bertrand Songis f27a87dea4 toInt16 function added 2016-05-17 23:41:05 +02:00
3djc 4268ce9eca 3djc/batt check widget (#3498)
* Add 1/4th screen widget (in addition to existing 1/8th)

* Batt+ filled white

* Cosmetics

* Review copyright and zone handling
2016-05-17 06:56:35 +02:00
Damjan Adamic 8eda8244c6 Re #2826: Lua API: doc update for Cels- and Cels+ 2016-05-16 22:01:06 +02:00
Damjan Adamic 67c0326cca Re #2826: Lua API: return proper values for Cels- and Cels+ 2016-05-16 21:36:19 +02:00
Arne Schwabe 164844319a Remove "*.exe" from german translation for Unix/Mac (closes #3500) 2016-05-16 18:23:10 +02:00
Bertrand Songis aed4bf3709 Wizard images commited by mistake 2016-05-16 10:30:49 +02:00
Damjan Adamic a0feed7f4d Fixes #3492: better implementation of delay_01us() using Cortex system cycle counter (#3497) 2016-05-15 14:30:32 +02:00
Bertrand Songis 3f74d54fd9 RIGHT exported to Lua 2016-05-15 13:05:51 +02:00
Bertrand Songis f2d778e74e Curves fix for #3317 ported to 'next' 2016-05-15 08:30:32 +02:00
Damjan Adamic 1d4e6101ba Projectkk2glider/issue 3317 curves (#3451)
* Fixes #3317: curve Preset and Clear fixes

* Re #3317: cosmetics
2016-05-15 07:57:05 +02:00
Damjan Adamic 59653f9ca6 Fixes #3492: delay_01us() and delay_ms() functions were generating wrong delays (6 times shorter on Taranis, 8 times on X9E and Horus). Important delays adjusted, function names and code unified. (#3496) 2016-05-14 21:56:20 +02:00
Neil Horne 98798c1e42 Fixes #3459 Rotary encoders linked flight mode can freeze Companion (#3470) 2016-05-14 20:18:17 +02:00
3djc 721a166be3 Widget inital load. Currently working ONLY for SMALEST size (#3495)
* Widget inital load. Currently working ONLY for SMALEST size

* Allows selection of Cels sensor in the widgets settings, cosmetic (indentation)

* Change indent to 2
2016-05-14 20:15:07 +02:00
3djc dcd42145d0 3djc/add lcd.rgb (#3494)
Add docs for lcd.setColor and lcd.RGB
2016-05-14 16:58:29 +02:00
Bertrand Songis cc6ccdc3ab Travis good? 2016-05-14 12:15:49 +02:00
Bertrand Songis 29d1c4f6f6 [Taranis] DMA2_Stream1 used for SBUS Rx in the module bay 2016-05-14 12:12:01 +02:00
Bertrand Songis 0467ef862f Again OK with python2 2016-05-14 12:09:26 +02:00
Bertrand Songis 30f2f3a1e4 Again OK with python2 2016-05-14 12:08:11 +02:00
Bertrand Songis 77ca37cf96 Update README.md 2016-05-14 11:40:27 +02:00
Bertrand Songis f63a9c4cb7 Travis install time reduced (#3493) 2016-05-14 11:33:02 +02:00
3djc 7b3dcec30e Fix lcd.drawGauge outer rectangle which was always black 2016-05-14 02:12:04 -07:00
Damjan Adamic 7161d90297 gtests fix 2016-05-14 10:22:17 +02:00
Bertrand Songis 082e2bbefd [Horus] Timer countdown ported to Horus 2016-05-14 00:16:17 +02:00
Bertrand Songis 5b7526c5e8 Fixes #2999 in 'next' (OpenTX 2.2) 2016-05-13 16:51:04 +02:00
3djc 01a69e3dbf Do not export COLOR_INDEX to LUA anymore, as they are not needed anymore due to change in setColor (#3490) 2016-05-13 16:18:40 +02:00
Bertrand Songis aaa10034ad S6R script update 2016-05-13 14:41:48 +02:00
Bertrand Songis 7908eaa406 [All] Code refactoring
- keys beep and haptic refactoring (not anymore audio events)
- trims move/mid/min/max refactoring (trim end splitted to trim min / trim max)
- S6R new alarms
- S6R servos/rx status displayed as a text (not an integer which has no sense)
- Timer countdown configuration
- The splash was not displayed (but the timeout was there) after the first calibration
2016-05-13 14:41:48 +02:00
3djc 24abad55ca Fix CUSTOM_COLOR,… (#3489)
* Fix CUSTOM_COLOR, also change to way setColor work to a more natural : lcd.setColor(CUSTOM_COLOR, RED)

* Remove _INDEX from TBS main to match the recent change to setColor
2016-05-13 14:26:18 +02:00
Bertrand Songis 77888ae200 TTS scripts were completely broken 2016-05-13 13:08:56 +02:00
3djc e55a84d8b7 Enables lcd.drawGauge on Horus (#3487)
* Enables lcd.drawGauge on Horus

* cosmetic, unsigned, and add flags
2016-05-13 12:34:59 +02:00
Bertrand Songis f46ff84845 S6R Lua script fixes 2016-05-13 10:57:15 +02:00
Bertrand Songis a8480f9af2 Cosmetics 2016-05-13 09:34:56 +02:00
Damjan Adamic 06d9ec846d Re #3485: variable type fix 2016-05-12 22:25:35 +02:00
3djc 0ec122f519 Fix lcd.drawRectangle on Horus (#3485)
* Fix lcd.drawRectangle on Horus

* Fix lcd.drawRectangle on Horus, this time not breaking other platforms

* Fix lcd.drawRectangle on Horus, this time *realy ?* not breaking other platforms

* Fix lcd.drawRectangle on Horus, default thickness to 1

* Fix lcd.drawRectangle on Horus, move to unsigned, following projectkk2glider comment

* Fix lcd.drawRectangle on Horus, spelling

* Fix lcd.drawRectangle on Horus, indent (hope I did understand your comment correctly
2016-05-12 22:08:30 +02:00
Damjan Adamic 49b3e5428f Fixes #3476: better representation of negative mixer weight in offset bar widget (ported from master) 2016-05-12 21:05:36 +02:00
Damjan Adamic 2df621993e Enable DSM protocols on all targets that define DSM2 macro, not just on Taranis. (#3471) (ported from master) 2016-05-09 20:42:27 +02:00
Damjan Adamic 49cad7f757 Re #3462: Lua doc update 2016-05-09 19:29:52 +02:00
elecpower 5f648b2050 Fixes #3214: Flight mode clear (ported from master, Re #3460) 2016-05-08 20:39:37 +02:00
Bertrand Songis fa9b94bb71 Cosmetics 2016-05-07 15:36:36 +02:00
Bertrand Songis dabfb705be [Horus] Cosmetics 2016-05-07 11:21:37 +02:00
Bertrand Songis ec6a9541f1 [Horus] Another fix for french special chars + input icons 2016-05-07 11:21:02 +02:00
Andre Bernet 1c7bd63a94 [Horus] Input icons were broken 2016-05-07 10:30:41 +02:00
Andre Bernet 3b445321fc [Horus] Layout cosmetics 2016-05-06 23:28:45 +02:00
Damjan Adamic 6349ff9496 Fixes #3462: PlayTone check for min/max frequency added. Fixes Lua playTone() crash when called with abnormal parameter values. (#3468) (ported from master) 2016-05-06 22:44:43 +02:00
Damjan Adamic 8cd677d697 Projectkk2glider/issue 3463 negative filtered sensor values (#3469) (ported from master)
* Fixes #3463: negative sensor values were invalid if filter was active for the sensor

* Re #3463: enable simultaneous use of `offset` and `filter` (was: when `offset` was enabled, the `filter` was always inactive even if enabled)
2016-05-06 22:37:05 +02:00
Bertrand Songis e2247623a2 [Horus] Shutdown animation in EMERGENCY mode - not tested 2016-05-06 10:23:32 +02:00
Bertrand Songis cd9c17e1f4 Cosmetics 2016-05-06 10:21:32 +02:00
Bertrand Songis 8dee23d9d3 Build scripts update 2016-05-05 22:33:53 +02:00
Bertrand Songis a5a4309cee Build scripts update 2016-05-05 20:24:43 +02:00
Bertrand Songis 1d7f33e23f Build scripts update 2016-05-05 13:56:40 +02:00
Bertrand Songis 5409d00a2a Another problem with C++11 on the Docke container 2016-05-05 12:32:27 +02:00
Bertrand Songis addb51b25a French translations too long for the calibration screen 2016-05-05 11:29:12 +02:00
Bertrand Songis 870b6e2c68 Build scripts update 2016-05-05 11:27:51 +02:00
Bertrand Songis 65c4b26181 Build scripts update 2016-05-04 18:59:07 +02:00
Andre Bernet f9198e3b7e Missing translation 2016-05-04 10:05:35 +02:00
Bertrand Songis cc8ea42cdb Build scripts update 2016-05-03 07:36:25 +02:00
Damjan Adamic baacc0fe29 Stick mode now in one global variable, it should work in Horus emerge… (#3455)
* Stick mode now in one global variable, it should work in Horus emergency mode

* Improvements (suggested by Bertrand)
2016-05-02 23:39:15 +02:00
Bertrand Songis d2f654e32d Build scripts update 2016-05-02 23:36:57 +02:00
Bertrand Songis 30056224a6 Build scripts update 2016-05-02 23:30:44 +02:00
Bertrand Songis bded417e8d Build scripts update 2016-05-02 23:28:54 +02:00
Bertrand Songis 0e26f03a1c Compilation scripts update 2016-05-02 23:25:24 +02:00
Bertrand Songis afce17443f Fixes #3456 2016-05-02 22:46:06 +02:00
Bertrand Songis 0e5df7235d [Taranis] Some more conversion issues 2016-05-02 19:52:07 +02:00
Damjan Adamic 3fb853c8b8 Re #3454: sensor persistent fixes (ported from master)
* Only clear sensor.persistentValue when the sensor.persistent is disabled and not on every shutdown.
* Only show persistent option for calculated type sensors (only these actually get saved in EEPROM)
2016-05-02 19:38:57 +02:00
Damjan Adamic 97cc58e323 Projectkk2glider/issue 3432 jitter filter option (#3452)
* Fixes #3432: radio option added to turn on/off ADC jitter filter (ported from master)

* Gtests fix

* Re #3432: compilation fix

* Re #3432: existing field split to accommodate the new option without the RadioData size change
2016-05-02 19:26:08 +02:00
Arne Schwabe 9924695b1d Fix (my own) typo in german translation 2016-05-02 11:16:41 +02:00
Bertrand Songis 895a62c84e Unit "milliwatts" missing in french TTS 2016-05-01 22:48:54 +02:00
Bertrand Songis 3c377a55e7 Getting bored of this tada.wav :)
Somebody asked me to change it to hello.wav as we already have bye.wav
2016-05-01 22:37:00 +02:00
Andre Bernet ce4b6ed2b8 VC++ compilation 2016-05-01 09:37:50 +02:00
Bertrand Songis 633d52297d [Taranis] Consumption calculated sensor bugfix 2016-04-30 21:00:00 +02:00
Bertrand Songis e859baea3d [Lua] Snake game for Taranis 2016-04-30 20:59:06 +02:00
Bertrand Songis 3d815e5d1b [S6R] Delay is 500ms - Timeout set to 800ms 2016-04-30 19:41:37 +02:00
Bertrand Songis d8736bfe94 [FrSky] Support of old FAS prototypes (different resistors) 2016-04-30 19:33:00 +02:00
Bertrand Songis 1f7485ed91 [Sky9X] Shift in External Module settings 2016-04-29 20:46:42 +02:00
Damjan Adamic c6f13de505 Log viewer improvements (#3442)
* Added:
 * max altitude
 * two cursors for time/altitude measurement

* Fix if multiple altitude related telemetry items are selected (only put cursors on the first one)
2016-04-29 18:59:39 +02:00
Bertrand Songis bd87028fd5 FrSky S.PORT upstream (#3426)
FrSky S.PORT upstream
2016-04-29 18:44:25 +02:00
Bertrand Songis 56f59196ea [9XR-PRO] Compilation fixes and cosmetics 2016-04-28 20:36:42 +02:00
Bertrand Songis fe57faef74 [Taranis] EEPROM Conversions fixes 2016-04-28 18:59:36 +02:00
Bertrand Songis 9106ee581d [Sky9x] Fixes in Sky9x pulses driver. Would if fix #3203 ? 2016-04-28 18:58:45 +02:00
Bertrand Songis c147b2edbc [Sky9x] Cosmetics 2016-04-28 18:39:27 +02:00
Damjan Adamic 92c76b5884 Fixes #3372: Telemetry mode "FrSky D (cable)" choice was missing for Taranis (ported from master) 2016-04-28 12:52:50 +02:00
Bertrand Songis e04dfb7b7e [Crossfire] There was a NO DATA remaining in the telemetry screens 2016-04-26 23:53:30 +02:00
Bertrand Songis fd72c22cf5 Compilation fix for Sky9x 2016-04-26 20:10:11 +02:00
Bertrand Songis 26e156f9ad [Crossfire] Telemetry new fields (GPS / Battery)
I did a refactoring for the latitude and longitude decoding which should be tested carefully for FrSky S.PORT and D telemetry
There was a double conversion in S.PORT protocol, there are less maths now, and perhaps precision will be better
2016-04-26 19:36:48 +02:00
Bertrand Songis 34444aedb2 Dead code removed 2016-04-26 12:48:38 +02:00
Bertrand Songis 3693f34a41 [Crossfire] Min / max limits were missing for each channel transmitted 2016-04-26 12:17:02 +02:00
Andre Bernet 7d21c9eb87 [Horus] DE char shift (fix #3440) 2016-04-24 16:52:54 +04:00
Damjan Adamic 981d133607 Log viewer session finder fix (caused by different Qt4/5 behavior of QDateTime) 2016-04-23 20:40:18 +02:00
Damjan Adamic 8a545ee60b simu CPU optimizations 2016-04-23 20:07:43 +02:00
Damjan Adamic 42f82cbbed Proper simulator shutdown 2016-04-23 20:06:53 +02:00
Bertrand Songis 13ded98f29 Merge pull request #3428 from opentx/schwabe/companion_multimodule
Implementation of the Multi TX module logic in Companion and few minor fixes/updates for the code
2016-04-21 21:55:49 +02:00
Andre Bernet 6e5786ca71 [Horus] Disk cache OK now 2016-04-18 22:13:29 +04:00
Arne Schwabe 4c213d7639 Add some missing translation in the german language file 2016-04-18 17:01:14 +02:00
Arne Schwabe 788b62d80c Fix some compiler warnings of clang in companion 2016-04-18 00:53:12 +02:00
Arne Schwabe 7b30201867 Implement Multimodule TX options for Companion 2016-04-18 00:09:51 +02:00
Arne Schwabe 67364789a8 Implement real (struct size compatible) layout on Taranis 2016-04-18 00:09:51 +02:00
Arne Schwabe 80b406b8d9 Implement new protocols of Multimodule (SFHSS and D16 8ch) 2016-04-18 00:09:51 +02:00
Arne Schwabe f99e792dea Replace SYMAX2 with more user friendly Syma X2 2016-04-18 00:09:50 +02:00
Arne Schwabe 0ead216c24 Ensure that the multi protocol number does not change if Crossfire is disabled. 2016-04-18 00:09:50 +02:00
Arne Schwabe e053f75b76 Move ppm options in companion to substruct like in datastructs.h 2016-04-18 00:09:50 +02:00
Damjan Adamic d2923a32d3 Fixed bug in Disk Cache: reads bigger than cache block size were not handled properly 2016-04-17 18:37:57 +02:00
Arne Schwabe e62759e5f2 Fix C++ standard also on AVR target (#3401 needs c++11) 2016-04-17 13:36:15 +02:00
Damjan Adamic 41a5af5a6e Horus disk_ioctl() fixed: CTRL_SYNC was missing, default return is now RES_OK; 2016-04-17 12:55:01 +02:00
Andre Bernet 403471d869 [Horus] Disable disk cache by default until fixed 2016-04-17 11:16:03 +04:00
Bertrand Songis c2e90d35fd 2.1 to 2.2 RadioData conversions added 2016-04-16 19:16:38 +02:00
Andre Bernet 195a09c008 Compilation fix 2016-04-16 20:59:33 +04:00
Bertrand Songis 9c0e0a136a Simplification for div_and_round function 2016-04-16 18:26:14 +02:00
Bertrand Songis 740a2a71f5 [Horus] Fix in comment 2016-04-16 18:24:31 +02:00
Bertrand Songis 9c116f94ce Cosmetics 2016-04-16 18:23:53 +02:00
Andre Bernet 296d207cfa [Horus] Switch selection fixes 2016-04-16 16:40:05 +04:00
Damjan Adamic e33e83f2b5 Fixes #3351: same file was used as source and destination in file contents comparison 2016-04-15 15:31:44 +02:00
Bertrand Songis 1f19256722 Merge pull request #3407 from opentx/bsongis/adc_averaging_done_in_driver_layer
[ARM board] ADC are done 4 times inside the driver now. To be tested …
2016-04-10 22:57:13 +02:00
Damjan Adamic 6b73df6935 Doc fix for ANALOG_SCALE 2016-04-10 22:27:49 +02:00
Damjan Adamic 8ed325c33f Better precision for Analogs screen 2016-04-10 22:20:06 +02:00
Damjan Adamic 9e0e71ad92 ADC crosstalk fixed, new crosstalk and time measurements (for Horus) 2016-04-10 22:06:53 +02:00
Damjan Adamic 14841590b9 Fixes #3178: USB driver changed interrupt grouping which affected interrupt priorities (fix suggested by Michael Blandford) 2016-04-10 18:39:26 +02:00
Arne Schwabe a93e1538b9 Include c++ flags only on older make versions (< 3.1.0) 2016-04-10 18:09:02 +02:00
Bertrand Songis bbc2e11cca [Horus] Pots included in inputsMoved(...) function 2016-04-10 14:26:15 +02:00
Bertrand Songis 7247a511cf Simu compilation fix 2016-04-10 13:42:55 +02:00
Bertrand Songis dd2ff29601 [AVR] Flash usage on 9X now almost equals to 2.1 release 2016-04-10 12:50:43 +02:00
Bertrand Songis 9e0a26c51c [AVR] ModelData size check removed as it's more complex (depending on GVARS and EXT options) 2016-04-10 12:45:49 +02:00
Bertrand Songis 66bd674ccf [AVR] Target "firmware-size" added 2016-04-10 12:44:53 +02:00
Bertrand Songis b7939dc742 Executable permissions for checksize.py 2016-04-10 11:52:49 +02:00
Bertrand Songis 30e2d52f76 [Horus] EEPROM structs size changed between the 2 pull requests 2016-04-10 11:41:32 +02:00
Bertrand Songis 2acf6aed3b Merge pull request #3401 from opentx/schwabe/check_struct_sizes
check struct sizes
2016-04-10 10:48:07 +02:00
Bertrand Songis 5d171b3761 [Taranis] Crossfire period now 4ms. S.PORT TX didn't wait end of serial transfer before going to RX mode 2016-04-10 10:34:04 +02:00
Bertrand Songis 834092879c Merge pull request #3405 from opentx/kilrah/extratrims
[Horus] Extra trims support
2016-04-09 22:59:43 +02:00
Bertrand Songis e9bb5a5115 [Horus] These options are only examples! 2016-04-09 21:45:34 +02:00
Bertrand Songis 143afa855f [Horus] GVARS in OUTPUTS menu should be OK 2016-04-09 21:15:33 +02:00
Bertrand Songis e43d88e6b8 [Horus] Range and Bind buttons were badly displayed since latest font change 2016-04-09 19:54:49 +02:00
Bertrand Songis 070c64631a [Horus] Font again. How is it now? 2016-04-09 19:39:03 +02:00
Bertrand Songis efb290324a [Horus] Font cosmetics 2016-04-09 18:59:07 +02:00
Bertrand Songis 2f1f4243f0 [Horus] Is the font better? 2016-04-09 18:23:29 +02:00
Bertrand Songis 5ed27f157d Merge pull request #3409 from opentx/projectkk2glider/issue_3374_disk_cache_horus
Fixes #3374: added SD card disk cache for Horus
2016-04-09 18:11:19 +02:00
Damjan Adamic 868133371c Fixes #3374: added SD card disk cache for Horus
* SIMU_DISKIO option available again
 * new option DISK_CACHE defaults to ON for Horus
 * printf("%f") fixed in CLI
2016-04-09 17:09:46 +02:00
Bertrand Songis ee9bb73ef9 [Horus] The SETPOS char (0x1F) is again implemented on Horus (it's needed in the VERSION menu) 2016-04-09 11:23:44 +02:00
Bertrand Songis c5a44250fc Fixes #3353 2016-04-09 11:12:50 +02:00
Bertrand Songis a84357ad0b Qt warnings removed 2016-04-09 11:12:03 +02:00
Bertrand Songis 1e3da34ec8 [ARM board] ADC are done 4 times inside the driver now. To be tested on H 2016-04-09 10:09:54 +02:00
Bertrand Songis 5e354749b2 [Horus] Was it removed intentionnally? 2016-04-09 10:08:01 +02:00
Damjan Adamic 57028614fb Gtests cmake fix (which I broke in previous commit) 2016-04-08 21:42:12 +02:00
Damjan Adamic 651b0ad579 Disable gtests target if Qt5 not installed 2016-04-08 14:53:07 +02:00
Andre Bernet 0c187412ea Bad define 2016-04-08 14:38:45 +04:00
Bertrand Songis 1a05cfca16 [Horus] Cosmetics 2016-04-08 09:19:46 +02:00
Bertrand Songis 4bb5631b65 [Horus] Display trims option should be OK now 2016-04-08 09:18:00 +02:00
Bertrand Songis 1fc0525636 [Horus] Cosmetics 2016-04-08 09:07:56 +02:00
Bertrand Songis 79fcaec78f [Horus] DE special chars added 2016-04-08 09:05:07 +02:00
Bertrand Songis dc4587b5b6 [Horus] Topleft mask also added in cache 2016-04-08 09:03:39 +02:00
Bertrand Songis 5d869d78e3 Darkblue icons added 2016-04-08 09:02:18 +02:00
Andre Bernet 64a3c21c4e Merge branch 'next' into kilrah/extratrims 2016-04-08 10:46:34 +04:00
Andre Bernet c8cd34405d Merge pull request #3403 from opentx/kilrah/backlight
[Horus] Backlight control added back in, driver fix (thanks Adela), OFF level configurable
2016-04-08 10:25:27 +04:00
Andre Bernet 8807aa8689 Navigation fixes 2016-04-08 09:54:36 +04:00
Andre Bernet f534702d59 Backlight restored in emergency mode, prevent complete turn off to avoid confusion 2016-04-08 09:22:04 +04:00
Damjan Adamic 81c687dcd4 Merge pull request #3404 from opentx/bsongis/horus_icons_cache
Bsongis/horus icons cache
2016-04-07 22:07:36 +02:00
Damjan Adamic 7d57b4df05 Compilation fix 2016-04-07 21:27:00 +02:00
Andre Bernet 18f56075a5 Avoid EEPROM change by recovering some unused bits 2016-04-07 15:28:28 +04:00
Bertrand Songis eaed9dd1a9 [Horus] Menus icons now in cache
I hope it will reduce calculation time a little bit!
2016-04-07 08:26:04 +02:00
Bertrand Songis b1e5e06d5b [Horus] Last line was missing in popup menus 2016-04-06 16:22:41 +02:00
Andre Bernet 30018b2432 Backlight control added back in, driver fix (thanks Adela), OFF level configurable 2016-04-06 16:06:36 +04:00
Damjan Adamic eab639362a Compilation fix 2016-04-05 19:12:07 +02:00
Damjan Adamic 29325ad54f [ARM] Mixers calculated just-in-time 2016-04-05 18:38:37 +02:00
Bertrand Songis ce0b17744c French special chars added 2016-04-05 09:53:14 +02:00
Bertrand Songis 05ad98f9d8 Another potential menus freeze bug there 2016-04-05 09:52:03 +02:00
Bertrand Songis 38c7d9c2a0 Another fix for the SF menu freeze bug 2016-04-05 09:48:58 +02:00
Andre Bernet 7abcb28d11 Minor navigation fix 2016-04-04 21:40:14 +04:00
Andre Bernet cbe92aa058 Fix menu crash (please check) 2016-04-04 21:40:04 +04:00
Andre Bernet 0e7662b36d Compilation fix 2016-04-04 20:34:17 +04:00
Andre Bernet f0a0dc56c3 [Horus] One more SF fix (#3393) 2016-04-04 20:08:13 +04:00
Andre Bernet bdb938cd53 SF fixes (#3393) 2016-04-04 19:57:03 +04:00
Arne Schwabe bb21c20b21 Check sizes of eeprom struct sizes at compile time
Changing the size of a struct by accident lead to random the wrong data from the eeprom and can screw the eeprom up pretty bad. Better bail out if the eeprom size changes and let the developer make that an intentional choice. The template magic is there to print out the actual and expected size:

/Users/arne/oss/opentx/radio/src/datastructs.h:1045:3: error: static_assert failed "struct size changed"
  static_assert(expectedSize == realSize, "struct size changed");
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arne/oss/opentx/radio/src/datastructs.h:1181:3: note: in instantiation of function template specialization 'check_size<TrainerData, 168, 16>' requested here
  CHKSIZE(TrainerData, 168);
2016-04-04 10:20:58 +02:00
Damjan Adamic 5993d28ab7 Compilation fix 2016-04-04 07:00:32 +02:00
Damjan Adamic 8c36199d69 Compilation fix (crossfire) 2016-04-03 23:27:02 +02:00
Damjan Adamic 3ef7326756 Horus audio stall fix. The buffer->state value was set too late. 2016-04-03 23:07:55 +02:00
Damjan Adamic 018fec4863 CLI print audio added. New command p added (same as print) 2016-04-03 23:06:08 +02:00
Damjan Adamic 839296ac1b PlaySound fix 2016-04-03 19:33:32 +02:00
Damjan Adamic 2990e9b9a3 Debug timers added (use -DDEBUG_TIMERS=YES to enable and CLI command "print dt" to see them) 2016-04-03 19:27:47 +02:00
Damjan Adamic a8aa6148e5 Tasks switching log added (use -DDEBUG_TASKS=YES to enable and CLI command "print tsl" to see it, only works on Horus) 2016-04-03 17:56:32 +02:00
Damjan Adamic 9673df83a7 Interrupt counters added (use -DDEBUG_INTERRUPTS=YES to enable and CLI command "print int" to see them) 2016-04-03 17:51:20 +02:00
Bertrand Songis a0b4053e82 [Crossfire] Now the pulses frame is encoded the same way than other Crossfire frames 2016-04-02 21:05:22 +02:00
Bertrand Songis b0bda14f23 [Horus] My last commit did break BOLD 2016-04-02 20:45:22 +02:00
Bertrand Songis 664a966bbc Cosmetics 2016-04-02 19:32:28 +02:00
Bertrand Songis 3cd6638e01 [Horus] Fontcache added. Should improve a lot the menus speed. 2016-04-02 19:31:54 +02:00
Andre Bernet d207a600e8 Attempt at getting the simu interface usable with the extra trims 2016-04-02 17:03:24 +04:00
Andre Bernet 1f6a711d24 [Horus] Extra trims added (#3393) 2016-04-02 16:45:43 +04:00
Andre Bernet 27d37f7b78 [Horus] New main view wasn't saved if no manual layout selection was done 2016-04-02 13:11:28 +04:00
Andre Bernet ab2960b6aa Merge branch 'kilrah/navigation' into next 2016-04-02 12:50:16 +04:00
Andre Bernet 43418e6705 More navigation improvements 2016-04-02 12:19:32 +04:00
Andre Bernet 21312cb1be [Horus] Calibration menu fixes 2016-04-02 11:27:19 +04:00
Andre Bernet a03f85b083 [Horus] Switch menu pages on key press 2016-04-02 11:06:10 +04:00
Andre Bernet d41218eb29 [Horus] Improve "setup screens" responsivity feel (actions on key press instead of release) 2016-04-02 10:46:46 +04:00
Andre Bernet 788bdfbb09 [Horus] Navigation fixes 2016-04-02 10:38:34 +04:00
Andre Bernet 9615c98103 Fix merge 2016-04-02 09:57:46 +04:00
Bertrand Songis cbec010f44 Multimodule merge 2016-04-01 23:08:52 +02:00
Bertrand Songis 5cb1ed87d8 Merge branch 'multi_module_next' of https://github.com/schwabe/opentx into schwabe-multi_module_next 2016-04-01 23:02:05 +02:00
Andre Bernet 1f303ec995 Merge pull request #3368 from opentx/kilrah/antennaselection
[Horus] Internal module antenna selection support
2016-04-01 19:38:05 +04:00
Andre Bernet 36316ecf4c Merge branch 'next' into kilrah/antennaselection
# Conflicts:
#	radio/src/translations/de.h.txt
#	radio/src/translations/it.h.txt
#	radio/src/translations/pt.h.txt
#	radio/src/translations/se.h.txt
2016-04-01 19:37:10 +04:00
Andre Bernet 555f6510b2 WDT at 500ms. Needs thorough checking 2016-04-01 18:58:29 +04:00
Andre Bernet 3c39893bca [Horus] 8-bit source index, really? (#3393) 2016-04-01 18:22:32 +04:00
Andre Bernet 5f86e87ae2 [Horus] Only 4 topbar zones now we have the fixed icons 2016-04-01 17:36:15 +04:00
Andre Bernet c5e95c9730 [Horus] Linear icons and name fix for L1/L2 (#3393) 2016-04-01 12:10:06 +04:00
Andre Bernet 75977b6b6d [Horus] Enable SWR warning 2016-04-01 11:48:53 +04:00
Andre Bernet 09780a07ff Merge pull request #3395 from opentx/kilrah/taranis_gpio
GPIO speed reduction for Taranis
2016-04-01 11:15:58 +04:00
Andre Bernet 54cb3de46e Merge branch 'next' into kilrah/taranis_gpio 2016-04-01 11:13:30 +04:00
Damjan Adamic 009eaa3893 Cmake compiler optimization flags fixed, now release build uses -Os instead of -O3 which is cmake's default. 2016-03-31 18:06:57 +02:00
Andre Bernet 02dfff319f [Horus] Cosmetics 2016-03-31 16:51:20 +04:00
Andre Bernet 3d4f3611b0 Merge branch 'next' into kilrah/antennaselection
# Conflicts:
#	radio/src/translations/de.h.txt
#	radio/src/translations/es.h.txt
#	radio/src/translations/it.h.txt
#	radio/src/translations/pt.h.txt
#	radio/src/translations/se.h.txt
2016-03-31 15:11:12 +04:00
Bertrand Songis 1f54c61e41 Dockerfile fixes ported to 'next' 2016-03-30 23:14:17 +02:00
Bertrand Songis 3c1221452a Taranis bootloader Makefile removed (CMake now) 2016-03-30 22:47:25 +02:00
Bertrand Songis e4d820b11e Dockerfile cosmetics 2016-03-30 18:51:42 +02:00
Andre Bernet 7076889e1a Channel range fix 2016-03-30 20:27:59 +04:00
Andre Bernet 438f81aef9 Reorganize / clarify board types by relevance 2016-03-30 20:14:37 +04:00
Bertrand Songis 4382445123 Cosmetics 2016-03-30 07:56:02 +02:00
Bertrand Songis 5f10deb182 Merge pull request #3391 from schwabe/fix_audio_osx
Make sound work in OS X
2016-03-29 22:49:14 +02:00
Bertrand Songis 9fb5416ac9 Makefile removed as it doesn't work anymore. CMake is used instead. 2016-03-29 22:40:29 +02:00
Bertrand Songis 791a2e5f75 PPM_UNIT = PERCENT_PREC1 by default (as in 2.1) 2016-03-29 22:30:38 +02:00
Bertrand Songis 9cd9616ece OVERRIDE_CHANNEL_FUNCTION = YES by default (as in 2.1) 2016-03-29 22:27:27 +02:00
Bertrand Songis 3f4cae8cb1 PPM_UNIT = PERCENT_PREC1 by default (as in 2.1) 2016-03-29 22:25:56 +02:00
Arne Schwabe a2e5efa6c7 Make simulator sound functional again in OS X (and probably Linux)
The radio/src/simu/CMakeLists.txt was missing the SDL defines/includes required for SDL audio
2016-03-29 22:13:18 +02:00
Arne Schwabe 2ad644d793 Add horus support for multi pulses (untested, following DSM2) 2016-03-29 21:41:15 +02:00
Arne Schwabe c09c3e0a2b Do not backup the multi module struct 2016-03-29 21:41:15 +02:00
Arne Schwabe 5d19adb1eb Copy strings for multimode support from en.h.txt to other languages 2016-03-29 21:41:15 +02:00
Arne Schwabe 96c64f2895 Add german translations for multi module
(Also fix C++11 suffix error when compiling on OS X/clang)
2016-03-29 21:41:15 +02:00
Arne Schwabe 0dc2f60e09 Add german translations for multi module
(Also fix C++11 suffix error when compiling on OS X/clang)
2016-03-29 21:41:15 +02:00
Arne Schwabe 99c7e3f0ad Add FY326 protocol 2016-03-29 21:41:15 +02:00
Arne Schwabe f86dc6b156 Implement DSM2/DSMX frame format options 2016-03-29 21:41:15 +02:00
Arne Schwabe 9de6e09c09 Implement autobind and low power setting and specifying a custom protocol for the multi module
Specifying a custom prtocol is useful if OpenTX firmware is older than the multi module firmware
and the protocol in question is not yet in the protocol list of the OpenTX firmware.
2016-03-29 21:41:15 +02:00
Arne Schwabe 119e413a6d Multi module support for Taranis
Reuse some of the DSM2 routines to avoid code duplication.

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

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

Patch v3: Fix myeeprom.h, include option value in menu.
Patch v4: Fix identing, name substructs of modeldata
2016-03-29 21:41:14 +02:00
Arne Schwabe c788ad6add Move ppm related options into own struct
This allows to have the ppm related options in a union with a other module protocol specific options for the multi module.
2016-03-29 21:41:14 +02:00
Bertrand Songis 2e6570e209 New script to check AVR firmware size, as it seems it increased over time in the 'next' branch ... 2016-03-29 21:35:46 +02:00
Bertrand Songis 9762656ad0 Merge pull request #3388 from schwabe/datacopy_backup_union
Also backup members inside unions,
2016-03-29 21:31:25 +02:00
Bertrand Songis f2eadf0ff0 [Horus] Introduction of a button to remove an existing view 2016-03-29 20:09:24 +02:00
Arne Schwabe 90f67cd5ef Fix crash of simulator if directory does not exist. 2016-03-29 19:04:24 +02:00
Bertrand Songis 41b1e1c9bc Merge pull request #3390 from schwabe/companion_osx_build
Fix companion build on OS X
2016-03-29 19:03:06 +02:00
Arne Schwabe fb5feb8a91 Fix companion build on OS X 2016-03-29 18:11:50 +02:00
Arne Schwabe 86076bbf32 Also backup members inside unions,
the code is a bit more complicated since unions can have structs or simple types. Also change Telemetry sensor to be a struct, since a class with all public is identical to a struct in C++
2016-03-29 16:05:32 +02:00
Damjan Adamic c24219cbcd Merge pull request #3389 from schwabe/fix_travis
Fix travis (clang 3.8 -> 3.9)
2016-03-29 16:04:10 +02:00
Arne Schwabe 38dbfd130a Fix travis (clang 3.8 -> 3.9) 2016-03-29 15:17:01 +02:00
Bertrand Songis a6a07e9714 [Horus] Speedup when switching from the main view to any other menu 2016-03-28 23:18:32 +02:00
Bertrand Songis ed30b5a8ed [Horus] USB icon only displayed when USB plugged 2016-03-28 23:17:55 +02:00
Bertrand Songis 83a7859f6f Cosmetics 2016-03-28 23:17:20 +02:00
Bertrand Songis 6a2e26272e [Horus] Unused code removed 2016-03-28 23:16:22 +02:00
Bertrand Songis be1526a86d Cosmetics 2016-03-28 20:57:01 +02:00
Bertrand Songis 554f230696 Prevent from using the internal module when there is a Crossfire module plugged into the bay 2016-03-28 20:56:48 +02:00
Bertrand Songis f2fb6b20de Crossfire CRC added 2016-03-28 20:31:42 +02:00
Bertrand Songis a3c175f537 Crossfire telemetry protocol start 2016-03-28 19:07:28 +02:00
Bertrand Songis 5a5f192451 Remaining trace 2016-03-28 18:36:29 +02:00
Bertrand Songis af87c57d1d Translations files cosmetics (no CRLF / standard header / translation author, start at line 45) 2016-03-28 17:23:35 +02:00
Bertrand Songis 7c1db4c4dc Less files in .gitignore (they are now visible in case of in source compilation) 2016-03-28 11:26:57 +02:00
Bertrand Songis d73b34e1a9 [Crossfire] Back to 400kHz, at least for Taranis (no DMA on RX) 2016-03-28 11:25:47 +02:00
Bertrand Songis 746dc450fa Telemetry files split 2016-03-28 11:24:55 +02:00
Damjan Adamic 485d30f65b SysTick was configured wrong for Horus 2016-03-27 22:40:55 +02:00
Bertrand Songis 7e4b5d97e3 Compilation fix 2016-03-27 17:48:24 +02:00
Bertrand Songis 2c00a3437f Checkscreenshot simplification 2016-03-27 12:56:48 +02:00
Bertrand Songis fef78a1b97 Compilation fix 2016-03-27 10:49:04 +02:00
Bertrand Songis 2c256e9e73 Avoids generating all bitmaps one time per CPU during compilation 2016-03-27 10:46:19 +02:00
Bertrand Songis 1fba706bdb Compilation fixes 2016-03-27 10:33:32 +02:00
Bertrand Songis 7ec0dd8a40 Qt4 was still required for gtests 2016-03-27 10:18:31 +02:00
Bertrand Songis 8d5e5b2d01 Warnings fixed on VC++ 2015 2016-03-27 09:54:41 +02:00
Bertrand Songis 8c636e31d9 Dockerfile updated 2016-03-26 23:06:54 +01:00
Bertrand Songis c2412ca05e Python scripts with the executable flag 2016-03-26 23:04:39 +01:00
Bertrand Songis 6ceb575d1e DFU-UTIL "-d 0483:df11" again there 2016-03-26 16:34:12 +01:00
Bertrand Songis a70cbe6a0d Companion now able to use .dfu files for flashing radio firmware 2016-03-26 16:32:57 +01:00
Bertrand Songis e1b7848a91 Cosmetics 2016-03-26 16:13:00 +01:00
Bertrand Songis dfd4a04220 Revert "Also backup members inside unions,"
This reverts commit dd76e9d8bf.
2016-03-26 15:48:42 +01:00
Bertrand Songis 1c9a5ed753 Travis again 2016-03-26 14:13:50 +01:00
Bertrand Songis 42f1515b2f Travis again 2016-03-26 14:04:47 +01:00
Bertrand Songis 06cdc6ba7b Travis again 2016-03-26 13:24:18 +01:00
Bertrand Songis e774fe091c Travis again 2016-03-26 13:13:42 +01:00
Bertrand Songis 0273038289 Python build script fix 2016-03-26 12:48:47 +01:00
Bertrand Songis d609158b27 Travis again 2016-03-26 12:29:40 +01:00
Bertrand Songis 4bf837b21f Travis again 2016-03-26 11:36:29 +01:00
Bertrand Songis ca47684e36 Travis fix 2016-03-26 11:26:17 +01:00
Bertrand Songis 210ee69101 Travis fix 2016-03-26 10:49:27 +01:00
Bertrand Songis 6b4da258e7 Merge pull request #3385 from schwabe/next
Also backup members inside unions,
2016-03-26 09:22:07 +01:00
Bertrand Songis 47f083e1c8 Now we will try to build simulators the same way 2016-03-25 22:50:45 +01:00
Bertrand Songis 69fc1b9354 We won't start the bad simulator 2016-03-25 22:48:00 +01:00
Bertrand Songis c2786d36c9 More compilation server errors 2016-03-25 19:12:35 +01:00
Andre Bernet a2928c5d79 [Horus] Clock is 168MHz, not 180... 2016-03-25 20:54:07 +04:00
Andre Bernet 2bb63e6644 Header data is useful 2016-03-25 20:54:07 +04:00
Bertrand Songis 7501608aca Build output now saved in a .out file ... so that we can grep for warnings! 2016-03-25 16:53:09 +01:00
Bertrand Songis 862199f822 Dockerfile commited 2016-03-25 16:23:12 +01:00
Bertrand Songis ccfcfa85d0 Dockerfile commited 2016-03-25 15:56:21 +01:00
Bertrand Songis 884e1feee4 Dockerfile commited 2016-03-25 15:47:48 +01:00
Bertrand Songis a681c341a2 Dockerfile commited 2016-03-25 15:43:16 +01:00
Bertrand Songis 34f9bc0b63 Dockerfile commited 2016-03-25 15:39:55 +01:00
Bertrand Songis f073c9fe85 Dockerfile commited 2016-03-25 15:30:03 +01:00
Arne Schwabe dd76e9d8bf Also backup members inside unions,
the code is a bit more complicated since unions can have structs or simple types.
2016-03-25 14:04:30 +01:00
Bertrand Songis ecff71b044 Cosmetics 2016-03-25 12:54:35 +01:00
Andre Bernet 79dffdf5f4 GPIO speed adjustments - to be tested! 2016-03-25 14:39:07 +04:00
Andre Bernet bc70acb55d [Horus] Reduce GPIO speed where possible for noise reduction - no more audio noise now :) 2016-03-25 14:13:22 +04:00
Andre Bernet 4b6bcc6a0e 9x timer start edit fix 2016-03-25 11:48:39 +04:00
Bertrand Songis 1809addbb3 Later ... 2016-03-24 23:04:39 +01:00
Bertrand Songis 641fdc5160 VC++ compilation fix 2016-03-24 22:25:46 +01:00
Bertrand Songis c1cd54ee6a [Horus] Missing font 2016-03-24 22:11:08 +01:00
Bertrand Songis 497f699331 gtests enabled for Horus 2016-03-24 21:52:49 +01:00
Bertrand Songis b4bf833667 Compilation fix on older CMake versions 2016-03-24 21:45:48 +01:00
Bertrand Songis f979fd7289 Cosmetics 2016-03-24 21:43:22 +01:00
Bertrand Songis d5931d2129 TTS language is "en" by default 2016-03-24 21:43:00 +01:00
Bertrand Songis d6dfdea6e2 [9x] Simu compilation fix when VOICE option enabled 2016-03-24 21:42:32 +01:00
Bertrand Songis 31fa16bf87 [Horus] Bold font added 2016-03-24 21:41:43 +01:00
Bertrand Songis e3d70817ea Build script converted to python and added to git 2016-03-23 23:46:49 +01:00
Bertrand Songis 20ab3a324b CMake warning fix 2016-03-23 23:20:59 +01:00
Bertrand Songis fd57db6068 [Horus] Curve bug when drawing negative X or negative Y 2016-03-23 23:20:40 +01:00
Bertrand Songis 3d0bf81bfd [AVR boards] TTS option was missing in CMakeLists.txt 2016-03-23 22:47:45 +01:00
Bertrand Songis c58217a82c TODO added for Kilrah, I am not sure this line is useful 2016-03-23 22:46:51 +01:00
Damjan Adamic d831d1428c Re #3371: Horus batery voltage adjusted based on measurements with a precise volt-meter 2016-03-23 19:49:35 +01:00
Andre Bernet 3480107a9b Typo 2016-03-23 22:42:15 +04:00
Andre Bernet c5a5fa2430 Horus got forgotten 2016-03-23 22:20:01 +04:00
Andre Bernet ea41a59da7 Translation fixes 2016-03-23 22:16:37 +04:00
Bertrand Songis cb42f4814b Merge pull request #3384 from opentx/kilrah/timers_22
Kilrah/timers22
2016-03-23 18:30:19 +01:00
Andre Bernet e5e3bb4997 Missing translations 2016-03-23 21:13:57 +04:00
Andre Bernet cd43482911 Elapsed timer visualization (fix #3383) 2016-03-23 19:37:25 +04:00
Andre Bernet 82ccb70ebd Wasted flash 2016-03-23 16:57:38 +04:00
Andre Bernet 8931b76143 Horus part 2016-03-23 16:51:03 +04:00
Andre Bernet c6b2e12802 Removed a few legacy timer limitations, fix non-working limit (fix #3301) 2016-03-23 07:29:12 +04:00
Bertrand Songis c282aa6065 Merge pull request #3382 from schwabe/fix_build_opentx
Fix building OpenTX under OS X
2016-03-22 22:44:14 +01:00
Bertrand Songis bff45a4b2a [Horus] Tx battery and audio volume added in the topbar 2016-03-22 22:43:00 +01:00
Arne Schwabe ad5b17900b Fix building OpenTX under OS X
The clang.index python library does not look in the default path where the library is installed
2016-03-22 22:37:23 +01:00
Bertrand Songis 43c70780b1 Compilation fix 2016-03-22 20:25:22 +01:00
Bertrand Songis a05fa1738f [Horus] Return to 6 chars wav names to track the shutdown bug without having to reconfigure the model 2016-03-22 19:38:23 +01:00
Bertrand Songis 5691395dcf [Horus] Google tests added 2016-03-22 19:36:53 +01:00
Andre Bernet 74992a69dc Default AVR fuse settings changed to disable JTAG interface (#3379 part 2) 2016-03-22 16:16:17 +04:00
Andre Bernet d064ba0136 Simu compilation 2016-03-22 15:49:45 +04:00
Andre Bernet 1efad1ac38 Merge branch 'next' into kilrah/antennaselection
Conflicts:
	radio/src/myeeprom.h
2016-03-22 15:31:44 +04:00
Andre Bernet 909b3bb595 Antenna change warning added 2016-03-22 15:28:20 +04:00
Andre Bernet 3eb0c3a953 [9X/2650] Fix occasional interaction between JTAG port and POT3 (fix from Mike following openrcforums discussion) 2016-03-22 12:18:29 +04:00
Andre Bernet 9e61f3e5e0 [Horus] Timer display enhancements 2016-03-22 12:18:29 +04:00
Bertrand Songis dbcda02770 Error and Warning fixed 2016-03-21 22:21:13 +01:00
Bertrand Songis c8a84a404b Compilation failure 2016-03-21 21:51:51 +01:00
Bertrand Songis c19b35ea0e [Horus] Compilation fix with JITTER_MEASURE 2016-03-21 20:53:52 +01:00
Bertrand Songis bca7773279 [Horus] Failsafe screen done 2016-03-21 18:40:11 +01:00
Bertrand Songis b29f9584d1 [Horus] Cosmetics in Special Functions screen 2016-03-21 18:39:35 +01:00
Bertrand Songis e6acfc7e88 [Horus] Logical switches UI fixes 2016-03-21 18:38:52 +01:00
Bertrand Songis 38e44991e9 Cosmetics 2016-03-21 18:38:05 +01:00
Bertrand Songis 27dc84028c [Taranis] It's now impossible to have Trainer input in the external module and a regular module enabled 2016-03-21 18:37:17 +01:00
Bertrand Songis bd3c52d6ac Warning removed 2016-03-21 18:33:26 +01:00
Bertrand Songis 8ecd053af5 Cosmetics 2016-03-21 18:32:35 +01:00
Damjan Adamic be29e80988 WATCHDOG_DISABLED default set to OFF 2016-03-20 22:15:06 +01:00
Damjan Adamic 28dd71905f Fixes #3375: better linearity for Horus volume control 2016-03-20 21:44:33 +01:00
Bertrand Songis 76e39222db [Horus] The Modelbmp widget was always refreshed since my last commit 2016-03-20 19:56:06 +01:00
Andre Bernet 5e6288b7d1 [Horus] LS editing bug 2016-03-20 22:53:19 +04:00
Bertrand Songis 65664c0bc9 Merge pull request #3373 from opentx/projectkk2glider/issue_3371_horus_tx_battery
Projectkk2glider/issue 3371 horus tx battery
2016-03-20 18:06:58 +01:00
Damjan Adamic 3a064b15ed Simu fixes for 9X 2016-03-20 17:24:30 +01:00
Damjan Adamic af2cd30146 Re #3371: Battery warning range fix for Horus 2016-03-20 17:13:23 +01:00
Damjan Adamic a25b20a1e7 Re #3371: Sky9X fixed 2016-03-20 17:01:17 +01:00
Damjan Adamic 43e7680c9b Re #3371: ARM stuff removed from AVR version of checkBattery() 2016-03-20 17:00:58 +01:00
Damjan Adamic e317687973 Fixes #3371: Battery calibration menu item added for Horus 2016-03-20 16:05:27 +01:00
Damjan Adamic a3af63edad Re #3371: tx battery measuring code moved to board_xxx.cpp, battery check code rewritten for ARM platforms, Horus battery calibrated. 2016-03-20 16:05:27 +01:00
Damjan Adamic 49e70dbf12 simulator fixes 2016-03-20 15:20:59 +01:00
Bertrand Songis 74229b808f Duplicated code removed 2016-03-19 19:30:37 +01:00
Bertrand Songis 5925e8eae4 [Horus] Analogs view for debug in the Statistics menu 2016-03-19 19:06:15 +01:00
Bertrand Songis 63d306070a [Taranis] Cosmetics 2016-03-19 19:05:34 +01:00
Bertrand Songis bffa99d98f Simulator segfault 2016-03-19 18:49:04 +01:00
Bertrand Songis defef14018 Compilation fix 2016-03-19 18:20:48 +01:00
Bertrand Songis 0a7d0119fe Merge pull request #3330 from opentx/projectkk2glider/issue_3255_uid_display
Projectkk2glider/issue 3255 uid display
2016-03-19 16:32:26 +01:00
Bertrand Songis 3fdfcf45f9 [Horus] ModelBmp widget refreshed when the model name changes 2016-03-19 14:35:45 +01:00
Bertrand Songis f43a790d5c [Taranis] HEARBEAT now uses the DMA for SBUS reception 2016-03-19 13:41:21 +01:00
Bertrand Songis 244239ff6a Compilation fix 2016-03-19 12:40:11 +01:00
Bertrand Songis 4443ab22ee [Taranis] Overrun errors on S.PORT are now counted and it's possible to display the errors count in the CLI 2016-03-19 12:06:43 +01:00
Bertrand Songis f622d7cf6d [Taranis] We cannot receive S.PORT through DMA, the associated stream is already used by the DAC 2016-03-19 12:01:36 +01:00
Bertrand Songis b8068438fb [Horus] Sliders will stop always moving when around 0, just because of a bad rounding when negative 2016-03-19 00:09:06 +01:00
Bertrand Songis e8b783a491 [Crossfire] Now 921600bauds as we have bigger plans :) 2016-03-18 22:19:29 +01:00
Bertrand Songis 5cb6884ab3 [Horus / Taranis] S.PORT telemetry now uses the DMA. I think the buffer could be reduced, 512bytes seems really big 2016-03-18 21:49:06 +01:00
Andre Bernet e810367284 Duplicate code removed 2016-03-19 00:24:57 +04:00
Andre Bernet 648f03a079 Cosmetics 2016-03-19 00:21:16 +04:00
Andre Bernet 0661b8219c [Horus] Internal module antenna selection support 2016-03-18 21:12:18 +04:00
Bertrand Songis e4b596d733 Cosmetics 2016-03-18 17:11:06 +01:00
Andre Bernet f90a69335b [Horus] Theme init was missing in general settings defaults 2016-03-18 17:49:02 +04:00
Andre Bernet dd066c3ec1 Fix simu screenshot size for Horus 2016-03-18 15:30:49 +04:00
Andre Bernet 83c88d93ee Battery timer was reset on wrong page 2016-03-18 15:08:39 +04:00
Andre Bernet 92911daf73 Duplicate "Free Mem" line removed 2016-03-18 14:52:55 +04:00
Andre Bernet ca7eae6ef0 SDL path got mangled when mingw32 is defined 2016-03-18 12:44:38 +04:00
Bertrand Songis 662137aa6d [Companion] dfu-util launched with right args for Horus 2016-03-17 21:04:09 +01:00
Bertrand Songis a2db3f2150 [Companion] dfu-util launched with right args for Horus 2016-03-17 20:45:11 +01:00
Bertrand Songis de08e50f15 [Companion] Latest release correctly stored 2016-03-17 20:08:30 +01:00
Bertrand Songis 32a3d4588e [Horus] Nightly builds parameters hidden when NIGHTLY_BUILDS=NO 2016-03-17 19:00:56 +01:00
Bertrand Songis ca4a5356f2 Merge pull request #3363 from craftandtheory/next
SMLSIZE fixes + Gtests on SmlsizeDecimalPoint
2016-03-16 23:07:14 +01:00
Bertrand Songis 8cf4b5e4e8 [Horus] Telemetry fields missing in the sources list 2016-03-16 22:18:37 +01:00
Bertrand Songis e4729727ae [Horus] MAX and Trims were missing in the sources list 2016-03-16 22:12:36 +01:00
Bertrand Songis 14673dd7bb [Horus] Navigation enhancements 2016-03-16 21:55:03 +01:00
floaledm c2dffd2b24 Gtests on SmlsizeDecimalPoint 2016-03-16 20:22:31 +00:00
Bertrand Songis 5a7c9311de [Horus] Better handling of theme options 2016-03-16 20:47:56 +01:00
Bertrand Songis eb477f2953 [Horus] Small changes in the keymap 2016-03-16 20:46:42 +01:00
Damjan Adamic 5337092e93 datacopy.cpp generated file now part of the sources and can be generated manually with target datacopy 2016-03-16 20:15:54 +01:00
Bertrand Songis e0ead516f6 Wrong command 2016-03-16 07:32:19 +01:00
Bertrand Songis 083060968f Wrong command line 2016-03-16 07:28:06 +01:00
Bertrand Songis c038a7e4d5 [Companion] I forgot the -DALLOW_NIGHTLY_BUILDS 2016-03-16 07:20:00 +01:00
Bertrand Songis 7e45537402 [Horus] Keymap is now consistent with labels on keys 2016-03-15 23:21:32 +01:00
Bertrand Songis 9a66da21d5 [Horus] Default theme color can now be changed 2016-03-15 23:15:26 +01:00
Bertrand Songis 63fcf537e6 [Horus] Internal module OK 2016-03-15 22:52:21 +01:00
Bertrand Songis b1ebcb9ace [VC++] Quick & dirty fix to avoid the gettimeofday function when _MSC_VER is defined 2016-03-15 07:12:37 +01:00
Bertrand Songis 0807edfc20 TTS prompts (en / fr) updated 2016-03-14 22:52:12 +01:00
Bertrand Songis 5c107aeece [Horus] Compilation with the StatsTraces screen was KO 2016-03-14 22:38:25 +01:00
Bertrand Songis 050c1b5a7f [Horus] Wrong timer displayed 2016-03-14 22:37:28 +01:00
Bertrand Songis e9bcb05a93 CRLF removed 2016-03-14 22:30:46 +01:00
Bertrand Songis 691f4aa0ae Horus is flashed with dfu-util in Companion 2016-03-14 22:23:22 +01:00
Bertrand Songis 0045d8bcc8 Dead code removed 2016-03-14 21:57:15 +01:00
Bertrand Songis 7adccc23dc [Horus] Stats menu refactoring 2016-03-14 21:57:15 +01:00
Andre Bernet 13657587b1 Installer cleanup 2016-03-14 22:34:47 +04:00
Bertrand Songis ccb4db4c70 [Horus] Draft for stats menu 2016-03-14 18:56:55 +01:00
Bertrand Songis b6e8b73589 Sky9x simulator should now be OK 2016-03-14 18:55:56 +01:00
Bertrand Songis 88ca7fcc68 Link error in Sky9x / 9XRPRO simulators 2016-03-14 07:04:50 +01:00
Bertrand Songis 3f3af01cca Wrong simulator started in Companion for Taranis Plus / X9E 2016-03-13 23:34:20 +01:00
Bertrand Songis 7ec2c2c5a9 Merge pull request #3358 from opentx/projectkk2glider/issue_3344_lua_language
Fixes #3344: radio and voice language returned in Lua getGeneralSetti…
2016-03-13 19:29:40 +01:00
Damjan Adamic 92c208c003 Fixes #3350: sync dialog new line was not translated 2016-03-13 19:23:00 +01:00
Damjan Adamic a1e0b550fd Re #3344: doc update 2016-03-13 18:34:29 +01:00
Damjan Adamic d5db9b7410 Fixes #3344: radio and voice language returned in Lua getGeneralSettings() 2016-03-13 18:26:08 +01:00
Bertrand Songis 129b46ed2b Some more DLLs, now it works! 2016-03-12 22:51:52 +01:00
Bertrand Songis 7f3dbd0b57 Missing DLLs 2016-03-12 22:04:31 +01:00
Bertrand Songis 6443c49285 Try to have everything compiling in the same time! 2016-03-12 20:52:03 +01:00
Bertrand Songis 9fa354779c Suffix added to the Windows compile script 2016-03-12 20:46:17 +01:00
Damjan Adamic 3134b601d4 Re #3340: emergency mode is working, model settings survive WDT reset 2016-03-12 19:38:53 +01:00
Damjan Adamic b5c59368ca Compilation fix 2016-03-12 19:29:08 +01:00
Damjan Adamic a575709088 Horus power loop fixed if power button is held pressed. 2016-03-12 19:23:15 +01:00
Bertrand Songis a0132fc4e7 More simulators in Companion 2016-03-12 19:20:31 +01:00
Bertrand Songis ddac3ea5e0 More simulators in Companion 2016-03-12 19:18:32 +01:00
Bertrand Songis f4174e6756 Windows compilation script added to git 2016-03-12 18:58:32 +01:00
Bertrand Songis 958c51b374 VC++ simu DLL compilation fixes 2016-03-12 18:31:27 +01:00
Bertrand Songis 8d1121dcc1 Make Companion optional (in case we don't have Qt5 installed) 2016-03-12 12:17:12 +01:00
Bertrand Songis 47f949c491 Make Companion optional (in case we don't have Qt5 installed) 2016-03-12 11:56:15 +01:00
Bertrand Songis 5790716a0b [Horus] Memory overflow check added in compress / uncompress methods to BACKUP RAM 2016-03-12 10:21:43 +01:00
Damjan Adamic c141554fc1 CLI fixes 2016-03-12 07:03:50 +01:00
Bertrand Songis 560a297680 [Horus] Freeze when selecting an empty models category 2016-03-11 22:55:31 +01:00
Bertrand Songis b86f45e15b Thread delays also used in simu 2016-03-11 22:45:01 +01:00
Bertrand Songis 80bc6f2d1a Date / Time on simu now right (and less warnings given by Valgrind) 2016-03-11 22:24:26 +01:00
Bertrand Songis 2b39d703a1 Compilation fix 2016-03-11 21:54:29 +01:00
Damjan Adamic 03988a3a62 Emergency mode now working 2016-03-11 21:24:09 +01:00
Bertrand Songis 5b7853029c Warning fixed 2016-03-11 20:24:47 +01:00
Bertrand Songis 4daf15869b Simulators refactoring 2016-03-11 20:24:27 +01:00
mhotar ba736a6a64 horus stats icons 2016-03-11 18:40:31 +01:00
Bertrand Songis 086204aed5 Fixes #3344 2016-03-11 18:29:00 +01:00
Bertrand Songis 44d4e93ad1 [Taranis] EEPROM savings 2016-03-11 18:22:16 +01:00
Bertrand Songis 2e57549982 Simu threads now correctly stopped 2016-03-11 18:16:53 +01:00
Bertrand Songis 946c17770a Fixes #3347 2016-03-11 18:09:31 +01:00
Bertrand Songis eb9e6d3c80 Fixes #3342 2016-03-11 18:07:40 +01:00
Bertrand Songis e1a865650f Cosmetics 2016-03-11 18:04:08 +01:00
Bertrand Songis 3d3e077fae Merge pull request #3349 from craftandtheory/next
[Taranis] fixed placement of decimal point in SMLSIZE font
2016-03-11 07:08:02 +01:00
floaledm 13f33e38f8 [Taranis] fixed placement of decimal point in SMLSIZE font 2016-03-10 17:24:03 -06:00
Bertrand Songis e0d5989bef Now a GCC compilation fix ... 2016-03-10 22:47:34 +01:00
Bertrand Songis 41a6e7c4ab Visual C++ compilation fixes 2016-03-10 22:39:51 +01:00
Bertrand Songis 64cd872055 [SPORT] Sensor switches + Telemetry switch 2016-03-10 21:16:45 +01:00
Bertrand Songis 0341b9ffce [SPORT] Alarm added when a servo is in overload or a sensor is disconnected 2016-03-10 20:22:26 +01:00
Bertrand Songis 75e613331b Audio sound removed (for EEPROM format) 2016-03-10 18:51:02 +01:00
Bertrand Songis c521fce20b Default options for widgets / layouts / themes now OK on VC++ 2016-03-10 18:42:04 +01:00
Bertrand Songis 62df9831d8 Warnings removed 2016-03-10 18:40:15 +01:00
Bertrand Songis 051ec88bee [Taranis] Curve names can now only be 3 chars long 2016-03-10 18:39:38 +01:00
Bertrand Songis f1f6bbfc24 [Taranis] EEPROM import/export fixes 2016-03-10 18:38:53 +01:00
Bertrand Songis 02fdede06b Merge pull request #3346 from opentx/bsongis/switch_to_qt5
Move to Qt5 and Qt5Multimedia
2016-03-10 07:26:41 +01:00
Bertrand Songis aec2170e7e Move to Qt5 and Qt5Multimedia 2016-03-10 07:12:44 +01:00
Bertrand Songis d7a9710a9c Compilation fix 2016-03-09 21:17:35 +01:00
Bertrand Songis d4be000ccc Commit tests may now me executed from everywhere (not always inside sources) 2016-03-09 21:01:26 +01:00
Bertrand Songis be531b77f0 Commit tests may now me executed from everywhere (not always inside sources) 2016-03-09 20:34:34 +01:00
Bertrand Songis 9263dde231 Compilation fix 2016-03-09 20:32:46 +01:00
Bertrand Songis 473e69b3c3 [Horus] Emergency mode + some simu refactoring to avoid duplicated code 2016-03-09 19:22:27 +01:00
Bertrand Songis 10d0c56b08 [Horus] TODO added 2016-03-09 19:14:51 +01:00
Bertrand Songis c68e91c004 [Horus] Missing initialization when loading BACKUP RAM 2016-03-09 19:03:26 +01:00
Bertrand Songis e11eb2480e [Horus] Timer added in models list 2016-03-09 19:02:28 +01:00
Bertrand Songis 6b318e1383 [Horus] Cosmetics in popups 2016-03-09 19:00:30 +01:00
Bertrand Songis 382e4d2d4b [Horus] Freeze in Model Custom Scripts menu 2016-03-09 18:58:11 +01:00
Bertrand Songis 3b2524dcbb [Horus] Cosmetics 2016-03-09 18:57:18 +01:00
Bertrand Songis f75fedcb0d [Horus] Model selection screen refactoring 2016-03-09 07:06:51 +01:00
Bertrand Songis 797b4d9f1e Merge pull request #3341 from opentx/projectkk2glider/horus_reboot_and_external_module
Projectkk2glider/horus reboot and external module
2016-03-07 21:21:34 +01:00
Damjan Adamic 77d892a5de Horus:
* Fixed peripheral frequency.
 * Enabled external module driver: None and PPM protocols working. PPM timing and polarity verified.
2016-03-07 20:42:49 +01:00
Damjan Adamic 0b163ba067 CLI fixes 2016-03-07 20:41:37 +01:00
Damjan Adamic 4ebca98cdf Re #3340: Watchdog still disabled on Horus, but use -DWATCHDOG_DISABLED=OFF to enable it. Radio currently resets if WDT is enabled, because external module functions are not yet implemented. After the radio is stable default for WATCHDOG_DISABLED will be set to OFF 2016-03-07 20:09:25 +01:00
Damjan Adamic 1147db45a4 Re #3340: Cleanup
Re #3340: Software reboot tested and working on Horus
2016-03-07 20:05:12 +01:00
Damjan Adamic 4a6a20a2aa Re #3340: startup_stm32f40_41xxx.s file moved into targets directory in order to be able to customize it for each radio. 2016-03-07 20:04:09 +01:00
Bertrand Songis 7e0c78e2b7 Lua lcd.drawLine was not OK when (x1=x2 and y1>y2) or (y1=y2 and x1>x2) 2016-03-07 18:54:00 +01:00
Bertrand Songis 7cfb1b24a1 Lua lcd.drawLine was not OK when (x1=x2 and y1>y2) or (y1=y2 and x1>x2) 2016-03-06 13:35:08 +01:00
Bertrand Songis 0615fa780c PCB=TARANIS instead of PCB=HORUS for the default value 2016-03-06 13:24:03 +01:00
Bertrand Songis e43afd8001 [Horus] Compilation fix 2016-03-05 17:12:36 +01:00
Bertrand Songis 04966868eb [Horus] Ram backup write should be working now. Still needs to be tested with a restore on WDT 2016-03-05 16:34:23 +01:00
Bertrand Songis 52ebba3802 [Horus] Ram backup continued (RLC methods added) 2016-03-05 15:54:58 +01:00
Bertrand Songis 3b8c5bbeb1 Code formatting 2016-03-05 15:44:42 +01:00
Bertrand Songis 8e2c280e4a Script for code generation for model/radio structure copy is now OK 2016-03-05 12:42:19 +01:00
Bertrand Songis e0544e2d1e Test code enabled only in SIMU mode 2016-03-05 11:44:07 +01:00
Bertrand Songis f76a368497 Warning removed 2016-03-05 10:02:03 +01:00
Bertrand Songis 0c5f5695cc MSVC errors 2016-03-05 09:58:38 +01:00
Bertrand Songis 863272bc52 MSVC errors 2016-03-05 08:59:28 +01:00
Bertrand Songis 15912854e8 Warnings removed 2016-03-05 08:53:16 +01:00
Bertrand Songis ad33bff31c Warning removed 2016-03-05 08:42:55 +01:00
Bertrand Songis b8195e1372 New packages needed on Travis 2016-03-05 08:36:34 +01:00
Bertrand Songis 97a8dc33be New packages needed on Travis 2016-03-05 08:31:50 +01:00
Bertrand Songis ff4f914d34 New packages needed on Travis 2016-03-05 08:09:21 +01:00
Bertrand Songis 4104efbb17 Compilation fix 2016-03-05 08:07:04 +01:00
Bertrand Songis a7d0816ac7 Merge pull request #3326 from opentx/bsongis/passthrough_sport_to_lua
Bsongis/passthrough sport to lua
2016-03-05 00:27:13 +01:00
Bertrand Songis 7cf66c56c2 [Taranis] Infinite loop when drawing horizontal lines with a negative width 2016-03-05 00:22:18 +01:00
Bertrand Songis 55f71f053b myeeprom.h splitted into dataconstants.h and datastructs.h 2016-03-04 23:54:35 +01:00
Andre Bernet 7a45b3f71b Sync Companion voice language list with radio (fix #3338) 2016-03-03 10:53:54 +04:00
Andre Bernet 4ef981e914 Hungarian TTS fixes by hori64 2016-03-03 10:38:25 +04:00
Bertrand Songis 338c34427e [Taranis] Wizard moved to the sdcard/taranis directory 2016-03-03 07:22:24 +01:00
Bertrand Songis f41ac20051 Compilation fix 2016-03-02 23:37:01 +01:00
Bertrand Songis dee5a510f5 Compilation fix 2016-03-02 19:57:50 +01:00
Bertrand Songis 917b114b49 CMake LUA variable is now a string (YES/NO/NO_MODEL_SCRIPTS) 2016-03-02 19:44:49 +01:00
Bertrand Songis 2a5ab33d67 Compilation fix 2016-03-02 18:58:31 +01:00
Bertrand Songis 59b457650a [Horus] Cosmetics 2016-03-02 18:38:11 +01:00
Bertrand Songis 72a15318be [Horus] Transparency in the busy picto 2016-03-02 18:19:35 +01:00
Bertrand Songis 3e1d87d5b3 [Horus] Use of SD buffers in RAM instead of CCM for loading bitmaps (they may only be loaded from the main thread now) 2016-03-02 07:33:31 +01:00
Bertrand Songis b5f6618238 [Horus] UI continued 2016-03-01 23:47:11 +01:00
Bertrand Songis 23e597fffe [Horus] Memory leak 2016-03-01 19:59:32 +01:00
Bertrand Songis 2f9ae3750d [Horus] Cosmetics 2016-03-01 19:57:08 +01:00
Bertrand Songis dcc9dcbe99 [Horus] Screens Setup bugfixes 2016-03-01 19:54:55 +01:00
Bertrand Songis bfd2e2c538 [Horus] Warning removed 2016-03-01 19:53:23 +01:00
Bertrand Songis 638648a0a4 Cosmetics 2016-03-01 19:46:28 +01:00
Bertrand Songis d6c7b63f90 [9X] Warning fixed 2016-03-01 19:44:10 +01:00
Bertrand Songis 9f29003553 [Horus] Cosmetics 2016-03-01 19:15:12 +01:00
Bertrand Songis 4b4522f2ee [Horus] Bitmaps in SD Manager now truncated when too large 2016-03-01 19:12:45 +01:00
Bertrand Songis 54343be57e [Horus] Cosmetics 2016-03-01 19:07:11 +01:00
Bertrand Songis d449075a54 [9X] Warning fixed 2016-03-01 19:03:20 +01:00
Bertrand Songis 9a615adff7 [Horus] Revert to BMP bitmaps instead of PNG. It uses far less CPU 2016-03-01 19:01:31 +01:00
Damjan Adamic 8427e6ed04 Variables that are filled from SD card moved to RAM 2016-02-29 23:24:09 +01:00
Damjan Adamic c5e8dcff38 DMA used when reading/writing from SD card to SDRAM 2016-02-29 23:07:24 +01:00
Bertrand Songis d7909e7dbc [Horus] Menu model select continued 2016-02-29 22:18:16 +01:00
Bertrand Songis 1fd1e141f2 [Horus] More bitmaps on SD. PNG format used instead of BMP. And yes it's a bad idea given the resources we have. 2016-02-29 22:17:47 +01:00
Damjan Adamic f65e42833e SD read speed tests added to CLI 2016-02-29 22:14:45 +01:00
Damjan Adamic 98a7900e70 Re #3255: UID displayed on VERSION screen (Taranis) 2016-02-29 20:44:30 +01:00
Damjan Adamic 726e32731b Re #3255: strAppendUnsigned() was not working for numbers >= 0x80000000 2016-02-29 20:43:37 +01:00
Bertrand Songis cc4e28857d [Horus] Memory leak at each model load 2016-02-29 19:24:32 +01:00
Bertrand Songis 52a52fdb8a Memory leak in the simu (thanks Valgrind) 2016-02-29 19:20:56 +01:00
Damjan Adamic 19f392131c Fixes #3329: playDuration() second parameter is now really optional 2016-02-29 19:11:45 +01:00
Damjan Adamic fb3dd1303c Fixes #3328: docs updated 2016-02-29 19:11:28 +01:00
Bertrand Songis c6a04394c5 Invalid read fixed (thanks Valgrind) 2016-02-29 19:03:47 +01:00
Bertrand Songis 301cd0538b Changes in stb lib to avoid returning alpha bitmaps when no pixel has alpha 2016-02-29 18:41:35 +01:00
Bertrand Songis d28c71db86 Double test removed 2016-02-28 21:57:10 +01:00
Bertrand Songis 56fb01a958 Lua telemetryPush function now added 2016-02-28 21:21:48 +01:00
Damjan Adamic 5e96d02120 Transparent bitmaps supported/displayed in SD browser. BitmapBuffer: fixed wrong free() when using external data buffer. 2016-02-28 21:08:45 +01:00
Bertrand Songis 9a23c3fcc6 Merge pull request #3327 from opentx/projectkk2glider/new_jitter_filter_for_next2
Projectkk2glider/new jitter filter for next2
2016-02-28 19:58:45 +01:00
Bertrand Songis fe901dabdf luaRegister function removed 2016-02-28 19:55:20 +01:00
Bertrand Songis 806d547ced DMA used for ARGB4444 bitmaps 2016-02-28 19:37:50 +01:00
Bertrand Songis a495885472 Shift in bitmaps (and mem overflow I suppose) 2016-02-28 19:36:49 +01:00
Bertrand Songis 946fda5705 Less traces! 2016-02-28 18:38:41 +01:00
Damjan Adamic cefc78dbe8 Re #3167: Code cleanup, old bitmap loading code removed, now stb_image used exclusively. Malloc traces disabled. 2016-02-28 18:16:16 +01:00
Damjan Adamic 6acfabeaf0 Improvement of Horus ADC driver, the cross-talk between A4 and A5 was excessive. The ADC chip used supports only low impedance sources, so the time between MUX change and ADC sampling had to be bigger. 2016-02-28 17:58:19 +01:00
Damjan Adamic 9a40830f8a Re #3233: Better ADC jitter filter: using inverted formula and scaled input value for jitter filter, gives better result for small changes 2016-02-28 17:58:13 +01:00
Damjan Adamic 3004a61695 Show analog jitter measuring results and multipos calibration in CLI 2016-02-28 17:56:05 +01:00
Bertrand Songis 3660101e37 Cosmetics 2016-02-28 13:32:42 +01:00
Bertrand Songis acb7f1e17f Compilation fix 2016-02-28 12:17:20 +01:00
Bertrand Songis 75e1bead3f S.PORT to Lua telemetry passthrough
The Fifo is created with ```telemetryRegister``` and elements (ID + Value) are taken from the Fifo with ```telemetryPop```
Not tested at all. Just for review / discussion
2016-02-28 11:56:54 +01:00
Bertrand Songis 81a7a554c3 Languages support was broken 2016-02-27 23:53:26 +01:00
Bertrand Songis c5c92c012b Merge pull request #3324 from opentx/projectkk2glider/issue_3167_stb_image_fixes_for_horus
Projectkk2glider/issue 3167 stb image fixes for horus
2016-02-27 22:53:47 +01:00
Bertrand Songis 5f951abc15 Revert of my latest commit 2016-02-27 19:11:58 +01:00
Damjan Adamic 017f64a7a4 meminfo cli command added (memory allocator statistics from mallinfo()) 2016-02-27 18:07:23 +01:00
Damjan Adamic dfde65f397 Re #3167: Using stb library to load images 2016-02-27 17:33:27 +01:00
Damjan Adamic bdb50052ba Re #3167: Stb library modifed to reduce its stack usage. 2016-02-27 17:33:27 +01:00
Damjan Adamic 5cc8f41bce Re #3167: Update to new stb_image.h library v 2.10 (commit 30015ef464) 2016-02-27 17:33:11 +01:00
Bertrand Songis 08cb4550f6 Cosmetics 2016-02-27 15:38:23 +01:00
Bertrand Songis 4c342a1883 [Horus] Compilation fix 2016-02-26 15:50:06 +01:00
Bertrand Songis de96f607e2 [Horus] Last LCD change was commited by mistake 2016-02-26 14:45:56 +01:00
Bertrand Songis 927c511556 Compilation fix 2016-02-26 14:41:59 +01:00
Bertrand Songis 95fe7ad197 Cosmetics 2016-02-26 14:37:44 +01:00
Bertrand Songis 1b93340319 [Taranis] Sticks bitmap was not right 2016-02-26 14:30:09 +01:00
Bertrand Songis ca0e58e923 [X9E] Option added to allow the usage of HORUS sticks 2016-02-26 13:56:46 +01:00
Bertrand Songis 43b8ee361b [X9E] Option added to allow the usage of HORUS sticks 2016-02-26 13:55:09 +01:00
Bertrand Songis ee533c7950 Temporary compilation fix for VC++ 2016-02-26 13:33:50 +01:00
Bertrand Songis 2b9242fac2 [Horus] GUI continued 2016-02-25 23:14:58 +01:00
Damjan Adamic 83887f1532 Cmake PCB and USB options converted to STRING type 2016-02-25 14:58:38 +01:00
Bertrand Songis 1734ca6919 /radio/sdcard directory added to the repo 2016-02-24 22:31:19 +01:00
Bertrand Songis f299a5bfdf [Horus] White is now the default color for the Default theme. Is it good? 2016-02-21 21:05:34 +01:00
Bertrand Songis 95201db642 [Horus] Cosmetics for the LED 2016-02-21 20:00:00 +01:00
Bertrand Songis 103fea7b98 Compilation fixes 2016-02-21 19:35:30 +01:00
Bertrand Songis 358badfed9 [Horus] Bitmaps dynamic load 2016-02-21 18:25:52 +01:00
Bertrand Songis 63713578fe [Horus] LED off when drawing the SLEEP bitmap on shutdown 2016-02-21 15:16:52 +01:00
Andre Bernet 22a8a5cc80 [Horus] Fix LED off 2016-02-21 17:39:07 +04:00
Bertrand Songis 5827b0fd6c Compilation fix on X9E 2016-02-21 11:17:48 +01:00
Bertrand Songis cfe1a3777f Fixes #3307 2016-02-21 10:25:42 +01:00
Bertrand Songis d5396f8377 [Horus] Compilation fix 2016-02-21 10:13:37 +01:00
Bertrand Songis dcf7cd2c65 [RedundancyBus] Fields renamed (not PowerBox anymore) 2016-02-21 10:00:01 +01:00
Bertrand Songis 71e54b3072 [Horus] Heap now moved to the SDRAM. Around 7.5MB available, without any speed issue :) 2016-02-21 09:21:17 +01:00
Bertrand Songis fdca5a11b0 [Horus] Compilation fix 2016-02-21 09:07:43 +01:00
Bertrand Songis 8223cd907d [Horus] Another 40K saved for Lua 2016-02-21 08:58:29 +01:00
Bertrand Songis c2f8ef83c7 [Horus] Unused code 2016-02-21 08:55:02 +01:00
Bertrand Songis 7fceed4f5f [Horus] Another 64K saved for Lua 2016-02-20 19:42:55 +01:00
Bertrand Songis 2519df3b59 [Horus] Cosmetics 2016-02-20 19:40:02 +01:00
Bertrand Songis 6e30373f86 [Horus] Changes were applied to Taranis by mistake 2016-02-20 19:28:47 +01:00
Bertrand Songis b29d8c50ba [Horus] Cosmetics 2016-02-20 19:24:51 +01:00
Bertrand Songis fe3efb9483 [Horus] Cosmetics 2016-02-20 19:15:22 +01:00
Bertrand Songis f926b85611 [Horus] 64K more for Lua 2016-02-20 17:36:18 +01:00
Bertrand Songis 401f0f2a4f Cosmetics 2016-02-20 17:34:47 +01:00
Bertrand Songis 701d02ba8e [Horus] New bitmaps for popups 2016-02-20 17:12:30 +01:00
Bertrand Songis 67a599e0b9 [CLI] reboot command added 2016-02-20 16:55:05 +01:00
Bertrand Songis 0f4f49b64e [CLI] reboot command added 2016-02-20 15:05:19 +01:00
Bertrand Songis 84bf31f908 Compilation error 2016-02-19 07:13:53 +01:00
Bertrand Songis 1d9056fe8d Update .travis.yml 2016-02-18 23:46:17 +01:00
Bertrand Songis 5c175bfd7f Update .travis.yml 2016-02-18 23:31:37 +01:00
Bertrand Songis b74a3987c0 Update .travis.yml 2016-02-18 23:07:42 +01:00
Bertrand Songis d1be1b4ea0 [Horus] Widgets can be written in Lua 2016-02-18 22:10:27 +01:00
Bertrand Songis 01ef176173 [Horus] Cosmetics 2016-02-17 20:31:42 +01:00
Bertrand Songis 3e0a314307 [Horus] Preparation for the SCRIPTS/WIDGETS and SCRIPTS/LAYOUTS Lua scripts 2016-02-17 20:30:30 +01:00
Bertrand Songis 6622324483 [Horus] Transparency missing in alert boxes on real radio 2016-02-17 20:29:42 +01:00
Bertrand Songis 286a865d30 [Horus] Cosmetics 2016-02-17 20:27:40 +01:00
mhotar 5d72bbdc90 horus masks 1-8 for mainviews 2016-02-17 20:21:57 +01:00
Bertrand Songis a44d0ddc14 Compilation fix 2016-02-17 07:01:51 +01:00
Bertrand Songis 97ef3fa916 [Horus] Widget selection new design by Martin 2016-02-16 22:59:47 +01:00
Bertrand Songis f9f7ddd639 [Horus] Alert Box new design by Martin 2016-02-16 22:07:33 +01:00
Bertrand Songis 33910c8721 [Horus] UI continued 2016-02-16 20:45:25 +01:00
Bertrand Songis e72a049683 [Horus] Cosmetics 2016-02-16 18:59:45 +01:00
Bertrand Songis f7fafc0948 [Horus] New Lua LCD functions 2016-02-16 18:57:51 +01:00
Bertrand Songis 1d867a0daa [Horus] Lua constants names can go up to 32 chars 2016-02-16 18:54:07 +01:00
Bertrand Songis 3c56ea0122 [Horus] HORUS compilation removed from the Makefile. CMake is now mandatory 2016-02-16 18:52:35 +01:00
Bertrand Songis 6db97c573b [Horus] Array initialization when loading a bitmap fails 2016-02-16 18:51:37 +01:00
Bertrand Songis 5853ac635f [Horus] More constants exported to the Lua interface 2016-02-16 18:49:41 +01:00
mhotar fad9710012 horus images to alpha 2016-02-16 17:19:35 +01:00
Damjan Adamic 9abeb15360 Fixes #3256: Spanish TTS correction for hundreds 2016-02-15 22:17:10 +01:00
Damjan Adamic 29b8b2685c Fixes #3285: only first 32 input lines (out of 64) were accessible in Lua 2016-02-15 21:50:57 +01:00
Bertrand Songis 79a5f65a2c [Horus] UI continued 2016-02-15 21:28:31 +01:00
Andre Bernet c07e965542 No more XercesC 2016-02-15 23:50:10 +04:00
Andre Bernet 9e4f9bb7ed No more XercesC 2016-02-15 23:28:24 +04:00
JivaroFAD 32f278ee3f MEGA2560 audio=no fix 2016-02-14 21:01:06 +01:00
Andre Bernet 860409de29 [Horus] UI fixes 2016-02-12 12:21:33 +04:00
Bertrand Songis 48081db9f6 [Horus] Compilation fixes 2016-02-11 23:34:07 +01:00
Bertrand Songis 02f06706c2 [Horus] Themes introduction 2016-02-11 22:58:43 +01:00
Bertrand Songis 1da4df143c [Horus] Travis OK? 2016-02-10 17:16:45 +01:00
Bertrand Songis 6ce34c511c [Horus] Last commit broke the UI :( 2016-02-10 17:00:55 +01:00
Bertrand Songis 27fe5c198f [Horus] Warnings fixed 2016-02-10 14:55:00 +01:00
Bertrand Songis cd821116c5 [Horus] UI Refactoring 2016-02-10 14:38:14 +01:00
Bertrand Songis 65fc20ddde [Horus] Martin's design for buttons 2016-02-09 23:08:47 +01:00
Bertrand Songis 2037c33ce1 [Horus] Martin's design to choose the layout 2016-02-09 23:08:47 +01:00
JivaroFAD 2e76be5b0b Mega2560 audio compilation allowed 2016-02-09 20:07:37 +01:00
JivaroFAD cdcf64e38c Mega2560 audio correction 2016-02-09 19:39:15 +01:00
Andre Bernet fd1181dc09 VC++ compilation 2016-02-09 02:07:22 +04:00
Andre Bernet c7bd968586 Fix annoying space and newline in date constant on windows requiring manual fix each time 2016-02-09 01:22:23 +04:00
Bertrand Songis 11cc82a7ac [Horus] UI bugfix 2016-02-08 21:41:13 +01:00
Bertrand Songis 1ba6a56641 Travis compilation fix 2016-02-08 21:20:59 +01:00
Bertrand Songis 366c286e73 [Horus] UI continued 2016-02-08 20:56:02 +01:00
Andre Bernet afddad9396 Taranis main view adjustments for 3-char switch names (fix #3278) 2016-02-07 15:45:47 +04:00
Andre Bernet 110c5da1e7 Joystick now supports 24 buttons (ch9-32) (fix #3268) 2016-02-06 09:34:12 +04:00
Bertrand Songis fda4cac1ed [Horus] 2016-02-01 20:45:56 +01:00
Andre Bernet 7d0f5a9d9b Store control types and names in profile (fix #3260) 2016-01-31 12:21:18 +01:00
Bertrand Songis e64866244d Compilation fix 2016-01-31 11:40:27 +01:00
Bertrand Songis 1c38ccaa12 New menu to configure the user custom screens 2016-01-31 11:35:25 +01:00
Bertrand Songis 40ae1879e8 VC++ compilation fix 2016-01-31 11:34:07 +01:00
Bertrand Songis 979a86f24e Companion crash when opening a new model fixed 2016-01-31 00:22:03 +01:00
Andre Bernet 992897a5a7 Import/export handling was broken for Average formula telemetry sensors (Fix #3262) 2016-01-30 23:06:48 +01:00
Andre Bernet 8733915634 Fix 2.2 nightly updates 2016-01-30 22:47:56 +01:00
Bertrand Songis 643e449f52 Calibration modified 2016-01-30 13:54:52 +01:00
Bertrand Songis c36acc5372 SPORT_FILE_LOG renamed to LOG_TELEMETRY. And logs are now stored in telemetry.log 2016-01-30 12:58:00 +01:00
Bertrand Songis 3913a36aeb Crossfire again @400000 bauds 2016-01-30 12:14:35 +01:00
Bertrand Songis 2a4bc2cf6a Fixes #2022 2016-01-30 11:23:34 +01:00
Bertrand Songis fe865dfdae Cosmetics 2016-01-30 11:14:43 +01:00
Bertrand Songis 45cdfac22b Cosmetics 2016-01-30 10:17:28 +01:00
Bertrand Songis c07a2d338a Try to update gcc-avr on Travis and fix compilation failure 2016-01-30 00:40:29 +01:00
Bertrand Songis 16a37db86f Try to update gcc-avr on Travis and fix compilation failure 2016-01-30 00:37:35 +01:00
Bertrand Songis 695e05c713 Try to update gcc-avr on Travis and fix compilation failure 2016-01-30 00:36:32 +01:00
Bertrand Songis 29eafb4fba Try to update gcc-avr on Travis and fix compilation failure 2016-01-30 00:29:05 +01:00
Bertrand Songis 7599d22c83 Try to update gcc-avr on Travis and fix compilation failure 2016-01-30 00:00:49 +01:00
Bertrand Songis 027f442079 Update README.md 2016-01-29 23:59:03 +01:00
Bertrand Songis 56fd1e8039 Try to update gcc-avr on Travis and fix compilation failure 2016-01-29 23:57:00 +01:00
Bertrand Songis 0e1ab00ed3 Try to update gcc-avr on Travis and fix compilation failure 2016-01-29 23:54:35 +01:00
Bertrand Songis 7ebebb312a Fixes #3255 2016-01-29 16:11:51 +01:00
Bertrand Songis 364bf6ac23 Commit tests should be OK now 2016-01-29 14:27:27 +01:00
Bertrand Songis b7e4a3c63b [Horus] A few TODOs fixed (some sprintf removed) 2016-01-28 23:12:26 +01:00
Bertrand Songis d6c17a7ead Compilation failure 2016-01-28 06:53:13 +01:00
Bertrand Songis 3854e05f26 [Horus] Missing bitmaps 2016-01-27 23:03:33 +01:00
Bertrand Songis 087e606021 [Horus] Horus downloads now enabled 2016-01-27 22:29:03 +01:00
Bertrand Songis 4c8789106d [Horus] Button widget added (still not finished) 2016-01-27 22:17:51 +01:00
Bertrand Songis 5ff4d8829a Compilation failure 2016-01-27 07:09:15 +01:00
Bertrand Songis a313d541dc Compilation failure 2016-01-27 07:01:36 +01:00
Bertrand Songis a8300715a9 [Horus] View main - Timer bitmap added 2016-01-26 21:51:04 +01:00
Bertrand Songis d118acdf20 [Horus] Batt range added in Radio Setup 2016-01-26 21:48:27 +01:00
Bertrand Songis 9f60e3c909 [Horus] Hardware menu added to the simulator 2016-01-26 06:45:59 +01:00
Bertrand Songis 9d7e38aeff Missing bitmaps added 2016-01-25 22:38:42 +01:00
Bertrand Songis 5c71d74aab [Horus] Hardware menu added. Calibration menu moved to the Hardware menu 2016-01-25 22:11:25 +01:00
Damjan Adamic e738293a52 Fixes #3248: offset was missing in inputs display 2016-01-25 20:22:06 +01:00
Bertrand Songis 870002ab79 [Horus] Calibration bitmaps 2016-01-25 18:58:44 +01:00
Bertrand Songis 07d62e39db [Horus] Rotary encoder initialization now good 2016-01-25 18:40:21 +01:00
Bertrand Songis 48365f36a5 [Horus] Slider a little bit modified 2016-01-25 07:29:36 +01:00
Bertrand Songis b43d336978 Missing bitmaps 2016-01-25 06:44:05 +01:00
Bertrand Songis e5ae58d4d7 Calibration bitmaps by Martin 2016-01-24 22:36:11 +01:00
Bertrand Songis b141203bc1 [Horus] Slider with Martin's design 2016-01-24 22:30:46 +01:00
Bertrand Songis 16eaa0347d Bitmaps moved 2016-01-24 22:29:25 +01:00
Bertrand Songis c0c7968fc4 [Horus] Pots and sliders now correct in the main view 2016-01-24 20:54:02 +01:00
mhotar e1463b99e6 Horus button and slider bitmaps 2016-01-24 12:27:59 +01:00
Bertrand Songis e8318cd8de Mike's bootloader moved to GitHub 2016-01-24 09:21:12 +01:00
Bertrand Songis 0eb71cb4f2 [Horus] Red LED on error. Blue LED otherwise 2016-01-22 23:05:00 +01:00
Bertrand Songis c5f3010295 [Taranis] Cosmetics 2016-01-22 22:37:29 +01:00
Bertrand Songis 641b6a321a [Horus] Internal module and Telemetry now OK. Trainer modes (as Taranis) added 2016-01-22 22:37:06 +01:00
Bertrand Songis a42b63ff34 [Horus] Missing telemetry code 2016-01-22 22:14:51 +01:00
Bertrand Songis d2ec99513c [Horus] Missing pulses code 2016-01-22 22:07:37 +01:00
Bertrand Songis 8eb3480acc [Horus] Remaining trace removed 2016-01-22 22:04:34 +01:00
Bertrand Songis c9ae964428 [Horus] Haptic now OK 2016-01-20 21:40:53 +01:00
Bertrand Songis c51a85f376 [Horus] Mixer volumes range again [-2:+2]. Could be improved later. 2016-01-20 20:05:28 +01:00
Bertrand Songis 6c54374ed8 [Horus] VS1053B Volume added. No ticks at all compared to Taranis! 2016-01-20 19:52:14 +01:00
Bertrand Songis da76106465 Cosmetics 2016-01-20 15:19:53 +01:00
Bertrand Songis 3b3555df48 Travis should be happy now 2016-01-20 15:18:08 +01:00
Bertrand Songis c8ae36997e Simu always compiled in debug mode (-g) 2016-01-20 15:16:40 +01:00
Bertrand Songis 30bf6f7530 [Horus] Segfault in popups displaying file lists 2016-01-20 15:15:51 +01:00
Bertrand Songis 1786d998f8 [Horus] MP3 driver now OK. Still the volume to add 2016-01-20 13:44:07 +01:00
Bertrand Songis 708ef3bc98 Firmware compilation under mingw32 is now OK (tested for Horus) 2016-01-19 20:16:07 +01:00
Damjan Adamic 4aa6bd12ca Fixes #3233: Added ADC jitter measurement (use MEASURE_JITTER=YES to enable), Added ADC jitter filter (use JITTER_FILTER=No to disable) (ported from master) 2016-01-19 17:13:11 +01:00
Bertrand Songis c46c1f887a [Horus] MP3 driver. The sound is completely distorded (why?), but the background noise is not there 2016-01-18 23:26:23 +01:00
Damjan Adamic a8172e3588 Fixes #2639: ADC crosstalk on X9E fixed, sample time was not set for the right channels, sample time also needed to be increased 2016-01-18 20:45:31 +01:00
Andre Bernet 91341fa759 Companion looking for custom scripts at the wrong place (fix #3237) 2016-01-18 14:41:44 +01:00
Bertrand Songis 0bad169008 GUI simplification. Needs to be reviewed, but it is better on Horus like this 2016-01-17 23:29:38 +01:00
Bertrand Songis aa7c320821 [Horus] Shutdown noise removed 2016-01-17 22:44:07 +01:00
Bertrand Songis 5c67e20fa5 [Horus] Makefile updated 2016-01-17 22:00:56 +01:00
Bertrand Songis aa62f0d6f1 [Horus] Not sure it's good. But the 10ms timer goes at the right speed and audio is good (but still very noisy!) 2016-01-17 21:42:11 +01:00
Bertrand Songis c86ace9976 [Horus] Audio now OK. PI9 needed to be set as INPUT 2016-01-17 21:41:14 +01:00
Bertrand Songis b11d45dbb5 [Horus] Shutdown animation fixed 2016-01-17 21:38:42 +01:00
Bertrand Songis 50b76183da XSD and Xerces not needed anymore (they were not used) 2016-01-16 15:37:15 +01:00
Bertrand Songis 1a7fb12f15 Compilation fix 2016-01-16 11:20:44 +01:00
Bertrand Songis cbfdf9b9f5 Compilation fix 2016-01-16 11:10:36 +01:00
Bertrand Songis 3f7b289ebe [Horus] Shutdown animation now OK 2016-01-16 11:00:42 +01:00
Damjan Adamic 295491f965 Header files stamp.h and location.h now generated in build directory 2016-01-15 20:26:08 +01:00
Damjan Adamic 16f465b147 Hours simu build now uses the same config as firmware build 2016-01-15 19:39:16 +01:00
Bertrand Songis c91511565e [Horus] MP3 driver extracted from FrSky drivers. I would like to have the sine test wave OK. Still nothing for now 2016-01-15 17:30:54 +01:00
Bertrand Songis b6759d5434 [Horus] Compilation fix 2016-01-15 12:42:37 +01:00
Bertrand Songis 1771a47637 [Horus] Debug variable added for the audio buffer count. This one is incremented correctly. 2016-01-15 12:23:55 +01:00
Bertrand Songis 677995205d [Horus] I2C audio pot is removed in latest board! 2016-01-15 11:16:24 +01:00
Bertrand Songis a6a71b8650 Google tests should be OK 2016-01-15 10:36:20 +01:00
Bertrand Songis ab4efe89cc Compilation error 2016-01-15 09:09:19 +01:00
Bertrand Songis efb37a4419 Remarks from Damjan in e8aaa67450 taken into account 2016-01-15 08:44:45 +01:00
Bertrand Songis d85ee61cb3 Compilation error 2016-01-15 08:02:44 +01:00
Bertrand Songis eecdef3c5a VC++ compilation 2016-01-14 23:15:51 +01:00
Bertrand Songis a1883db889 Curve names used instead of CV<X> when available 2016-01-14 23:13:26 +01:00
Bertrand Songis 0dd15ebbab [Taranis] EEPROM v217 => v218 conversion fixes - The MENU and EXIT keys are now OK 2016-01-14 22:57:19 +01:00
Bertrand Songis 3ad57cf3ff VC++ compilation 2016-01-14 19:46:27 +01:00
Damjan Adamic f27c092ba4 Missing stuff from commit e8aaa67450 2016-01-14 19:23:56 +01:00
Bertrand Songis e8aaa67450 [Horus] GUI continued - #3159
[GVars] Refactoring continued - #3185
2016-01-14 07:41:30 +01:00
Andre Bernet 43b84385d8 Cosmetics 2016-01-12 11:31:34 +04:00
Andre Bernet 7fe39791ff Cosmetics 2016-01-12 11:23:58 +04:00
Damjan Adamic a3fac6049f Fixes #3207: proper sensor instance generation in Telemetry Simulator (ported from master #3213) 2016-01-11 18:58:41 +01:00
Damjan Adamic e3eb236e7b Nightly build fix: gmake target only availabe if gtests source is found 2016-01-11 18:42:37 +01:00
Andre Bernet a57053e390 RTC tooltip corrected (fix #3225) 2016-01-11 20:36:04 +04:00
Damjan Adamic f2362bb748 Fixes #3222 : Throttle Source combobox was populated multiple times (ported from master) 2016-01-10 21:52:47 +01:00
Damjan Adamic 8780535ff9 Fixes #3223: some lua fields were not exported (CPUARM) 2016-01-10 21:13:42 +01:00
Damjan Adamic 12af6a8a19 Travis using cmake for build tests 2016-01-10 20:43:19 +01:00
Damjan Adamic 7faa7c79bf Re #2939: additional test for EDGE logical switch 2016-01-10 18:52:42 +01:00
Damjan Adamic 0ac9998e6b Fixes #2939: Logical switch internal state was being reset by the AND switch, that affected its function (it looked like AND was applied before the EDGE processing, not after like it is done for other logical switch types). (ported from master branch) 2016-01-10 18:52:42 +01:00
Damjan Adamic a76fc4c88c Re #2939: gtests added to cmake 2016-01-10 18:43:33 +01:00
Bertrand Songis 26469b8627 [Horus] Cosmetics 2016-01-10 13:27:02 +01:00
martin ba4dd66891 horus startup/shutdown images 2016-01-10 12:41:47 +01:00
Bertrand Songis be67637ec6 [Horus] Compilation fix 2016-01-09 11:44:23 +01:00
Bertrand Songis 595a191be4 [Horus] Compilation fix 2016-01-09 11:19:01 +01:00
Bertrand Songis 1ff32c64f5 [Horus] Bitmaps must be word aligned! 2016-01-09 01:05:09 +01:00
Bertrand Songis 87f8ea516b Compilation fix 2016-01-08 23:34:57 +01:00
Bertrand Songis 86df9fee4a Compilation fix 2016-01-08 23:17:30 +01:00
Bertrand Songis bd7769e717 [Horus] Throttle stick interrupts the splash 2016-01-08 23:07:29 +01:00
Bertrand Songis c42696102a Cosmetics 2016-01-08 22:27:55 +01:00
Bertrand Songis 82a4ad4103 [Horus] Fixes. ADC + Switches + Trims + RTC OK 2016-01-08 22:21:26 +01:00
Bertrand Songis 685dece185 [Horus] Missing dependency 2016-01-08 16:49:20 +01:00
Bertrand Songis a43271c7a6 [Horus] First fixes on the real radio 2016-01-07 23:56:18 +01:00
Bertrand Songis bbe4e7d4c3 Fixes #3206 2016-01-06 23:29:20 +01:00
Bertrand Songis 3d9553d5f3 #3206 - Statistics view reworked 2016-01-06 23:12:02 +01:00
Bertrand Songis 5e02140ac7 [CMake] BOLD missing in Taranis compilation 2016-01-06 22:32:13 +01:00
Bertrand Songis d54525fe7a Cosmetics 2016-01-06 21:55:42 +01:00
Bertrand Songis 8a819dbed5 OpenTX copyright date updated to 2016 2016-01-06 21:54:15 +01:00
Damjan Adamic b4cffbcce1 nightly-22 updated 2016-01-04 22:34:23 +01:00
Damjan Adamic 9a5bd48712 More changes 2016-01-04 22:25:52 +01:00
Damjan Adamic d8bc752291 Revision fetched after the repository update.
Removed unused files.
Unification of nightly and release scripts
Code cosmetics
2016-01-04 22:25:52 +01:00
mhotar f6740c4583 CZ translation-minor update 2016-01-04 20:35:26 +01:00
Bertrand Songis 5f0bfc50e9 Merge pull request #3197 from opentx/projectkk2glider/issue_3167_image_support
Projectkk2glider/issue 3167 image support
2016-01-03 19:50:39 +01:00
Damjan Adamic f61bb941dc Read image using FatFs and disable stb-image stdio support 2016-01-03 18:49:21 +01:00
Damjan Adamic 0600122102 Small fixes 2016-01-03 18:05:18 +01:00
Damjan Adamic bfd385115f Compilaton fix 2016-01-02 21:01:28 +01:00
Damjan Adamic d7112b5dd7 BMP also works (1bit bitmaps are not supported by stb-image library) 2016-01-02 20:48:28 +01:00
Damjan Adamic acaa77daab JPEG also works 2016-01-02 20:48:28 +01:00
Damjan Adamic 03c9b2c4a2 PNG loading works 2016-01-02 20:48:28 +01:00
Damjan Adamic 826eb2569c stb-image v2.08 library added (https://github.com/nothings/stb) 2016-01-02 20:48:28 +01:00
1105 changed files with 94488 additions and 57654 deletions
+1
View File
@@ -10,3 +10,4 @@ radio/src/bootloader/bootloader_ramBoot*
*.stamp
radio/src/lua/lua_fields_*.txt
radio/src/lua/lua_exports_*.txt
build*/
+21 -8
View File
@@ -1,14 +1,27 @@
language: cpp
sudo: required
dist: trusty
language: python
virtualenv:
system_site_packages: true
python:
- 3.4
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
- sudo add-apt-repository ppa:ubuntu-sdk-team/ppa --yes
- sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded --yes
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
- sudo apt-get update -qq
install:
- sudo apt-get install -y xvfb lcov cmake cmake-data bc curl gcc-arm-none-eabi gcc-avr avr-libc avrdude libqtcore4 libqt4-dev qt4-qmake g++ libxerces-c-dev xsdcxx libsdl1.2-dev libusb-1.0-0 libphonon-dev phonon libqtwebkit-dev python-qt4 python-qt4-dev libfox-1.6-dev libgtest-dev
- sudo apt-get --yes --force-yes install qtbase5-dev qtmultimedia5-dev qttools5-dev qttools5-dev-tools python3-pyqt5 curl gcc-arm-none-eabi libfox-1.6-dev libgtest-dev
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/gcc-avr_1%253a4.8-2.1_amd64.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/libmpfr4_3.1.2-1_amd64.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/avr-libc_1%253a1.8.0-4.1_all.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/binutils-avr_2.23.1-2.1_amd64.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/libmpc3_1.0.1-1ubuntu1_amd64.deb
- sudo dpkg --install gcc-avr_1%3a4.8-2.1_amd64.deb avr-libc_1%3a1.8.0-4.1_all.deb libmpfr4_3.1.2-1_amd64.deb binutils-avr_2.23.1-2.1_amd64.deb libmpc3_1.0.1-1ubuntu1_amd64.deb
script:
- radio/util/commit-tests.sh
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS .. && cmake --build .
- ./tools/commit-tests.sh .
+36 -1
View File
@@ -9,6 +9,13 @@ set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFI
message(STATUS "OpenTX ${VERSION}")
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0020 NEW)
cmake_policy(SET CMP0023 OLD)
if(POLICY CMP0043)
cmake_policy(SET CMP0043 NEW)
endif()
set(CMAKE_CXX_STANDARD 11)
set(RADIO_DIRECTORY ${PROJECT_SOURCE_DIR}/radio)
set(RADIO_SRC_DIRECTORY ${RADIO_DIRECTORY}/src)
@@ -18,5 +25,33 @@ 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)
find_package(Qt5Widgets)
find_package(Qt5Xml)
find_package(Qt5LinguistTools)
find_package(Qt5PrintSupport)
find_package(Qt5Multimedia)
message(STATUS "Looking for SDL ")
find_package(Sdl)
if(SDL_FOUND)
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
else()
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
endif()
message(STATUS "Looking for FOX ")
find_package(Fox)
if ((NOT FOX_FOUND) AND (NOT WIN32))
message("Libfox not found, simu target will not be available")
endif()
include(Macros)
today(DATE)
now(TIME)
git_id(GIT_STR)
add_subdirectory(${RADIO_SRC_DIRECTORY})
add_subdirectory(${COMPANION_SRC_DIRECTORY})
if(Qt5Widgets_FOUND)
add_subdirectory(${COMPANION_SRC_DIRECTORY})
endif()
+1
View File
@@ -17,3 +17,4 @@ Karl Szmutny
Michal Hlavinka
Pat Mackenzie
Michael Byrne
Christophe Brision (Ingwie)
+2 -2
View File
@@ -1,7 +1,7 @@
##OpenTX 2.2 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)
[![Build Status](https://travis-ci.org/opentx/opentx.svg?branch=next)](https://travis-ci.org/opentx/opentx)
[![Join the chat at https://opentx.rocket.chat](https://camo.githubusercontent.com/3d659054abd6ce21c0e47cf3b83a51bda69ca282/68747470733a2f2f64656d6f2e726f636b65742e636861742f696d616765732f6a6f696e2d636861742e737667)](https://opentx.rocket.chat)
[![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.
+4 -5
View File
@@ -1,11 +1,12 @@
macro(add_bitmaps_target targetname filter width format)
set(bitmaps_files)
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}
COMMAND python ${RADIO_DIRECTORY}/util/img2lbm.py ${bitmap} ${target} ${width} ${format} ${ARGN}
DEPENDS ${bitmap}
)
list(APPEND bitmaps_files ${target})
@@ -15,11 +16,9 @@ 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
add_custom_target(ttf_${radio}_${name}
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)
set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
endmacro(add_truetype_font_target)
+63
View File
@@ -0,0 +1,63 @@
# Imported from the DeskVox project (LPGL 2.1)
include(FindPackageHandleStandardArgs)
set(hints
$ENV{LIB_BASE_PATH}/fox
)
set(paths
/usr
/usr/local
)
find_path(FOX_INCLUDE_DIR
NAMES
fx.h
HINTS
${hints}
PATHS
${paths}
PATH_SUFFIXES
include
include/fox
include/fox-1.6
)
find_library(FOX_LIBRARY
NAMES
FOX-1.6
fox-1.6
HINTS
${hints}
PATHS
${paths}
PATH_SUFFIXES
lib64
lib
)
find_library(FOX_LIBRARY_DEBUG
NAMES
FOXD-1.6
foxd-1.6
HINTS
${hints}
PATHS
${paths}
PATH_SUFFIXES
lib64
lib
)
if(FOX_LIBRARY_DEBUG)
set(FOX_LIBRARIES optimized ${FOX_LIBRARY} debug ${FOX_LIBRARY_DEBUG})
else()
set(FOX_LIBRARIES ${FOX_LIBRARY})
endif()
find_package_handle_standard_args(FOX
DEFAULT_MSG
FOX_INCLUDE_DIR
FOX_LIBRARY
)
+20 -26
View File
@@ -4,25 +4,25 @@
# SDL_FOUND, if false, do not try to link to SDL
# SDL_INCLUDE_DIR, where to find SDL.h
#
# Don't forget to include SDLmain.h and SDLmain.m your project for the
# Don't forget to include SDLmain.h and SDLmain.m your project for the
# OS X framework based version. (Other versions link to -lSDLmain which
# this module will try to find on your behalf.) Also for OS X, this
# this module will try to find on your behalf.) Also for OS X, this
# module will automatically add the -framework Cocoa on your behalf.
# $SDLDIR is an environment variable that would
# correspond to the ./configure --prefix=$SDLDIR
# used in building SDL.
# l.e.galup 9-20-02
#
# Modified by Eric Wing.
# Added new modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
# Modified by Eric Wing.
# Added new modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
# Also corrected the header search path to follow "proper" SDL guidelines.
# Added a search for SDLmain which is needed by some platforms.
# Added a search for threads which is needed by some platforms.
# Added needed compile switches for MinGW.
#
# On OSX, this will prefer the Framework version (if found) over others.
# People will have to manually change the cache values of
# People will have to manually change the cache values of
# SDL_LIBRARY to override this selection.
#
# Note that the header path has changed from SDL/SDL.h to just SDL.h
@@ -46,14 +46,14 @@ FIND_PATH(SDL_INCLUDE_DIR SDL.h
/opt/local/include/SDL # DarwinPorts
/opt/local/include
/opt/csw/include/SDL # Blastwave
/opt/csw/include
/opt/csw/include
/opt/include/SDL
/opt/include
C:/Programs/SDL/include
)
# I'm not sure if I should do a special casing for Apple. It is
# I'm not sure if I should do a special casing for Apple. It is
# unlikely that other Unix systems will find the framework path.
# But if they do ([Next|Open|GNU]Step?),
# But if they do ([Next|Open|GNU]Step?),
# do they want the -framework option also?
IF(${SDL_INCLUDE_DIR} MATCHES ".framework")
# The Cocoa framework must be linked into SDL because SDL is Cocoa based.
@@ -83,7 +83,7 @@ IF(${SDL_INCLUDE_DIR} MATCHES ".framework")
ELSE(${SDL_INCLUDE_DIR} MATCHES ".framework")
# SDL-1.1 is the name used by FreeBSD ports...
# don't confuse it for the version number.
FIND_LIBRARY(SDL_LIBRARY_TEMP
FIND_LIBRARY(SDL_LIBRARY_TEMP
NAMES SDL SDL-1.1
PATHS
$ENV{SDLDIR}/lib
@@ -93,13 +93,13 @@ ELSE(${SDL_INCLUDE_DIR} MATCHES ".framework")
/opt/local/lib
/opt/csw/lib
/opt/lib
C:/Programs/SDL/lib
C:/Programs/SDL/lib/x86
)
# Non-OS X framework versions expect you to also dynamically link to
# SDLmain. This is mainly for Windows and OS X. Other platforms
# Non-OS X framework versions expect you to also dynamically link to
# SDLmain. This is mainly for Windows and OS X. Other platforms
# seem to provide SDLmain for compatibility even though they don't
# necessarily need it.
FIND_LIBRARY(SDLMAIN_LIBRARY
FIND_LIBRARY(SDLMAIN_LIBRARY
NAMES SDLmain SDLmain-1.1
PATHS
$ENV{SDLDIR}/lib
@@ -109,13 +109,12 @@ ELSE(${SDL_INCLUDE_DIR} MATCHES ".framework")
/opt/local/lib
/opt/csw/lib
/opt/lib
C:/Programs/SDL/lib
)
ENDIF(${SDL_INCLUDE_DIR} MATCHES ".framework")
# SDL may require threads on your system.
# The Apple build may not need an explicit flag because one of the
# frameworks may already provide it.
# The Apple build may not need an explicit flag because one of the
# frameworks may already provide it.
# But for non-OSX systems, I will use the CMake Threads package.
IF(NOT APPLE)
FIND_PACKAGE(Threads)
@@ -136,14 +135,14 @@ IF(SDL_LIBRARY_TEMP)
ENDIF(SDLMAIN_LIBRARY)
# For OS X, SDL uses Cocoa as a backend so it must link to Cocoa.
# CMake doesn't display the -framework Cocoa string in the UI even
# though it actually is there. I think it has something to do
# CMake doesn't display the -framework Cocoa string in the UI even
# though it actually is there. I think it has something to do
# with the CACHE STRING. Maybe somebody else knows how to fix this.
# The problem is mainly cosmetic, and not a functional issue.
IF(APPLE)
SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa")
ENDIF(APPLE)
# For threads, as mentioned Apple doesn't need this.
# In fact, there seems to be a problem if Find the threads package
# and try using this line, so I'm just skipping it entirely for OS X.
@@ -151,15 +150,10 @@ IF(SDL_LIBRARY_TEMP)
SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
ENDIF(NOT APPLE)
# For MinGW library
IF(MINGW)
SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP})
ENDIF(MINGW)
# Set the final string here so the GUI reflects the final state.
SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
SET(SDL_FOUND "YES")
ENDIF(SDL_LIBRARY_TEMP)
MARK_AS_ADVANCED(SDL_LIBRARY_TEMP)
MARK_AS_ADVANCED(SDL_LIBRARY_TEMP)
+1
View File
@@ -2,6 +2,7 @@ macro(today RESULT)
if(WIN32)
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/(....).*" "\\1.\\2.\\3" ${RESULT} ${${RESULT}})
string(SUBSTRING ${${RESULT}} 0 10 ${RESULT})
elseif(UNIX)
execute_process(COMMAND "date" "+%Y-%m-%d" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(....)-(..)-(..).*" "\\1-\\2-\\3" ${RESULT} ${${RESULT}})
+95 -86
View File
@@ -1,5 +1,3 @@
include(Macros)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
set(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
@@ -8,6 +6,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
else(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(COMPANION_NAME "companion")
set(SIMULATOR_NAME "simulator")
if(APPLE)
set(SIMULATOR_LIB_PATH ${CMAKE_INSTALL_PREFIX}/Contents/companion.app/Ressources)
endif()
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(ALLOW_NIGHTLY_BUILDS "Allow nightly builds download / update") # Disabled by default
@@ -27,48 +28,10 @@ if(TABLE_LAYOUT)
message(STATUS "Using QTableWidget")
endif(TABLE_LAYOUT)
message(STATUS "Looking for XercesC ")
find_package(XercesC)
if(XERCESC_FOUND)
include_directories(${XERCESC_INCLUDE_DIR})
set(LidarFormat_LIBRAIRIES ${LidarFormat_LIBRAIRIES} ${XERCESC_LIBRARIES})
else()
message(FATAL_ERROR "XercesC not found! Please set XercesC path ...")
endif()
message(STATUS "Looking for 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 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()
find_package(Qt4 4.8.1 REQUIRED)
set(QT_USE_QTNETWORK True)
set(QT_USE_QTXML True)
include(${QT_USE_FILE})
message(STATUS "Looking for PHONON ")
find_package(Phonon)
if(PHONON_FOUND)
include_directories(${PHONO_INCLUDE_DIR})
message("PHONON Include Path: " ${PHONON_INCLUDE_DIR})
add_definitions(-DPHONON)
else()
message("PHONON not found!")
add_definitions(-DJOYSTICKS)
endif()
message(STATUS "Looking for QT lupdate ")
@@ -81,12 +44,6 @@ endif()
add_definitions(-DQXT_STATIC)
add_custom_command(
COMMAND ${XSDCXX_EXECUTABLE} cxx-tree --root-element-all --generate-serialization --output-dir ${PROJECT_BINARY_DIR}/ ${PROJECT_SOURCE_DIR}/radio.xsd
OUTPUT ${PROJECT_BINARY_DIR}/radio.hxx ${PROJECT_BINARY_DIR}/radio.cxx
DEPENDS ${PROJECT_SOURCE_DIR}/radio.xsd
)
if(MSVC)
set(CMAKE_CXX_FLAGS "/EHsc /LD")
include_directories(${PROJECT_SOURCE_DIR}/winbuild C:/Programs/pthreads/Pre-built.2/include C:/Programs/msinttypes C:/Programs/dirent/include)
@@ -108,7 +65,6 @@ include_directories(
${COMPANION_SRC_DIRECTORY}
${COMPANION_SRC_DIRECTORY}/shared
${SIMU_SRC_DIRECTORY}
${XSD_INCLUDE_DIR}
${COMPANION_SRC_DIRECTORY}/qxtcommandoptions
)
@@ -116,7 +72,6 @@ add_subdirectory(shared)
add_subdirectory(modeledit)
add_subdirectory(generaledit)
add_subdirectory(simulation)
add_subdirectory(firmwares/opentx/simulator)
add_subdirectory(qcustomplot)
add_subdirectory(qxtcommandoptions)
@@ -139,9 +94,10 @@ set(common_SRCS
appdata.cpp
)
qt4_wrap_cpp(common_SRCS)
qt5_wrap_cpp(common_SRCS)
add_library(common ${common_SRCS})
qt5_use_modules(common Core Xml Widgets)
set(companion_SRCS
hexinterface.cpp
@@ -236,14 +192,11 @@ set(companion_UIS
radionotfound.ui
)
set(companion_RCS
set(companion_RESOURCES
companion.qrc
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
)
today(DATE)
now(TIME)
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)
@@ -264,23 +217,25 @@ foreach(language ${LANGUAGES})
set(companion_TS ${companion_TS} translations/companion_${language}.ts)
endforeach(language)
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})
qt5_wrap_ui(companion_SRCS ${companion_UIS})
qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})
qt5_add_translation(companion_QM ${companion_TS})
qt5_add_resources(companion_RCC ${companion_RESOURCES})
add_custom_target(gen_qrc DEPENDS ${companion_RCC})
add_definitions(-DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}")
if(APPLE)
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_QM})
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_RCC} ${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})
add_executable(${COMPANION_NAME} WIN32 ${companion_SRCS} ${companion_RCC} ${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})
add_dependencies(${COMPANION_NAME} gen_qrc)
qt5_use_modules(${COMPANION_NAME} Core Widgets Network)
target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit simulation common qcustomplot shared ${PTHREAD_LIBRARY} ${SDL_LIBRARY})
############# Standalone simu ###############
@@ -294,44 +249,72 @@ set(simu_MOC_HDRS
modeledit/node.h
)
set(simu_SRCS ${simu_SRCS})
qt4_wrap_cpp(simu_SRCS ${simu_MOC_HDRS})
qt4_add_resources(simu_SRCS companion.qrc) # TODO not needed
qt5_wrap_cpp(simu_SRCS ${simu_MOC_HDRS} )
if(WIN32)
set(simu_SRCS ${simu_SRCS} icon.rc)
endif()
if(APPLE)
add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE ${simu_SRCS})
add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE ${simu_SRCS} ${companion_RCC})
else()
add_executable(${SIMULATOR_NAME} WIN32 ${simu_SRCS})
add_executable(${SIMULATOR_NAME} WIN32 ${simu_SRCS} ${companion_RCC})
endif()
target_link_libraries(${SIMULATOR_NAME} simulation common qxtcommandoptions ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ${OPENTX_SIMULATOR_LIBS})
add_dependencies(${SIMULATOR_NAME} gen_qrc)
# TODO not the same link command than companion?
target_link_libraries(${SIMULATOR_NAME} PRIVATE simulation common qxtcommandoptions ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${OPENTX_SIMULATOR_LIBS})
############# Packaging ####################
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message(STATUS ${CMAKE_BINARY_DIR} ${CMAKE_INSTALL_PREFIX}/bin)
if(APPLE)
install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${SIMULATOR_LIB_PATH} USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN "libopentx-*.dylib"
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${SIMULATOR_LIB_PATH} USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN "libopentx-*.so"
PATTERN "CMakeFiles" EXCLUDE
PATTERN "_CPack_Packages" EXCLUDE
PATTERN "companion" EXCLUDE
PATTERN "radio" EXCLUDE
)
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)
if(${CMAKE_INSTALL_PREFIX} MATCHES "/usr/local")
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)
else()
install(FILES images/linuxicons/16x16/companion.png DESTINATION share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/22x22/companion.png DESTINATION share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/24x24/companion.png DESTINATION share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/32x32/companion.png DESTINATION share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/48x48/companion.png DESTINATION share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/128x128/companion.png DESTINATION share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/256x256/companion.png DESTINATION share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/512x512/companion.png DESTINATION share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/scalable/companion.svg DESTINATION 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)
endif()
# 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")
elseif(WIN32)
get_target_property(QtCore_LOCATION Qt5::Core LOCATION)
get_filename_component(QT_DLL_DIR ${QtCore_LOCATION} PATH)
get_filename_component(SDL_DIR ${SDL_LIBRARY} PATH)
install(FILES ${QT_DLL_DIR}/icudt54.dll ${QT_DLL_DIR}/icuin54.dll ${QT_DLL_DIR}/icuuc54.dll ${QT_DLL_DIR}/Qt5Core.dll ${QT_DLL_DIR}/Qt5Gui.dll ${QT_DLL_DIR}/Qt5Widgets.dll ${QT_DLL_DIR}/Qt5Xml.dll ${QT_DLL_DIR}/Qt5Network.dll ${QT_DLL_DIR}/Qt5PrintSupport.dll ${QT_DLL_DIR}/Qt5Multimedia.dll ${SDL_DIR}/SDL.dll DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>)
install(FILES ${QT_DLL_DIR}/icudt54.dll ${QT_DLL_DIR}/icuin54.dll ${QT_DLL_DIR}/icuuc54.dll ${QT_DLL_DIR}/Qt5Cored.dll ${QT_DLL_DIR}/Qt5Guid.dll ${QT_DLL_DIR}/Qt5Widgetsd.dll ${QT_DLL_DIR}/Qt5Xmld.dll ${QT_DLL_DIR}/Qt5Networkd.dll ${QT_DLL_DIR}/Qt5PrintSupportd.dll ${QT_DLL_DIR}/Qt5Multimediad.dll ${SDL_DIR}/SDL.dll DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>)
endif()
if(WIN32)
if(MSVC)
@@ -359,7 +342,7 @@ if(WIN32)
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
DEPENDS simulator ${PROJECT_BINARY_DIR}/companion/simulator.nsi
COMMENT "Simulator Windows NSIS Installer")
add_custom_target(installer
@@ -372,6 +355,9 @@ endif()
if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
SET_SOURCE_FILES_PROPERTIES(${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(${COMPANION_SOURCES} ${COMPANION_SOURCES} ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE})
if(CMAKE_GENERATOR STREQUAL Xcode)
set(WORK_DIR ${CMAKE_BINARY_DIR}/Debug)
else()
@@ -386,7 +372,6 @@ if(APPLE)
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
@@ -414,10 +399,19 @@ set(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTx open source firmware")
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
# The file stripping is deliberately disabled, with the stripped file we get
# 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)
INSTALL(TARGETS ${COMPANION_NAME}
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime
)
# directories to look for dependencies
SET(DIRS ${QT_LIBRARY_DIRS})
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
if(DPKG_PROGRAM)
set(CPACK_GENERATOR "DEB")
@@ -433,6 +427,14 @@ if(DPKG_PROGRAM)
set(CPACK_DEBIAN_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_DEBIAN_ARCHITECTURE $(CMAKE_SYSTEM_PROCESSOR))
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
elseif(APPLE)
set(APPS "${COMPANION_NAME}.app")
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_BINARY_DRAGNDROP ON)
set(CPACK_DMG_BACKGROUND_IMAGE ${COMPANION_SRC_DIRECTORY}/images/dmg_background.png)
set(CPACK_DMG_VOLUME_NAME "OpenTX Companion")
set(CPACK_DMG_DS_STORE ${PROJECT_SOURCE_DIR}/companion/targets/mac/DS_Store)
else(DPKG_PROGRAM)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_VERSION ${VERSION})
@@ -441,4 +443,11 @@ else(DPKG_PROGRAM)
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib /lib/udev /lib/udev/rules.d")
endif(DPKG_PROGRAM)
INSTALL(CODE "
include(BundleUtilities)
" COMPONENT Runtime
VERIFY_APP(${COMPANION_NAME})
)
include(CPack)
+15 -1
View File
@@ -312,6 +312,8 @@ QString Profile::speaker() const { return _speaker; }
QString Profile::stickPotCalib() const { return _stickPotCalib; }
QString Profile::timeStamp() const { return _timeStamp; }
QString Profile::trainerCalib() const { return _trainerCalib; }
QString Profile::controlTypes() const { return _controlTypes; }
QString Profile::controlNames() const { return _controlNames; }
int Profile::txCurrentCalibration() const { return _txCurrentCalibration; }
int Profile::gsStickMode() const { return _gsStickMode; }
int Profile::ppmMultiplier() const { return _ppmMultiplier; }
@@ -342,6 +344,8 @@ void Profile::speaker (const QString x) { store(x, _speaker, "Speake
void Profile::stickPotCalib (const QString x) { store(x, _stickPotCalib, "StickPotCalib" ,"Profiles", QString("profile%1").arg(index));}
void Profile::timeStamp (const QString x) { store(x, _timeStamp, "TimeStamp" ,"Profiles", QString("profile%1").arg(index));}
void Profile::trainerCalib (const QString x) { store(x, _trainerCalib, "TrainerCalib" ,"Profiles", QString("profile%1").arg(index));}
void Profile::controlTypes (const QString x) { store(x, _controlTypes, "ControlTypes" ,"Profiles", QString("profile%1").arg(index));}
void Profile::controlNames (const QString x) { store(x, _controlNames, "ControlNames" ,"Profiles", QString("profile%1").arg(index));}
void Profile::txCurrentCalibration (const int x) { store(x, _txCurrentCalibration, "currentCalib","Profiles", QString("profile%1").arg(index));}
void Profile::gsStickMode (const int x) { store(x, _gsStickMode, "GSStickMode" ,"Profiles", QString("profile%1").arg(index));}
void Profile::ppmMultiplier (const int x) { store(x, _ppmMultiplier, "PPM_Multiplier" ,"Profiles", QString("profile%1").arg(index));}
@@ -378,6 +382,8 @@ Profile& Profile::operator=(const Profile& rhs)
speaker ( rhs.speaker() );
stickPotCalib( rhs.stickPotCalib() );
trainerCalib ( rhs.trainerCalib() );
controlTypes ( rhs.controlTypes() );
controlNames ( rhs.controlNames() );
txCurrentCalibration ( rhs.txCurrentCalibration() );
gsStickMode ( rhs.gsStickMode() );
ppmMultiplier( rhs.ppmMultiplier() );
@@ -423,6 +429,8 @@ void Profile::initFwVariables()
_stickPotCalib = "";
_timeStamp = "";
_trainerCalib = "";
_controlTypes = "";
_controlNames = "";
_txCurrentCalibration = 0;
_gsStickMode = 0;
@@ -483,6 +491,8 @@ void Profile::flush()
getset( _stickPotCalib, "StickPotCalib" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _timeStamp, "TimeStamp" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _trainerCalib, "TrainerCalib" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _controlTypes, "ControlTypes" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _controlNames, "ControlNames" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _txCurrentCalibration, "currentCalib" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _gsStickMode, "GSStickMode" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _ppmMultiplier, "PPM_Multiplier" ,0 ,"Profiles", QString("profile%1").arg(index));
@@ -595,6 +605,10 @@ void AppData::warningId (const int x) { store(x, _warningId,
// Constructor
AppData::AppData()
{
}
void AppData::init()
{
//Initialize the profiles
for (int i=0; i<MAX_PROFILES; i++)
@@ -726,7 +740,7 @@ AppData::AppData()
// Load and store all variables. Use default values if setting values are missing
QString _tempString; // Do not touch. Do not change the settings version before a new verson update!
getset( _tempString, "settings_version" ,"210" ); // This is a version marker. Will be used to upgrade the settings later on.
getset( _tempString, "settings_version" ,"220" ); // This is a version marker. Will be used to upgrade the settings later on.
getset( _recentFiles, "recentFileList" ,"" );
getset( _mainWinGeo, "mainWindowGeometry" ,"" );
+7
View File
@@ -125,6 +125,8 @@ class Profile: protected CompStoreObj
QString _stickPotCalib;
QString _timeStamp;
QString _trainerCalib;
QString _controlTypes;
QString _controlNames;
int _txCurrentCalibration;
int _gsStickMode;
int _ppmMultiplier;
@@ -156,6 +158,8 @@ class Profile: protected CompStoreObj
QString stickPotCalib() const;
QString timeStamp() const;
QString trainerCalib() const;
QString controlTypes() const;
QString controlNames() const;
int txCurrentCalibration() const;
int gsStickMode() const;
int ppmMultiplier() const;
@@ -186,6 +190,8 @@ class Profile: protected CompStoreObj
void stickPotCalib (const QString);
void timeStamp (const QString);
void trainerCalib (const QString);
void controlTypes (const QString);
void controlNames (const QString);
void txCurrentCalibration (const int);
void gsStickMode (const int);
void ppmMultiplier (const int);
@@ -378,6 +384,7 @@ class AppData: protected CompStoreObj
// Constructor
AppData();
void init();
};
extern AppData g;
+3 -3
View File
@@ -21,7 +21,7 @@ burnConfigDialog::burnConfigDialog(QWidget *parent) :
getSettings();
populateProgrammers();
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_TARANIS(eepromInterface->getBoard())) {
if (IS_STM32(eepromInterface->getBoard())) {
setWindowTitle(tr("DFU-UTIL Configuration"));
ui->avrArgs->hide();
ui->avrdude_location->hide();
@@ -310,7 +310,7 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
{
EEPROMInterface *eepromInterface = GetEepromInterface();
if (checked) {
if (IS_TARANIS(eepromInterface->getBoard())) {
if (IS_STM32(eepromInterface->getBoard())) {
ui->label_dfu2->show();
ui->dfuArgs->show();
}
@@ -327,7 +327,7 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
}
}
else {
if (IS_TARANIS(eepromInterface->getBoard())) {
if (IS_STM32(eepromInterface->getBoard())) {
ui->label_dfu2->hide();
ui->dfuArgs->hide();
}
+1 -2
View File
@@ -1,8 +1,7 @@
#ifndef BURNCONFIGDIALOG_H_
#define BURNCONFIGDIALOG_H_
#include <QDialog>
#include <QtGui>
#include <QtWidgets>
#define MEM_TYPE_EEPROM 1
#define MEM_TYPE_FLASH 2
+5 -5
View File
@@ -82,12 +82,15 @@ class MyProxyStyle : public QProxyStyle
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(companion);
QApplication app(argc, argv);
app.setApplicationName("OpenTX Companion");
app.setOrganizationName("OpenTX");
app.setOrganizationDomain("open-tx.org");
app.setAttribute(Qt::AA_DontShowIconsInMenus, false);
g.init();
QStringList strl = QApplication::arguments();
if (strl.contains("--version")) {
printf("%s\n", VERSION);
@@ -106,7 +109,7 @@ int main(int argc, char *argv[])
app.installTranslator(&companionTranslator);
app.installTranslator(&qtTranslator);
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
// QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
uint32_t sdlFlags = 0;
@@ -131,10 +134,7 @@ int main(int argc, char *argv[])
}
QString splashScreen;
if ( g.profile[g.id()].fwType().contains("taranis")) splashScreen = ":/images/splash-taranis.png";
else if ( g.profile[g.id()].fwType().contains("9xrpro")) splashScreen = ":/images/splash-9xrpro.png";
else if ( g.profile[g.id()].fwType().contains("9xr")) splashScreen = ":/images/splash-9xr.png";
else splashScreen = ":/images/splash-9x.png";
splashScreen = ":/images/splash.png";
QPixmap pixmap = QPixmap(splashScreen);
QSplashScreen *splash = new QSplashScreen(pixmap);
+2 -5
View File
@@ -1,4 +1,4 @@
<RCC>
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>images/customize.png</file>
<file>icon.png</file>
@@ -54,10 +54,7 @@
<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>
<file>images/splash-9xr.png</file>
<file>images/splash-taranis.png</file>
<file>images/splash.png</file>
<file>images/companion-title.png</file>
<file>images/maps.png</file>
<file>images/track.png</file>
+1 -2
View File
@@ -1,8 +1,7 @@
#ifndef _COMPAREDIALOG_H
#define _COMPAREDIALOG_H
#include <QDialog>
#include <QLabel>
#include <QtWidgets>
#include "multimodelprinter.h"
namespace Ui {
+1 -1
View File
@@ -3,7 +3,7 @@
#include "helpers.h"
ContributorsDialog::ContributorsDialog(QWidget * parent):
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
QDialog(parent),
ui(new Ui::HtmlDialog)
{
ui->setupUi(this);
+1 -1
View File
@@ -27,7 +27,7 @@ bool convertEEprom(const QString &sourceEEprom, const QString &destinationEEprom
QSharedPointer<RadioData> radioData = QSharedPointer<RadioData>(new RadioData());
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEeprom(*radioData, (uint8_t *)eeprom.data(), eeprom_size));
if (!errors.test(NO_ERROR)
if (!errors.test(ALL_OK)
|| !currentFirmware->saveEEPROM((uint8_t *)eeprom.data(), *radioData, variant, version)) {
return false;
}
+1 -2
View File
@@ -1,8 +1,7 @@
#ifndef CUSTOMIZESPLASHDIALOG_H
#define CUSTOMIZESPLASHDIALOG_H
#include <QtGui>
#include <QDialog>
#include <QtWidgets>
#include "firmwareinterface.h"
namespace Ui
-2
View File
@@ -1,7 +1,5 @@
#include "downloaddialog.h"
#include "ui_downloaddialog.h"
#include <QMessageBox>
#include <QtGui>
#include <QTime>
#include "helpers.h"
+1 -2
View File
@@ -1,13 +1,12 @@
#ifndef DOWNLOADDIALOG_H
#define DOWNLOADDIALOG_H
#include <QDialog>
#include <QtWidgets>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QFile>
namespace Ui {
class downloadDialog;
}
+82 -14
View File
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <list>
#include <float.h>
#include <QtWidgets>
#include "eeprominterface.h"
#include "firmwares/er9x/er9xinterface.h"
#include "firmwares/th9x/th9xinterface.h"
@@ -1169,9 +1170,9 @@ GeneralSettings::GeneralSettings()
byte8u=(uint8_t)t_CountrySet.mid(2,2).toUInt(&ok,16);
if (ok)
imperial=byte8u;
QString chars=t_CountrySet.mid(4,2);
ttsLanguage[0]=chars[0].toAscii();
ttsLanguage[1]=chars[1].toAscii();
QString chars = t_CountrySet.mid(4, 2);
ttsLanguage[0] = chars[0].toLatin1();
ttsLanguage[1] = chars[1].toLatin1();
}
}
}
@@ -1379,9 +1380,9 @@ void ModelData::clear()
moduleData[0].channelsCount = 8;
moduleData[1].channelsStart = 0;
moduleData[1].channelsCount = 8;
moduleData[0].ppmDelay = 300;
moduleData[1].ppmDelay = 300;
moduleData[2].ppmDelay = 300;
moduleData[0].ppm.delay = 300;
moduleData[1].ppm.delay = 300;
moduleData[2].ppm.delay = 300;
int board = GetEepromInterface()->getBoard();
if (IS_TARANIS(board)) {
moduleData[0].protocol = PULSES_PXX_XJT_X16;
@@ -1396,7 +1397,7 @@ void ModelData::clear()
moduleData[1].protocol = PULSES_OFF;
}
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
flightModeData[i].clear();
flightModeData[i].clear(i);
}
clearInputs();
clearMixes();
@@ -1509,9 +1510,7 @@ int ModelData::getTrimValue(int phaseIdx, int trimIdx)
}
else {
phaseIdx = phase.trimRef[trimIdx];
if (phase.trimMode[trimIdx] == 0)
result = 0;
else
if (phase.trimMode[trimIdx] != 0)
result += phase.trim[trimIdx];
}
}
@@ -1524,7 +1523,7 @@ bool ModelData::isGVarLinked(int phaseIdx, int gvarIdx)
return flightModeData[phaseIdx].gvars[gvarIdx] > 1024;
}
int ModelData::getGVarValue(int phaseIdx, int gvarIdx)
int ModelData::getGVarFieldValue(int phaseIdx, int gvarIdx)
{
int idx = flightModeData[phaseIdx].gvars[gvarIdx];
for (int i=0; idx>1024 && i<C9X_MAX_FLIGHT_MODES; i++) {
@@ -1685,7 +1684,7 @@ unsigned long LoadEeprom(RadioData &radioData, const uint8_t *eeprom, const int
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
std::bitset<NUM_ERRORS> result((unsigned long long)eepromInterface->load(radioData, eeprom, size));
if (result.test(NO_ERROR)) {
if (result.test(ALL_OK)) {
return result.to_ulong();
}
else {
@@ -1705,7 +1704,7 @@ unsigned long LoadBackup(RadioData & radioData, uint8_t * eeprom, int size, int
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
std::bitset<NUM_ERRORS> result((unsigned long long)eepromInterface->loadBackup(radioData, eeprom, size, index));
if (result.test(NO_ERROR)) {
if (result.test(ALL_OK)) {
return result.to_ulong();
}
else {
@@ -1726,7 +1725,7 @@ unsigned long LoadEepromXml(RadioData & radioData, QDomDocument & doc)
foreach(EEPROMInterface *eepromInterface, eepromInterfaces) {
std::bitset<NUM_ERRORS> result((unsigned long long)eepromInterface->loadxml(radioData, doc));
if (result.test(NO_ERROR)) {
if (result.test(ALL_OK)) {
return result.to_ulong();
}
else {
@@ -1766,6 +1765,33 @@ QString getBoardName(BoardEnum board)
}
}
const int Firmware::getFlashSize()
{
switch (board) {
case BOARD_STOCK:
return FSIZE_STOCK;
case BOARD_M128:
return FSIZE_M128;
case BOARD_MEGA2560:
case BOARD_GRUVIN9X:
return FSIZE_GRUVIN9X;
case BOARD_SKY9X:
return FSIZE_SKY9X;
case BOARD_9XRPRO:
case BOARD_AR9X:
return FSIZE_9XRPRO;
case BOARD_TARANIS:
case BOARD_TARANIS_PLUS:
case BOARD_TARANIS_X9E:
case BOARD_FLAMENCO:
return FSIZE_TARANIS;
case BOARD_HORUS:
return FSIZE_HORUS;
default:
return 0;
}
}
Firmware * GetFirmware(QString id)
{
foreach(Firmware * firmware, firmwares) {
@@ -1829,3 +1855,45 @@ SimulatorInterface *GetCurrentFirmwareSimulator()
else
return NULL;
}
unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
switch (type) {
case MM_RF_PROTO_HISKY:
case MM_RF_PROTO_DSM2:
case MM_RF_PROTO_SYMAX:
case MM_RF_PROTO_KN:
return 2;
case MM_RF_PROTO_FRSKY:
case MM_RF_PROTO_CG023:
case MM_RF_PROTO_MT99XX:
return 3;
case MM_RF_PROTO_FLYSKY:
return 4;
case MM_RF_PROTO_MJXQ:
case MM_RF_PROTO_YD717:
return 5;
case MM_RF_PROTO_CX10:
case MM_RF_PROTO_CUSTOM:
return 8;
default:
return 1;
}
}
void FlightModeData::clear(const int phase)
{
memset(this, 0, sizeof(FlightModeData));
if (phase != 0) {
for (int idx=0; idx<C9X_MAX_GVARS; idx++) {
gvars[idx] = 1025;
}
for (int idx=0; idx<C9X_MAX_ENCODERS; idx++) {
rotaryEncoders[idx] = 1025;
}
}
}
+86 -32
View File
@@ -21,11 +21,12 @@
#include <QString>
#include <QStringList>
#include <QList>
#include <QtXml>
#include <QtXml> // This should be removed from here, and remove Xml dependency from all libs which don't need it.
#include <QComboBox>
#include <iostream>
#include <bitset>
#include "constants.h"
#include "../../radio/src/definitions.h"
#include "simulatorinterface.h"
#define EESIZE_STOCK 2048
@@ -36,6 +37,15 @@
#define EESIZE_9XRPRO (128*4096)
#define EESIZE_MAX EESIZE_9XRPRO
#define FSIZE_STOCK (64*1024)
#define FSIZE_M128 (128*1024)
#define FSIZE_GRUVIN9X (256*1024)
#define FSIZE_TARANIS (512*1024)
#define FSIZE_SKY9X (256*1024)
#define FSIZE_9XRPRO (512*1024)
#define FSIZE_HORUS (2048*1024)
#define FSIZE_MAX FSIZE_HORUS
QString getBoardName(BoardEnum board);
#define IS_9X(board) (board==BOARD_STOCK || board==BOARD_M128)
@@ -46,7 +56,10 @@ QString getBoardName(BoardEnum board);
#define IS_TARANIS(board) (board==BOARD_TARANIS || board==BOARD_TARANIS_PLUS || board==BOARD_TARANIS_X9E)
#define IS_TARANIS_PLUS(board) (board==BOARD_TARANIS_PLUS || board==BOARD_TARANIS_X9E)
#define IS_TARANIS_X9E(board) (board==BOARD_TARANIS_X9E)
#define IS_ARM(board) (IS_TARANIS(board) || IS_SKY9X(board))
#define IS_HORUS(board) (board==BOARD_HORUS)
#define IS_FLAMENCO(board) (board==BOARD_FLAMENCO)
#define IS_STM32(board) (IS_TARANIS(board) || IS_HORUS(board) || IS_FLAMENCO(board))
#define IS_ARM(board) (IS_STM32(board) || IS_SKY9X(board))
const uint8_t modn12x3[4][4]= {
{1, 2, 3, 4},
@@ -132,7 +145,11 @@ enum FailsafeModes {
#define TRIM_RV_UP 5
#define TRIM_RH_L 6
#define TRIM_RH_R 7
#define TRIM_NONE 8
#define TRIM_T5_DN 8
#define TRIM_T5_UP 9
#define TRIM_T6_DN 10
#define TRIM_T6_UP 11
#define TRIM_NONE 12
// Beep center bits
#define BC_BIT_RUD (0x01)
@@ -146,23 +163,6 @@ enum FailsafeModes {
#define BC_BIT_REA (0x80)
#define BC_BIT_REB (0x100)
// TODO remove this enum!
enum EnumKeys {
KEY_MENU,
KEY_EXIT,
#if defined(PCBTARANIS)
KEY_ENTER,
KEY_PAGE,
KEY_PLUS,
KEY_MINUS,
#else
KEY_DOWN,
KEY_UP,
KEY_RIGHT,
KEY_LEFT,
#endif
};
#define CHAR_FOR_NAMES " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-."
#define CHAR_FOR_NAMES_REGEX "[ A-Za-z0-9_.-,]*"
@@ -632,7 +632,7 @@ class CustomFunctionData { // Function Switches data
class FlightModeData {
public:
FlightModeData() { clear(); }
FlightModeData() { clear(0); }
int trimMode[NUM_STICKS];
int trimRef[NUM_STICKS];
int trim[NUM_STICKS];
@@ -640,9 +640,9 @@ class FlightModeData {
char name[10+1];
unsigned int fadeIn;
unsigned int fadeOut;
int rotaryEncoders[2];
int rotaryEncoders[C9X_MAX_ENCODERS];
int gvars[C9X_MAX_GVARS];
void clear() { memset(this, 0, sizeof(FlightModeData)); }
void clear(const int phase);
};
class SwashRingData { // Swash Ring data
@@ -842,9 +842,38 @@ enum PulsesProtocol {
PULSES_PXX_XJT_LR12,
PULSES_PXX_DJT,
PULSES_CROSSFIRE,
PULSES_MULTIMODULE,
PULSES_PROTOCOL_LAST
};
enum MultiModuleRFProtocols {
MM_RF_PROTO_FLYSKY=0,
MM_RF_PROTO_FIRST=MM_RF_PROTO_FLYSKY,
MM_RF_PROTO_HUBSAN,
MM_RF_PROTO_FRSKY,
MM_RF_PROTO_HISKY,
MM_RF_PROTO_V2X2,
MM_RF_PROTO_DSM2,
MM_RF_PROTO_DEVO,
MM_RF_PROTO_YD717,
MM_RF_PROTO_KN,
MM_RF_PROTO_SYMAX,
MM_RF_PROTO_SLT,
MM_RF_PROTO_CX10,
MM_RF_PROTO_CG023,
MM_RF_PROTO_BAYANG,
MM_RF_PROTO_ESky,
MM_RF_PROTO_MT99XX,
MM_RF_PROTO_MJXQ,
MM_RF_PROTO_SHENQI,
MM_RF_PROTO_FY326,
MM_RF_PROTO_SFHSS,
MM_RF_PROTO_CUSTOM,
MM_RF_PROTO_LAST= MM_RF_PROTO_CUSTOM
};
unsigned int getNumSubtypes(MultiModuleRFProtocols type);
enum TrainerProtocol {
TRAINER_MASTER_JACK,
TRAINER_SLAVE_JACK,
@@ -858,17 +887,39 @@ class ModuleData {
ModuleData() { clear(); }
unsigned int modelId;
int protocol;
int subprotocol;
unsigned int subType;
bool invertedSerial;
unsigned int channelsStart;
int channelsCount; // 0=8 channels
unsigned int failsafeMode;
int failsafeChannels[C9X_NUM_CHNOUT];
int ppmDelay;
bool ppmPulsePol; // false = positive
bool ppmOutputType; // false = open drain, true = push pull
int ppmFrameLength;
// By pure coincidence the struct are unions with the same datatype in Companion
// and the firmware itself. If this changes the multi struct needs it own logic in the eeprom interface
union {
struct {
int delay;
bool pulsePol; // false = positive
bool outputType; // false = open drain, true = push pull
int frameLength;
} ppm;
struct {
int rfProtocol;
bool autoBindMode;
bool lowPowerMode;
int optionValue;
} multi;
};
// Currently the Eeprom read/write code does not work with unions
// define a hack for the multi rf Protocol to get the real numbers here
// (reverse the int => ms logic of the ppm delay)
int getMultiRfProtocol () { return (multi.rfProtocol - 300) / 50; }
void setMultiRfProtocol (int val) { multi.rfProtocol = 300 + 50 * val; }
void clear() { memset(this, 0, sizeof(ModuleData)); }
QString polarityToString() const { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
QString polarityToString() const { return ppm.pulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
};
#define C9X_MAX_SCRIPTS 7
@@ -1077,7 +1128,7 @@ class ModelData {
void setTrimValue(int phaseIdx, int trimIdx, int value);
bool isGVarLinked(int phaseIdx, int gvarIdx);
int getGVarValue(int phaseIdx, int gvarIdx);
int getGVarFieldValue(int phaseIdx, int gvarIdx);
ModelData removeGlobalVars();
@@ -1506,8 +1557,7 @@ void registerOpenTxFirmwares();
void unregisterOpenTxFirmwares();
enum EepromLoadErrors {
NO_ERROR,
ALL_OK,
UNKNOWN_ERROR,
UNSUPPORTED_NEWER_VERSION,
WRONG_SIZE,
@@ -1625,9 +1675,13 @@ class Firmware {
virtual int getCapability(const Capability) = 0;
virtual QTime getMaxTimerStart() = 0;
virtual bool isTelemetrySourceAvailable(int source) = 0;
virtual int isAvailable(PulsesProtocol proto, int port=0) = 0;
const int getFlashSize();
public:
QList<const char *> languages;
+34 -6
View File
@@ -125,7 +125,7 @@ bool RleFile::searchFat()
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) {
if (header->mark == EEPROM_MARK && header->index >= bestFatIndex) {
eepromFatHeader = header;
bestFatIndex = header->index;
}
@@ -236,6 +236,9 @@ void RleFile::EeFsSetDat(unsigned int blk, unsigned int ofs, const uint8_t *buf,
unsigned int RleFile::EeFsGetFree()
{
if (IS_HORUS(board))
return 0;
unsigned int ret = 0;
unsigned int i;
if (IS_ARM(board))
@@ -255,6 +258,9 @@ unsigned int RleFile::EeFsGetFree()
*/
void RleFile::EeFsFree(unsigned int blk)
{
if (IS_HORUS(board))
return;
unsigned int i = blk;
while (EeFsGetLink(i)) i = EeFsGetLink(i);
if (IS_ARM(board)) {
@@ -272,6 +278,8 @@ void RleFile::EeFsFree(unsigned int blk)
*/
unsigned int RleFile::EeFsAlloc()
{
if (IS_HORUS(board))
return 0;
unsigned int ret = (IS_ARM(board) ? eeFsArm->freeList : eeFs->freeList);
if (ret) {
if (IS_ARM(board))
@@ -285,12 +293,18 @@ unsigned int RleFile::EeFsAlloc()
unsigned int RleFile::size(unsigned int id)
{
return IS_ARM(board) ? eeFsArm->files[id].size : eeFs->files[id].size;
if (IS_HORUS(board))
return 0;
else
return IS_ARM(board) ? eeFsArm->files[id].size : eeFs->files[id].size;
}
unsigned int RleFile::openRd(unsigned int i_fileId)
{
if (IS_SKY9X(board)) {
if (IS_HORUS(board)) {
return 1;
}
else if (IS_SKY9X(board)) {
if (eepromFatHeader) {
m_fileId = eepromFatHeader->files[i_fileId].zoneIndex;
if (eepromFatHeader->files[i_fileId].exists) {
@@ -324,6 +338,9 @@ unsigned int RleFile::openRd(unsigned int i_fileId)
unsigned int RleFile::read(uint8_t *buf, unsigned int i_len)
{
if (IS_HORUS(board))
return 0;
unsigned int len = IS_ARM(board) ? eeFsArm->files[m_fileId].size : eeFs->files[m_fileId].size;
len -= m_pos;
if (i_len > len) i_len = len;
@@ -344,6 +361,9 @@ unsigned int RleFile::read(uint8_t *buf, unsigned int i_len)
// G: Read runlength (RLE) compressed bytes into buf.
unsigned int RleFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2)
{
if (IS_HORUS(board))
return 0;
memset(buf, 0, i_len);
if (IS_SKY9X(board)) {
@@ -416,9 +436,11 @@ unsigned int importRlc(QByteArray & dst, QByteArray & src, unsigned int rlcVersi
dst.resize(0);
for( ; 1; ) {
for (int i=0; i<zeroes; i++)
dst.append((char)0);
zeroes = 0;
if (zeroes > 0) {
for (int i = 0; i < zeroes; i++)
dst.append((char) 0);
zeroes = 0;
}
if (len == 0)
return dst.size();
@@ -525,6 +547,9 @@ void RleFile::closeTrunc()
unsigned int RleFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
{
if (IS_HORUS(board))
return 0;
create(i_fileId, typ);
bool state0 = true;
uint8_t cnt = 0;
@@ -571,6 +596,9 @@ unsigned int RleFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const u
*/
unsigned int RleFile::writeRlc2(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
{
if (IS_HORUS(board))
return 0;
if (IS_SKY9X(board)) {
openRd(i_fileId);
if (eepromFatHeader) {
+17 -9
View File
@@ -44,7 +44,7 @@ int getFileType(const QString &fullFileName)
}
FirmwareInterface::FirmwareInterface(const QString &filename):
flash(MAX_FSIZE, 0),
flash(FSIZE_MAX, 0),
flashSize(0),
versionId(0),
eepromVersion(0),
@@ -59,11 +59,11 @@ FirmwareInterface::FirmwareInterface(const QString &filename):
QFile file(filename);
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { // reading HEX TEXT file
QTextStream inputStream(&file);
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), MAX_FSIZE);
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), FSIZE_MAX);
file.close();
if (flashSize == 0) {
file.open(QIODevice::ReadOnly);
flashSize = file.read((char *)flash.data(), MAX_FSIZE);
flashSize = file.read((char *)flash.data(), FSIZE_MAX);
}
}
}
@@ -130,10 +130,12 @@ QString FirmwareInterface::seekLabel(const QString & label)
QString FirmwareInterface::getFlavour() const
{
if (flavour == "opentx-x9dp")
return "opentx-taranis-plus";
else if (flavour == "opentx-x9d")
return "opentx-taranis";
if (flavour == "opentx-taranis-x9e")
return "opentx-x9e";
else if (flavour == "opentx-x9dp" || flavour == "opentx-taranis-plus")
return "opentx-x9d+";
else if (flavour == "opentx-taranis")
return "opentx-x9d";
else
return flavour;
}
@@ -340,14 +342,18 @@ bool FirmwareInterface::isValid()
unsigned int FirmwareInterface::save(QString fileName)
{
uint8_t binflash[MAX_FSIZE];
memcpy(&binflash, flash.constData(), flashSize);
uint8_t *binflash = (uint8_t*)malloc(FSIZE_MAX);
if (binflash == NULL) {
return -1;
}
memcpy(binflash, flash.constData(), flashSize);
QFile file(fileName);
int fileType = getFileType(fileName);
if (fileType == FILE_TYPE_HEX) {
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text)) { //reading HEX TEXT file
free(binflash);
return -1;
}
QTextStream outputStream(&file);
@@ -356,6 +362,7 @@ unsigned int FirmwareInterface::save(QString fileName)
}
else {
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) { //reading HEX TEXT file
free(binflash);
return -1;
}
file.write((char*)binflash, flashSize);
@@ -363,5 +370,6 @@ unsigned int FirmwareInterface::save(QString fileName)
file.close();
free(binflash);
return flashSize;
}
-1
View File
@@ -19,7 +19,6 @@
#include <QImage>
#include <QByteArray>
#define MAX_FSIZE (512*1024)
#define SPLASH_WIDTH (128)
#define SPLASH_HEIGHT (64)
#define SPLASHX9D_WIDTH (212)
+3 -3
View File
@@ -373,17 +373,17 @@ t_Er9xModelData::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -114,7 +114,7 @@ unsigned long Er9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
}
}
std::cout << "ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -186,7 +186,7 @@ unsigned long Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, i
}
std::cout << "ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -261,7 +261,7 @@ QDomElement Er9xInterface::getGeneralDataXML(QDomDocument * qdoc, Er9xGeneral *
{
QDomElement gd = qdoc->createElement("GENERAL_DATA");
appendNumberElement(qdoc, &gd, "Version", tgen->myVers, true); // have to write value here
appendTextElement(qdoc, &gd, "Owner", QString::fromAscii(tgen->ownerName,sizeof(tgen->ownerName)).trimmed());
appendTextElement(qdoc, &gd, "Owner", QString::fromLatin1(tgen->ownerName,sizeof(tgen->ownerName)).trimmed());
appendCDATAElement(qdoc, &gd, "Data", (const char *)tgen,sizeof(Er9xGeneral));
return gd;
}
@@ -271,7 +271,7 @@ QDomElement Er9xInterface::getModelDataXML(QDomDocument * qdoc, Er9xModelData *
QDomElement md = qdoc->createElement("MODEL_DATA");
md.setAttribute("number", modelNum);
appendNumberElement(qdoc, &md, "Version", mdver, true); // have to write value here
appendTextElement(qdoc, &md, "Name", QString::fromAscii(tmod->name,sizeof(tmod->name)).trimmed());
appendTextElement(qdoc, &md, "Name", QString::fromLatin1(tmod->name,sizeof(tmod->name)).trimmed());
appendCDATAElement(qdoc, &md, "Data", (const char *)tmod,sizeof(Er9xModelData));
return md;
}
@@ -289,7 +289,7 @@ bool Er9xInterface::loadGeneralDataXML(QDomDocument * qdoc, Er9xGeneral * tgen)
while (!n.isNull()) {
if (n.isCDATASection()) {
QString ds = n.toCDATASection().data();
QByteArray ba = QByteArray::fromBase64(ds.toAscii());
QByteArray ba = QByteArray::fromBase64(ds.toLatin1());
const char * data = ba.data();
memcpy(tgen, data, sizeof(Er9xGeneral));
break;
@@ -326,7 +326,7 @@ bool Er9xInterface::loadModelDataXML(QDomDocument * qdoc, Er9xModelData * tmod,
while (!n.isNull()) {
if (n.isCDATASection()) {
QString ds = n.toCDATASection().data();
QByteArray ba = QByteArray::fromBase64(ds.toAscii());
QByteArray ba = QByteArray::fromBase64(ds.toLatin1());
const char * data = ba.data();
memcpy(tmod, data, sizeof(Er9xModelData));
break;
@@ -19,13 +19,14 @@
#define SIMU
#define SIMU_EXCEPTIONS
#define FRSKY
#define TELEMETRY_FRSKY
#define PHASES
#undef min
#undef max
#define NUM_POTS 3
#define SWSRC_SW1 DSW_SW1
#define NUM_POTS 3
#define NUM_SLIDERS 0
#define SWSRC_SW1 DSW_SW1
#include <exception>
@@ -47,7 +48,7 @@ namespace Er9x {
uint8_t pxxFlag = 0;
int16_t g_anas[7];
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
uint16_t anaIn(uint8_t chan)
{
@@ -151,7 +152,7 @@ void simuSetKey(uint8_t key, bool state)
}
}
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
}
@@ -54,7 +54,7 @@ class Er9xSimulator : public SimulatorInterface {
virtual void sendTelemetry(uint8_t * data, unsigned int len) {};
virtual uint8_t getSensorInstance(uint16_t id) { return 0; };
virtual uint8_t getSensorInstance(uint16_t id, uint8_t defaultValue = 0) { return 0; };
virtual uint16_t getSensorRatio(uint16_t id) { return 0; };
@@ -505,17 +505,17 @@ t_Ersky9xModelData_v10::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -620,17 +620,17 @@ t_Ersky9xModelData_v11::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -152,7 +152,7 @@ unsigned long Ersky9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
}
}
std::cout << "ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -230,7 +230,7 @@ unsigned long Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom
}
std::cout << "ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -305,7 +305,7 @@ QDomElement Ersky9xInterface::getGeneralDataXML(QDomDocument * qdoc, Ersky9xGene
{
QDomElement gd = qdoc->createElement("GENERAL_DATA");
appendNumberElement(qdoc, &gd, "Version", tgen->myVers, true); // have to write value here
appendTextElement(qdoc, &gd, "Owner", QString::fromAscii(tgen->ownerName,sizeof(tgen->ownerName)).trimmed());
appendTextElement(qdoc, &gd, "Owner", QString::fromLatin1(tgen->ownerName,sizeof(tgen->ownerName)).trimmed());
appendCDATAElement(qdoc, &gd, "Data", (const char *)tgen,sizeof(Ersky9xGeneral));
return gd;
}
@@ -315,7 +315,7 @@ QDomElement Ersky9xInterface::getModelDataXML(QDomDocument * qdoc, Ersky9xModelD
QDomElement md = qdoc->createElement("MODEL_DATA");
md.setAttribute("number", modelNum);
appendNumberElement(qdoc, &md, "Version", mdver, true); // have to write value here
appendTextElement(qdoc, &md, "Name", QString::fromAscii(tmod->name,sizeof(tmod->name)).trimmed());
appendTextElement(qdoc, &md, "Name", QString::fromLatin1(tmod->name,sizeof(tmod->name)).trimmed());
appendCDATAElement(qdoc, &md, "Data", (const char *)tmod,sizeof(Ersky9xModelData_v11));
return md;
}
@@ -333,7 +333,7 @@ bool Ersky9xInterface::loadGeneralDataXML(QDomDocument * qdoc, Ersky9xGeneral *
while (!n.isNull()) {
if (n.isCDATASection()) {
QString ds = n.toCDATASection().data();
QByteArray ba = QByteArray::fromBase64(ds.toAscii());
QByteArray ba = QByteArray::fromBase64(ds.toLatin1());
const char * data = ba.data();
memcpy(tgen, data, std::min((unsigned int)ba.size(), (unsigned int)sizeof(Ersky9xGeneral)));
break;
@@ -373,7 +373,7 @@ bool Ersky9xInterface::loadModelDataXML(QDomDocument * qdoc, ModelData *model, i
while (!n.isNull()) {
if (n.isCDATASection()) {
QString ds = n.toCDATASection().data();
QByteArray ba = QByteArray::fromBase64(ds.toAscii());
QByteArray ba = QByteArray::fromBase64(ds.toLatin1());
const char * data = ba.data();
memcpy(&ersky9xModel, data, std::min(ba.size(), (int)sizeof(ersky9xModel)));
break;
@@ -22,7 +22,7 @@
#define PCBSKY9X
#define PCBSKY
#define STAMP
#define FRSKY
#define TELEMETRY_FRSKY
#define FRSKY_HUB
#define WS_HOW_HIGH
#define TEMPLATES
@@ -31,8 +31,9 @@
#define AUDIO
#define REVB
#define NUM_POTS 3
#define SWSRC_SW1 DSW_SW1
#define NUM_POTS 3
#define NUM_SLIDERS 0
#define SWSRC_SW1 DSW_SW1
#undef min
#undef max
@@ -58,7 +59,7 @@ namespace Ersky9x {
#include "../ersky9x/sound.cpp"
#include "../ersky9x/diskio.cpp"
#define isBacklightEnable() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
#define isBacklightEnabled() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
//uint8_t pxxFlag = 0;
int16_t g_anas[7];
@@ -54,7 +54,7 @@ class Ersky9xSimulator : public SimulatorInterface {
virtual void sendTelemetry(uint8_t * data, unsigned int len) {};
virtual uint8_t getSensorInstance(uint16_t id) { return 0; };
virtual uint8_t getSensorInstance(uint16_t id, uint8_t defaultValue = 0) { return 0; };
virtual uint16_t getSensorRatio(uint16_t id) { return 0; };
@@ -447,9 +447,9 @@ t_Gruvin9xModelData_v102::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
c9x.flightModeData[i] = flightModeData[i];
@@ -517,9 +517,9 @@ t_Gruvin9xModelData_v103::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
c9x.flightModeData[i] = flightModeData[i];
@@ -587,9 +587,9 @@ t_Gruvin9xModelData_v105::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
@@ -677,9 +677,9 @@ t_Gruvin9xModelData_v106::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
@@ -207,7 +207,7 @@ unsigned long Gruvin9xInterface::load(RadioData &radioData, const uint8_t *eepro
}
std::cout << "ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -455,9 +455,9 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -499,7 +499,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -533,9 +533,9 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -578,7 +578,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.frsky.varioSource = varioSource;
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -615,9 +615,9 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -661,7 +661,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -698,9 +698,9 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -744,7 +744,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -785,9 +785,9 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -831,7 +831,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -735,9 +735,9 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -780,7 +780,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.frsky.varioSource = varioSource;
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -818,9 +818,9 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -864,7 +864,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -902,9 +902,9 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -948,7 +948,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -986,9 +986,9 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -1032,7 +1032,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -1073,9 +1073,9 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -1119,7 +1119,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -932,9 +932,9 @@ t_Open9xModelData_v201::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1006,9 +1006,9 @@ t_Open9xModelData_v202::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter,
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1052,7 +1052,7 @@ t_Open9xModelData_v202::operator ModelData ()
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1082,9 +1082,9 @@ t_Open9xModelData_v203::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1126,7 +1126,7 @@ t_Open9xModelData_v203::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1156,9 +1156,9 @@ t_Open9xModelData_v204::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1202,7 +1202,7 @@ t_Open9xModelData_v204::operator ModelData ()
c9x.frsky = frsky;
c9x.frsky.rssiAlarms[0] = frskyRssiAlarms[0].get(0);
c9x.frsky.rssiAlarms[1] = frskyRssiAlarms[1].get(1);
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1235,9 +1235,9 @@ t_Open9xModelData_v205::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1279,7 +1279,7 @@ t_Open9xModelData_v205::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0]. modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1314,9 +1314,9 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1362,7 +1362,7 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1400,9 +1400,9 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1449,7 +1449,7 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1487,9 +1487,9 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1536,7 +1536,7 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
@@ -1575,9 +1575,9 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1624,7 +1624,7 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
+107 -80
View File
@@ -26,7 +26,7 @@
#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 MAX_TELEMETRY_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))
@@ -183,7 +183,7 @@ class SwitchesConversionTable: public ConversionTable {
internalCache.push_back(element);
return element.table;
}
static void Cleanup()
static void Cleanup()
{
for (std::list<Cache>::iterator it=internalCache.begin(); it!=internalCache.end(); it++) {
Cache element = *it;
@@ -370,7 +370,7 @@ class SourcesConversionTable: public ConversionTable {
internalCache.push_back(element);
return element.table;
}
static void Cleanup()
static void Cleanup()
{
for (std::list<Cache>::iterator it=internalCache.begin(); it!=internalCache.end(); it++) {
Cache element = *it;
@@ -384,7 +384,7 @@ std::list<SourcesConversionTable::Cache> SourcesConversionTable::internalCache;
void OpenTxEepromCleanup(void)
{
SourcesConversionTable::Cleanup();
SourcesConversionTable::Cleanup();
SwitchesConversionTable::Cleanup();
}
@@ -392,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), QObject::tr("Switch").toAscii(),
QObject::tr("Switch ").toAscii()+ sw.toString()+ QObject::tr(" cannot be exported on this board!").toAscii()),
ConversionField< SignedField<N> >(_switch, SwitchesConversionTable::getInstance(board, version, flags), QObject::tr("Switch").toLatin1(),
QObject::tr("Switch ").toLatin1()+ sw.toString()+ QObject::tr(" cannot be exported on this board!").toLatin1()),
sw(sw),
_switch(0)
{
@@ -408,14 +408,14 @@ class SwitchField: public ConversionField< SignedField<N> > {
_switch = sw.toValue();
ConversionField< SignedField<N> >::beforeExport();
}
virtual void afterImport()
{
ConversionField< SignedField<N> >::afterImport();
ConversionField< SignedField<N> >::afterImport();
sw = RawSwitch(_switch);
eepromImportDebug() << QString("imported %1: %2").arg(ConversionField< SignedField<N> >::internalField.getName()).arg(sw.toString());
}
}
protected:
RawSwitch & sw;
int _switch;
@@ -553,7 +553,7 @@ template <int N>
class SourceField: public ConversionField< UnsignedField<N> > {
public:
SourceField(RawSource & source, BoardEnum board, unsigned int version, unsigned int variant, unsigned long flags=0):
ConversionField< UnsignedField<N> >(_source, SourcesConversionTable::getInstance(board, version, variant, flags),
ConversionField< UnsignedField<N> >(_source, SourcesConversionTable::getInstance(board, version, variant, flags),
"Source", QObject::tr("Source %1 cannot be exported on this board!").arg(source.toString())),
source(source),
_source(0)
@@ -569,13 +569,13 @@ class SourceField: public ConversionField< UnsignedField<N> > {
_source = source.toValue();
ConversionField< UnsignedField<N> >::beforeExport();
}
virtual void afterImport()
{
ConversionField< UnsignedField<N> >::afterImport();
ConversionField< UnsignedField<N> >::afterImport();
source = RawSource(_source);
eepromImportDebug() << QString("imported %1: %2").arg(ConversionField< UnsignedField<N> >::internalField.getName()).arg(source.toString());
}
}
protected:
RawSource & source;
@@ -742,6 +742,14 @@ class CurveReferenceField: public TransformedField {
int _curve_value;
};
static int exportHeliInversionWeight(int source) {
return (source < 0) ? 1 : 0;
}
static int importHeliInversionWeight(int source) {
return source ? -100: 100;
}
class HeliField: public StructField {
public:
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
@@ -757,22 +765,15 @@ class HeliField: public StructField {
Append(new SignedField<8>(heli.elevatorWeight));
}
else {
Append(new BoolField<1>(invertELE));
Append(new BoolField<1>(invertAIL));
Append(new BoolField<1>(invertCOL));
Append(new ConversionField< SignedField<1> >(heli.elevatorWeight, exportHeliInversionWeight, importHeliInversionWeight));
Append(new ConversionField< SignedField<1> >(heli.aileronWeight, exportHeliInversionWeight, importHeliInversionWeight));
Append(new ConversionField< SignedField<1> >(heli.collectiveWeight, exportHeliInversionWeight, importHeliInversionWeight));
Append(new UnsignedField<5>(heli.type));
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
//, FLAG_NOSWITCHES)); Fix shift in collective
Append(new UnsignedField<8>(heli.value));
}
}
// TODO before + after
protected:
bool invertELE;
bool invertAIL;
bool invertCOL;
};
class FlightModeField: public TransformedField {
@@ -1465,7 +1466,13 @@ class CurvesField: public TransformedField {
maxPoints(IS_ARM(board) ? 512 : 112-8)
{
for (int i=0; i<maxCurves; i++) {
if (IS_TARANIS(board) && version >= 216) {
if (IS_TARANIS(board) && version >= 218) {
internalField.Append(new UnsignedField<1>((unsigned int &)curves[i].type));
internalField.Append(new BoolField<1>(curves[i].smooth));
internalField.Append(new ConversionField< SignedField<6> >(curves[i].count, -5));
internalField.Append(new ZCharField<3>(curves[i].name));
}
else if (IS_TARANIS(board) && version >= 216) {
internalField.Append(new UnsignedField<3>((unsigned int &)curves[i].type));
internalField.Append(new BoolField<1>(curves[i].smooth));
internalField.Append(new SpareBitsField<4>());
@@ -1622,7 +1629,7 @@ class AndSwitchesConversionTable: public ConversionTable {
{
int val=0;
addConversion(RawSwitch(SWITCH_TYPE_NONE), val++);
if (IS_TARANIS(board)) {
for (int i=1; i<=MAX_SWITCHES_POSITION(board, version); i++) {
int s = switchIndex(i, board, version);
@@ -1767,7 +1774,7 @@ class LogicalSwitchField: public TransformedField {
}
}
~LogicalSwitchField()
~LogicalSwitchField()
{
delete andswitchesConversionTable;
}
@@ -2113,7 +2120,7 @@ class ArmCustomFunctionField: public TransformedField {
if (fn.swtch.type != SWITCH_TYPE_NONE) {
_func = fn.func;
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic)
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic || (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast))
_active = (version >= 216 ? fn.repeatParam : (fn.repeatParam/5));
else
_active = (fn.enabled ? 1 : 0);
@@ -2209,7 +2216,7 @@ class ArmCustomFunctionField: public TransformedField {
{
fn.func = (AssignFunc)_func;
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic)
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic || (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast))
fn.repeatParam = (version >= 216 ? _active : (_active*5));
else
fn.enabled = (_active & 0x01);
@@ -2226,7 +2233,7 @@ class ArmCustomFunctionField: public TransformedField {
if (fn.func >= FuncOverrideCH1 && fn.func <= FuncOverrideCH32) {
fn.func = AssignFunc(fn.func + index);
fn.param = (int8_t)value;
fn.param = (int16_t)(uint16_t)value;
}
else if (fn.func >= FuncSetTimer1 && fn.func <= FuncSetTimer3) {
fn.func = AssignFunc(fn.func + index);
@@ -2529,7 +2536,7 @@ class FrskyScreenField: public DataField {
else
numbers.Append(new SpareBitsField<4*8>());
}
if (IS_TARANIS(board) && version >= 217) {
script.Append(new CharField<8>(screen.body.script.filename));
script.Append(new SpareBitsField<16*8>());
@@ -2878,7 +2885,7 @@ class SensorField: public TransformedField {
_instance = sensor.formula;
if (sensor.formula == SensorData::TELEM_FORMULA_CELL)
_param = (sensor.source) + (sensor.index << 8);
else if (sensor.formula == SensorData::TELEM_FORMULA_ADD || sensor.formula == SensorData::TELEM_FORMULA_MULTIPLY || sensor.formula == SensorData::TELEM_FORMULA_MIN || sensor.formula == SensorData::TELEM_FORMULA_MAX)
else if (sensor.formula == SensorData::TELEM_FORMULA_ADD || sensor.formula == SensorData::TELEM_FORMULA_AVERAGE || sensor.formula == SensorData::TELEM_FORMULA_MULTIPLY || sensor.formula == SensorData::TELEM_FORMULA_MIN || sensor.formula == SensorData::TELEM_FORMULA_MAX)
_param = ((uint8_t)sensor.sources[0]) + ((uint8_t)sensor.sources[1] << 8) + ((uint8_t)sensor.sources[2] << 16) + ((uint8_t)sensor.sources[3] << 24);
else if (sensor.formula == SensorData::TELEM_FORMULA_DIST)
_param = (sensor.gps) + (sensor.alt << 8);
@@ -2900,7 +2907,7 @@ class SensorField: public TransformedField {
sensor.formula = _instance;
if (sensor.formula == SensorData::TELEM_FORMULA_CELL)
(sensor.source = _sources[0], sensor.index = _sources[1]);
else if (sensor.formula == SensorData::TELEM_FORMULA_ADD || sensor.formula == SensorData::TELEM_FORMULA_MULTIPLY || sensor.formula == SensorData::TELEM_FORMULA_MIN || sensor.formula == SensorData::TELEM_FORMULA_MAX)
else if (sensor.formula == SensorData::TELEM_FORMULA_ADD || sensor.formula == SensorData::TELEM_FORMULA_AVERAGE || sensor.formula == SensorData::TELEM_FORMULA_MULTIPLY || sensor.formula == SensorData::TELEM_FORMULA_MIN || sensor.formula == SensorData::TELEM_FORMULA_MAX)
for (int i=0; i<4; ++i)
sensor.sources[i] = _sources[i];
else if (sensor.formula == SensorData::TELEM_FORMULA_DIST)
@@ -3049,14 +3056,14 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))
internalField.Append(new BoolField<1>(modelData.displayChecklist));
else
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppm.pulsePol));
internalField.Append(new BoolField<1>(modelData.extendedLimits));
internalField.Append(new BoolField<1>(modelData.extendedTrims));
internalField.Append(new BoolField<1>(modelData.throttleReversed));
if (!IS_ARM(board) || version < 216) {
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppm.delay, exportPpmDelay, importPpmDelay));
}
if (IS_ARM(board) || IS_2560(board))
@@ -3085,7 +3092,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
if (!IS_ARM(board) || version < 216) {
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength));
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppm.frameLength));
}
internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc, "Throttle Source"));
@@ -3164,36 +3171,38 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_ARM(board) && version >= 215) {
for (int module=0; module<modulesCount; module++) {
if (version >= 217) {
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
internalField.Append(new ConversionField<SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
internalField.Append(new SignedField<4>(subprotocols[module]));
}
else {
internalField.Append(new SignedField<8>(subprotocols[module]));
}
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].channelsStart));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
if (version >= 217)
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].failsafeMode));
else
internalField.Append(new ConversionField<SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
if (version >= 217) {
internalField.Append(new UnsignedField<4>(modelData.moduleData[module].failsafeMode));
internalField.Append(new UnsignedField<3>(modelData.moduleData[module].subType));
internalField.Append(new BoolField<1>(modelData.moduleData[module].invertedSerial));
} else
internalField.Append(new ConversionField< UnsignedField<8> >(modelData.moduleData[module].failsafeMode, -1));
for (int i=0; i<32; i++) {
internalField.Append(new SignedField<16>(modelData.moduleData[module].failsafeChannels[i]));
}
if (version >= 217) {
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmPulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmOutputType));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.pulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.outputType));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
}
else {
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppmPulsePol));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppm.pulsePol));
}
}
}
if (IS_TARANIS(board)) {
if (IS_TARANIS(board) && version < 218) {
for (int i=0; i<MAX_CURVES(board, version); i++) {
internalField.Append(new ZCharField<6>(modelData.curves[i].name));
}
@@ -3221,13 +3230,13 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
}
}
if (IS_TARANIS(board) && version >= 216) {
for (int i=0; i<32; i++) {
internalField.Append(new ZCharField<4>(modelData.inputNames[i]));
}
}
if (IS_ARM(board) && version >= 217) {
for (int i=0; i<8; i++) {
if (i < MAX_POTS(board, version)+MAX_SLIDERS(board))
@@ -3249,7 +3258,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_ARM(board) && version >= 216) {
for (int i=0; i < MAX_POTS(board, version)+MAX_SLIDERS(board); i++) {
internalField.Append(new SignedField<8>(modelData.potPosition[i]));
}
}
}
if (IS_ARM(board) && version == 216) {
@@ -3262,7 +3271,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
if (IS_ARM(board) && version >= 217) {
for (int i=0; i<MAX_SENSORS(board, version); ++i) {
for (int i=0; i<MAX_TELEMETRY_SENSORS(board, version); ++i) {
internalField.Append(new SensorField(modelData.sensorData[i], board, version));
}
}
@@ -3369,8 +3378,9 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
internalField.Append(new SignedField<8>(generalData.txVoltageCalibration));
internalField.Append(new SignedField<8>(generalData.backlightMode));
for (int i=0; i<NUM_STICKS; i++)
for (int i=0; i<NUM_STICKS; i++) {
internalField.Append(new SignedField<16>(generalData.trainer.calib[i]));
}
for (int i=0; i<NUM_STICKS; i++) {
internalField.Append(new UnsignedField<6>(generalData.trainer.mix[i].src));
internalField.Append(new UnsignedField<2>(generalData.trainer.mix[i].mode));
@@ -3379,7 +3389,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
internalField.Append(new UnsignedField<8>(generalData.view, 0, MAX_VIEWS(board)-1));
internalField.Append(new SpareBitsField<2>());
internalField.Append(new SpareBitsField<2>()); // TODO buzzerMode?
internalField.Append(new BoolField<1>(generalData.fai));
internalField.Append(new SignedField<2>((int &)generalData.beeperMode));
internalField.Append(new BoolField<1>(generalData.flashBeep));
@@ -3396,13 +3406,18 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
}
internalField.Append(new UnsignedField<8>(generalData.inactivityTimer));
if (IS_9X(board) && version >= 215) {
internalField.Append(new UnsignedField<3>(generalData.mavbaud));
if (IS_9X(board)) {
if (version >= 215) {
internalField.Append(new UnsignedField<3>(generalData.mavbaud));
}
else {
internalField.Append(new SpareBitsField<1>());
internalField.Append(new BoolField<1>(generalData.minuteBeep));
internalField.Append(new BoolField<1>(generalData.preBeep));
}
}
else {
internalField.Append(new SpareBitsField<1>());
internalField.Append(new BoolField<1>(generalData.minuteBeep));
internalField.Append(new BoolField<1>(generalData.preBeep));
internalField.Append(new SpareBitsField<3>());
}
if (version >= 216 && IS_TARANIS(board))
internalField.Append(new SignedField<3>(generalData.splashDuration));
@@ -3415,20 +3430,19 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
if (IS_ARM(board))
internalField.Append(new SignedField<8>(generalData.switchesDelay));
else
internalField.Append(new SpareBitsField<8>());
internalField.Append(new SpareBitsField<8>()); // TODO blOffBright + blOnBright
internalField.Append(new UnsignedField<8>(generalData.backlightDelay));
internalField.Append(new UnsignedField<8>(generalData.templateSetup));
internalField.Append(new SignedField<8>(generalData.PPM_Multiplier));
internalField.Append(new SignedField<8>(generalData.hapticLength));
if (version < 216 || !IS_9X(board)) {
if (version < 216 || (version < 218 && !IS_9X(board)) || (!IS_9X(board) && !IS_TARANIS(board))) {
internalField.Append(new UnsignedField<8>(generalData.reNavigation));
}
if (version >= 216 && !IS_TARANIS(board)) {
internalField.Append(new UnsignedField<4>(generalData.stickReverse));
internalField.Append(new SpareBitsField<4>());
internalField.Append(new UnsignedField<8>(generalData.stickReverse));
}
internalField.Append(new SignedField<3>(generalData.beeperLength));
@@ -3450,33 +3464,46 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
if (IS_ARM(board)) {
internalField.Append(new UnsignedField<8>(generalData.backlightBright));
internalField.Append(new SignedField<8>(generalData.txCurrentCalibration));
if (version < 218) internalField.Append(new SignedField<8>(generalData.txCurrentCalibration));
if (version >= 213) {
internalField.Append(new SignedField<8>(generalData.temperatureWarn)); // TODO
internalField.Append(new UnsignedField<8>(generalData.mAhWarn));
internalField.Append(new UnsignedField<16>(generalData.mAhUsed));
if (version < 218) internalField.Append(new SignedField<8>(generalData.temperatureWarn)); // TODO
if (version < 218) internalField.Append(new UnsignedField<8>(generalData.mAhWarn));
if (version < 218) internalField.Append(new UnsignedField<16>(generalData.mAhUsed));
internalField.Append(new UnsignedField<32>(generalData.globalTimer));
internalField.Append(new SignedField<8>(generalData.temperatureCalib)); // TODO
if (version < 218) internalField.Append(new SignedField<8>(generalData.temperatureCalib)); // TODO
internalField.Append(new UnsignedField<8>(generalData.btBaudrate)); // TODO
internalField.Append(new BoolField<8>(generalData.optrexDisplay)); //TODO
internalField.Append(new UnsignedField<8>(generalData.sticksGain)); // TODO
if (version < 218) internalField.Append(new BoolField<8>(generalData.optrexDisplay)); //TODO
if (version < 218) internalField.Append(new UnsignedField<8>(generalData.sticksGain)); // TODO
}
if (version >= 214) {
internalField.Append(new UnsignedField<8>(generalData.rotarySteps)); // TODO
if (version < 218) internalField.Append(new UnsignedField<8>(generalData.rotarySteps)); // TODO
internalField.Append(new UnsignedField<8>(generalData.countryCode));
internalField.Append(new UnsignedField<8>(generalData.imperial));
}
if (version >= 215) {
internalField.Append(new CharField<2>(generalData.ttsLanguage));
internalField.Append(new SignedField<8>(generalData.beepVolume));
internalField.Append(new SignedField<8>(generalData.wavVolume));
internalField.Append(new SignedField<8>(generalData.varioVolume));
if (version < 218) {
internalField.Append(new SignedField<8>(generalData.beepVolume));
internalField.Append(new SignedField<8>(generalData.wavVolume));
internalField.Append(new SignedField<8>(generalData.varioVolume));
}
else {
internalField.Append(new SignedField<4>(generalData.beepVolume));
internalField.Append(new SignedField<4>(generalData.wavVolume));
internalField.Append(new SignedField<4>(generalData.varioVolume));
internalField.Append(new SignedField<4>(generalData.backgroundVolume));
}
if (version >= 216) {
internalField.Append(new SignedField<8>(generalData.varioPitch));
internalField.Append(new SignedField<8>(generalData.varioRange));
internalField.Append(new SignedField<8>(generalData.varioRepeat));
}
internalField.Append(new SignedField<8>(generalData.backgroundVolume));
if (version < 218) internalField.Append(new SignedField<8>(generalData.backgroundVolume));
}
if (version >= 218) {
for (int i=0; i<MAX_CUSTOM_FUNCTIONS(board, version); i++) {
internalField.Append(new ArmCustomFunctionField(generalData.customFn[i], board, version, variant));
}
}
if (IS_TARANIS(board) && version >= 216) {
if (version >= 217) {
@@ -3502,11 +3529,11 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
}
if (IS_TARANIS_X9E(board))
internalField.Append(new SpareBitsField<64>());
internalField.Append(new SpareBitsField<64>()); // switchUnlockStates
else if (IS_TARANIS(board))
internalField.Append(new SpareBitsField<16>());
if (version >= 217) {
internalField.Append(new SpareBitsField<16>()); // switchUnlockStates
if (version == 217) {
for (int i=0; i<MAX_CUSTOM_FUNCTIONS(board, version); i++) {
internalField.Append(new ArmCustomFunctionField(generalData.customFn[i], board, version, variant));
}
@@ -83,6 +83,7 @@ class ProtocolsConversionTable: public ConversionTable
}
if (IS_TARANIS(board)) {
addConversion(PULSES_CROSSFIRE, val++);
addConversion(PULSES_MULTIMODULE, val++);
}
}
};
+166 -156
View File
@@ -393,7 +393,7 @@ unsigned long OpenTxEepromInterface::load(RadioData &radioData, const uint8_t *e
}
}
std::cout << " ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -597,7 +597,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case OffsetWeight:
return (IS_ARM(board) ? 500 : 245);
case Timers:
return ((IS_ARM(board) && id.contains("timer3")) ? 3 : 2);
return (IS_ARM(board) ? 3 : 2);
case TimersName:
return (IS_TARANIS(board) ? 8 : (IS_ARM(board) ? 3 : 0));
case PermTimers:
@@ -813,6 +813,16 @@ int OpenTxFirmware::getCapability(const Capability capability)
}
}
QTime OpenTxFirmware::getMaxTimerStart()
{
if (IS_TARANIS(board) || IS_HORUS(board))
return QTime(23, 59, 59);
else if (IS_ARM(board))
return QTime(8, 59, 59);
else
return QTime(0, 59, 59);
}
bool OpenTxFirmware::isTelemetrySourceAvailable(int source)
{
if (IS_TARANIS(board) && (source == TELEMETRY_SOURCE_RSSI_TX))
@@ -855,6 +865,8 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
case PULSES_DSMX:
case PULSES_CROSSFIRE:
return 1;
case PULSES_MULTIMODULE:
return id.contains("multimodule") ? 1 : 0;
default:
return 0;
}
@@ -973,7 +985,7 @@ EepromLoadErrors OpenTxEepromInterface::checkVersion(unsigned int version)
return NOT_OPENTX;
}
return NO_ERROR;
return ALL_OK;
}
bool OpenTxEepromInterface::checkVariant(unsigned int version, unsigned int variant)
@@ -1081,7 +1093,7 @@ unsigned long OpenTxEepromInterface::loadBackup(RadioData &radioData, uint8_t *e
}
std::cout << " ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
@@ -1097,25 +1109,12 @@ QString OpenTxFirmware::getFirmwareBaseUrl()
QString OpenTxFirmware::getFirmwareUrl()
{
QString url = getFirmwareBaseUrl();
switch (board) {
case BOARD_STOCK:
case BOARD_M128:
case BOARD_GRUVIN9X:
case BOARD_MEGA2560:
url.append(QString("/getfw.php?fw=%1.hex").arg(id));
break;
case BOARD_SKY9X:
case BOARD_AR9X:
case BOARD_9XRPRO:
case BOARD_TARANIS:
case BOARD_TARANIS_PLUS:
case BOARD_TARANIS_X9E:
url.append(QString("/getfw.php?fw=%1.bin").arg(id));
break;
default:
url.clear();
break;
}
QByteArray data = QUrl::toPercentEncoding(id);
if (IS_ARM(board))
url.append(QString("/getfw.php?fw=%1.bin").arg((QString)data));
else
url.append(QString("/getfw.php?fw=%1.hex").arg((QString)data));
return url;
}
@@ -1136,7 +1135,6 @@ QString OpenTxFirmware::getStampUrl()
void addOpenTxCommonOptions(OpenTxFirmware * firmware)
{
firmware->addOption("ppmus", QObject::tr("Channel values displayed in us"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
firmware->addOption("nooverridech", QObject::tr("No OverrideCH functions available"));
Option fai_options[] = { { "faichoice", QObject::tr("Possibility to enable FAI MODE (no telemetry) at field") }, { "faimode", QObject::tr("FAI MODE (no telemetry) always enabled") }, { NULL } };
firmware->addOptions(fai_options);
@@ -1144,15 +1142,16 @@ void addOpenTxCommonOptions(OpenTxFirmware * firmware)
void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
{
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
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"));
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
firmware->addOptions(usb_options);
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
firmware->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use in the EU on radios sold after Jan 1st, 2015"));
firmware->addOption("eu", QObject::tr("Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
}
void addOpenTxLcdOptions(OpenTxFirmware * firmware)
@@ -1162,6 +1161,7 @@ void addOpenTxLcdOptions(OpenTxFirmware * firmware)
{ "ST7565R", QObject::tr("ST7565R LCD or compatible") },
{ "ERC12864FSF", QObject::tr("ERC12864FSF LCD") },
{ "ST7920", QObject::tr("ST7920 LCD") },
{ "KS108", QObject::tr("KS108 LCD") },
{ NULL }
};
firmware->addOptions(lcd_options);
@@ -1176,8 +1176,123 @@ void registerOpenTxFirmwares()
Option nav_options[] = { { "rotenc", QObject::tr("Rotary Encoder use in menus navigation") }, { "potscroll", QObject::tr("Pots use in menus navigation") }, { NULL } };
Option dsm2_options[] = { { "DSM2", QObject::tr("Support for DSM2 modules"), 0 }, { "DSM2PPM", QObject::tr("Support for DSM2 modules using ppm instead of true serial"), 0 }, { NULL } };
/* Taranis Plus board */
firmware = new OpenTxFirmware("opentx-x9d+", QObject::tr("FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis board */
firmware = new OpenTxFirmware("opentx-x9d", QObject::tr("FrSky Taranis"), BOARD_TARANIS);
firmware->addOption("haptic", QObject::tr("Haptic module installed"));
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis X9E board */
firmware = new OpenTxFirmware("opentx-x9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
addOpenTxTaranisOptions(firmware);
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"));
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
firmware->addOptions(usb_options);
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
addOpenTxCommonOptions(firmware);
firmware->addOption("pcbdev", QObject::tr("Use ONLY with first DEV pcb version"));
firmwares.push_back(firmware);
/* 9XR-Pro */
firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("Turnigy 9XR-PRO"), BOARD_9XRPRO);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR board with M128 chip */
firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("Turnigy 9XR with m128 chip"), BOARD_M128);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR board */
firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("Turnigy 9XR"), BOARD_STOCK);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
firmware->addOption("novario", QObject::tr("No vario support"));
firmware->addOption("nogps", QObject::tr("No GPS support"));
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9x board */
firmware = new OpenTxFirmware("opentx-9x", QObject::tr("9X board"), BOARD_STOCK);
firmware = new OpenTxFirmware("opentx-9x", QObject::tr("9X with stock board"), BOARD_STOCK);
firmware->addOptions(ext_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
@@ -1209,11 +1324,12 @@ void registerOpenTxFirmwares()
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
firmware->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9x board with M128 chip */
firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("M128 / 9X board"), BOARD_M128);
firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("9X with stock board and m128 chip"), BOARD_M128);
firmware->addOptions(ext_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
@@ -1239,72 +1355,56 @@ void registerOpenTxFirmwares()
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR board */
firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("9XR"), BOARD_STOCK);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
/* ar9x board */
firmware = new OpenTxFirmware("opentx-ar9x", QObject::tr("9X with AR9X board"), BOARD_AR9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
firmware->addOption("novario", QObject::tr("No vario support"));
firmware->addOption("nogps", QObject::tr("No GPS support"));
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
// firmware->addOption("rtc", QObject::tr("Optional RTC added"));
// firmware->addOption("volume", QObject::tr("i2c volume control added"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR board with M128 chip */
firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("9XR with M128 chip"), BOARD_M128);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
/* Sky9x board */
firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("9X with Sky9x board"), BOARD_SKY9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Gruvin9x board */
firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("Gruvin9x board / 9X"), BOARD_GRUVIN9X);
firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("9X with Gruvin9x board"), BOARD_GRUVIN9X);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
@@ -1325,11 +1425,12 @@ void registerOpenTxFirmwares()
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* MEGA2560 board */
firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("MEGA2560 board"), BOARD_MEGA2560);
firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("DIY MEGA2560 radio"), BOARD_MEGA2560);
addOpenTxLcdOptions(firmware);
firmware->addOption("PWR", QObject::tr("Power management by soft-off circuitry"));
firmware->addOptions(ext_options);
@@ -1340,8 +1441,8 @@ void registerOpenTxFirmwares()
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("sdcard", QObject::tr("Support for SD memory card"));
//firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
//firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
@@ -1355,102 +1456,11 @@ void registerOpenTxFirmwares()
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Sky9x board */
firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("Sky9x board / 9X"), BOARD_SKY9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
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"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
// firmware->addOption("rtc", QObject::tr("Optional RTC added"));
// firmware->addOption("volume", QObject::tr("i2c volume control added"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR-Pro */
firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("9XR-PRO"), BOARD_9XRPRO);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis board */
firmware = new OpenTxFirmware("opentx-taranis", QObject::tr("FrSky Taranis"), BOARD_TARANIS);
firmware->addOption("haptic", QObject::tr("Haptic module installed"));
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis Plus board */
firmware = new OpenTxFirmware("opentx-taranisplus", QObject::tr("FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis X9E board */
firmware = new OpenTxFirmware("opentx-taranisx9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
addOpenTxTaranisOptions(firmware);
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");
default_firmware_variant = GetFirmware("opentx-x9d+");
current_firmware_variant = default_firmware_variant;
}
@@ -118,6 +118,8 @@ class OpenTxFirmware: public Firmware {
virtual QString getFirmwareUrl();
virtual int getCapability(const Capability);
virtual QTime getMaxTimerStart();
virtual bool isTelemetrySourceAvailable(int source);
@@ -1,195 +0,0 @@
today(DATE)
now(TIME)
git_id(GIT_STR)
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}
${COMPANION_SRC_DIRECTORY}/firmwares/opentx
${RADIO_SRC_DIRECTORY}
${RADIO_SRC_DIRECTORY}/fonts/std
${RADIO_SRC_DIRECTORY}/lua/src
${RADIO_SRC_DIRECTORY}/thirdparty
${RADIO_SRC_DIRECTORY}/thirdparty/FatFs
${RADIO_SRC_DIRECTORY}/thirdparty/FatFs/option
${RADIO_SRC_DIRECTORY}/thirdparty/CoOS
${RADIO_SRC_DIRECTORY}/thirdparty/Lua/src
)
if(APPLE)
# OS X compiler no longer automatically includes /Library/Frameworks in search path
set(CMAKE_SHARED_LINKER_FLAGS -F/Library/Frameworks)
endif(APPLE)
if(DEFINED TRANSLATIONS)
set(COMMON_DEFINITIONS ${COMMON_DEFINITIONS} TRANSLATIONS_${TRANSLATIONS})
string(TOLOWER ${TRANSLATIONS} TRANSLATION_SUFFIX)
set(SUFFIX ${SUFFIX}-${TRANSLATION_SUFFIX})
endif()
set(COMMON_DEFINITIONS
${COMMON_DEFINITIONS}
SUFFIX="${SUFFIX}"
HELI
GVARS
FLIGHT_MODES
PPM_CENTER_ADJUSTABLE
PPM_LIMITS_SYMETRICAL
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})
add_library(opentx-9x128${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-9xr128${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-gruvin9x${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-mega2560${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-sky9x${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-9xrpro${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-ar9x${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranis${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-horus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
set(dependencies_9x 9x_bitmaps firmware_translations)
add_dependencies(opentx-9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xr${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9x128${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xr128${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-gruvin9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-mega2560${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
set(dependencies_taranis taranis_bitmaps firmware_translations)
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis_x9e)
add_dependencies(opentx-horus${SUFFIX}-simulator horus_bitmaps horus_fonts firmware_translations lua_export_horus)
set(OPENTX_LIBRARIES
opentx-9x${SUFFIX}-simulator
opentx-9xr${SUFFIX}-simulator
opentx-9x128${SUFFIX}-simulator
opentx-9xr128${SUFFIX}-simulator
opentx-gruvin9x${SUFFIX}-simulator
opentx-mega2560${SUFFIX}-simulator
opentx-sky9x${SUFFIX}-simulator
opentx-9xrpro${SUFFIX}-simulator
opentx-ar9x${SUFFIX}-simulator
opentx-taranis${SUFFIX}-simulator
opentx-taranisplus${SUFFIX}-simulator
opentx-taranisx9e${SUFFIX}-simulator
opentx-horus${SUFFIX}-simulator
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(TARGETS ${OPENTX_LIBRARIES} LIBRARY DESTINATION ${SIMULATOR_LIB_PATH})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# 9X with ATmega64
target_include_directories(opentx-9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega64
target_include_directories(opentx-9xr${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9xr${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM64 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xr${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9X with ATmega128
target_include_directories(opentx-9x128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9x128${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM128 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9x128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega128
target_include_directories(opentx-9xr128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9xr128${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM128 EEPROM EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xr128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Gruvin9x
target_include_directories(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/gruvin9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-gruvin9x${SUFFIX}-simulator PRIVATE PCBGRUVIN9X CPUM2560 EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Mega2560
target_include_directories(opentx-mega2560${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/mega2560 PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-mega2560${SUFFIX}-simulator PRIVATE PCBMEGA2560 CPUM2560 EEPROM EEPROM_RLC SDCARD ROTARY_ENCODERS=2 ${COMMON_DEFINITIONS})
target_link_libraries(opentx-mega2560${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Sky9x
target_include_directories(opentx-sky9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-sky9x${SUFFIX}-simulator PRIVATE PCBSKY9X CPUARM VOICE EEPROM SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-sky9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR-PRO
target_include_directories(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-9xrpro${SUFFIX}-simulator PRIVATE PCBSKY9X REVX CPUARM VOICE EEPROM SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# AR9X
target_include_directories(opentx-ar9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/9x)
target_compile_definitions(opentx-ar9x${SUFFIX}-simulator PRIVATE PCBSKY9X AR9X CPUARM VOICE EEPROM SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-ar9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis standard
target_include_directories(opentx-taranis${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/taranis)
target_compile_definitions(opentx-taranis${SUFFIX}-simulator PRIVATE PCBTARANIS CPUARM CPUSTM32 EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranis${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis Plus
target_include_directories(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/taranis)
target_compile_definitions(opentx-taranisplus${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS CPUARM CPUSTM32 EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis X9E
target_include_directories(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis PRIVATE ${CMAKE_BINARY_DIR}/radio/src/bitmaps/taranis)
target_compile_definitions(opentx-taranisx9e${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS REV9E CPUARM CPUSTM32 STM32F40_41xxx EEPROM EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_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)
foreach(_file ${OPENTX_LIBRARIES})
set(SIMULATOR_BUNDLE "${_file}-bundle")
add_custom_target(${SIMULATOR_BUNDLE}
COMMAND install_name_tool -change /opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore lib${_file}.dylib
COMMAND install_name_tool -change /opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork lib${_file}.dylib
COMMAND install_name_tool -change /opt/local/Library/Frameworks/QtXml.framework/Versions/4/QtXml @executable_path/../Frameworks/QtXml.framework/Versions/4/QtXml lib${_file}.dylib
COMMAND install_name_tool -change /opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui lib${_file}.dylib
COMMAND install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL lib${_file}.dylib
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
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})
endif(APPLE)
@@ -1,695 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include "opentxsimulator.h"
#include <QDebug>
#include <stdio.h>
#include <exception>
#include <map>
#include <string>
#define COMPANION
#define SIMU
#define SIMU_EXCEPTIONS
#define GUI
#define SPLASH
#define FRSKY
#define FRSKY_HUB
#define GPS
#define VARIO
#define GAUGES
#define PPM_UNIT_PERCENT_PREC1
#define AUDIO
#define PXX
#define DSM2
#define DSM2_PPM
#define DBLKEYS
#define AUTOSWITCH
#define GRAPHICS
#define CURVES
#if defined(PCBFLAMENCO)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
#elif defined(PCBTARANIS) || defined(PCBHORUS)
#define RTCLOCK
#define XCURVES
#define VIRTUALINPUTS
#define LUA
#define LUA_MODEL_SCRIPTS
#define LUAINPUTS
#else
#define BUZZER
#define TEMPLATES
#endif
#define BOLD_FONT
#define HAPTIC
#define THRTRACE
#if defined(CPUARM)
#define TIMERS 3
#else
#define TIMERS 2
#endif
#if defined(PCBSKY9X) && !defined(REVX)
#define ROTARY_ENCODERS 1
#elif defined(PCBGRUVIN9X)
#define ROTARY_ENCODERS 2
#endif
#if defined(CPUARM)
#define FRSKY_SPORT
#endif
#if defined (PCBTARANIS)
#define MIXERS_MONITOR
#endif
#undef min
#undef max
namespace NAMESPACE {
#if defined(CPUARM)
#include "radio/src/pulses/ppm_arm.cpp"
#include "radio/src/pulses/pxx_arm.cpp"
#include "radio/src/pulses/dsm2_arm.cpp"
#include "radio/src/main_arm.cpp"
#include "radio/src/pulses/pulses_arm.cpp"
#include "radio/src/tasks_arm.cpp"
#include "radio/src/audio_arm.cpp"
#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/storage/storage_common.cpp"
#if defined(EEPROM_RLC)
#include "radio/src/storage/eeprom_common.cpp"
#include "radio/src/storage/eeprom_rlc.cpp"
#elif defined(EEPROM)
#include "radio/src/storage/eeprom_common.cpp"
#include "radio/src/storage/eeprom_raw.cpp"
#elif defined(SDCARD)
#include "radio/src/storage/sdcard_raw.cpp"
#endif
#if defined(PCBTARANIS) || defined(PCBSKY9X)
#include "radio/src/storage/eeprom_conversions.cpp"
#endif
#include "radio/src/opentx.cpp"
#include "radio/src/debug.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/functions.cpp"
#include "radio/src/curves.cpp"
#include "radio/src/mixer.cpp"
#if defined(SDCARD)
#include "radio/src/sdcard.cpp"
#endif
#include "radio/src/timers.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"
#include "radio/src/vario.cpp"
#include "radio/src/trainer_input.cpp"
#if defined(PCBHORUS)
#include "radio/src/bmp.cpp"
#include "radio/src/gui/horus/bitmaps.cpp"
#include "radio/src/gui/horus/curves.cpp"
#include "radio/src/gui/horus/fonts.cpp"
#include "radio/src/gui/horus/widgets.cpp"
#include "radio/src/gui/horus/navigation.cpp"
#include "radio/src/gui/horus/popups.cpp"
#include "radio/src/gui/horus/helpers.cpp"
#include "radio/src/gui/horus/menus.cpp"
#include "radio/src/gui/horus/menu_model.cpp"
#include "radio/src/gui/horus/menu_model_select.cpp"
#include "radio/src/gui/horus/menu_model_setup.cpp"
#include "radio/src/gui/horus/menu_model_heli.cpp"
#include "radio/src/gui/horus/menu_model_flightmodes.cpp"
#include "radio/src/gui/horus/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/horus/menu_model_curves.cpp"
#include "radio/src/gui/horus/menu_model_logical_switches.cpp"
#include "radio/src/gui/horus/menu_model_custom_functions.cpp"
#include "radio/src/gui/horus/menu_model_custom_scripts.cpp"
#include "radio/src/gui/horus/menu_model_gvars.cpp"
#include "radio/src/gui/horus/menu_model_limits.cpp"
#include "radio/src/gui/horus/menu_model_telemetry.cpp"
#include "radio/src/gui/horus/menu_general.cpp"
#include "radio/src/gui/horus/menu_general_setup.cpp"
#include "radio/src/gui/horus/menu_general_sdmanager.cpp"
#include "radio/src/gui/horus/menu_general_trainer.cpp"
#include "radio/src/gui/horus/menu_general_version.cpp"
// #include "radio/src/gui/horus/menu_general_hardware.cpp"
#include "radio/src/gui/horus/menu_general_calib.cpp"
#include "radio/src/gui/horus/view_main.cpp"
#include "radio/src/gui/horus/view_statistics.cpp"
#include "radio/src/gui/horus/view_channels.cpp"
#include "radio/src/gui/horus/view_telemetry.cpp"
#include "radio/src/gui/horus/view_text.cpp"
#include "radio/src/gui/horus/view_about.cpp"
#include "radio/src/gui/horus/lcd.cpp"
#include "radio/src/gui/horus/splash.cpp"
#elif defined(PCBFLAMENCO)
#include "radio/src/gui/Flamenco/fonts.cpp"
#include "radio/src/gui/Flamenco/widgets.cpp"
#include "radio/src/gui/Flamenco/navigation.cpp"
#include "radio/src/gui/Flamenco/popups.cpp"
#include "radio/src/gui/Flamenco/helpers.cpp"
#include "radio/src/gui/Flamenco/menus.cpp"
#include "radio/src/gui/Flamenco/menu_model.cpp"
#include "radio/src/gui/Flamenco/menu_model_select.cpp"
#include "radio/src/gui/Flamenco/menu_model_setup.cpp"
#include "radio/src/gui/Flamenco/menu_model_heli.cpp"
#include "radio/src/gui/Flamenco/menu_model_flightmodes.cpp"
#include "radio/src/gui/Flamenco/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/Flamenco/menu_model_curves.cpp"
#include "radio/src/gui/Flamenco/menu_model_logical_switches.cpp"
#include "radio/src/gui/Flamenco/menu_model_custom_functions.cpp"
// #include "radio/src/gui/Flamenco/menu_model_custom_scripts.cpp"
#include "radio/src/gui/Flamenco/menu_model_gvars.cpp"
#include "radio/src/gui/Flamenco/menu_model_limits.cpp"
#include "radio/src/gui/Flamenco/menu_model_telemetry.cpp"
#include "radio/src/gui/Flamenco/menu_general.cpp"
#include "radio/src/gui/Flamenco/menu_general_setup.cpp"
#include "radio/src/gui/Flamenco/menu_general_sdmanager.cpp"
#include "radio/src/gui/Flamenco/menu_general_trainer.cpp"
#include "radio/src/gui/Flamenco/menu_general_version.cpp"
// #include "radio/src/gui/Flamenco/menu_general_hardware.cpp"
#include "radio/src/gui/Flamenco/menu_general_calib.cpp"
#include "radio/src/gui/Flamenco/view_main.cpp"
#include "radio/src/gui/Flamenco/view_statistics.cpp"
#include "radio/src/gui/Flamenco/view_channels.cpp"
#include "radio/src/gui/Flamenco/view_telemetry.cpp"
#include "radio/src/gui/Flamenco/view_text.cpp"
#include "radio/src/gui/Flamenco/view_about.cpp"
#include "radio/src/gui/Flamenco/lcd.cpp"
#include "radio/src/gui/Flamenco/splash.cpp"
#include "radio/src/targets/flamenco/tw8823_driver.cpp"
#elif defined(PCBTARANIS)
#include "radio/src/bmp.cpp"
#include "radio/src/gui/taranis/fonts.cpp"
#include "radio/src/gui/taranis/widgets.cpp"
#include "radio/src/gui/taranis/navigation.cpp"
#include "radio/src/gui/taranis/popups.cpp"
#include "radio/src/gui/taranis/helpers.cpp"
#include "radio/src/gui/taranis/menus.cpp"
#include "radio/src/gui/taranis/menu_model.cpp"
#include "radio/src/gui/taranis/menu_model_select.cpp"
#include "radio/src/gui/taranis/menu_model_setup.cpp"
#include "radio/src/gui/taranis/menu_model_heli.cpp"
#include "radio/src/gui/taranis/menu_model_flightmodes.cpp"
#include "radio/src/gui/taranis/menu_model_inputs_mixes.cpp"
#include "radio/src/gui/taranis/menu_model_curves.cpp"
#include "radio/src/gui/taranis/menu_model_logical_switches.cpp"
#include "radio/src/gui/taranis/menu_model_custom_functions.cpp"
#include "radio/src/gui/taranis/menu_model_custom_scripts.cpp"
#include "radio/src/gui/taranis/menu_model_gvars.cpp"
#include "radio/src/gui/taranis/menu_model_limits.cpp"
#include "radio/src/gui/taranis/menu_model_telemetry.cpp"
#include "radio/src/gui/taranis/menu_general.cpp"
#include "radio/src/gui/taranis/menu_general_setup.cpp"
#include "radio/src/gui/taranis/menu_general_sdmanager.cpp"
#include "radio/src/gui/taranis/menu_general_trainer.cpp"
#include "radio/src/gui/taranis/menu_general_version.cpp"
#include "radio/src/gui/taranis/menu_general_diagkeys.cpp"
#include "radio/src/gui/taranis/menu_general_diaganas.cpp"
#include "radio/src/gui/taranis/menu_general_hardware.cpp"
#include "radio/src/gui/taranis/menu_general_calib.cpp"
#include "radio/src/gui/taranis/view_main.cpp"
#include "radio/src/gui/taranis/view_statistics.cpp"
#include "radio/src/gui/taranis/view_channels.cpp"
#include "radio/src/gui/taranis/view_telemetry.cpp"
#include "radio/src/gui/taranis/view_text.cpp"
#include "radio/src/gui/taranis/view_about.cpp"
#include "radio/src/gui/taranis/lcd.cpp"
#include "radio/src/gui/taranis/splash.cpp"
#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"
#if defined(SDCARD)
#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"
#if defined(CPUARM)
#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"
#if !defined(CPUM64)
#include "radio/src/gui/9x/view_about.cpp"
#endif
#include "radio/src/gui/9x/lcd.cpp"
#include "radio/src/gui/9x/splash.cpp"
#endif
#if !defined(VIRTUALINPUTS)
#include "radio/src/templates.cpp"
#endif
#if defined(SDCARD)
#include "radio/src/logs.cpp"
#endif
#if defined(RTCLOCK)
#include "radio/src/rtc.cpp"
#endif
#if defined(BUZZER)
#include "radio/src/buzzer.cpp"
#endif
#if defined(PCBHORUS)
#include "radio/src/targets/horus/board_horus.cpp"
#include "radio/src/targets/horus/keys_driver.cpp"
#include "radio/src/targets/horus/audio_driver.cpp"
#include "radio/src/targets/horus/telemetry_driver.cpp"
#include "radio/src/targets/horus/haptic_driver.cpp"
#include "radio/src/targets/horus/pulses_driver.cpp"
#include "radio/src/targets/taranis/rtc_driver.cpp"
#include "radio/src/targets/horus/trainer_driver.cpp"
#include "radio/src/targets/horus/serial2_driver.cpp"
#elif defined(PCBFLAMENCO)
#include "radio/src/targets/flamenco/board_flamenco.cpp"
#include "radio/src/targets/flamenco/keys_driver.cpp"
#include "radio/src/targets/flamenco/audio_driver.cpp"
#include "radio/src/targets/flamenco/telemetry_driver.cpp"
#include "radio/src/targets/flamenco/eeprom_driver.cpp"
// #include "radio/src/targets/flamenco/haptic_driver.cpp"
#include "radio/src/targets/flamenco/pulses_driver.cpp"
#include "radio/src/targets/flamenco/rtc_driver.cpp"
#include "radio/src/targets/flamenco/trainer_driver.cpp"
#elif defined(PCBTARANIS)
#include "radio/src/targets/taranis/board_taranis.cpp"
#include "radio/src/targets/taranis/keys_driver.cpp"
#include "radio/src/targets/taranis/audio_driver.cpp"
#include "radio/src/targets/taranis/telemetry_driver.cpp"
#include "radio/src/targets/taranis/haptic_driver.cpp"
#if defined(REV9E)
#include "radio/src/targets/taranis/top_lcd_driver.cpp"
#endif
#include "radio/src/targets/taranis/pulses_driver.cpp"
#include "radio/src/targets/taranis/rtc_driver.cpp"
#include "radio/src/targets/taranis/trainer_driver.cpp"
#include "radio/src/targets/taranis/serial2_driver.cpp"
#elif defined(PCBSKY9X)
#include "radio/src/targets/sky9x/board_sky9x.cpp"
#include "radio/src/targets/sky9x/telemetry_driver.cpp"
#include "radio/src/targets/sky9x/pwr_driver.cpp"
#include "radio/src/targets/sky9x/eeprom_driver.cpp"
#include "radio/src/targets/sky9x/keys_driver.cpp"
#include "radio/src/targets/sky9x/audio_driver.cpp"
#include "radio/src/targets/sky9x/sdcard_driver.cpp"
#include "radio/src/targets/sky9x/coproc_driver.cpp"
#include "radio/src/targets/sky9x/haptic_driver.cpp"
#include "radio/src/targets/sky9x/serial2_driver.cpp"
#include "radio/src/targets/sky9x/pulses_driver.cpp"
#elif defined(PCBGRUVIN9X)
#include "radio/src/targets/gruvin9x/board_gruvin9x.cpp"
#include "radio/src/targets/gruvin9x/somo14d.cpp"
#elif defined(PCBMEGA2560)
#include "radio/src/targets/mega2560/board_mega2560.cpp"
#else
#include "radio/src/targets/9x/board_stock.cpp"
#endif
#if defined(CPUARM)
#include "radio/src/gui/gui_helpers.cpp"
#endif
#include "radio/src/keys.cpp"
#include "radio/src/haptic.cpp"
#include "radio/src/targets/simu/simpgmspace.cpp"
#include "radio/src/translations.cpp"
#include "radio/src/telemetry/frsky.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)
#include "radio/src/translations/tts_cz.cpp"
#include "radio/src/translations/tts_de.cpp"
#include "radio/src/translations/tts_es.cpp"
#include "radio/src/translations/tts_fr.cpp"
#include "radio/src/translations/tts_hu.cpp"
#include "radio/src/translations/tts_it.cpp"
#include "radio/src/translations/tts_nl.cpp"
#include "radio/src/translations/tts_pl.cpp"
#include "radio/src/translations/tts_pt.cpp"
#include "radio/src/translations/tts_se.cpp"
#include "radio/src/translations/tts_sk.cpp"
#endif
#if defined(LUA)
#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"
#include "radio/src/thirdparty/Lua/src/ldebug.c"
#include "radio/src/thirdparty/Lua/src/ldo.c"
#include "radio/src/thirdparty/Lua/src/ldump.c"
#include "radio/src/thirdparty/Lua/src/lfunc.c"
#include "radio/src/thirdparty/Lua/src/lgc.c"
#include "radio/src/thirdparty/Lua/src/llex.c"
#include "radio/src/thirdparty/Lua/src/lmem.c"
#include "radio/src/thirdparty/Lua/src/lobject.c"
#include "radio/src/thirdparty/Lua/src/lopcodes.c"
#include "radio/src/thirdparty/Lua/src/lparser.c"
#include "radio/src/thirdparty/Lua/src/lstate.c"
#include "radio/src/thirdparty/Lua/src/lstring.c"
#include "radio/src/thirdparty/Lua/src/ltable.c"
#include "radio/src/thirdparty/Lua/src/lrotable.c"
#include "radio/src/thirdparty/Lua/src/ltm.c"
#include "radio/src/thirdparty/Lua/src/lundump.c"
#include "radio/src/thirdparty/Lua/src/lvm.c"
#include "radio/src/thirdparty/Lua/src/lzio.c"
#include "radio/src/thirdparty/Lua/src/lbaselib.c"
#include "radio/src/thirdparty/Lua/src/linit.c"
#include "radio/src/thirdparty/Lua/src/lmathlib.c"
#include "radio/src/thirdparty/Lua/src/lbitlib.c"
#include "radio/src/thirdparty/Lua/src/loadlib.c"
#include "radio/src/thirdparty/Lua/src/lauxlib.c"
#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];
uint16_t anaIn(uint8_t chan)
{
return g_anas[chan];
}
bool hasExtendedTrims()
{
return g_model.extendedTrims;
}
uint8_t getStickMode()
{
return limit<uint8_t>(0, g_eeGeneral.stickMode, 3);
}
#if defined(PCBTARANIS)
void resetTrims()
{
TRIMS_GPIO_REG_RVD |= TRIMS_GPIO_PIN_RVD;
TRIMS_GPIO_REG_RVU |= TRIMS_GPIO_PIN_RVU;
TRIMS_GPIO_REG_RHL |= TRIMS_GPIO_PIN_RHL;
TRIMS_GPIO_REG_RHR |= TRIMS_GPIO_PIN_RHR;
TRIMS_GPIO_REG_LVD |= TRIMS_GPIO_PIN_LVD;
TRIMS_GPIO_REG_LVU |= TRIMS_GPIO_PIN_LVU;
TRIMS_GPIO_REG_LHL |= TRIMS_GPIO_PIN_LHL;
TRIMS_GPIO_REG_LHR |= TRIMS_GPIO_PIN_LHR;
}
#endif
void delay_01us(::uint16_t nb)
{
}
OpenTxSimulator::OpenTxSimulator()
{
}
void OpenTxSimulator::setSdPath(const QString &sdPath)
{
#if defined(SDCARD)
strncpy(simuSdDirectory, sdPath.toAscii().constData(), sizeof(simuSdDirectory)-1);
simuSdDirectory[sizeof(simuSdDirectory)-1] = '\0';
#endif
}
void OpenTxSimulator::setVolumeGain(int value)
{
volumeGain = value;
}
bool OpenTxSimulator::timer10ms()
{
#define TIMER10MS_IMPORT
#include "simulatorimport.h"
}
::uint8_t * OpenTxSimulator::getLcd()
{
return (::uint8_t *)simuLcdBuf;
}
bool OpenTxSimulator::lcdChanged(bool & lightEnable)
{
#define LCDCHANGED_IMPORT
#include "simulatorimport.h"
}
void OpenTxSimulator::start(QByteArray & eeprom, bool tests)
{
memcpy(NAMESPACE::eeprom, eeprom.data(), std::min<int>(sizeof(NAMESPACE::eeprom), eeprom.size()));
start((const char *)0, tests);
}
void OpenTxSimulator::start(const char * filename, bool tests)
{
#if defined(PCBSKY9X) && !defined(REVX)
g_rotenc[0] = 0;
#elif defined(PCBGRUVIN9X)
g_rotenc[0] = 0;
g_rotenc[1] = 0;
#endif
StartEepromThread(filename);
StartAudioThread(volumeGain);
StartMainThread(tests);
}
void OpenTxSimulator::stop()
{
StopMainThread();
#if defined(CPUARM)
StopAudioThread();
#endif
StopEepromThread();
}
void OpenTxSimulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT
#define g_chans512 channelOutputs
#include "simulatorimport.h"
#if defined(PCBSKY9X)
outputs.beep = g_beepCnt;
g_beepCnt = 0;
#endif
}
void OpenTxSimulator::setValues(TxInputs &inputs)
{
#define SETVALUES_IMPORT
#include "simulatorimport.h"
}
void OpenTxSimulator::setTrim(unsigned int idx, int value)
{
idx = NAMESPACE::modn12x3[4*getStickMode() + idx];
::uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
setTrimValue(phase, idx, value);
}
void OpenTxSimulator::getTrims(Trims & trims)
{
::uint8_t phase = getFlightMode();
trims.extended = hasExtendedTrims();
for (::uint8_t idx=0; idx<4; idx++) {
trims.values[idx] = getTrimValue(getTrimFlightPhase(phase, idx), idx);
}
for (int i=0; i<2; i++) {
::uint8_t idx = NAMESPACE::modn12x3[4*getStickMode() + i];
::int16_t tmp = trims.values[i];
trims.values[i] = trims.values[idx];
trims.values[idx] = tmp;
}
}
void OpenTxSimulator::wheelEvent(int steps)
{
#if defined(PCBHORUS) || defined(PCBFLAMENCO)
if (steps > 0)
rotencValue -= 2;
else
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)
g_rotenc[0] += steps;
#endif
}
unsigned int OpenTxSimulator::getPhase()
{
return getFlightMode();
}
const char * OpenTxSimulator::getPhaseName(unsigned int phase)
{
static char buff[sizeof(g_model.flightModeData[0].name)+1];
zchar2str(buff, g_model.flightModeData[phase].name, sizeof(g_model.flightModeData[0].name));
return buff;
}
const char * OpenTxSimulator::getError()
{
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
void OpenTxSimulator::sendTelemetry(::uint8_t * data, unsigned int len)
{
#if defined(FRSKY_SPORT)
processSportPacket(data);
#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;
}
class OpenTxSimulatorFactory: public SimulatorFactory
{
public:
OpenTxSimulatorFactory()
{
}
virtual SimulatorInterface *create()
{
return new OpenTxSimulator();
}
virtual QString name()
{
return QString("opentx-" FLAVOUR SUFFIX);
}
virtual BoardEnum type()
{
#if defined(PCBHORUS)
return BOARD_HORUS;
#elif defined(PCBFLAMENCO)
return BOARD_FLAMENCO;
#elif defined(PCBTARANIS)
return BOARD_TARANIS;
#else
return BOARD_STOCK;
#endif
}
};
}
extern "C" DLLEXPORT SimulatorFactory *registerSimu()
{
return new NAMESPACE::OpenTxSimulatorFactory();
}
@@ -24,9 +24,10 @@
#undef min
#undef max
#define NUM_POTS 3
#define NUM_CSW 12
#define SWSRC_SW1 10
#define NUM_POTS 3
#define NUM_SLIDERS 0
#define NUM_CSW 12
#define SWSRC_SW1 10
#include <exception>
#include <algorithm>
@@ -156,7 +157,7 @@ void simuSetKey(uint8_t key, bool state)
}
}
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
}
+1 -1
View File
@@ -273,7 +273,7 @@ t_Th9xModelData::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncTrims2Offsets;
if (trimSw) {
c9x.customFn[0].swtch = trimSw;
@@ -123,7 +123,7 @@ unsigned long Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, i
}
std::cout << "ok\n";
errors.set(NO_ERROR);
errors.set(ALL_OK);
return errors.to_ulong();
}
+2 -2
View File
@@ -126,7 +126,7 @@ int FlashEEpromDialog::getEEpromVersion(const QString &filename)
if (xmlOK) {
RadioData * radioData = new RadioData();
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEepromXml(*radioData, doc));
if (!errors.test(NO_ERROR)) {
if (!errors.test(ALL_OK)) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings File %1").arg(filename));
}
else {
@@ -162,7 +162,7 @@ int FlashEEpromDialog::getEEpromVersion(const QString &filename)
RadioData * radioData = new RadioData();
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)) {
if (eeprom_size == 0 || !errors.test(ALL_OK)) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings file %1").arg(filename));
}
else {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef FLASHEEPROMDIALOG_H_
#define FLASHEEPROMDIALOG_H_
#include <QDialog>
#include <QtWidgets>
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
+2 -2
View File
@@ -37,7 +37,7 @@ fwName(g.profile[g.id()].fwName())
ui->useProfileSplash->setDisabled(true);
}
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
if (IS_STM32(GetEepromInterface()->getBoard())) {
// No backup on Taranis ... could be done if in massstorage
ui->backupEEprom->hide();
ui->backupEEprom->setCheckState(Qt::Unchecked);
@@ -124,7 +124,7 @@ void FlashFirmwareDialog::on_firmwareLoad_clicked()
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER);
if (!fileName.isEmpty()) {
fwName = fileName;
if (!fwName.isEmpty() && !FirmwareInterface(fwName).isValid()) {
if (!fwName.isEmpty() && !fwName.endsWith(".dfu") && !FirmwareInterface(fwName).isValid()) {
QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fwName));
}
updateUI();
+3 -3
View File
@@ -1,17 +1,17 @@
#ifndef FLASH_FIRMWARE_DIALOG_H
#define FLASH_FIRMWARE_DIALOG_H
#include <QtGui>
#include <QDialog>
#include <QtWidgets>
#include "eeprominterface.h"
#include "firmwareinterface.h"
#include "xmlinterface.h"
#define HEX_FILES_FILTER "HEX files (*.hex);;"
#define BIN_FILES_FILTER "BIN files (*.bin);;"
#define DFU_FILES_FILTER "DFU files (*.dfu);;"
#define EEPE_FILES_FILTER "EEPE EEPROM files (*.eepe);;"
#define EEPROM_FILES_FILTER "EEPE files (*.eepe *.bin *.hex);;" EEPE_FILES_FILTER BIN_FILES_FILTER HEX_FILES_FILTER
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex *.dfu);;" BIN_FILES_FILTER HEX_FILES_FILTER DFU_FILES_FILTER
#define EXTERNAL_EEPROM_FILES_FILTER "EEPROM files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
+4 -3
View File
@@ -24,7 +24,8 @@ foreach(name ${generaledit_NAMES})
set(generaledit_UIS ${generaledit_UIS} ${name}.ui)
endforeach()
qt4_wrap_ui(generaledit_SRCS ${generaledit_UIS})
qt4_wrap_cpp(generaledit_SRCS ${generaledit_HDRS})
qt5_wrap_ui(generaledit_SRCS ${generaledit_UIS})
qt5_wrap_cpp(generaledit_SRCS ${generaledit_HDRS})
add_library(generaledit ${generaledit_SRCS})
add_library(generaledit ${generaledit_SRCS})
qt5_use_modules(generaledit Widgets Xml Multimedia)
+1 -1
View File
@@ -14,7 +14,7 @@ CalibrationPanel::CalibrationPanel(QWidget * parent, GeneralSettings & generalSe
layout->setContentsMargins(0, 0, 0, 0);
this->setLayout(layout);
tableWidget->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
tableWidget->setColumnCount(3);
tableWidget->setShowGrid(false);
tableWidget->setSelectionMode(QAbstractItemView::NoSelection);
+87 -41
View File
@@ -1,6 +1,3 @@
#include <QDateTime>
#include <QtGui>
#include <QScrollArea>
#include "generaledit.h"
#include "ui_generaledit.h"
#include "helpers.h"
@@ -84,12 +81,15 @@ void GeneralEdit::on_calretrieve_PB_clicked()
{
int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt();
QString calib=g.profile[profile_id].stickPotCalib();
int potsnum=GetCurrentFirmware()->getCapability(Pots);
int potsnum=GetCurrentFirmware()->getCapability(Pots)+GetCurrentFirmware()->getCapability(Sliders);
int numSwPots=GetCurrentFirmware()->getCapability(Switches)+GetCurrentFirmware()->getCapability(Pots)+GetCurrentFirmware()->getCapability(Sliders);
if (calib.isEmpty()) {
return;
}
else {
QString trainercalib = g.profile[profile_id].trainerCalib();
QString hwtypes = g.profile[profile_id].controlTypes();
QString controlNames=g.profile[profile_id].controlNames();
int8_t txVoltageCalibration = (int8_t)g.profile[profile_id].txVoltageCalibration();
int8_t txCurrentCalibration = (int8_t)g.profile[profile_id].txCurrentCalibration();
int8_t PPM_Multiplier = (int8_t)g.profile[profile_id].ppmMultiplier();
@@ -108,22 +108,18 @@ void GeneralEdit::on_calretrieve_PB_clicked()
for (int i=0; i<(NUM_STICKS+potsnum); i++) {
Byte=calib.mid(i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
generalSettings.calibMid[i]=byte16;
if (ok) generalSettings.calibMid[i]=byte16;
Byte=calib.mid(4+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
generalSettings.calibSpanNeg[i]=byte16;
if (ok) generalSettings.calibSpanNeg[i]=byte16;
Byte=calib.mid(8+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
generalSettings.calibSpanPos[i]=byte16;
if (ok) generalSettings.calibSpanPos[i]=byte16;
}
for (int i=0; i<4; i++) {
Byte=trainercalib.mid(i*4,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
generalSettings.trainer.calib[i]=byte16;
if (ok) generalSettings.trainer.calib[i]=byte16;
}
generalSettings.txCurrentCalibration=txCurrentCalibration;
generalSettings.txVoltageCalibration=txVoltageCalibration;
@@ -136,6 +132,48 @@ void GeneralEdit::on_calretrieve_PB_clicked()
} else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, radio calibration was not retrieved"));
}
if (hwtypes.length()==numSwPots) {
QString Byte;
int16_t byte16;
QByteArray qba;
int16_t offset;
bool ok;
for (int i=0; i<NUM_STICKS; i++) {
qba = controlNames.mid(3*i,3).toLatin1();
strcpy(generalSettings.stickName[i], qba.data());
}
for (int i=0; i<(GetCurrentFirmware()->getCapability(Switches)); i++) {
Byte=hwtypes.mid(i,1);
byte16=(int16_t)Byte.toInt(&ok,16);
qba=controlNames.mid(3*(i+NUM_STICKS),3).toLatin1();
if (ok) {
generalSettings.switchConfig[i]=byte16;
strcpy(generalSettings.switchName[i], qba.data());
}
}
offset = GetCurrentFirmware()->getCapability(Switches);
for (int i=0; i<(GetCurrentFirmware()->getCapability(Pots)); i++) {
Byte=hwtypes.mid(i+offset,1);
byte16=(int16_t)Byte.toInt(&ok,16);
qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toLatin1();
if (ok) {
generalSettings.potConfig[i]=byte16;
strcpy(generalSettings.potName[i], qba.data());
}
}
offset += GetCurrentFirmware()->getCapability(Pots);
for (int i=0; i<(GetCurrentFirmware()->getCapability(Sliders)); i++) {
Byte=hwtypes.mid(i+offset,1);
byte16=(int16_t)Byte.toInt(&ok,16);
qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toLatin1();
if (ok) {
generalSettings.sliderConfig[i]=byte16;
strcpy(generalSettings.sliderName[i], qba.data());
}
}
} else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, Switch/pot config not retrieved"));
}
if ((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6)) {
generalSettings.stickMode=GSStickMode;
uint8_t byte8u;
@@ -143,48 +181,35 @@ void GeneralEdit::on_calretrieve_PB_clicked()
QString chars;
bool ok;
byte8=(int8_t)DisplaySet.mid(0,2).toInt(&ok,16);
if (ok)
generalSettings.optrexDisplay=(byte8==1 ? true : false);
if (ok) generalSettings.optrexDisplay=(byte8==1 ? true : false);
byte8u=(uint8_t)DisplaySet.mid(2,2).toUInt(&ok,16);
if (ok)
generalSettings.contrast=byte8u;
if (ok) generalSettings.contrast=byte8u;
byte8u=(uint8_t)DisplaySet.mid(4,2).toUInt(&ok,16);
if (ok)
generalSettings.backlightBright=byte8u;
if (ok) generalSettings.backlightBright=byte8u;
byte8=(int8_t)BeeperSet.mid(0,2).toUInt(&ok,16);
if (ok)
generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8;
if (ok) generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8;
byte8=(int8_t)BeeperSet.mid(2,2).toInt(&ok,16);
if (ok)
generalSettings.beeperLength=byte8;
if (ok) generalSettings.beeperLength=byte8;
byte8=(int8_t)HapticSet.mid(0,2).toUInt(&ok,16);
if (ok)
generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8;
if (ok) generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8;
byte8=(int8_t)HapticSet.mid(2,2).toInt(&ok,16);
if (ok)
generalSettings.hapticStrength=byte8;
if (ok) generalSettings.hapticStrength=byte8;
byte8=(int8_t)HapticSet.mid(4,2).toInt(&ok,16);
if (ok)
generalSettings.hapticLength=byte8;
if (ok) generalSettings.hapticLength=byte8;
byte8u=(uint8_t)SpeakerSet.mid(0,2).toUInt(&ok,16);
if (ok)
generalSettings.speakerMode=byte8u;
if (ok) generalSettings.speakerMode=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(2,2).toUInt(&ok,16);
if (ok)
generalSettings.speakerPitch=byte8u;
if (ok) generalSettings.speakerPitch=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(4,2).toUInt(&ok,16);
if (ok)
generalSettings.speakerVolume=byte8u;
if (ok) generalSettings.speakerVolume=byte8u;
if (CountrySet.length()==6) {
byte8u=(uint8_t)CountrySet.mid(0,2).toUInt(&ok,16);
if (ok)
generalSettings.countryCode=byte8u;
if (ok) generalSettings.countryCode=byte8u;
byte8u=(uint8_t)CountrySet.mid(2,2).toUInt(&ok,16);
if (ok)
generalSettings.imperial=byte8u;
if (ok) generalSettings.imperial=byte8u;
chars=CountrySet.mid(4,2);
generalSettings.ttsLanguage[0]=chars[0].toAscii();
generalSettings.ttsLanguage[1]=chars[1].toAscii();
generalSettings.ttsLanguage[0]=chars[0].toLatin1();
generalSettings.ttsLanguage[1]=chars[1].toLatin1();
}
}
else {
@@ -200,13 +225,15 @@ void GeneralEdit::on_calstore_PB_clicked()
int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt();
QString name=g.profile[profile_id].name();
int potsnum=GetCurrentFirmware()->getCapability(Pots);
int potsnum=GetCurrentFirmware()->getCapability(Pots)+GetCurrentFirmware()->getCapability(Sliders);
if (name.isEmpty()) {
ui->calstore_PB->setDisabled(true);
return;
}
else {
QString calib=g.profile[profile_id].stickPotCalib();
QString hwtypes=g.profile[profile_id].controlTypes();
QString controlNames=g.profile[profile_id].controlNames();
if (!(calib.isEmpty())) {
int ret = QMessageBox::question(this, "Companion",
tr("Do you want to store calibration in %1 profile<br>overwriting existing calibration?").arg(name) ,
@@ -227,6 +254,25 @@ void GeneralEdit::on_calstore_PB_clicked()
calib.append(QString("%1").arg((uint16_t)generalSettings.trainer.calib[i], 4, 16, QChar('0')));
}
g.profile[profile_id].trainerCalib( calib );
hwtypes.clear();
controlNames.clear();
for (int i=0; i<NUM_STICKS; i++) {
controlNames.append(QString("%1").arg(generalSettings.stickName[i], -3));
}
for (int i=0; i<(GetCurrentFirmware()->getCapability(Switches)); i++) {
hwtypes.append(QString("%1").arg((uint16_t)generalSettings.switchConfig[i], 1));
controlNames.append(QString("%1").arg(generalSettings.switchName[i], -3));
}
for (int i=0; i<(GetCurrentFirmware()->getCapability(Pots)); i++) {
hwtypes.append(QString("%1").arg((uint16_t)generalSettings.potConfig[i], 1));
controlNames.append(QString("%1").arg(generalSettings.potName[i], -3));
}
for (int i=0; i<(GetCurrentFirmware()->getCapability(Sliders)); i++) {
hwtypes.append(QString("%1").arg((uint16_t)generalSettings.sliderConfig[i], 1));
controlNames.append(QString("%1").arg(generalSettings.sliderName[i], -3));
}
g.profile[profile_id].controlTypes( hwtypes );
g.profile[profile_id].controlNames( controlNames );
g.profile[profile_id].txVoltageCalibration( generalSettings.txVoltageCalibration );
g.profile[profile_id].txCurrentCalibration( generalSettings.txCurrentCalibration );
g.profile[profile_id].vBatWarn( generalSettings.vBatWarn );
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef GENERALEDIT_H
#define GENERALEDIT_H
#include <QDialog>
#include <QtWidgets>
#include "eeprominterface.h"
#include "genericpanel.h"
+3 -4
View File
@@ -1,6 +1,5 @@
#include "generalsetup.h"
#include "ui_generalsetup.h"
#include <QMessageBox>
GeneralSetupPanel::GeneralSetupPanel(QWidget * parent, GeneralSettings & generalSettings, Firmware * firmware):
GeneralPanel(parent, generalSettings, firmware),
@@ -275,8 +274,8 @@ void GeneralSetupPanel::populateBacklightCB()
void GeneralSetupPanel::populateVoiceLangCB()
{
QComboBox * b = ui->voiceLang_CB;
QString strings[] = { QObject::tr("English"), QObject::tr("Finnish"), QObject::tr("French"), QObject::tr("Italian"), QObject::tr("German"), QObject::tr("Czech"), QObject::tr("Slovak"), QObject::tr("Spanish"), QObject::tr("Polish"), QObject::tr("Portuguese"), QObject::tr("Swedish"), NULL};
QString langcode[] = { "en", "fi","fr", "it", "de", "cz", "sk", "es", "pl", "pt", "se", NULL};
QString strings[] = { QObject::tr("English"), QObject::tr("Dutch"), QObject::tr("French"), QObject::tr("Italian"), QObject::tr("German"), QObject::tr("Czech"), QObject::tr("Slovak"), QObject::tr("Spanish"), QObject::tr("Polish"), QObject::tr("Portuguese"), QObject::tr("Swedish"), QObject::tr("Hungarian"), NULL};
QString langcode[] = { "en", "nl","fr", "it", "de", "cz", "sk", "es", "pl", "pt", "se", "hu", NULL};
b->clear();
for (int i=0; strings[i]!=NULL; i++) {
@@ -316,7 +315,7 @@ void GeneralSetupPanel::on_voiceLang_CB_currentIndexChanged(int index)
if (!lock) {
QString code = ui->voiceLang_CB->itemData(index).toString();
for (int i=0; i<2; i++) {
generalSettings.ttsLanguage[i] = code.at(i).toAscii();
generalSettings.ttsLanguage[i] = code.at(i).toLatin1();
}
generalSettings.ttsLanguage[2] = '\0';
emit modified();
+1 -1
View File
@@ -658,7 +658,7 @@
<item>
<widget class="QCheckBox" name="adjustRTC">
<property name="toolTip">
<string>If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio.</string>
<string>Automatically adjust the radio's clock if a GPS is connected to telemetry.</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
+23 -15
View File
@@ -86,7 +86,7 @@ void getFileComboBoxValue(QComboBox * b, char * dest, int length)
{
memset(dest, 0, length+1);
if (b->currentText() != "----") {
strncpy(dest, b->currentText().toAscii(), length);
strncpy(dest, b->currentText().toLatin1(), length);
}
}
@@ -103,7 +103,7 @@ void populatePhasesCB(QComboBox *b, int value)
b->setCurrentIndex(value + GetCurrentFirmware()->getCapability(FlightModes));
}
GVarGroup::GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const double step, bool allowGvars):
GVarGroup::GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBox * weightCB, int & weight, const ModelData & model, const int deflt, const int mini, const int maxi, const double step, bool allowGvars):
QObject(),
weightGV(weightGV),
weightSB(weightSB),
@@ -115,7 +115,7 @@ GVarGroup::GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox
lock(true)
{
if (allowGvars && GetCurrentFirmware()->getCapability(Gvars)) {
populateGVCB(weightCB, weight);
populateGVCB(*weightCB, weight, model);
connect(weightGV, SIGNAL(stateChanged(int)), this, SLOT(gvarCBChanged(int)));
connect(weightCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
}
@@ -179,13 +179,14 @@ void GVarGroup::valuesChanged()
}
}
CurveGroup::CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags):
CurveGroup::CurveGroup(QComboBox * curveTypeCB, QCheckBox * curveGVarCB, QComboBox * curveValueCB, QSpinBox * curveValueSB, CurveReference & curve, const ModelData & model, unsigned int flags):
QObject(),
curveTypeCB(curveTypeCB),
curveGVarCB(curveGVarCB),
curveValueCB(curveValueCB),
curveValueSB(curveValueSB),
curve(curve),
model(model),
flags(flags),
lock(false),
lastType(-1)
@@ -219,7 +220,7 @@ void CurveGroup::update()
curveGVarCB->setChecked(true);
if (lastType != CurveReference::CURVE_REF_DIFF && lastType != CurveReference::CURVE_REF_EXPO) {
lastType = curve.type;
populateGVCB(curveValueCB, curve.value);
populateGVCB(*curveValueCB, curve.value, model);
}
curveValueCB->show();
curveValueSB->hide();
@@ -276,6 +277,7 @@ void CurveGroup::gvarCBChanged(int state)
if (!lock) {
if (state) {
curve.value = 10000+1; // TODO constant in EEpromInterface ...
lastType = -1; // quickfix for issue #3518: force refresh of curveValueCB at next update() to set current index to GV1
}
else {
curve.value = 0; // TODO could be better
@@ -478,33 +480,39 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
b->setMaxVisibleItems(10);
}
void populateGVCB(QComboBox *b, int value)
void populateGVCB(QComboBox & b, int value, const ModelData & model)
{
bool selected = false;
b->clear();
b.clear();
int pgvars = GetCurrentFirmware()->getCapability(Gvars);
for (int i=-pgvars; i<=-1; i++) {
int count = GetCurrentFirmware()->getCapability(Gvars);
for (int i=-count; i<=-1; i++) {
int16_t gval = (int16_t)(-10000+i);
b->addItem(QObject::tr("-GV%1").arg(-i), gval);
if (strlen(model.gvars_names[-i-1]) > 0)
b.addItem(QObject::tr("-GV%1 (%2)").arg(-i).arg(model.gvars_names[-i-1]), gval);
else
b.addItem(QObject::tr("-GV%1").arg(-i), gval);
if (value == gval) {
b->setCurrentIndex(b->count()-1);
b.setCurrentIndex(b.count()-1);
selected = true;
}
}
for (int i=1; i<=pgvars; i++) {
for (int i=1; i<=count; i++) {
int16_t gval = (int16_t)(10000+i);
b->addItem(QObject::tr("GV%1").arg(i), gval);
if (strlen(model.gvars_names[i-1]) > 0)
b.addItem(QObject::tr("GV%1 (%2)").arg(i).arg(model.gvars_names[i-1]), gval);
else
b.addItem(QObject::tr("GV%1").arg(i), gval);
if (value == gval) {
b->setCurrentIndex(b->count()-1);
b.setCurrentIndex(b.count()-1);
selected = true;
}
}
if (!selected) {
b->setCurrentIndex(pgvars);
b.setCurrentIndex(count);
}
}
+6 -5
View File
@@ -1,7 +1,8 @@
#ifndef HELPERS_H
#define HELPERS_H
#include <QtGui>
#include <QCheckBox>
#include <QSpinBox>
#include <QTableWidget>
#include <QGridLayout>
#include <QDebug>
@@ -45,7 +46,7 @@ class GVarGroup: public QObject {
Q_OBJECT
public:
GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const double step=1.0, bool allowGVars=true);
GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBox * weightCB, int & weight, const ModelData & model, const int deflt, const int mini, const int maxi, const double step=1.0, bool allowGVars=true);
protected slots:
void gvarCBChanged(int);
@@ -71,7 +72,7 @@ class CurveGroup : public QObject {
Q_OBJECT
public:
CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags=0);
CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, const ModelData & model, unsigned int flags=0);
void update();
protected slots:
@@ -85,6 +86,7 @@ class CurveGroup : public QObject {
QComboBox *curveValueCB;
QSpinBox *curveValueSB;
CurveReference & curve;
const ModelData & model;
unsigned int flags;
bool lock;
int lastType;
@@ -117,8 +119,7 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase);
#define GVARS_VARIANT 0x0001
#define FRSKY_VARIANT 0x0002
// void populateGVarCB(QComboBox *b, int value, int min, int max,int pgvars=5); //TODO: Clean Up
void populateGVCB(QComboBox *b, int value);
void populateGVCB(QComboBox & b, int value, const ModelData & model);
void populateSourceCB(QComboBox *b, const RawSource &source, const GeneralSettings generalSettings, const ModelData * model, unsigned int flags);
QString image2qstring(QImage image);
int findmult(float value, float base);
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 866 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 960 KiB

@@ -0,0 +1,948 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="800"
height="500"
id="svg2"
inkscape:label="Pozadí"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="splash22_3_dmg.svg"
inkscape:export-filename="/home/martin/Dokumenty/MojeDokumenty/OpenTXwip/Grafika/splash/splash22_3_dmg.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3">
<inkscape:path-effect
effect="spiro"
id="path-effect4023"
is_visible="true" />
<linearGradient
inkscape:collect="always"
id="linearGradient3977">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3979" />
<stop
style="stop-color:#6b6e7a;stop-opacity:1"
offset="1"
id="stop3981" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3959">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3961" />
<stop
style="stop-color:#adb0b6;stop-opacity:1"
offset="1"
id="stop3963" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4110"
id="linearGradient8590"
gradientUnits="userSpaceOnUse"
x1="32.03112"
y1="919.08826"
x2="13.698381"
y2="917.573" />
<linearGradient
id="linearGradient4110"
inkscape:collect="always">
<stop
id="stop4112"
offset="0"
style="stop-color:#787878;stop-opacity:1;" />
<stop
id="stop4114"
offset="1"
style="stop-color:#787878;stop-opacity:0;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4087"
id="radialGradient8592"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1208029,0.28390177,-0.22234482,0.87778509,-104.71658,-31.467902)"
cx="-112.21627"
cy="-531.93341"
fx="-112.21627"
fy="-531.93341"
r="23.035715" />
<linearGradient
id="linearGradient4087"
inkscape:collect="always">
<stop
id="stop4089"
offset="0"
style="stop-color:#ff8080;stop-opacity:1" />
<stop
id="stop4091"
offset="1"
style="stop-color:#c80000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4100"
id="linearGradient8594"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.89739834,0,0,0.87587127,4.0183202,712.56816)"
x1="34.241589"
y1="83.140976"
x2="49.625"
y2="83.140976" />
<linearGradient
id="linearGradient4100"
inkscape:collect="always">
<stop
id="stop4102"
offset="0"
style="stop-color:#ff8080;stop-opacity:1;" />
<stop
id="stop4104"
offset="1"
style="stop-color:#ff8080;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient8596"
gradientUnits="userSpaceOnUse"
x1="98.229652"
y1="132.15594"
x2="103.66933"
y2="160.80135" />
<linearGradient
id="linearGradient4123"
inkscape:collect="always">
<stop
id="stop4125"
offset="0"
style="stop-color:#928c8c;stop-opacity:1;" />
<stop
id="stop4127"
offset="1"
style="stop-color:#ffffff;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4135"
id="linearGradient8598"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-0.63134529,702.36218)"
x1="121.7157"
y1="133.16609"
x2="137.76198"
y2="147.41682" />
<linearGradient
inkscape:collect="always"
id="linearGradient4135">
<stop
style="stop-color:#928c8c;stop-opacity:0"
offset="0"
id="stop4137" />
<stop
style="stop-color:#ffffff;stop-opacity:0.40282686"
offset="1"
id="stop4139" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977"
id="linearGradient3921"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959"
id="linearGradient3923"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<linearGradient
inkscape:collect="always"
id="linearGradient3977-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3979-5" />
<stop
style="stop-color:#6b6e7a;stop-opacity:1"
offset="1"
id="stop3981-5" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3959-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3961-7" />
<stop
style="stop-color:#adb0b6;stop-opacity:1"
offset="1"
id="stop3963-1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977"
id="linearGradient4188"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959"
id="linearGradient4190"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4312">
<rect
y="545.63458"
x="131.18359"
height="133.1575"
width="261.93893"
id="rect4314"
style="fill:none;stroke:#d62929;stroke-opacity:1" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-5"
id="linearGradient4444"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959-3"
id="linearGradient4446"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-5"
id="linearGradient4505"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959-3"
id="linearGradient4507"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3274">
<rect
style="fill:none;stroke:#d62929;stroke-opacity:1"
id="rect3276"
width="420.34811"
height="133.34306"
x="130.51035"
y="521.02094" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3274-3">
<rect
style="fill:none;stroke:#d62929;stroke-opacity:1"
id="rect3276-2"
width="420.34811"
height="133.34306"
x="130.51035"
y="521.02094" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4312-9">
<rect
y="545.63458"
x="131.18359"
height="133.1575"
width="261.93893"
id="rect4314-5"
style="fill:none;stroke:#d62929;stroke-opacity:1" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3883">
<rect
style="fill:#d89119;fill-opacity:1;stroke:none"
id="rect3885"
width="241.35912"
height="37.132172"
x="211.64659"
y="1009.2491" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4891-2">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4893-0"
width="640"
height="210"
x="0"
y="842.36218" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591"
id="linearGradient12262"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<linearGradient
id="linearGradient5591"
inkscape:collect="always">
<stop
id="stop5593"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop5595"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-0"
id="linearGradient3965"
x1="532.14532"
y1="869.62433"
x2="494.59061"
y2="997.27747"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3977-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3979-1" />
<stop
style="stop-color:#c3b7a1;stop-opacity:1;"
offset="1"
id="stop3981-4" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter4196"
x="-0.080580361"
width="1.1611607"
y="-0.18846314"
height="1.3769263"
style="color-interpolation-filters:sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="30.294119"
id="feGaussianBlur4198" />
</filter>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-0"
id="radialGradient4178"
cx="321.13412"
cy="1244.5212"
fx="321.13412"
fy="1244.5212"
r="469.35312"
gradientTransform="matrix(1.9217668,0.29348951,-0.18210814,1.1924423,-68.177703,-526.12911)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3333">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3335" />
<stop
style="stop-color:#c3b7a1;stop-opacity:1;"
offset="1"
id="stop3337" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter4204"
x="-0.087714754"
width="1.1754295"
y="-0.15834162"
height="1.3166832"
style="color-interpolation-filters:sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="33.153964"
id="feGaussianBlur4206" />
</filter>
<linearGradient
id="linearGradient4347">
<stop
style="stop-color:#f0e47c;stop-opacity:1;"
offset="0"
id="stop4349" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop4351" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4291"
id="radialGradient4297"
cx="232.55463"
cy="997.94202"
fx="232.55463"
fy="997.94202"
r="247.41025"
gradientTransform="matrix(1.7432285,-1.5632483,1.7076977,1.4428782,-1700.9789,-1057.0931)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4291">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4293" />
<stop
style="stop-color:#8296d6;stop-opacity:0;"
offset="1"
id="stop4295" />
</linearGradient>
<linearGradient
id="linearGradient5611">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop5613" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop5615" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591-6"
id="linearGradient4003-4"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<linearGradient
id="linearGradient5591-6"
inkscape:collect="always">
<stop
id="stop5593-1"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop5595-0"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591-6"
id="linearGradient5018"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591-6"
id="linearGradient5046"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<filter
inkscape:collect="always"
id="filter8684">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.37919011"
id="feGaussianBlur8686" />
</filter>
<filter
inkscape:collect="always"
id="filter8696">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.37919011"
id="feGaussianBlur8698" />
</filter>
<filter
inkscape:collect="always"
id="filter8708">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.37919011"
id="feGaussianBlur8710" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591"
id="linearGradient9450"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(3.7604321,0,0,3.7554825,-1099.283,-1774.0469)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.39482968"
inkscape:cx="240.13866"
inkscape:cy="72.917006"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
borderlayer="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1215"
inkscape:window-height="1000"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<sodipodi:guide
orientation="0,1"
position="225.44567,-819.73138"
id="guide3904" />
<sodipodi:guide
orientation="0,1"
position="228.337,-793.0061"
id="guide3906" />
<sodipodi:guide
orientation="0,1"
position="143.37385,50.789259"
id="guide4005" />
</sodipodi:namedview>
<metadata
id="metadata6">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Vrstva#1"
style="display:inline"
transform="translate(0,290)">
<rect
style="display:inline;fill:#234ca2;fill-opacity:1;stroke:none"
id="rect3846-4"
width="804.09418"
height="503.88089"
x="-2.954421"
y="-291.07556" />
<path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:19;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 253.27378,-420.65169 416.16531,-138.51528 176.19537,277.12476"
id="path5011"
inkscape:connector-curvature="0" />
<path
style="fill:#ffeb0e;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 245.67556,-416.85258 159.66351,276.54531 -280.60799,486.02728 -218.442373,0 0,-768.90443 z"
id="path5014"
inkscape:connector-curvature="0" />
<rect
y="-292.86649"
x="-23.549952"
height="457.31708"
width="868.56714"
id="rect4289"
style="display:inline;fill:url(#radialGradient4297);fill-opacity:1;stroke:none" />
<path
style="display:inline;fill:#fff9f9;fill-opacity:1;stroke:none"
d="m 877.13158,56.928644 -30.07273,-72.66535 -10.647,4.40919 c -0.17223,-0.79215 -0.39809,-1.58039 -0.71897,-2.3558 -2.90654,-7.02343 -10.9547,-10.3598 -17.9757,-7.45219 -5.55461,2.30021 -8.78643,7.82963 -8.46164,13.51264 -2.92241,-3.09113 -7.55211,-4.22774 -11.71605,-2.50328 -5.39129,2.23251 -7.95886,8.43043 -5.72708,13.82349 0.0122,0.022 0.0159,0.0391 0.0244,0.0599 -1.57291,-0.23301 -3.23597,-0.0794 -4.81206,0.57295 -3.0569,1.26588 -5.03792,4.02051 -5.49659,7.07108 l -12.49426,5.17422 c -0.1136,-0.96652 -0.33908,-1.94342 -0.72935,-2.88684 -2.28382,-5.5183 -8.61127,-8.14158 -14.12788,-5.85701 -4.94387,2.0474 -7.54039,7.34869 -6.38693,12.39754 -1.54666,-0.14772 -3.15108,0.0709 -4.68662,0.70723 -3.09904,1.28336 -5.19109,3.95869 -5.84874,7.00742 -3.84696,-1.78322 -9.65796,-1.65651 -15.4063,0.7241 -0.23587,0.0965 -0.45647,0.20479 -0.68709,0.30779 -3.08255,-4.50596 -8.99982,-6.39782 -14.24392,-4.22615 -6.01804,2.49217 -8.87047,9.37666 -6.37899,15.3968 0.5978,1.44452 1.45638,2.71382 2.48854,3.76415 l -8.99823,3.7264 c -2.34795,-4.67312 -7.93713,-6.8146 -12.84532,-4.78211 -1.25691,0.52065 -2.35259,1.28311 -3.25955,2.1878 -3.04566,-4.9439 -9.31325,-7.08257 -14.84966,-4.78994 -3.65055,1.51173 -6.14483,4.59908 -7.04861,8.15612 -2.30129,-0.34518 -4.71386,-0.0965 -7.02052,0.85887 -5.02399,2.08063 -8.09763,6.89684 -8.20023,12.00789 -1.69946,-0.36914 -3.51985,-0.24035 -5.24838,0.47446 -2.59152,1.0733 -4.39505,3.24625 -5.11328,5.74856 -3.11297,-6.10621 -10.44729,-8.8942 -16.88711,-6.2273 -5.2253,2.16391 -8.31884,7.28974 -8.17678,12.62659 -2.04295,-0.2798 -4.19216,-0.056 -6.23474,0.78975 -5.91433,2.4493 -8.81782,9.0684 -6.7585,15.0418 l -18.55274,7.6831 c -1.99787,-3.7365 -6.54926,-5.4343 -10.54562,-3.7793 -0.36363,0.1511 -0.70968,0.3298 -1.03973,0.5237 -2.71342,-4.6598 -8.51012,-6.7171 -13.62964,-4.597 -5.58514,2.313 -8.23712,8.7139 -5.92484,14.300996 0.13058,0.3158 0.28999,0.6127 0.44621,0.9091 -2.1166,-0.8527 -4.552,-0.908 -6.82666,0.034 -3.926,1.626 -6.08584,5.713 -5.46471,9.7346 -0.12215,-0.4249 -0.25749,-0.8465 -0.43033,-1.2647 -2.49575,-6.0305 -9.41953,-8.9008 -15.44795,-6.4043 -3.6812,1.5245 -6.16132,4.704 -6.98289,8.3149 -4.00881,-4.9547 -10.94053,-6.8976 -17.12799,-4.3353 -6.64857,2.7534 -10.21044,9.7934 -8.81599,16.5922 -1.06086,0.089 -2.13248,0.3473 -3.16879,0.7769 -4.53466,1.878 -7.06376,6.54154 -6.44519,11.18824 l -22.86313,9.4682 c -0.0122,-1.2886 -0.26238,-2.6006 -0.78506,-3.8647 -2.16545,-5.2322 -8.16688,-7.7204 -13.39743,-5.5543 -3.66019,1.5158 -5.96222,4.9132 -6.28078,8.6061 -1.19181,0.034 -2.4133,0.2544 -3.58043,0.738 -4.88743,2.0238 -7.30965,7.4482 -5.71231,12.3975 l -6.21738,2.5746 c -2.45178,-4.4168 -7.86237,-6.38 -12.64097,-4.4011 -1.04681,0.4334 -1.98663,1.0314 -2.79391,1.7388 -3.19884,-4.0115 -8.7758,-5.6061 -13.75264,-3.5451 -5.26145,2.1789 -8.11204,7.7246 -7.09308,13.109 -0.73485,0.3458 -1.40972,0.7753 -2.00886,1.2741 -2.75397,-2.0639 -6.50627,-2.6591 -9.91631,-1.2468 -3.99561,1.6546 -6.33465,5.5806 -6.19222,9.6634 -1.14368,0.02 -2.30422,0.2555 -3.42482,0.7201 -3.72823,1.5439 -5.90407,5.209 -5.76091,9.0193 l -8.28318,3.4303 c -2.18683,-4.8632 -7.83415,-7.1601 -12.79316,-5.1063 -2.10377,0.8711 -3.73263,2.4051 -4.78421,4.239 -1.44563,0.1236 -2.97909,0.4891 -4.5139,1.1245 -0.49152,0.2032 -0.96485,0.4397 -1.41717,0.6798 -2.25292,-0.9814 -4.86141,-1.0822 -7.31099,-0.067 -1.50585,0.6234 -2.76154,1.5858 -3.71577,2.7722 -3.41346,-2.9002 -8.29344,-3.8273 -12.71609,-1.9959 -5.59748,2.318 -8.57034,8.2778 -7.3298,13.9985 -1.71265,-0.2724 -3.51923,-0.1027 -5.23897,0.6098 -4.37868,1.8135 -6.72577,6.4472 -5.80965,10.9252 l -4.74733,1.9659 30.07274,72.6653 597.06608,-77.3299 z"
id="rect3848-0-85"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccsccccccccscccccssccccccccsccccccccscccccccscccccccsccccscccccccccccccsccccccc" />
<path
inkscape:connector-curvature="0"
id="path3975-80"
d="m 1193.5465,858.03124 -29.4521,-110.4209 -16.1842,4.3168 c -0.097,-1.174 -0.2718,-2.3525 -0.586,-3.5308 -2.8466,-10.6726 -13.8062,-17.0168 -24.4788,-14.1701 -8.4433,2.2521 -14.1567,9.5997 -14.7743,17.848 -3.6206,-5.0114 -10.0747,-7.5331 -16.4041,-5.8449 -8.1951,2.1858 -13.0791,10.623 -10.8932,18.8181 0.01,0.032 0.016,0.06 0.024,0.09 -2.222,-0.6369 -4.6479,-0.7332 -7.0436,-0.094 -4.6467,1.2394 -8.0276,4.8289 -9.2713,9.1355 l -18.9922,5.0658 c 0.021,-1.4139 -0.1174,-2.8641 -0.4995,-4.2978 -2.2367,-8.3856 -10.8531,-13.3735 -19.2388,-11.1368 -7.5151,2.0044 -12.2694,9.1448 -11.5717,16.638 -2.2004,-0.5087 -4.5543,-0.4994 -6.8884,0.1232 -4.7108,1.2564 -8.23652,4.7104 -9.76662,8.9765 -5.2026,-3.304 -13.6002,-4.2318 -22.3382,-1.9011 -0.3585,0.096 -0.6969,0.2076 -1.0488,0.3121 -3.581,-7.08 -11.7462,-10.9359 -19.7177,-8.8097 -9.1479,2.4399 -14.5732,11.8119 -12.1332,20.9599 0.5855,2.195 1.5801,4.1876 2.8669,5.8978 l -13.6781,3.6483 c -2.4906,-7.1803 -10.1353,-11.3332 -17.5961,-9.3433 -1.9107,0.5097 -3.6352,1.3986 -5.1148,2.5286 -3.4444,-7.7036 -12.0671,-11.9823 -20.4828,-9.7376 -5.5491,1.48 -9.7331,5.4506 -11.715,10.4017 -3.2501,-0.9368 -6.7741,-1.0393 -10.2803,-0.1041 -7.6369,2.037 -12.9861,8.3873 -14.1102,15.7302 -2.3784,-0.8566 -5.0258,-1.0204 -7.6534,-0.3196 -3.9394,1.0508 -6.9532,3.8363 -8.4663,7.3036 -3.3191,-9.3907 -13.355,-14.8083 -23.144,-12.1975 -7.9429,2.1187 -13.3799,8.9113 -14.1947,16.6261 -2.8902,-0.7934 -6.02995,-0.882 -9.13489,-0.054 -8.99025,2.398 -14.43842,11.3779 -12.61231,20.3763 l -28.20158,7.5221 c -2.16498,-5.7643 -8.39914,-9.0797 -14.47374,-7.4594 -0.55283,0.1479 -1.0856,0.3396 -1.59838,0.5557 -3.01962,-7.2309 -10.9796,-11.3022 -18.76147,-9.2265 -8.48998,2.2645 -13.53415,10.9783 -11.26966,19.4682 0.12794,0.4798 0.3009,0.938 0.46937,1.3949 -2.88702,-1.6328 -6.38577,-2.1779 -9.84361,-1.2556 -5.96773,1.5918 -9.86057,7.0664 -9.73405,12.9783 -0.0947,-0.6354 -0.20909,-1.2688 -0.37854,-1.9042 -2.44421,-9.1638 -11.87275,-14.6217 -21.03641,-12.1774 -5.59564,1.4924 -9.7769,5.5986 -11.65065,10.6432 -4.82999,-7.9033 -14.44707,-12.0266 -23.85245,-9.5181 -10.10638,2.6957 -16.58369,12.1562 -15.87323,22.2162 -1.5458,-0.073 -3.13924,0.093 -4.7144,0.5137 -6.89322,1.8386 -11.42848,8.073 -11.42493,14.8847 l -34.7537,9.2697 c 0.2357,-1.8574 0.11937,-3.7962 -0.39288,-5.7168 -2.12072,-7.951 -10.29329,-12.682 -18.24422,-10.5613 -5.5638,1.484 -9.52984,5.9381 -10.69443,11.1969 -1.72402,-0.1789 -3.52593,-0.095 -5.30017,0.3788 -7.42927,1.9815 -11.95597,9.332 -10.59952,16.7667 l -9.45087,2.5208 c -2.68926,-6.8309 -10.11075,-10.693 -17.37455,-8.7555 -1.5911,0.4243 -3.05966,1.106 -4.35807,1.9709 -3.84299,-6.3899 -11.5747,-9.7527 -19.13992,-7.7348 -7.99785,2.1332 -13.16481,9.5769 -12.72512,17.52777 -1.12488,0.3576 -2.17944,0.8474 -3.13812,1.4515 -3.57408,-3.49947 -8.86743,-5.07357 -14.05092,-3.69107 -6.07344,1.61997 -10.19397,6.82827 -10.76873,12.73677 -1.65177,-0.1901 -3.369,-0.072 -5.07271,0.3827 -5.66704,1.5116 -9.50243,6.3754 -10.02407,11.8914 l -12.59113,3.3584 c -2.22216,-7.4232 -9.92099,-11.811 -17.4591,-9.8004 -3.19785,0.853 -5.83796,2.7513 -7.70353,5.192 -2.10667,-0.098 -4.38619,0.135 -6.71932,0.7572 -0.74697,0.1989 -1.47434,0.4492 -2.17189,0.7087 -3.0588,-1.8442 -6.79851,-2.4883 -10.52203,-1.495 -2.28891,0.6105 -4.28205,1.7566 -5.88374,3.2834 -4.36467,-4.8302 -11.21945,-7.0983 -17.94211,-5.3052 -8.50871,2.2695 -13.93086,10.2864 -13.23639,18.7638 -2.41578,-0.7193 -5.05157,-0.8196 -7.66547,-0.1224 -6.6561,1.7754 -10.92344,8.0017 -10.4587,14.627 l -7.21641,1.9248 29.45211,110.42089 875.12416,-11.811 z"
style="display:inline;fill:url(#radialGradient4178);fill-opacity:1;stroke:none;filter:url(#filter4204)"
transform="matrix(0.85505879,0.09386503,-0.09382668,0.85540827,-193.08489,-633.44617)"
sodipodi:nodetypes="ccccscsccccccccccccscccccccsccccccccccsccscccccccccssccccccccccccccccccccscsccccc" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none"
d="m 624.36947,366.03444 35.80221,-91.5894 -13.41855,-5.2496 c 0.53058,-0.8637 1.00939,-1.7702 1.39152,-2.7474 3.4604,-8.8525 -0.90784,-18.8354 -9.7567,-22.297 -7.00054,-2.739 -14.70287,-0.5526 -19.33073,4.8536 0.0413,-5.3201 -3.14945,-10.3566 -8.39726,-12.4099 -6.7948,-2.6581 -14.47681,0.7063 -17.13386,7.5037 -0.0153,0.026 -0.0199,0.049 -0.029,0.075 -1.21635,-1.5734 -2.84919,-2.876 -4.83544,-3.6532 -3.85277,-1.5072 -8.02444,-0.739 -11.07934,1.6137 l -15.74692,-6.1604 c 0.73417,-0.97 1.37716,-2.046 1.84192,-3.2353 2.71889,-6.9554 -0.71539,-14.8038 -7.66811,-17.5239 -6.23094,-2.4378 -13.16274,0.093 -16.49424,5.6458 -1.26659,-1.4737 -2.90324,-2.6662 -4.83849,-3.4234 -3.90576,-1.5281 -8.10874,-0.9285 -11.34172,1.2512 -1.92486,-4.9414 -7.27469,-9.8626 -14.51959,-12.6969 -0.29721,-0.1161 -0.58877,-0.2116 -0.88599,-0.3177 1.12211,-6.7347 -2.57579,-13.5683 -9.18503,-16.1539 -7.58473,-2.9674 -16.11806,0.7696 -19.08407,8.3574 -0.71173,1.8207 -1.03673,3.7094 -1.01535,5.5509 l -11.34082,-4.4365 c 1.92929,-6.249 -1.25636,-13.0233 -7.44223,-15.4434 -1.58426,-0.6197 -3.23253,-0.8816 -4.8336,-0.8516 1.53433,-7.0978 -2.26545,-14.4574 -9.24306,-17.1873 -4.60085,-1.7999 -9.52333,-1.1771 -13.41841,1.2475 -1.77624,-2.3054 -4.16724,-4.1715 -7.07445,-5.3088 -6.33189,-2.4771 -13.27376,-0.7972 -17.79197,3.7232 -1.21283,-1.8057 -2.96481,-3.2677 -5.14349,-4.1201 -3.26613,-1.2778 -6.77405,-0.8803 -9.5884,0.7533 2.48019,-8.204 -1.71943,-17.07374 -9.83566,-20.24894 -6.58556,-2.5766 -13.81367,-0.6345 -18.30668,4.3015 -1.59985,-2.0227 -3.73165,-3.6833 -6.30607,-4.6904 -7.45398,-2.9162 -15.80344,0.5371 -19.11889,7.70854 l -23.38251,-9.14734 c 1.43398,-5.101 -1.20031,-10.5759 -6.23688,-12.5463 -0.45835,-0.1795 -0.92555,-0.3174 -1.39107,-0.4287 1.58808,-6.5535 -1.8578,-13.4318 -8.30989,-15.956 -7.03917,-2.7538 -14.97304,0.7206 -17.72584,7.7628 -0.15549,0.3978 -0.26896,0.8037 -0.38474,1.2063 -1.17037,-2.6028 -3.31851,-4.763 -6.18556,-5.8846 -4.94784,-1.9358 -10.43436,-0.1222 -13.3567,4.0434 0.25766,-0.4891 0.50111,-0.9866 0.70715,-1.5136 2.9712,-7.6011 -0.78688,-16.1893 -8.38458,-19.1615 -4.63948,-1.8152 -9.62902,-1.0977 -13.49676,1.4476 0.67538,-7.9419 -3.89278,-15.70065 -11.69102,-18.75147 -8.37938,-3.2781 -17.68705,-0.0159 -22.31675,7.32392 -1.03445,-0.83825 -2.22406,-1.53423 -3.53005,-2.04511 -5.71531,-2.23606 -12.03405,-0.22189 -15.49981,4.50446 L 159.20103,78.45548 c 1.10913,-1.16821 2.01557,-2.57223 2.63841,-4.16539 2.57793,-6.59482 -0.67934,-14.03907 -7.27163,-16.61821 -4.61306,-1.80464 -9.6307,-0.73554 -13.11554,2.31878 -1.10438,-1.00217 -2.39649,-1.86162 -3.86758,-2.43704 -6.15976,-2.40985 -13.0407,0.38275 -15.88575,6.23031 l -7.83598,-3.06552 c 1.6136,-6.10772 -1.56547,-12.56672 -7.58808,-14.92293 -1.31913,-0.51614 -2.68439,-0.79132 -4.02504,-0.85273 0.58907,-6.38964 -3.059189,-12.66023 -9.331659,-15.11424 -6.63122,-2.59426 -14.00351,-0.0627 -17.74692,5.67547 -0.96205,-0.32482 -1.94258,-0.52223 -2.91485,-0.5916 -0.69615,-4.24779 -3.56456,-8.03597 -7.86223,-9.7173 -5.03567,-1.96995 -10.54434,-0.45639 -13.95128,3.3489 -1.04835,-0.97313 -2.2992,-1.76566 -3.711808,-2.31831 -4.69873,-1.83825 -9.83428,-0.41835 -13.0045,3.14187 l -10.43955,-4.08429 c 2.23903,-6.28055 -0.8646,-13.24543 -7.11462,-15.69057 -2.6514,-1.03715 -5.44849,-1.06527 -7.9845699,-0.3227 -1.41077,-1.14089 -3.10973,-2.14062 -5.04406,-2.8974 -0.61932,-0.24233 -1.25102,-0.43943 -1.86667,-0.61484 -1.18183005,-2.83705 -3.44666,-5.18867001 -6.53394,-6.39650001 C -7.1544869,-1.38118 -9.1199769,-1.6015 -11.007877,-1.35826 c -0.56678,-5.57357 -4.16434,-10.63833 -9.73837,-12.81897 -7.054599,-2.7599 -14.895919,0.0382 -18.730659,6.27242 -1.30874,-1.72945 -3.08499,-3.14156 -5.25223,-3.98941 -5.51875,-2.1591 -11.6475,-0.0153 -14.69874,4.81786 l -5.9832,-2.34078 -53.009694,246.06918 742.7907,129.383 z"
id="rect3848-52"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccccscccccscccscccccccscccccccccccsccsccccssccccccsccscsccscccscscsccccc" />
<path
inkscape:connector-curvature="0"
id="path3957-2"
d="m 784.03557,1142.9676 29.5781,-110.3871 -16.1792,-4.3352 c 0.5019,-1.0657 0.9384,-2.1743 1.2541,-3.3522 2.8588,-10.6693 -3.4729,-21.6361 -14.1422,-24.4949 -8.4408,-2.26169 -17.0585,1.2547 -21.7097,8.0944 -0.6369,-6.1495 -4.9716,-11.55547 -11.2991,-13.25092 -8.1926,-2.1952 -16.6353,2.67926 -18.8305,10.87182 -0.01,0.031 -0.016,0.06 -0.024,0.09 -1.6077,-1.6607 -3.6619,-2.9547 -6.0569,-3.5965 -4.6453,-1.2447 -9.3663,0.1788 -12.5932,3.2903 l -18.9864,-5.0874 c 0.7234,-1.215 1.3277,-2.54036 1.7118,-3.97363 2.2462,-8.38304 -2.7318,-17.00523 -11.1149,-19.25147 -7.5128,-2.01304 -15.196,1.80223 -18.3305,8.644 -1.6531,-1.53882 -3.6976,-2.70544 -6.031,-3.33067 -4.7093,-1.26185 -9.4882,-0.0282 -12.943,2.90536 -2.8599,-5.45936 -9.6742,-10.45382 -18.4096,-12.79448 -0.3584,-0.096 -0.7075,-0.16773 -1.0646,-0.25284 0.4297,-7.9224 -4.7221,-15.33856 -12.6911,-17.47387 -9.1451,-2.45042 -18.5234,2.96407 -20.9738,12.1092 -0.588,2.1944 -0.7204,4.41748 -0.4587,6.54167 l -13.6739,-3.66389 c 1.4247,-7.4653 -3.1278,-14.87902 -10.5863,-16.87752 -1.9101,-0.51182 -3.8481,-0.602 -5.6942,-0.36109 0.8593,-8.39474 -4.478,-16.40548 -12.8911,-18.65977 -5.5474,-1.48642 -11.1546,-0.13339 -15.3428,3.1682 -2.349,-2.43368 -5.3517,-4.281 -8.8569,-5.22021 -7.6346,-2.04568 -15.439,0.78829 -20.0774,6.59066 -1.6336,-1.92926 -3.8461,-3.3923 -6.4729,-4.09613 -3.9382,-1.05523 -7.94,-0.14518 -10.9814,2.10452 1.8097,-9.79428 -4.1839,-19.49723 -13.9698,-22.11938 -7.9405,-2.12764 -16.0418,1.04575 -20.5977,7.32478 -2.1087,-2.12989 -4.7854,-3.77339 -7.8894,-4.6051 -8.9875,-2.40819 -18.1899,2.65497 -21.0977,11.36424 l -28.193,-7.55428 c 1.0003,-6.07563 -2.7478,-12.05962 -8.8206,-13.68681 -0.5527,-0.1481 -1.1102,-0.24747 -1.6624,-0.31602 0.9915,-7.77313 -3.875,-15.27335 -11.6545,-17.35788 -8.4874,-2.27419 -17.2069,2.76003 -19.4811,11.24743 -0.1285,0.47963 -0.2073,0.96298 -0.2893,1.44303 -1.6871,-2.85561 -4.4471,-5.07388 -7.9039,-6.00012 -5.9659,-1.59857 -12.0713,1.20312 -14.9118,6.3895 0.2348,-0.598 0.452,-1.20392 0.6222,-1.83913 2.4547,-9.16099 -2.9925,-18.59564 -12.1534,-21.0503 -5.5939,-1.49887 -11.2664,-0.0273 -15.4075,3.40968 -0.2418,-9.25926 -6.5183,-17.6316 -15.9208,-20.15099 -10.1033,-2.70717 -20.4374,2.25898 -24.8418,11.33158 -1.303,-0.83492 -2.7671,-1.48554 -4.3418,-1.90747 -6.8911,-1.84647 -13.9324,1.29314 -17.3284,7.19784 l -34.7431,-9.30938 c 1.1311,-1.49197 1.9978,-3.23022 2.5123,-5.15026 2.1298,-7.94851 -2.5917,-16.12655 -10.5402,-18.25634 -5.5621,-1.49036 -11.2217,0.39044 -14.8551,4.36649 -1.4048,-1.01526 -3.0084,-1.84135 -4.7821,-2.31662 -7.427,-1.99006 -15.0178,2.12099 -17.5523,9.24076 l -9.448,-2.53159 c 1.0782,-7.26161 -3.426,-14.31189 -10.6876,-16.25761 -1.5906,-0.4262 -3.2034,-0.56831 -4.7602,-0.46669 -0.1417,-7.45513 -5.1639,-14.22755 -12.7268,-16.25403 -7.9954,-2.14237 -16.1876,1.73002 -19.7741,8.83953 -1.1533,-0.25135 -2.3116,-0.3531 -3.4438,-0.30807 -1.351,-4.81613 -5.152699,-8.8217 -10.334599,-10.21018 -6.0716,-1.62689 -12.2414,0.83038 -15.6879,5.66389 -1.3366,-0.98895 -2.8838,-1.74327 -4.587,-2.19965 -5.6653,-1.518 -11.4161,0.78299 -14.6207,5.30283 l -12.5873,-3.37274 c 1.7785,-7.54171 -2.7037,-15.18597 -10.2395,-17.2052 -3.1969,-0.85659 -6.4321,-0.52891 -9.2667,0.65519 -1.7769,-1.13587 -3.8684,-2.07181 -6.2008,-2.69678 -0.7467,-0.20009 -1.5018,-0.3465 -2.2358,-0.46967 -1.7305,-3.12447 -4.6499,-5.54881 -8.3722996,-6.54622 -2.2882,-0.61312 -4.5874,-0.61445 -6.7373,-0.0906 -1.3721,-6.36384 -6.1806,-11.75002 -12.9012004,-13.55081 -8.5061,-2.27921 -17.2055,1.96262 -20.83394,9.65554 -1.73458,-1.8288 -3.96869,-3.23102 -6.5818,-3.9312 -6.65407,-1.78296 -13.4591,1.48324 -16.36247,7.45666 l -7.21421,-1.93304 -36.017883,370.02255 881.296802,-25.2181 z"
style="display:inline;opacity:0.76678443;fill:url(#linearGradient3965);fill-opacity:1;stroke:none;filter:url(#filter4196)"
transform="matrix(0.85837445,-0.05590027,0.05587743,0.85872528,-281.62956,-689.27743)"
sodipodi:nodetypes="ccccscsccccccscscccssccscscscscscsccscsccscsscscscccscsccscsccscsccscccscscsccccc" />
<rect
style="opacity:0.459;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:7.8415556;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5016"
width="490.40955"
height="183.9483"
x="154.96779"
y="-232.75832"
ry="38.450249" />
</g>
<g
inkscape:label="Vrstva 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-552.36218)"
style="display:inline">
<g
id="g9429"
transform="translate(715.89458,-484.76097)">
<path
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0"
id="path5521"
d="m -541.16139,1401.9765 -133.15983,-126.4507 c -2.67796,-3.1869 4.36168,-10.2653 7.69711,-8.84 l 42.71889,22.6766 53.49485,37.6661 46.95231,34.207 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.98724842;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5500"
d="m -550.63035,1394.3425 c 2.30616,13.423 7.07661,27.1453 16.86881,36.8888 14.06473,13.8692 32.5591,22.4132 51.78176,26.3534 10.03569,2.0175 20.53541,-0.2419 30.76131,0.022 26.27854,-1.1777 52.65257,-1.2221 78.8705,-3.1197 14.63631,-1.2671 28.79784,-5.3814 43.02494,-8.6398 13.37018,-5.5166 26.49631,-14.0331 32.57971,-27.6668 4.77003,-9.4263 10.66489,-18.5689 14.7418,-28.17 2.16574,-7.0809 -7.89007,-2.4276 -10.07958,0.7336 -8.05751,8.63 -16.11503,17.26 -24.17255,25.89 -16.06434,-8.8296 -31.45372,-19.0573 -48.95319,-24.9143 -13.03118,-5.448 -27.50414,-5.9791 -41.18036,-9.2276 -13.7795,-2.7366 -27.92117,-4.205 -40.70957,-10.4122 -17.83415,-6.5723 -35.33415,-14.2911 -53.37768,-20.1453 -8.53908,-2.1286 -18.7772,-3.1026 -26.3501,1.651 -7.93527,13.5854 -15.87053,27.1708 -23.8058,40.7562 z"
style="fill:#9ab3d9;fill-opacity:1;stroke:#000000;stroke-width:1.06395769;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
transform="matrix(0.94985292,0.31269703,-0.31269703,0.94985292,397.05926,247.01432)"
inkscape:connector-curvature="0"
inkscape:tile-y0="495.09051"
inkscape:tile-x0="-540.98978"
inkscape:tile-h="46.001777"
inkscape:tile-w="169.04809"
inkscape:tile-cy="535.18738"
inkscape:tile-cx="-541.1986"
id="path7694"
d="m -407.89167,1272.2747 c 5.14001,6.3357 -20.61438,35.9473 -57.52404,66.1395 -36.90965,30.1922 -70.99764,49.5317 -76.13765,43.1961 -5.14002,-6.3357 20.61437,-35.9474 57.52403,-66.1395 36.90966,-30.1922 70.99764,-49.5318 76.13766,-43.1961 z"
inkscape:transform-center-y="-30.293294"
inkscape:transform-center-x="-80.958308"
style="opacity:0.61100003;fill:#cecece;fill-opacity:1;stroke:none;filter:url(#filter8696)" />
<g
style="fill:#ffffff;fill-opacity:1"
transform="matrix(1.0775939,0,0,1.0761756,-480.68834,1077.7838)"
id="g5514">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.892648,275.48747 6.25,-3.57143 5.26786,-2.05357 4.64286,-0.71429 7.85714,0.89286 5.17857,1.25 4.46429,2.14286 4.10714,3.57143 3.30357,2.85714 5.98214,3.21428 6.60715,2.67858 -0.0893,6.51785 c 0,0 -1.16071,3.66072 -1.16071,4.01786 0,0.35714 -1.69643,4.55357 -1.69643,4.55357 l -7.05357,-4.01786 -2.05357,-0.44642 -5,3.92857 -5.44643,1.78571 -5.44643,1.96429 -1.60714,0.17857 -4.375,-7.05357 -3.92858,-5.625 -3.21428,-4.28572 -2.94643,-3.66071 -4.01786,-3.39286 -4.01785,-3.125 z"
id="path5503"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 41.267648,283.79104 14.01786,-13.83929 0,0"
id="path5505"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 43.410508,286.02318 15.17857,-15.26785"
id="path5507"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 56.446218,303.88033 c 0,0 1.875,-22.14286 1.875,-22.58929 0,-0.44643 -0.0893,-7.41071 -0.0893,-7.41071 l 0.17857,-2.67858"
id="path5509"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 74.035508,296.46961 0,-16.25"
id="path5511"
inkscape:connector-curvature="0" />
</g>
<path
transform="matrix(0.79625178,0.45406311,-0.45381717,0.79676123,512.52081,521.26661)"
style="opacity:0.61100003;fill:#cecece;fill-opacity:1;stroke:none;filter:url(#filter8684)"
inkscape:transform-center-x="17.57733"
inkscape:transform-center-y="55.045522"
d="m -512.87163,1507.2802 c -5.80542,1.2629 -16.61393,-25.2242 -24.14142,-59.1607 -7.52755,-33.9364 -8.92364,-62.4711 -3.11834,-63.7341 5.80542,-1.2628 16.61393,25.2243 24.14141,59.1608 7.52756,33.9364 8.92371,62.4711 3.11835,63.734 z"
id="path8280"
inkscape:tile-cx="-541.1986"
inkscape:tile-cy="535.18738"
inkscape:tile-w="169.04809"
inkscape:tile-h="46.001777"
inkscape:tile-x0="-540.98978"
inkscape:tile-y0="495.09051"
inkscape:connector-curvature="0" />
<circle
transform="matrix(1.0775939,0,0,1.0761756,-580.01711,1931.488)"
id="path5523"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="47.098362"
cy="-512.54401"
r="23.359777" />
<path
transform="matrix(1.0155585,0.26208382,-0.26208513,1.0155506,375.59085,113.89354)"
style="opacity:0.61100003;fill:#cecece;fill-opacity:1;stroke:none;filter:url(#filter8708)"
inkscape:transform-center-x="36.497207"
inkscape:transform-center-y="-42.010802"
d="m -627.24914,1324.3778 c 2.81378,-4.1267 24.76631,5.7977 49.03238,22.1666 24.26609,16.3688 41.65657,32.9837 38.84289,37.1104 -2.81386,4.1266 -24.76633,-5.7976 -49.03231,-22.1665 -24.26608,-16.3689 -41.65674,-32.9838 -38.84296,-37.1105 z"
id="path8282"
inkscape:tile-cx="-541.1986"
inkscape:tile-cy="535.18738"
inkscape:tile-w="169.04809"
inkscape:tile-h="46.001777"
inkscape:tile-x0="-540.98978"
inkscape:tile-y0="495.09051"
inkscape:connector-curvature="0" />
<circle
transform="matrix(1.0775939,0,0,1.0761756,-573.75806,1934.4775)"
id="path5525"
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0.38783747;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="33.966381"
cy="-518.09985"
r="16.28871" />
<ellipse
inkscape:transform-center-y="-17.09598"
inkscape:transform-center-x="-84.732874"
transform="matrix(2.834602,-0.60010423,0.5942,2.8637499,-358.0305,2555.1763)"
id="path5529"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.14347301;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="50.507626"
cy="-406.60425"
rx="29.7995"
ry="5.0507627" />
<ellipse
transform="matrix(-1.1277765,-1.744406,1.752265,-1.1244094,202.6751,961.09238)"
id="path5529-7"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.20083466;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="50.507626"
cy="-406.60425"
rx="29.7995"
ry="5.0507627" />
<ellipse
inkscape:transform-center-y="-0.70656384"
inkscape:transform-center-x="-0.68115835"
transform="matrix(1.1338996,-2.0198832,2.0232381,1.1299859,199.61444,1989.4171)"
id="path5529-4"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.18026559;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="50.507626"
cy="-406.60425"
rx="29.7995"
ry="5.0507627" />
<path
inkscape:connector-curvature="0"
id="path5563"
d="m -312.42545,1421.5179 6.35009,-2.1139 46.9523,26.1357 12.12296,10.5696 -0.96214,1.5374 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.83382982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5500-4"
d="m -548.10009,1393.2764 c 2.30616,13.423 7.0766,27.1453 16.86881,36.8889 14.06473,13.8691 32.5591,22.4131 51.78175,26.3533 10.03569,2.0175 20.53542,-0.2418 30.76131,0.022 26.27854,-1.1776 52.65256,-1.2221 78.87053,-3.1197 14.63631,-1.267 28.79784,-5.3814 43.02494,-8.6397 13.37018,-5.5166 26.49631,-14.0332 32.57971,-27.6669 4.77003,-9.4263 10.66489,-18.5689 14.7418,-28.1699 2.16574,-7.081 -7.89007,-2.4277 -10.07958,0.7335 -8.05751,8.63 -16.11503,17.26 -24.17254,25.89 -16.06434,-8.8296 -31.45372,-19.0573 -48.9532,-24.9143 -13.03121,-5.448 -27.50419,-5.9791 -41.18039,-9.2275 -13.7795,-2.7367 -27.92117,-4.205 -40.70957,-10.4122 -17.83415,-6.5724 -35.33415,-14.2912 -53.37768,-20.1453 -8.53908,-2.1287 -18.77719,-3.1027 -26.3501,1.6509 -7.93527,13.5854 -15.87053,27.1708 -23.80579,40.7562 z"
style="opacity:0.49823321;fill:url(#linearGradient9450);fill-opacity:1;stroke:none" />
<path
sodipodi:nodetypes="ccccccsccccccccccc"
inkscape:connector-curvature="0"
id="path5496"
d="m -485.62932,1455.857 4.61826,-6.5339 3.84854,-2.6905 8.08196,-2.3061 8.85168,-3.0748 16.54876,-1.5373 c 0,0 8.08196,1.153 9.62136,1.153 1.53941,0 18.47305,2.6904 18.47305,2.6904 l 21.93676,3.4592 6.92736,3.0748 5.77282,4.6122 -12.70018,3.0747 -5.38798,3.0748 -3.46371,4.2279 -1.92429,2.6904 239.76468,161.042 c 5.82092,4.1638 1.20266,16.4949 -4.61826,14.2209 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.98724842;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7664"
transform="translate(318.31762,-3.8891046)"
style="opacity:0.858">
<g
transform="matrix(0.95511441,0,0,0.95385727,205.18996,51.838406)"
id="text7238"
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none">
<g
transform="matrix(0.68786515,0,0,0.68786515,161.92514,215.41774)"
id="g7273"
style="">
<path
d="m -154.78125,940.90625 c -16.83367,0.0841 -32.94231,5.79147 -48.3125,12.1875 0,11.85417 0,23.70833 0,35.5625 17.7207,-10.62322 38.58707,-22.68911 59.8125,-16.25 13.04398,5.00743 16.63873,22.94986 8.66918,33.81085 -11.30773,19.951 -29.75582,34.2821 -44.49033,51.4383 -8.37949,9.1645 -18.35443,17.5352 -24.99135,27.8758 0,8.1146 0,16.2292 0,24.3438 35.57292,0 71.14583,0 106.71875,0 0,-9.8542 0,-19.7083 0,-29.5625 -20.85373,-0.1908 -41.71203,0.331 -62.5625,-0.1875 18.72263,-20.4224 40.27979,-39.0816 55.0625,-62.75 11.305666,-20.54355 8.686275,-50.04312 -10.9375,-64.4375 -10.92302,-8.6146 -25.15049,-12.36911 -38.96875,-12.03125 z"
id="path7243"
inkscape:connector-curvature="0"
style="" />
<path
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;stroke-width:1.16349924;stroke-opacity:1"
d="m -155.61282,936.62569 c -18.35737,0.048 -35.64676,6.5447 -52.28125,13.5 0,15.0834 0,30.1667 0,45.25 18.18309,-10.4957 37.97826,-24.6759 60.0625,-20.0624 13.23334,2.403 16.32048,21.2393 7.9375,30.37501 -14.06333,22.1049 -34.68279,38.4853 -51.72671,58.1017 -6.37015,6.5604 -13.70611,12.9672 -17.27329,21.4607 0,9.448 0,18.8959 0,28.3438 38.23958,0 76.47917,0 114.718752,0 0,-12.5 0,-25 0,-37.5 -19.144232,-0.341 -38.293232,0.1821 -57.437502,-0.125 18.7872,-20.259 41.09596,-38.8741 52.906252,-64.4375 8.900061,-22.73901 2.040917,-52.61991 -19.875002,-65.18751 -10.99187,-6.9728 -24.10026,-10.0645 -37.03125,-9.7188 z"
id="path7243-3"
inkscape:connector-curvature="0" />
</g>
</g>
<g
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none"
id="g12221"
transform="matrix(0.95511441,0,0,0.95385727,308.812,51.838406)">
<g
id="g12223"
transform="matrix(0.68786515,0,0,0.68786515,161.92514,215.41774)"
style="">
<path
inkscape:connector-curvature="0"
id="path12225"
d="m -154.78125,940.90625 c -16.83367,0.0841 -32.94231,5.79147 -48.3125,12.1875 0,11.85417 0,23.70833 0,35.5625 17.7207,-10.62322 38.58707,-22.68911 59.8125,-16.25 13.04398,5.00743 16.63873,22.94986 8.66918,33.81085 -11.30773,19.951 -29.75582,34.2821 -44.49033,51.4383 -8.37949,9.1645 -18.35443,17.5352 -24.99135,27.8758 0,8.1146 0,16.2292 0,24.3438 35.57292,0 71.14583,0 106.71875,0 0,-9.8542 0,-19.7083 0,-29.5625 -20.85373,-0.1908 -41.71203,0.331 -62.5625,-0.1875 18.72263,-20.4224 40.27979,-39.0816 55.0625,-62.75 11.305666,-20.54355 8.686275,-50.04312 -10.9375,-64.4375 -10.92302,-8.6146 -25.15049,-12.36911 -38.96875,-12.03125 z"
style="" />
<path
inkscape:connector-curvature="0"
id="path12227"
d="m -155.61282,936.62569 c -18.35737,0.048 -35.64676,6.5447 -52.28125,13.5 0,15.0834 0,30.1667 0,45.25 18.18309,-10.4957 37.97826,-24.6759 60.0625,-20.0624 13.23334,2.403 16.32048,21.2393 7.9375,30.37501 -14.06333,22.1049 -34.68279,38.4853 -51.72671,58.1017 -6.37015,6.5604 -13.70611,12.9672 -17.27329,21.4607 0,9.448 0,18.8959 0,28.3438 38.23958,0 76.47917,0 114.718752,0 0,-12.5 0,-25 0,-37.5 -19.144232,-0.341 -38.293232,0.1821 -57.437502,-0.125 18.7872,-20.259 41.09596,-38.8741 52.906252,-64.4375 8.900061,-22.73901 2.040917,-52.61991 -19.875002,-65.18751 -10.99187,-6.9728 -24.10026,-10.0645 -37.03125,-9.7188 z"
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;stroke-width:1.16349924;stroke-opacity:1" />
</g>
</g>
<rect
y="965.94965"
x="302.44888"
height="19.519009"
width="19.544735"
id="rect12229"
style="display:inline;fill:#000000;fill-opacity:1;stroke:none" />
<rect
style="display:inline;fill:none;stroke:#000000;stroke-width:1.11054337;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect12231"
width="24.647095"
height="24.614655"
x="299.89771"
y="963.40186" />
</g>
<rect
y="992.5824"
x="346.09998"
height="54.969776"
width="373.92401"
id="rect9140"
style="fill:#009100;fill-opacity:1;stroke:none" />
<text
sodipodi:linespacing="125%"
id="text8636-8-3-41-8-8-3-1-7-0-2"
y="1221.6985"
x="49.664951"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.44179535px;line-height:125%;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
xml:space="preserve"
transform="scale(0.99979574,1.0002043)"><tspan
y="1221.6985"
x="49.664951"
id="tspan8638-9-0-6-09-8-3-2-1-3-6"
sodipodi:role="line">Copyright (C) OpenTX www.open-tx.org</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Vrstva"
style="display:inline"
transform="translate(0,290)">
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="rect9140-2-4-2"
d="m 78.807562,150.66824 43.329348,0 10.20977,25.6073 -10.20977,25.6075 -43.329348,0 z"
style="fill:#e5201e;fill-opacity:1;stroke:none" />
<g
transform="matrix(1.1462245,0,0,1.146693,-282.4675,-1143.4763)"
id="g4285">
<path
d="m 322.76938,1149.8874 13.1654,0 0,2.6087 -4.7361,0 0,10.7752 -3.68363,0 0,-10.7752 -4.74567,0 0,-2.6087"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
id="path7326-3-8"
inkscape:connector-curvature="0" />
<path
d="m 345.78969,1156.4405 4.95618,6.8308 -3.83672,0 -3.3392,-4.5719 -3.31049,4.5719 -3.85585,0 4.95617,-6.8308 -4.76482,-6.5531 3.84629,0 3.1287,4.3119 3.11913,-4.3119 3.86542,0 -4.76481,6.5531"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
id="path7328-5-2"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.44830608px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
x="320.66251"
y="1147.8616"
id="text7317-6-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan7319-0-7"
x="320.66251"
y="1147.8616">OPEN</tspan></text>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.37788773px;line-height:89.99999762%;font-family:Sans;-inkscape-font-specification:Sans;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="140.42691"
y="174.21489"
id="text3859-0-1"
sodipodi:linespacing="89.999998%"><tspan
sodipodi:role="line"
id="tspan3861-7-1"
x="140.42691"
y="174.21489">THE ULTIMATE</tspan><tspan
sodipodi:role="line"
x="140.42691"
y="198.85498"
id="tspan4223-9-4">TRANSMITTER</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:50.75551224px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
x="356.35379"
y="194.75381"
id="text3869-7-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3871-2-3"
x="356.35379"
y="194.75381">COMPANION</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

+166 -6
View File
@@ -1,3 +1,4 @@
#include <math.h>
#include "logsdialog.h"
#include "appdata.h"
#include "ui_logsdialog.h"
@@ -10,7 +11,11 @@
LogsDialog::LogsDialog(QWidget *parent) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::LogsDialog)
ui(new Ui::LogsDialog),
tracerMaxAlt(0),
cursorA(0),
cursorB(0),
cursorLine(0)
{
csvlog.clear();
@@ -78,7 +83,7 @@ LogsDialog::LogsDialog(QWidget *parent) :
// connect slot that ties some axis selections together (especially opposite axes):
connect(ui->customPlot, SIGNAL(selectionChangedByUser()), this, SLOT(selectionChanged()));
// connect slots that takes care that when an axis is selected, only that direction can be dragged and zoomed:
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress()));
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress(QMouseEvent*)));
connect(ui->customPlot, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheel()));
// make left axes transfer its range to right axes:
@@ -419,7 +424,7 @@ void LogsDialog::on_mapsButton_clicked()
ui->logTable->setDisabled(false);
}
void LogsDialog::mousePress()
void LogsDialog::mousePress(QMouseEvent * event)
{
// if an axis is selected, only allow the direction of that axis to be dragged
// if no axis is selected, both directions may be dragged
@@ -430,6 +435,74 @@ void LogsDialog::mousePress()
axisRect->setRangeDrag(axisRect->axis(QCPAxis::atLeft)->orientation());
else
axisRect->setRangeDrag(Qt::Horizontal | Qt::Vertical);
if (event->button() == Qt::RightButton) {
double x = axisRect->axis(QCPAxis::atBottom)->pixelToCoord(event->pos().x());
placeCursor(x, event->modifiers() & Qt::ShiftModifier);
}
}
void LogsDialog::placeCursor(double x, bool second)
{
QCPItemTracer * cursor = second ? cursorB : cursorA;
if (cursor) {
cursor->setGraphKey(x);
cursor->updatePosition();
cursor->setVisible(true);
}
if (cursorA && cursorB) {
updateCursorsLabel();
}
}
void LogsDialog::updateCursorsLabel()
{
QString text = QString("Max Altitude: %1 m\n").arg(tracerMaxAlt->position->value(), 0, 'f', 1);
if (cursorA->visible() ) {
text += tr("Cursor A: %1 m").arg(cursorA->position->value(), 0, 'f', 1) + "\n";
}
if (cursorB->visible() ) {
text += tr("Cursor B: %1 m").arg(cursorB->position->value(), 0, 'f', 1) + "\n";
}
if (cursorA->visible() && cursorB->visible()) {
cursorLine->setVisible(true);
// calc deltas
double deltaX = cursorB->position->key() - cursorA->position->key();
double deltaY = cursorB->position->value() - cursorA->position->value();
double slope = 0;
if (deltaX != 0) {
slope = deltaY / deltaX;
}
qDebug() << "Cursors: dt:" << formatTimeDelta(deltaX) << "dy:" << deltaY << "rate:" << slope;
text += tr("Time delta: %1").arg(formatTimeDelta(deltaX)) + "\n";
text += tr("Climb rate: %1 m/s").arg(slope, 0, 'f', fabs(slope)<1.0 ? 2 : 1) + "\n";
}
ui->labelCursors->setText(text);
}
QString LogsDialog::formatTimeDelta(double timeDelta)
{
if (abs(timeDelta) < 10) {
return QString("%1 s").arg(timeDelta, 1, 'f', 1);
}
int seconds = (int)round(abs(timeDelta));
int hours = seconds / 3600;
seconds %= 3600;
int minutes = seconds / 60;
seconds %= 60;
if (hours) {
return QString("%1h:%2:%3").arg(hours).arg(minutes, 2, 10, QChar('0')).arg(seconds, 2, 10, QChar('0'));
}
else if (minutes) {
return QString("%1m:%2").arg(minutes).arg(seconds, 2, 10, QChar('0'));
}
else {
return QString("%1 s").arg(seconds);
}
}
void LogsDialog::mouseWheel()
@@ -453,6 +526,7 @@ void LogsDialog::mouseWheel()
void LogsDialog::removeAllGraphs()
{
ui->customPlot->clearGraphs();
ui->customPlot->clearItems();
ui->customPlot->legend->setVisible(false);
rightLegend->clearItems();
rightLegend->setVisible(false);
@@ -466,6 +540,11 @@ void LogsDialog::removeAllGraphs()
axisRect->axis(QCPAxis::atRight, 1)->setSelectedParts(QCPAxis::spNone);
axisRect->axis(QCPAxis::atBottom)->setSelectedParts(QCPAxis::spNone);
ui->customPlot->replot();
tracerMaxAlt = 0;
cursorA = 0;
cursorB = 0;
cursorLine = 0;
ui->labelCursors->setText("");
}
void LogsDialog::on_fileOpen_BT_clicked()
@@ -499,12 +578,12 @@ void LogsDialog::on_fileOpen_BT_clicked()
}
}
ui->logTable->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
ui->logTable->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
QVarLengthArray<int> sizes;
for (int i = 0; i < ui->logTable->columnCount(); i++) {
sizes.append(ui->logTable->columnWidth(i));
}
ui->logTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
ui->logTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
for (int i = 0; i < ui->logTable->columnCount(); i++) {
ui->logTable->setColumnWidth(i, sizes.at(i));
}
@@ -608,7 +687,7 @@ void LogsDialog::setFlightSessions()
QDateTime lastvalue;
for (int i = 1; i < n; i++) {
QDateTime tmp = getRecordTimeStamp(i);
if (lastvalue.secsTo(tmp) > 60) {
if (!lastvalue.isValid() || lastvalue.secsTo(tmp) > 60) {
sessions.push_back(i-1);
// qDebug() << "session index" << i-1;
}
@@ -904,6 +983,17 @@ void LogsDialog::plotLogs()
plots.coords.at(i).y);
pen.setColor(colors.at(i % colors.size()));
ui->customPlot->graph(i)->setPen(pen);
if (!tracerMaxAlt && (plots.coords.at(i).name.endsWith("(m)") ||
plots.coords.at(i).name.endsWith(" Alt") ||
plots.coords.at(i).name.endsWith("(ft)"))) {
addMaxAltitudeMarker(plots.coords.at(i), ui->customPlot->graph(i));
countNumberOfThrows(plots.coords.at(i), ui->customPlot->graph(i));
addCursor(&cursorA, ui->customPlot->graph(i), Qt::blue);
addCursor(&cursorB, ui->customPlot->graph(i), Qt::red);
addCursorLine(&cursorLine, ui->customPlot->graph(i), Qt::black);
updateCursorsLabel();
}
}
ui->customPlot->legend->setVisible(true);
@@ -951,3 +1041,73 @@ void LogsDialog::yAxisChangeRanges(QCPRange range)
yAxesRanges[firstLeft].max = range.upper;
}
}
void LogsDialog::addMaxAltitudeMarker(const coords & c, QCPGraph * graph) {
// find max altitude
int positionIndex = 0;
double maxAlt = -100000;
for(int i=0; i<c.x.count(); ++i) {
double alt = c.y.at(i);
if (alt > maxAlt) {
maxAlt = alt;
positionIndex = i;
// qDebug() << "max alt: " << maxAlt << "@" << result;
}
}
// qDebug() << "max alt: " << maxAlt << "@" << positionIndex;
// add max altitude marker
tracerMaxAlt = new QCPItemTracer(ui->customPlot);
ui->customPlot->addItem(tracerMaxAlt);
tracerMaxAlt->setGraph(graph);
tracerMaxAlt->setInterpolating(true);
tracerMaxAlt->setStyle(QCPItemTracer::tsSquare);
tracerMaxAlt->setPen(QPen(Qt::blue));
tracerMaxAlt->setBrush(Qt::NoBrush);
tracerMaxAlt->setSize(7);
tracerMaxAlt->setGraphKey(c.x.at(positionIndex));
tracerMaxAlt->updatePosition();
}
void LogsDialog::countNumberOfThrows(const coords & c, QCPGraph * graph)
{
#if 0
// find all launches
// TODO
double startTime = c.x.at(0);
for(int i=0; i<c.x.count(); ++i) {
double alt = c.y.at(i);
double time = c.x.at(i);
}
#endif
}
void LogsDialog::addCursor(QCPItemTracer ** cursor, QCPGraph * graph, const QColor & color) {
QCPItemTracer * c = new QCPItemTracer(ui->customPlot);
ui->customPlot->addItem(c);
c->setGraph(graph);
c->setInterpolating(false);
c->setStyle(QCPItemTracer::tsCrosshair);
QPen pen(color);
pen.setStyle(Qt::DashLine);
c->setPen(pen);
c->setBrush(color);
c->setSize(7);
c->setVisible(false);
*cursor = c;
}
void LogsDialog::addCursorLine(QCPItemStraightLine ** line, QCPGraph * graph, const QColor & color) {
QCPItemStraightLine * l = new QCPItemStraightLine(ui->customPlot);
ui->customPlot->addItem(l);
l->point1->setParentAnchor(cursorA->position);
l->point2->setParentAnchor(cursorB->position);
QPen pen(color);
pen.setStyle(Qt::DashLine);
l->setPen(pen);
l->setVisible(false);
*line = l;
}
+15 -1
View File
@@ -53,7 +53,7 @@ private slots:
void axisLabelDoubleClick(QCPAxis* axis, QCPAxis::SelectablePart part);
void legendDoubleClick(QCPLegend* legend, QCPAbstractLegendItem* item);
void selectionChanged();
void mousePress();
void mousePress(QMouseEvent * event);
void mouseWheel();
void removeAllGraphs();
void plotLogs();
@@ -76,6 +76,11 @@ private:
double yAxesRatios[AXES_LIMIT];
minMax yAxesRanges[AXES_LIMIT];
QCPItemTracer * tracerMaxAlt;
QCPItemTracer * cursorA;
QCPItemTracer * cursorB;
QCPItemStraightLine * cursorLine;
bool cvsFileParse();
QList<QStringList> filterGePoints(const QList<QStringList> & input);
void exportToGoogleEarth();
@@ -83,6 +88,15 @@ private:
QString generateDuration(const QDateTime & start, const QDateTime & end);
void setFlightSessions();
void addMaxAltitudeMarker(const coords & c, QCPGraph * graph);
void countNumberOfThrows(const coords & c, QCPGraph * graph);
void addCursor(QCPItemTracer ** cursor, QCPGraph * graph, const QColor & color);
void addCursorLine(QCPItemStraightLine ** line, QCPGraph * graph, const QColor & color);
void placeCursor(double x, bool second);
QString formatTimeDelta(double timeDelta);
void updateCursorsLabel();
};
#endif // _LOGSDIALOG_H_
+159 -129
View File
@@ -16,32 +16,78 @@
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,0,0,0,0,0,0">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0">
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Filename</string>
<string>Fly sessions</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="FileName_LE">
<property name="readOnly">
<bool>true</bool>
<widget class="QComboBox" name="sessions_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fileOpen_BT">
<property name="text">
<string>Open LogFile</string>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0" rowspan="12">
<widget class="QTableWidget" name="FieldsTW">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="autoScrollMargin">
<number>0</number>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QFrame" name="frame_2">
<property name="sizePolicy">
@@ -127,121 +173,7 @@
</item>
</layout>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Fly sessions</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="sessions_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="4" column="1" rowspan="4">
<widget class="QTableWidget" name="logTable">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="rowCount">
<number>0</number>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>18</number>
</attribute>
<attribute name="verticalHeaderHighlightSections">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="1" column="0" rowspan="6">
<widget class="QTableWidget" name="FieldsTW">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="autoScrollMargin">
<number>0</number>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="7" column="0">
<item row="13" column="0">
<widget class="QPushButton" name="mapsButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
@@ -276,6 +208,106 @@
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Filename</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="FileName_LE">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fileOpen_BT">
<property name="text">
<string>Open LogFile</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="1" rowspan="8">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="5,1">
<item>
<widget class="QTableWidget" name="logTable">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="rowCount">
<number>0</number>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>18</number>
</attribute>
<attribute name="verticalHeaderHighlightSections">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<widget class="QLabel" name="labelCursors">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
@@ -289,14 +321,12 @@
</customwidgets>
<tabstops>
<tabstop>FileName_LE</tabstop>
<tabstop>fileOpen_BT</tabstop>
<tabstop>FieldsTW</tabstop>
<tabstop>mapsButton</tabstop>
<tabstop>ZoomX_ChkB</tabstop>
<tabstop>ZoomY_ChkB</tabstop>
<tabstop>Reset_PB</tabstop>
<tabstop>sessions_CB</tabstop>
<tabstop>logTable</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
+182 -149
View File
@@ -71,7 +71,6 @@
#include "progressdialog.h"
#define OPENTX_COMPANION_DOWNLOADS "http://downloads-22.open-tx.org/companion"
#define OPENTX_NIGHT_COMPANION_DOWNLOADS "http://downloads-22.open-tx.org/nightly/companion"
#define DONATE_STR "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QUZ48K4SEXDP2"
#ifdef __APPLE__
@@ -85,8 +84,10 @@
#if defined WIN32 || !defined __GNUC__
#include <windows.h>
#define sleep(x) Sleep(x*1000)
#define OPENTX_NIGHT_COMPANION_DOWNLOADS "http://downloads-22.open-tx.org/nightly/companion/windows"
#else
#include <unistd.h>
#define OPENTX_NIGHT_COMPANION_DOWNLOADS "http://downloads-22.open-tx.org/nightly/companion/linux"
#endif
MainWindow::MainWindow():
@@ -275,51 +276,57 @@ void MainWindow::closeUpdatesWaitDialog()
}
}
QString MainWindow::seekCodeString(const QByteArray & qba, const QString & label)
{
int posLabel = qba.indexOf(label);
if (posLabel < 0)
return QString::null;
int start = qba.indexOf("\"", posLabel + label.length());
if (start < 0)
return QString::null;
int end = qba.indexOf("\"", start + 1);
if (end < 0)
return QString::null;
return qba.mid(start + 1, end - start - 1);
}
void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply)
{
QByteArray qba = reply->readAll();
int i = qba.indexOf("VERSION");
if (i>0) {
QString version = qba.mid(i+14, qba.indexOf("\"", i+14)-i-14);
QString version = seekCodeString(qba, "VERSION");
if (version.isNull())
return onUpdatesError();
if (version.isNull()) {
return onUpdatesError();
}
int vnum = version2index(version);
int vnum = version2index(version);
QString c9xversion = QString(VERSION);
int c9xver = version2index(c9xversion);
QString c9xversion = QString(VERSION);
int c9xver = version2index(c9xversion);
if (c9xver < vnum) {
if (c9xver < vnum) {
#if defined WIN32 || !defined __GNUC__ // || defined __APPLE__ // OSX should only notify of updates since no update packages are available.
int ret = QMessageBox::question(this, "Companion", tr("A new version of Companion is available (version %1)<br>"
"Would you like to download it?").arg(version) ,
QMessageBox::Yes | QMessageBox::No);
int ret = QMessageBox::question(this, "Companion", tr("A new version of Companion is available (version %1)<br>"
"Would you like to download it?").arg(version) ,
QMessageBox::Yes | QMessageBox::No);
if (ret == QMessageBox::Yes) {
QDir dir(g.updatesDir());
QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), dir.absoluteFilePath(QString(COMPANION_INSTALLER).arg(version)), tr("Executable (*.exe)"));
if (!fileName.isEmpty()) {
g.updatesDir(QFileInfo(fileName).dir().absolutePath());
downloadDialog * dd = new downloadDialog(this, QString("%1/%2").arg(getCompanionUpdateBaseUrl()).arg(QString(COMPANION_INSTALLER).arg(version)), fileName);
installer_fileName = fileName;
connect(dd, SIGNAL(accepted()), this, SLOT(updateDownloaded()));
dd->exec();
}
if (ret == QMessageBox::Yes) {
QDir dir(g.updatesDir());
QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), dir.absoluteFilePath(QString(COMPANION_INSTALLER).arg(version)), tr("Executable (*.exe)"));
if (!fileName.isEmpty()) {
g.updatesDir(QFileInfo(fileName).dir().absolutePath());
downloadDialog * dd = new downloadDialog(this, QString("%1/%2").arg(getCompanionUpdateBaseUrl()).arg(QString(COMPANION_INSTALLER).arg(version)), fileName);
installer_fileName = fileName;
connect(dd, SIGNAL(accepted()), this, SLOT(updateDownloaded()));
dd->exec();
}
}
#else
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available, please check the OpenTX website!"));
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available, please check the OpenTX website!"));
#endif
}
else {
if (downloadDialog_forWait && checkForUpdatesState==0) {
QMessageBox::information(this, "Companion", tr("No updates available at this time."));
}
}
}
else {
return onUpdatesError();
if (downloadDialog_forWait && checkForUpdatesState==0) {
QMessageBox::information(this, "Companion", tr("No updates available at this time."));
}
}
checkForUpdates();
@@ -350,19 +357,28 @@ void MainWindow::firmwareDownloadAccepted()
QTextStream inputStream(&file);
QString hline = inputStream.readLine();
if (hline.startsWith("ERROR:")) {
int errnum=hline.mid(6).toInt();
int errnum = hline.mid(6).toInt();
switch(errnum) {
case 1:
errormsg = tr("Not enough memory for all the selected firmware options");
errormsg = tr("Not enough flash available on this board for all the selected options");
break;
case 2:
errormsg = tr("Compilation server termporary failure, try later");
errormsg = tr("Compilation server temporary failure, try later");
break;
case 3:
errormsg = tr("Compilation server too busy, try later");
break;
case 4:
errormsg = tr("Compilation server requires registration, please check OpenTX web site");
errormsg = tr("Compilation error");
break;
case 5:
errormsg = tr("Invalid firmware");
break;
case 6:
errormsg = tr("Invalid board");
break;
case 7:
errormsg = tr("Invalid language");
break;
default:
errormsg = tr("Unknown server failure, try later");
@@ -388,114 +404,106 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
bool ignore = false;
QByteArray qba = reply->readAll();
QString versionString = seekCodeString(qba, "VERSION");
QString dateString = seekCodeString(qba, "DATE");
if (versionString.isNull() || dateString.isNull())
return onUpdatesError();
long version = 0;
long version = version2index(versionString);
if (version <= 0)
return onUpdatesError();
int versionIndex = qba.indexOf("VERS_STR");
int dateIndex = qba.indexOf("DATE_STR");
QString fullVersionString = QString("%1 (%2)").arg(versionString).arg(dateString);
QString versionString;
if (versionIndex > 0 && dateIndex > 0) {
firmwareVersionString = qba.mid(versionIndex+10, qba.indexOf("\"", versionIndex+10)-versionIndex-10);
QString dateString = qba.mid(dateIndex+10, 10);
version = version2index(firmwareVersionString);
versionString = QString("%1 (%2)").arg(firmwareVersionString).arg(dateString);
}
if (version > 0) {
if (checkForUpdatesState & AUTOMATIC_DOWNLOAD) {
checkForUpdatesState -= AUTOMATIC_DOWNLOAD;
download = true;
}
else {
int currentVersion = g.fwRev.get(current_firmware_variant->getId());
QString currentVersionString = index2version(currentVersion);
QMessageBox msgBox;
msgBox.setWindowTitle("Companion");
QSpacerItem * horizontalSpacer = new QSpacerItem(500, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
QGridLayout * layout = (QGridLayout*)msgBox.layout();
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
if (currentVersion == 0) {
QString rn = GetCurrentFirmware()->getReleaseNotesUrl();
QAbstractButton *rnButton = NULL;
msgBox.setText(tr("Firmware %1 does not seem to have ever been downloaded.\nRelease %2 is available.\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.").arg(current_firmware_variant->getId()).arg(versionString));
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
if (!rn.isEmpty()) {
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
}
msgBox.setIcon(QMessageBox::Question);
msgBox.resize(0, 0);
msgBox.exec();
if (msgBox.clickedButton() == rnButton) {
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
dialog->exec();
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(versionString), QMessageBox::Yes | QMessageBox::No);
if (ret2 == QMessageBox::Yes)
download = true;
else
ignore = true;
}
else if (msgBox.clickedButton() == YesButton ) {
download = true;
}
else {
ignore = true;
}
}
else if (version > currentVersion) {
QString rn = GetCurrentFirmware()->getReleaseNotesUrl();
QAbstractButton *rnButton = NULL;
msgBox.setText(tr("A new version of %1 firmware is available:\n - current is %2\n - newer is %3\n\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.").arg(current_firmware_variant->getId()).arg(currentVersionString).arg(versionString));
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
if (!rn.isEmpty()) {
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
}
msgBox.setIcon(QMessageBox::Question);
msgBox.resize(0,0);
msgBox.exec();
if( msgBox.clickedButton() == rnButton ) {
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
dialog->exec();
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(versionString),
QMessageBox::Yes | QMessageBox::No);
if (ret2 == QMessageBox::Yes) {
download = true;
}
else {
ignore = true;
}
}
else if (msgBox.clickedButton() == YesButton ) {
download = true;
}
else {
ignore = true;
}
}
else {
if (downloadDialog_forWait && checkForUpdatesState==0) {
QMessageBox::information(this, "Companion", tr("No updates available at this time."));
}
}
}
if (ignore) {
int res = QMessageBox::question(this, "Companion", tr("Ignore this release %1?").arg(versionString), QMessageBox::Yes | QMessageBox::No);
if (res==QMessageBox::Yes) {
g.fwRev.set(current_firmware_variant->getId(), version);
}
}
else if (download == true) {
startFirmwareDownload();
}
if (checkForUpdatesState & AUTOMATIC_DOWNLOAD) {
checkForUpdatesState -= AUTOMATIC_DOWNLOAD;
download = true;
}
else {
// TODO remove serverFails config?
return onUpdatesError();
int currentVersion = g.fwRev.get(current_firmware_variant->getId());
QString currentVersionString = index2version(currentVersion);
QMessageBox msgBox;
msgBox.setWindowTitle("Companion");
QSpacerItem * horizontalSpacer = new QSpacerItem(500, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
QGridLayout * layout = (QGridLayout*)msgBox.layout();
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
if (currentVersion == 0) {
QString rn = GetCurrentFirmware()->getReleaseNotesUrl();
QAbstractButton *rnButton = NULL;
msgBox.setText(tr("Firmware %1 does not seem to have ever been downloaded.\nRelease %2 is available.\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.").arg(current_firmware_variant->getId()).arg(fullVersionString));
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
if (!rn.isEmpty()) {
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
}
msgBox.setIcon(QMessageBox::Question);
msgBox.resize(0, 0);
msgBox.exec();
if (msgBox.clickedButton() == rnButton) {
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
dialog->exec();
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(fullVersionString), QMessageBox::Yes | QMessageBox::No);
if (ret2 == QMessageBox::Yes)
download = true;
else
ignore = true;
}
else if (msgBox.clickedButton() == YesButton ) {
download = true;
}
else {
ignore = true;
}
}
else if (version > currentVersion) {
QString rn = GetCurrentFirmware()->getReleaseNotesUrl();
QAbstractButton *rnButton = NULL;
msgBox.setText(tr("A new version of %1 firmware is available:\n - current is %2\n - newer is %3\n\nDo you want to download it now?\n\nWe recommend you view the release notes using the button below to learn about any changes that may be important to you.").arg(current_firmware_variant->getId()).arg(currentVersionString).arg(fullVersionString));
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
if (!rn.isEmpty()) {
rnButton = msgBox.addButton(trUtf8("Release Notes"), QMessageBox::ActionRole);
}
msgBox.setIcon(QMessageBox::Question);
msgBox.resize(0,0);
msgBox.exec();
if( msgBox.clickedButton() == rnButton ) {
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
dialog->exec();
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(fullVersionString),
QMessageBox::Yes | QMessageBox::No);
if (ret2 == QMessageBox::Yes) {
download = true;
}
else {
ignore = true;
}
}
else if (msgBox.clickedButton() == YesButton ) {
download = true;
}
else {
ignore = true;
}
}
else {
if (downloadDialog_forWait && checkForUpdatesState==0) {
QMessageBox::information(this, "Companion", tr("No updates available at this time."));
}
}
}
if (ignore) {
int res = QMessageBox::question(this, "Companion", tr("Ignore this release %1?").arg(fullVersionString), QMessageBox::Yes | QMessageBox::No);
if (res==QMessageBox::Yes) {
g.fwRev.set(current_firmware_variant->getId(), version);
}
}
else if (download == true) {
firmwareVersionString = versionString;
startFirmwareDownload();
}
checkForUpdates();
@@ -901,7 +909,7 @@ void MainWindow::about()
aboutStr.append("<br/><br/>");
aboutStr.append(QString("Version %1, %2").arg(VERSION).arg(__DATE__));
aboutStr.append("<br/><br/>");
aboutStr.append(tr("Copyright OpenTX Team") + "<br/>&copy; 2011-2015<br/>");
aboutStr.append(tr("Copyright OpenTX Team") + "<br/>&copy; 2011-2016<br/>");
QMessageBox msgBox(this);
msgBox.setWindowIcon(CompanionIcon("information.png"));
msgBox.setWindowTitle(tr("About Companion"));
@@ -912,15 +920,38 @@ void MainWindow::about()
void MainWindow::updateMenus()
{
bool hasMdiChild = (activeMdiChild() != 0);
saveAct->setEnabled(hasMdiChild);
saveAsAct->setEnabled(hasMdiChild);
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
writeEepromAct->setEnabled(hasMdiChild);
separatorAct->setVisible(hasMdiChild);
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
cutAct->setEnabled(hasSelection);
copyAct->setEnabled(hasSelection);
if(GetCurrentFirmware()->getBoard() == BOARD_HORUS) {
newAct->setEnabled(false);
openAct->setEnabled(false);
saveAct->setEnabled(false);
saveAsAct->setEnabled(false);
writeEepromAct->setEnabled(false);
readEepromAct->setEnabled(false);
writeBackupToRadioAct->setEnabled(false);
readBackupToFileAct->setEnabled(false);
cutAct->setEnabled(false);
copyAct->setEnabled(false);
pasteAct->setEnabled(false);
for (int i=0; i<MAX_RECENT; ++i)
recentFileActs[i]->setEnabled(false);
} else {
newAct->setEnabled(true);
openAct->setEnabled(true);
saveAct->setEnabled(hasMdiChild);
saveAsAct->setEnabled(hasMdiChild);
cutAct->setEnabled(hasSelection);
copyAct->setEnabled(hasSelection);
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
writeEepromAct->setEnabled(hasMdiChild);
readEepromAct->setEnabled(true);
writeBackupToRadioAct->setEnabled(true);
readBackupToFileAct->setEnabled(true);
for (int i=0; i<MAX_RECENT; ++i)
recentFileActs[i]->setEnabled(true);
}
separatorAct->setVisible(hasMdiChild);
simulateAct->setEnabled(hasSelection);
printAct->setEnabled(hasSelection);
loadbackupAct->setEnabled(hasMdiChild);
@@ -1440,6 +1471,8 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
void MainWindow::dropEvent(QDropEvent *event)
{
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS)
return;
QList<QUrl> urls = event->mimeData()->urls();
if (urls.isEmpty())
return;
+4 -4
View File
@@ -42,8 +42,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui>
#include <QMainWindow>
#include <QtWidgets>
#include <QDateTime>
#include "downloaddialog.h"
#include "eeprominterface.h"
@@ -83,6 +82,7 @@ class MainWindow : public QMainWindow
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void setLanguage(const QString & langString);
QString seekCodeString(const QByteArray & qba, const QString & label);
private slots:
void openDocURL();
@@ -164,7 +164,7 @@ class MainWindow : public QMainWindow
QMenu * createRecentFileMenu();
QMenu * createProfilesMenu();
void autoClose();
private:
void closeUpdatesWaitDialog();
void onUpdatesError();
@@ -205,7 +205,7 @@ class MainWindow : public QMainWindow
downloadDialog * downloadDialog_forWait;
unsigned int checkForUpdatesState;
QString firmwareVersionString;
QNetworkAccessManager *networkManager;
QMenu *fileMenu;
+5 -5
View File
@@ -270,7 +270,7 @@ bool MdiChild::loadFile(const QString &fileName, bool resetCurrentFile)
bool xmlOK = doc.setContent(&file);
if(xmlOK) {
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEepromXml(radioData, doc));
if (errors.test(NO_ERROR)) {
if (errors.test(ALL_OK)) {
ui->modelsList->refreshList();
if(resetCurrentFile) setCurrentFile(fileName);
return true;
@@ -301,7 +301,7 @@ bool MdiChild::loadFile(const QString &fileName, bool resetCurrentFile)
file.close();
std::bitset<NUM_ERRORS> errors((unsigned long long)LoadEeprom(radioData, (uint8_t *)eeprom.data(), eeprom_size));
if (!errors.test(NO_ERROR)) {
if (!errors.test(ALL_OK)) {
ShowEepromErrors(this, tr("Error"), tr("Invalid EEPROM File %1").arg(fileName), errors.to_ulong());
return false;
}
@@ -339,9 +339,9 @@ bool MdiChild::loadFile(const QString &fileName, bool resetCurrentFile)
}
std::bitset<NUM_ERRORS> errorsEeprom((unsigned long long)LoadEeprom(radioData, eeprom, eeprom_size));
if (!errorsEeprom.test(NO_ERROR)) {
if (!errorsEeprom.test(ALL_OK)) {
std::bitset<NUM_ERRORS> errorsBackup((unsigned long long)LoadBackup(radioData, eeprom, eeprom_size, 0));
if (!errorsBackup.test(NO_ERROR)) {
if (!errorsBackup.test(ALL_OK)) {
ShowEepromErrors(this, tr("Error"), tr("Invalid binary EEPROM File %1").arg(fileName), (errorsEeprom | errorsBackup).to_ulong());
return false;
}
@@ -617,7 +617,7 @@ bool MdiChild::loadBackup()
}
std::bitset<NUM_ERRORS> errorsEeprom((unsigned long long)LoadBackup(radioData, (uint8_t *)eeprom.data(), eeprom_size, index));
if (!errorsEeprom.test(NO_ERROR)) {
if (!errorsEeprom.test(ALL_OK)) {
ShowEepromErrors(this, tr("Error"), tr("Invalid binary backup File %1").arg(fileName), (errorsEeprom).to_ulong());
return false;
}
+4 -3
View File
@@ -54,7 +54,8 @@ foreach(name ${modeledit_NAMES})
set(modeledit_UIS ${modeledit_UIS} ${name}.ui)
endforeach()
qt4_wrap_ui(modeledit_SRCS ${modeledit_UIS})
qt4_wrap_cpp(modeledit_SRCS ${modeledit_HDRS})
qt5_wrap_ui(modeledit_SRCS ${modeledit_UIS})
qt5_wrap_cpp(modeledit_SRCS ${modeledit_HDRS})
add_library(modeledit ${modeledit_SRCS})
add_library(modeledit ${modeledit_SRCS})
qt5_use_modules(modeledit Widgets Xml Multimedia)
+6 -12
View File
@@ -1,13 +1,7 @@
#include "channels.h"
#include "helpers.h"
#include <QLabel>
#include <QLineEdit>
#include <QSpinBox>
#include <QComboBox>
#include <QCheckBox>
#include <QDoubleSpinBox>
LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, int min, int max, int deflt):
LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt):
firmware(firmware),
spinbox(new QDoubleSpinBox()),
value(value),
@@ -50,7 +44,7 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row,
horizontalLayout->addWidget(cb);
horizontalLayout->addWidget(spinbox);
tableLayout->addLayout(row, col, horizontalLayout);
gvarGroup = new GVarGroup(gv, spinbox, cb, value, deflt, min, max, displayStep, allowGVars);
gvarGroup = new GVarGroup(gv, spinbox, cb, value, model, deflt, min, max, displayStep, allowGVars);
}
LimitsGroup::~LimitsGroup()
@@ -119,13 +113,13 @@ Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & genera
}
// Channel offset
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].offset, -1000, 1000, 0);
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].offset, model, -1000, 1000, 0);
// Channel min
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].min, -model.getChannelsMax()*10, 0, -1000);
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].min, model, -model.getChannelsMax()*10, 0, -1000);
// Channel max
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].max, 0, model.getChannelsMax()*10, 1000);
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].max, model, 0, model.getChannelsMax()*10, 1000);
// Channel inversion
QComboBox * invCB = new QComboBox(this);
@@ -200,7 +194,7 @@ void Channels::nameEdited()
if (!lock) {
QLineEdit *le = qobject_cast<QLineEdit*>(sender());
int index = le->property("index").toInt();
strcpy(model->limitData[index].name, le->text().toAscii());
strcpy(model->limitData[index].name, le->text().toLatin1());
emit modified();
}
}
+1 -2
View File
@@ -3,14 +3,13 @@
#include "helpers.h"
#include "modeledit.h"
#include <QSpinBox>
class GVarGroup;
class LimitsGroup
{
public:
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, int min, int max, int deflt);
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt);
~LimitsGroup();
void updateMinMax(int max);
+2 -8
View File
@@ -3,11 +3,6 @@
#include "node.h"
#include "edge.h"
#include "helpers.h"
#include <QSpinBox>
#include <QCheckBox>
#include <QPushButton>
#include <QMessageBox>
#include <QAction>
#define GFX_MARGIN 16
@@ -491,7 +486,7 @@ void Curves::on_curveSmooth_currentIndexChanged(int index)
void Curves::on_curveName_editingFinished()
{
memset(model->curves[currentCurve].name, 0, sizeof(model->curves[currentCurve].name));
strcpy(model->curves[currentCurve].name, ui->curveName->text().toAscii());
strcpy(model->curves[currentCurve].name, ui->curveName->text().toLatin1());
emit modified();
}
@@ -503,9 +498,8 @@ void Curves::resizeEvent(QResizeEvent *event)
ModelPanel::resizeEvent(event);
}
void Curves::on_curveType_currentIndexChanged()
void Curves::on_curveType_currentIndexChanged(int index)
{
int index = ui->curveType->currentIndex();
unsigned int flags = templates[index].flags;
ui->curveCoeffLabel->setVisible(flags & CURVE_COEFF_ENABLE);
ui->curveCoeff->setVisible(flags & CURVE_COEFF_ENABLE);
+1 -2
View File
@@ -3,7 +3,6 @@
#include "modeledit.h"
#include "eeprominterface.h"
#include <QSpinBox>
enum CopyAction {
CURVE_COPY,
@@ -46,7 +45,7 @@ class Curves : public ModelPanel
void onNodeMoved(int x, int y);
void onNodeFocus();
void onNodeUnfocus();
void on_curveType_currentIndexChanged();
void on_curveType_currentIndexChanged(int index);
void on_curveApply_clicked();
protected:
+1 -1
View File
@@ -94,7 +94,7 @@
<item row="1" column="1">
<widget class="QLineEdit" name="curveName">
<property name="maxLength">
<number>6</number>
<number>3</number>
</property>
</widget>
</item>
+38 -52
View File
@@ -43,13 +43,9 @@ void RepeatComboBox::update()
CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model, GeneralSettings & generalSettings, Firmware * firmware):
GenericPanel(parent, model, generalSettings, firmware),
functions(model ? model->customFn : generalSettings.customFn)
#if defined(PHONON)
,
phononCurrent(-1),
clickObject(NULL),
clickOutput(NULL)
#endif
functions(model ? model->customFn : generalSettings.customFn),
mediaPlayerCurrent(-1),
mediaPlayer(NULL)
{
Stopwatch s1("CustomFunctionsPanel - populate");
lock = true;
@@ -70,7 +66,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model,
s1.report("get tracks");
if (IS_TARANIS(firmware->getBoard())) {
scriptsSet = getFilesSet(g.profile[g.id()].sdPath() + "/SCRIPTS", QStringList() << "*.lua", firmware->getCapability(VoicesMaxLength));
scriptsSet = getFilesSet(g.profile[g.id()].sdPath() + "/SCRIPTS/FUNCTIONS", QStringList() << "*.lua", firmware->getCapability(VoicesMaxLength));
for (int i=0; i<num_fsw; i++) {
if (functions[i].func==FuncPlayScript) {
QString temp = functions[i].paramarm;
@@ -178,14 +174,12 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model,
paramLayout->addWidget(fswtchBLcolor[i]);
connect(fswtchBLcolor[i], SIGNAL(sliderReleased()), this, SLOT(customFunctionEdited()));
#ifdef PHONON
playBT[i] = new QPushButton(this);
playBT[i]->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
playBT[i]->setProperty("index", i);
playBT[i]->setIcon(playIcon);
paramLayout->addWidget(playBT[i]);
connect(playBT[i], SIGNAL(pressed()), this, SLOT(playMusic()));
#endif
QHBoxLayout * repeatLayout = new QHBoxLayout();
tableLayout->addLayout(i, 4, repeatLayout);
@@ -220,35 +214,42 @@ CustomFunctionsPanel::~CustomFunctionsPanel()
{
}
#ifdef PHONON
void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::State oldState)
void CustomFunctionsPanel::onMediaPlayerStateChanged(QMediaPlayer::State state)
{
if (!lock) {
lock = true;
if ((newState==Phonon::ErrorState || newState==Phonon::StoppedState || newState==Phonon::PausedState) && oldState==Phonon::PlayingState) {
clickObject->stop();
clickObject->clearQueue();
clickObject->clear();
if (phononCurrent >= 0) {
playBT[phononCurrent]->setIcon(CompanionIcon("play.png"));
phononCurrent = -1;
if (state==QMediaPlayer::StoppedState || state==QMediaPlayer::PausedState) {
mediaPlayer->stop();
if (mediaPlayerCurrent >= 0) {
playBT[mediaPlayerCurrent]->setIcon(CompanionIcon("play.png"));
mediaPlayerCurrent = -1;
}
}
lock = false;
}
}
void CustomFunctionsPanel::onMediaPlayerError(QMediaPlayer::Error error)
{
if (!lock) {
lock = true;
if (mediaPlayerCurrent >= 0) {
playBT[mediaPlayerCurrent]->setIcon(CompanionIcon("play.png"));
mediaPlayerCurrent = -1;
}
lock = false;
}
}
void CustomFunctionsPanel::playMusic()
{
if (!clickObject) {
clickObject = new Phonon::MediaObject(this);
clickOutput = new Phonon::AudioOutput(Phonon::NoCategory, this);
Phonon::createPath(clickObject, clickOutput);
connect(clickObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this, SLOT(mediaPlayer_state(Phonon::State, Phonon::State)));
if (!mediaPlayer) {
mediaPlayer = new QMediaPlayer(this);
connect(mediaPlayer, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(onMediaPlayerStateChanged(QMediaPlayer::State)));
connect(mediaPlayer, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(onMediaPlayerError(QMediaPlayer::Error)));
}
QPushButton * button = qobject_cast<QPushButton*>(sender());
int index = button->property("index").toInt();
int index = sender()->property("index").toInt();
QString path = g.profile[g.id()].sdPath();
QDir qd(path);
QString track;
@@ -272,29 +273,22 @@ void CustomFunctionsPanel::playMusic()
return;
}
if (phononCurrent == index) {
clickObject->stop();
clickObject->clear();
if (mediaPlayerCurrent == index) {
mediaPlayer->stop();
playBT[index]->setIcon(CompanionIcon("play.png"));
phononCurrent = -1;
mediaPlayerCurrent = -1;
}
else {
if (phononCurrent >= 0) {
playBT[phononCurrent]->setIcon(CompanionIcon("play.png"));
if (mediaPlayerCurrent >= 0) {
playBT[mediaPlayerCurrent]->setIcon(CompanionIcon("play.png"));
}
phononCurrent = index;
clickObject->clear();
#ifdef __APPLE__
clickObject->setCurrentSource(QUrl("file://"+track));
#else
clickObject->setCurrentSource(QUrl(track));
#endif
clickObject->play();
mediaPlayerCurrent = index;
mediaPlayer->setMedia(QUrl::fromLocalFile(track));
mediaPlayer->play();
playBT[index]->setIcon(CompanionIcon("stop.png"));
}
}
}
#endif
#define CUSTOM_FUNCTION_NUMERIC_PARAM (1<<0)
#define CUSTOM_FUNCTION_SOURCE_PARAM (1<<1)
@@ -373,8 +367,8 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
}
else if (func>=FuncAdjustGV1 && func<=FuncAdjustGVLast) {
if (modified) cfn.adjustMode = fswtchGVmode[i]->currentIndex();
widgetsMask |= CUSTOM_FUNCTION_GV_MODE + CUSTOM_FUNCTION_ENABLE;
if (cfn.adjustMode==0) {
widgetsMask |= CUSTOM_FUNCTION_GV_MODE | (IS_ARM(firmware->getBoard()) ? CUSTOM_FUNCTION_REPEAT : CUSTOM_FUNCTION_ENABLE);
if (cfn.adjustMode==0 || cfn.adjustMode==3) {
if (modified) cfn.param = fswtchParam[i]->value();
fswtchParam[i]->setDecimals(0);
fswtchParam[i]->setSingleStep(1);
@@ -403,7 +397,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
else if (func>=FuncSetTimer1 && func<=FuncSetTimer3) {
if (modified) cfn.param = QTimeS(fswtchParamTime[i]->time()).seconds();
fswtchParamTime[i]->setMinimumTime(QTime(0, 0, 0));
fswtchParamTime[i]->setMaximumTime(QTime(0, 59, 59));
fswtchParamTime[i]->setMaximumTime(firmware->getMaxTimerStart());
fswtchParamTime[i]->setTime(QTimeS(cfn.param));
widgetsMask |= CUSTOM_FUNCTION_TIME_PARAM + CUSTOM_FUNCTION_ENABLE;
}
@@ -526,9 +520,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
fswtchRepeat[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_REPEAT);
fswtchGVmode[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_GV_MODE);
fswtchBLcolor[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_BL_COLOR);
#ifdef PHONON
playBT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_PLAY);
#endif
}
void CustomFunctionsPanel::update()
@@ -677,12 +669,6 @@ void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, uint function, unsi
case 2:
populateSourceCB(b, RawSource(value), generalSettings, model, POPULATE_GVARS);
break;
case 3:
b->clear();
b->addItem("-1", 0);
b->addItem("+1", 1);
b->setCurrentIndex(value);
break;
}
}
else {
+7 -21
View File
@@ -3,24 +3,14 @@
#include "modeledit.h"
#include "eeprominterface.h"
#include <QLabel>
#include <QCheckBox>
#include <QComboBox>
#include <QDoubleSpinBox>
#include <QPushButton>
#include <QTimeEdit>
#ifdef PHONON
#include <phonon/audiooutput.h>
#include <phonon/mediaobject.h>
#include <phonon/mediasource.h>
#endif
#include <QtMultimedia>
class RepeatComboBox: public QComboBox
{
Q_OBJECT
public:
RepeatComboBox(QWidget *parent, int & repeatParam);
RepeatComboBox(QWidget * parent, int & repeatParam);
void update();
signals:
@@ -35,7 +25,7 @@ class RepeatComboBox: public QComboBox
class CustomFunctionsPanel : public GenericPanel
{
Q_OBJECT
Q_OBJECT
public:
CustomFunctionsPanel(QWidget *parent, ModelData * mode, GeneralSettings & generalSettings, Firmware * firmware);
@@ -52,10 +42,9 @@ class CustomFunctionsPanel : public GenericPanel
void fsw_customContextMenuRequested(QPoint pos);
void refreshCustomFunction(int index, bool modified=false);
void onChildModified();
#ifdef PHONON
void playMusic();
void mediaPlayer_state(Phonon::State newState, Phonon::State oldState);
#endif
void onMediaPlayerStateChanged(QMediaPlayer::State state);
void onMediaPlayerError(QMediaPlayer::Error error);
void fswDelete();
void fswCopy();
void fswPaste();
@@ -68,7 +57,7 @@ class CustomFunctionsPanel : public GenericPanel
QSet<QString> tracksSet;
QSet<QString> scriptsSet;
int phononCurrent;
int mediaPlayerCurrent;
QComboBox * fswtchSwtch[C9X_MAX_CUSTOM_FUNCTIONS];
QComboBox * fswtchFunc[C9X_MAX_CUSTOM_FUNCTIONS];
QCheckBox * fswtchParamGV[C9X_MAX_CUSTOM_FUNCTIONS];
@@ -81,10 +70,7 @@ class CustomFunctionsPanel : public GenericPanel
RepeatComboBox * fswtchRepeat[C9X_MAX_CUSTOM_FUNCTIONS];
QComboBox * fswtchGVmode[C9X_MAX_CUSTOM_FUNCTIONS];
QSlider * fswtchBLcolor[C9X_MAX_CUSTOM_FUNCTIONS];
#ifdef PHONON
Phonon::MediaObject *clickObject;
Phonon::AudioOutput *clickOutput;
#endif
QMediaPlayer * mediaPlayer;
int selectedFunction;
+5 -5
View File
@@ -21,11 +21,11 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
QRegExp rx(CHAR_FOR_NAMES_REGEX);
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, -100, 100);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, ed->offset, 0, -100, 100);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, model, 100, -100, 100);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, ed->offset, model, 0, -100, 100);
}
else {
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, 0, 100);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, model, 100, 0, 100);
gvOffsetGroup = NULL;
ui->offsetLabel->hide();
ui->offsetGV->hide();
@@ -33,7 +33,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
ui->offsetCB->hide();
}
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve,
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve, model,
firmware->getCapability(HasInputDiff) ? 0 : (HIDE_DIFF | HIDE_NEGATIVE_CURVES));
populateSwitchCB(ui->switchesCB, ed->swtch, generalSettings, MixesContext);
@@ -154,7 +154,7 @@ void ExpoDialog::valuesChanged()
ed->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt());
ed->mode = ui->sideCB->currentIndex() + 1;
strcpy(ed->name, ui->lineName->text().toAscii().data());
strcpy(ed->name, ui->lineName->text().toLatin1().data());
if (firmware->getCapability(VirtualInputs)) {
inputName = ui->inputName->text();
}
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef EXPODIALOG_H
#define EXPODIALOG_H
#include <QDialog>
#include <QtWidgets>
#include "eeprominterface.h"
#include "modelprinter.h"
+52 -25
View File
@@ -1,9 +1,6 @@
#include "flightmodes.h"
#include "ui_flightmode.h"
// #include "firmwares/opentx/opentxeeprom.h" // TODO shouldn't be there
#include "helpers.h"
#include <QComboBox>
#include <QGridLayout>
FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseIdx, GeneralSettings & generalSettings, Firmware * firmware):
ModelPanel(parent, model, generalSettings, firmware),
@@ -110,14 +107,14 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
reLayout->addWidget(label, i, 0, 1, 1);
if (phaseIdx > 0) {
// RE link to another RE
QComboBox *link = new QComboBox(ui->gvGB);
link->setProperty("index", i);
populateGvarUseCB(link, phaseIdx);
connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int)));
reUse[i] = new QComboBox(ui->reGB);
reUse[i]->setProperty("index", i);
populateGvarUseCB(reUse[i], phaseIdx);
if (phase.rotaryEncoders[i] > 1024) {
link->setCurrentIndex(phase.rotaryEncoders[i] - 1024);
reUse[i]->setCurrentIndex(phase.rotaryEncoders[i] - 1024);
}
reLayout->addWidget(link, i, 1, 1, 1);
connect(reUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int)));
reLayout->addWidget(reUse[i], i, 1, 1, 1);
}
// RE value
reValues[i] = new QSpinBox(ui->reGB);
@@ -152,14 +149,14 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
}
if (phaseIdx > 0) {
// GVar link to another GVar
QComboBox *link = new QComboBox(ui->gvGB);
link->setProperty("index", i);
populateGvarUseCB(link, phaseIdx);
gvUse[i] = new QComboBox(ui->gvGB);
gvUse[i]->setProperty("index", i);
populateGvarUseCB(gvUse[i], phaseIdx);
if (phase.gvars[i] > 1024) {
link->setCurrentIndex(phase.gvars[i] - 1024);
gvUse[i]->setCurrentIndex(phase.gvars[i] - 1024);
}
connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int)));
gvLayout->addWidget(link, i, col++, 1, 1);
connect(gvUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int)));
gvLayout->addWidget(gvUse[i], i, col++, 1, 1);
}
// GVar value
gvValues[i] = new QSpinBox(ui->gvGB);
@@ -220,7 +217,7 @@ void FlightModePanel::update()
gvNames[i]->setText(model->gvars_names[i]);
}
gvValues[i]->setDisabled(model->isGVarLinked(phaseIdx, i));
gvValues[i]->setValue(model->getGVarValue(phaseIdx, i));
gvValues[i]->setValue(model->getGVarFieldValue(phaseIdx, i));
if (IS_TARANIS(GetEepromInterface()->getBoard()) && phaseIdx == 0) {
gvPopups[i]->setChecked(model->gvars_popups[i]);
}
@@ -232,8 +229,9 @@ void FlightModePanel::update()
int idx = phase.rotaryEncoders[i];
FlightModeData *phasere = &phase;
while (idx > 1024) {
idx -= 1025;
phasere = &model->flightModeData[idx];
int nextPhase = idx - 1025;
if (nextPhase >= phaseIdx) nextPhase += 1;
phasere = &model->flightModeData[nextPhase];
idx = phasere->rotaryEncoders[i];
reValues[i]->setDisabled(true);
}
@@ -244,16 +242,18 @@ void FlightModePanel::update()
void FlightModePanel::phaseName_editingFinished()
{
QLineEdit *lineEdit = qobject_cast<QLineEdit*>(sender());
strcpy(phase.name, lineEdit->text().toAscii());
strcpy(phase.name, lineEdit->text().toLatin1());
emit modified();
emit nameModified();
}
void FlightModePanel::phaseSwitch_currentIndexChanged(int index)
{
if (!lock) {
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
phase.swtch = RawSwitch(comboBox->itemData(index).toInt());
emit modified();
}
}
void FlightModePanel::phaseFadeIn_editingFinished()
@@ -290,8 +290,14 @@ void FlightModePanel::trimUpdate(unsigned int trim)
trimsUse[trim]->setCurrentIndex(1 + 2*phase.trimRef[chn] + phase.trimMode[chn] - (phase.trimRef[chn] > phaseIdx ? 1 : 0));
else
trimsUse[trim]->setCurrentIndex(phase.trimRef[chn]);
trimsValue[trim]->setEnabled(true);
trimsSlider[trim]->setEnabled(true);
if (phaseIdx == 0 || phase.trimRef[chn] == phaseIdx || (IS_TARANIS(board) && phase.trimMode[chn] != 0)) {
trimsValue[trim]->setEnabled(true);
trimsSlider[trim]->setEnabled(true);
}
else {
trimsValue[trim]->setEnabled(false);
trimsSlider[trim]->setEnabled(false);
}
}
lock = false;
}
@@ -312,7 +318,7 @@ void FlightModePanel::GVName_editingFinished()
QLineEdit *lineedit = qobject_cast<QLineEdit*>(sender());
int gvar = lineedit->property("index").toInt();
memset(&model->gvars_names[gvar], 0, sizeof(model->gvars_names[gvar]));
strcpy(model->gvars_names[gvar], lineedit->text().toAscii());
strcpy(model->gvars_names[gvar], lineedit->text().toLatin1());
emit modified();
}
}
@@ -340,6 +346,7 @@ void FlightModePanel::phaseGVPopupToggled(bool checked)
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
int gvar = cb->property("index").toInt();
model->gvars_popups[gvar] = checked;
emit modified();
}
void FlightModePanel::phaseREValue_editingFinished()
@@ -442,9 +449,29 @@ void FlightModePanel::fmClear()
{
int res = QMessageBox::question(this, "Companion", tr("Clear all current Flight Mode properties?"), QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::Yes) {
phase.clear();
for(int i=0; i < 4; ++i) {
model->setTrimValue(phaseIdx, i, 0);
phase.clear(phaseIdx);
if (phaseIdx == 0) {
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
for (int i=0; i < gvCount; ++i) {
memset(&model->gvars_names[i], 0, sizeof(model->gvars_names[i]));
model->gvars_popups[i] = 0;
}
}
}
else {
lock = true;
QComboBox * pswtch = ui->swtch;
RawSwitch item = RawSwitch(SWITCH_TYPE_NONE);
pswtch->setCurrentIndex(pswtch->findText(item.toString()));
if (gvCount > 0 && (firmware->getCapability(GvarsFlightModes))) {
for (int i=0; i<gvCount; i++) {
gvUse[i]->setCurrentIndex((phase.gvars[i] > 1024 ? (phase.gvars[i] - 1024) : 0));
}
}
for (int i=0; i<reCount; i++) {
reUse[i]->setCurrentIndex((phase.rotaryEncoders[i] > 1024 ? (phase.rotaryEncoders[i] - 1024) : 0));
}
lock = false;
}
update();
emit modified();
+2 -6
View File
@@ -3,12 +3,6 @@
#include "modeledit.h"
#include "eeprominterface.h"
#include <QVector>
#include <QLabel>
#include <QTabWidget>
#include <QSpinBox>
#include <QComboBox>
#include <QCheckBox>
namespace Ui {
class FlightMode;
@@ -54,7 +48,9 @@ class FlightModePanel : public ModelPanel
QLineEdit * gvNames[C9X_MAX_GVARS];
QSpinBox * gvValues[C9X_MAX_GVARS];
QCheckBox * gvPopups[C9X_MAX_GVARS];
QComboBox * gvUse[C9X_MAX_GVARS];
QSpinBox * reValues[C9X_MAX_ENCODERS];
QComboBox * reUse[C9X_MAX_ENCODERS];
QVector<QComboBox *> trimsUse;
QVector<QSpinBox *> trimsValue;
QVector<QSlider *> trimsSlider;
+7 -9
View File
@@ -1,5 +1,4 @@
#include "inputs.h"
#include <QMessageBox>
#include "expodialog.h"
#include "helpers.h"
@@ -199,7 +198,7 @@ void InputsPanel::gm_openExpo(int index)
if (g->exec()) {
model->expoData[index] = mixd;
if (firmware->getCapability(VirtualInputs))
strncpy(model->inputNames[mixd.chn], inputName.toAscii().data(), 4);
strncpy(model->inputNames[mixd.chn], inputName.toLatin1().data(), 4);
emit modified();
update();
}
@@ -288,8 +287,6 @@ void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropActi
pasteExpoMimeData(data, idx);
}
#include <iostream>
#include <QtGui/qwidget.h>
void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx)
{
if (mimeData->hasFormat("application/x-companion-expo")) {
@@ -325,11 +322,12 @@ void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx)
void InputsPanel::exposPaste()
{
const QClipboard *clipboard = QApplication::clipboard();
const QMimeData *mimeData = clipboard->mimeData();
QListWidgetItem *item = ExposlistWidget->currentItem();
if (item)
pasteExpoMimeData(mimeData, item->data(Qt::UserRole).toByteArray().at(0));
const QClipboard *clipboard = QApplication::clipboard();
const QMimeData *mimeData = clipboard->mimeData();
QListWidgetItem *item = ExposlistWidget->currentItem();
if (item) {
pasteExpoMimeData(mimeData, item->data(Qt::UserRole).toByteArray().at(0));
}
}
void InputsPanel::exposDuplicate()
@@ -1,10 +1,4 @@
#include "logicalswitches.h"
#include <QLabel>
#include <QLineEdit>
#include <QSpinBox>
#include <QComboBox>
#include <QCheckBox>
#include <QDoubleSpinBox>
#include "helpers.h"
LogicalSwitchesPanel::LogicalSwitchesPanel(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware):
@@ -3,9 +3,6 @@
#include "modeledit.h"
#include "eeprominterface.h"
#include <QComboBox>
#include <QDoubleSpinBox>
#include <QTimeEdit>
class LogicalSwitchesPanel : public ModelPanel
{
+4 -5
View File
@@ -25,10 +25,10 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
int limit = firmware->getCapability(OffsetWeight);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, 100, -limit, limit);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, 0, -limit, limit);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, model, 100, -limit, limit);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, model, 0, -limit, limit);
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB,
md->curve, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
md->curve, model, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
ui->MixDR_CB->setChecked(md->noExpo == 0);
@@ -159,8 +159,7 @@ void MixerDialog::valuesChanged()
md->delayUp = round(ui->delayUpSB->value()*scale);
md->speedDown = round(ui->slowDownSB->value()*scale);
md->speedUp = round(ui->slowUpSB->value()*scale);
strcpy(md->name, ui->mixerName->text().toAscii());
strcpy(md->name, ui->mixerName->text().toLatin1());
md->flightModes = 0;
for (int i=8; i>=0 ; i--) {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef MIXERDIALOG_H
#define MIXERDIALOG_H
#include <QDialog>
#include <QtWidgets>
#include "eeprominterface.h"
class GVarGroup;
+1 -2
View File
@@ -1,8 +1,7 @@
#ifndef MIXERSLIST_H
#define MIXERSLIST_H
#include <QtGui>
#include <QtWidgets>
#define MIX_ROW_HEIGHT_INCREASE 8 //how much space is added above mixer row (for new channel), if 0 space adding is disabled
const int GroupHeaderRole = (Qt::UserRole+2); //defines new user role for list items. If value is > 0, then space is added before that item
-2
View File
@@ -1,7 +1,5 @@
#include "mixes.h"
#include "helpers.h"
// #include <QMessageBox>
// #include "expodialog.h"
MixesPanel::MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware):
ModelPanel(parent, model, generalSettings, firmware),
-1
View File
@@ -13,7 +13,6 @@
#include "customfunctions.h"
#include "telemetry.h"
#include "appdata.h"
#include <QScrollArea>
ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, Firmware * firmware) :
QDialog(parent),
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef MODELEDIT_H
#define MODELEDIT_H
#include <QDialog>
#include <QtWidgets>
#include "genericpanel.h"
class RadioData;
+2 -2
View File
@@ -82,7 +82,7 @@ void Node::stepToCenter(qreal step)
if(centerX)
{
qreal x = qr.right() - qr.width()/2;
if(abs(x-p.x())>xStep)
if(fabs(x-p.x())>xStep)
p.rx() += p.x()>x ? -xStep : xStep;
else
p.rx() = x;
@@ -91,7 +91,7 @@ void Node::stepToCenter(qreal step)
if(centerY)
{
qreal y = qr.bottom() - qr.height()/2;
if(abs(y-p.y())>yStep)
if(fabs(y-p.y())>yStep)
p.ry() += p.y()>y ? -yStep : yStep;
else
p.ry() = y;
+1 -1
View File
@@ -42,7 +42,7 @@
#ifndef NODE_H
#define NODE_H
#include <QtGui>
#include <QtWidgets>
#define DEFAULT_BALL_SIZE 10
#define BALL_HEIGHT 2
+90 -17
View File
@@ -42,6 +42,8 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
ui->countdownBeep->addItem(tr("Voice"), TimerData::COUNTDOWN_VOICE);
ui->countdownBeep->addItem(tr("Haptic"), TimerData::COUNTDOWN_HAPTIC);
}
ui->value->setMaximumTime(firmware->getMaxTimerStart());
ui->persistent->setField(timer.persistent, this);
ui->persistent->addItem(tr("Not persistent"), 0);
@@ -66,9 +68,11 @@ TimerPanel::~TimerPanel()
void TimerPanel::update()
{
int min = timer.val / 60;
int sec = timer.val % 60;
ui->value->setTime(QTime(0, min, sec));
int hour = timer.val / 3600;
int min = (timer.val - (hour * 3600)) / 60;
int sec = (timer.val - (hour * 3600)) % 60;
ui->value->setTime(QTime(hour, min, sec));
if (firmware->getCapability(PermTimers)) {
int sign = 1;
@@ -94,7 +98,7 @@ QWidget * TimerPanel::getLastFocus()
void TimerPanel::on_value_editingFinished()
{
timer.val = ui->value->time().minute()*60 + ui->value->time().second();
timer.val = ui->value->time().hour()*3600 + ui->value->time().minute()*60 + ui->value->time().second();
emit modified();
}
@@ -115,7 +119,7 @@ void TimerPanel::on_minuteBeep_toggled(bool checked)
void TimerPanel::on_name_editingFinished()
{
int length = ui->name->maxLength();
strncpy(timer.name, ui->name->text().toAscii(), length);
strncpy(timer.name, ui->name->text().toLatin1(), length);
emit modified();
}
@@ -177,6 +181,11 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module
}
}
for (int i=0; i<=MM_RF_PROTO_LAST; i++)
{
ui->multiProtocol->addItem(ModelPrinter::printMultiRfProtocol(i), (QVariant) i);
}
if (firmware->getCapability(HasFailsafe)) {
for (int i=0; i<maxChannels; i++) {
QLabel * label = new QLabel(this);
@@ -222,6 +231,7 @@ ModulePanel::~ModulePanel()
#define MASK_PPM_FIELDS 16
#define MASK_FAILSAFES 32
#define MASK_OPEN_DRAIN 64
#define MASK_MULTIMODULE 128
void ModulePanel::update()
{
@@ -257,6 +267,9 @@ void ModulePanel::update()
mask |= MASK_OPEN_DRAIN;
}
break;
case PULSES_MULTIMODULE:
mask |= MASK_CHANNELS_RANGE | MASK_RX_NUMBER | MASK_MULTIMODULE;
break;
case PULSES_OFF:
default:
break;
@@ -289,18 +302,44 @@ void ModulePanel::update()
// PPM settings fields
ui->label_ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmPolarity->setCurrentIndex(module.ppmPulsePol);
ui->ppmPolarity->setCurrentIndex(module.ppm.pulsePol);
ui->label_ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
ui->ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
ui->ppmOutputType->setCurrentIndex(module.ppmOutputType);
ui->ppmOutputType->setCurrentIndex(module.ppm.outputType);
ui->label_ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmDelay->setValue(module.ppmDelay);
ui->ppmDelay->setValue(module.ppm.delay);
ui->label_ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmFrameLength->setMinimum(module.channelsCount*(model->extendedLimits ? 2.250 : 2)+3.5);
ui->ppmFrameLength->setMaximum(firmware->getCapability(PPMFrameLength));
ui->ppmFrameLength->setValue(22.5+((double)module.ppmFrameLength)*0.5);
ui->ppmFrameLength->setValue(22.5+((double)module.ppm.frameLength)*0.5);
// Multi settings fields
ui->label_multiProtocol->setVisible(mask & MASK_MULTIMODULE);
ui->multiProtocol->setVisible(mask & MASK_MULTIMODULE);
ui->multiProtocol->setCurrentIndex(module.getMultiRfProtocol());
ui->label_multiSubType->setVisible(mask & MASK_MULTIMODULE);
ui->multiSubType->setVisible(mask & MASK_MULTIMODULE);
if (mask & MASK_MULTIMODULE) {
int numEntries = getNumSubtypes(static_cast<MultiModuleRFProtocols>(module.getMultiRfProtocol()));
// Removes extra items
ui->multiSubType->setMaxCount(numEntries);
for (int i=0; i < numEntries; i++) {
if (i < ui->multiSubType->count())
ui->multiSubType->setItemText(i, ModelPrinter::printMultiSubType(module.getMultiRfProtocol(), i));
else
ui->multiSubType->addItem(ModelPrinter::printMultiSubType(module.getMultiRfProtocol(), i), (QVariant) i);
}
}
ui->multiSubType->setCurrentIndex(module.subType);
ui->cb_autoBind->setVisible(mask & MASK_MULTIMODULE);
ui->cb_autoBind->setChecked(module.multi.autoBindMode ? Qt::Checked : Qt::Unchecked);
ui->cb_lowPower->setVisible(mask & MASK_MULTIMODULE);
ui->cb_lowPower->setChecked(module.multi.lowPowerMode ? Qt::Checked : Qt::Unchecked);
if (firmware->getCapability(HasFailsafe)) {
ui->label_failsafeMode->setVisible(mask & MASK_FAILSAFES);
@@ -327,8 +366,8 @@ void ModulePanel::update()
ui->failsafesFrame->setVisible(mask & MASK_FAILSAFES);
if (mask & MASK_CHANNELS_RANGE) {
ui->channelsStart->setMaximum(32 - ui->channelsCount->value());
ui->channelsCount->setMaximum(qMin(16, 32-ui->channelsStart->value()));
ui->channelsStart->setMaximum(33 - ui->channelsCount->value());
ui->channelsCount->setMaximum(qMin(16, 33-ui->channelsStart->value()));
}
}
@@ -352,13 +391,13 @@ void ModulePanel::on_protocol_currentIndexChanged(int index)
void ModulePanel::on_ppmPolarity_currentIndexChanged(int index)
{
module.ppmPulsePol = index;
module.ppm.pulsePol = index;
emit modified();
}
void ModulePanel::on_ppmOutputType_currentIndexChanged(int index)
{
module.ppmOutputType = index;
module.ppm.outputType = index;
emit modified();
}
@@ -384,7 +423,7 @@ void ModulePanel::on_ppmDelay_editingFinished()
{
if (!lock) {
// TODO only accept valid values
module.ppmDelay = ui->ppmDelay->value();
module.ppm.delay = ui->ppmDelay->value();
emit modified();
}
}
@@ -397,7 +436,7 @@ void ModulePanel::on_rxNumber_editingFinished()
void ModulePanel::on_ppmFrameLength_editingFinished()
{
module.ppmFrameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
module.ppm.frameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
emit modified();
}
@@ -431,6 +470,39 @@ void ModulePanel::onFailsafeComboIndexChanged(int index)
}
}
void ModulePanel::on_multiProtocol_currentIndexChanged(int index)
{
if (!lock) {
lock=true;
module.setMultiRfProtocol(index);
unsigned int maxSubTypes = getNumSubtypes(static_cast<MultiModuleRFProtocols>(index));
module.subType = std::min(module.subType, maxSubTypes -1);
update();
emit modified();
lock = false;
}
}
void ModulePanel::on_multiSubType_currentIndexChanged(int index)
{
if (!lock) {
lock=true;
module.subType = index;
update();
emit modified();
lock = false;
}
}
void ModulePanel::on_autoBind_stateChanged(int state)
{
module.multi.autoBindMode = (state == Qt::Checked);
}
void ModulePanel::on_lowPower_stateChanged(int state)
{
module.multi.lowPowerMode = (state == Qt::Checked);
}
void ModulePanel::updateFailsafe(int channel)
{
int failsafeValue = module.failsafeChannels[channel];
@@ -728,14 +800,14 @@ void SetupPanel::on_throttleSource_currentIndexChanged(int index)
void SetupPanel::on_name_editingFinished()
{
int length = ui->name->maxLength();
strncpy(model->name, ui->name->text().toAscii(), length);
strncpy(model->name, ui->name->text().toLatin1(), length);
emit modified();
}
void SetupPanel::on_image_currentIndexChanged(int index)
{
if (!lock) {
strncpy(model->bitmap, ui->image->currentText().toAscii(), 10);
strncpy(model->bitmap, ui->image->currentText().toLatin1(), 10);
QString path = g.profile[g.id()].sdPath();
path.append("/BMP/");
QDir qd(path);
@@ -774,6 +846,7 @@ void SetupPanel::populateThrottleSourceCB()
lock = true;
ui->throttleSource->clear();
ui->throttleSource->addItem(QObject::tr("THR"));
if (IS_TARANIS_X9E(GetEepromInterface()->getBoard())) {

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