Compare commits

...

1793 Commits

Author SHA1 Message Date
Bertrand Songis 65c9ae6bfd Merge pull request #2846 from opentx/MicheleVilla/FW_IT_Translations
Update it.h.txt
2015-09-07 22:29:12 +02:00
Andre Bernet 5188645313 Remove duplicate option 2015-09-07 22:28:29 +02:00
Michele 2260cde321 Update it.h.txt 2015-09-07 22:20:24 +02:00
Andre Bernet f76f7a6ad4 Companion translations 2015-09-07 22:11:07 +02:00
Andre Bernet 33c694f5a3 Release notes updated 2015-09-07 22:06:51 +02:00
Bertrand Songis a8890b11e0 [Companion] CLI option added 2015-09-07 21:54:07 +02:00
Bertrand Songis c8525b311f Fixes #2844 2015-09-07 21:46:12 +02:00
Bertrand Songis 99d3afbe1a Warning removed 2015-09-07 21:46:12 +02:00
Andre Bernet 1f1a88a06c Release notes updated 2015-09-07 21:06:29 +02:00
Andre Bernet bf6b5cc389 Release notes updated 2015-09-07 20:56:41 +02:00
Bertrand Songis 9967aab3dd Update DONATIONS.txt 2015-09-06 23:02:53 +02:00
mhotar 2fef5f3e78 CZ translation 2015-09-06 22:46:10 +02:00
Bertrand Songis d3edecb133 Merge pull request #2842 from opentx/driver33/PL_TR
Fixes in traslations
2015-09-06 21:04:52 +02:00
driver33 6ecf4ec6a0 Fixes in traslations 2015-09-06 20:58:07 +02:00
mhotar 57bc32edf5 Logo added to the lib 2015-09-06 20:56:23 +02:00
mhotar 5beeb208be CZ translation 2015-09-06 20:33:05 +02:00
Andre Bernet 2bf3f80364 Merge pull request #2834 from opentx/jtaylor2/issue_-2762
Telemetry simulator improvements (fix #2762)
2015-09-06 19:42:03 +02:00
Andre Bernet 3c0ed1350a Remove obsolete code 2015-09-06 19:34:56 +02:00
Bertrand Songis 2625e05953 Merge pull request #2841 from opentx/kilrah/ar9x
Support for AR9X board
2015-09-06 19:27:18 +02:00
Andre Bernet 461d994dea Cosmetics 2015-09-06 18:15:37 +02:00
Andre Bernet c2ee6d2eaf Disable volume/rtc options for now, not implemented yet 2015-09-06 16:51:02 +02:00
Bertrand Songis ebad326256 [9X] Model not stored on EEPROM upon creation
When TEMPLATES option disabled...
2015-09-06 16:39:16 +02:00
Bertrand Songis 3dc47f39ea Update DONATIONS.txt 2015-09-06 16:27:43 +02:00
Bertrand Songis aaacfb0888 [9XR-PRO] Navigation problem in Modelsel screen 2015-09-06 16:26:52 +02:00
Andre Bernet 45d22c83d4 AR9X simu added 2015-09-06 16:03:08 +02:00
Andre Bernet 45801a89ea Merge branch 'master' into kilrah/ar9x 2015-09-06 14:47:26 +02:00
Bertrand Songis 1a1f175ac1 Bars display problem on 9XR-PRO 2015-09-06 13:41:25 +02:00
Bertrand Songis 922ff5622f Merge pull request #2840 from opentx/driver33/polish_translation_2.1.x
Translation fixes for new features in 2.1.2
2015-09-06 13:25:54 +02:00
driver33 b4a8caba1c Translation fixes for new features in 2.1.2 2015-09-06 12:57:47 +02:00
Andre Bernet bab02ce9f7 French translations 2015-09-06 12:54:54 +02:00
Andre Bernet 3a09fb3777 NL translations (fix #2839) 2015-09-06 12:45:26 +02:00
Andre Bernet 7caa7f8144 French translations 2015-09-06 12:31:19 +02:00
Andre Bernet 1d9e2b7ad0 Merge remote-tracking branch 'origin/bsongis/refactoring_putsSwitches' 2015-09-06 12:16:58 +02:00
Andre Bernet 2a3e690373 Merge branch 'issue2780' 2015-09-06 12:14:42 +02:00
Andre Bernet 3f48f28079 Merge remote-tracking branch 'origin/bsongis/issue2418_better_fix' 2015-09-06 12:09:48 +02:00
Bertrand Songis 9083b1f35c Fixes #2805 2015-09-06 12:00:58 +02:00
Bertrand Songis a18ff7b502 Fixes #2800 2015-09-06 12:00:30 +02:00
Andre Bernet 0460b892d8 Companion translations updated for translators without build environment 2015-09-06 11:44:59 +02:00
Andre Bernet 4b9fcdaf9f Merge pull request #2832 from opentx/bsongis/#2810_reject_new_sensors
Fixes #2810 - Reject new sensor option
Fixes #2730 - Delete all sensors
2015-09-06 11:25:32 +02:00
Andre Bernet 91bd3f0cdb Delete all sensors (fix #2730) 2015-09-06 11:24:10 +02:00
Andre Bernet c96f8aef36 Translations weren't updated 2015-09-06 10:50:05 +02:00
Bertrand Songis bd48c4770b #2635 - Missing strings 2015-09-05 22:08:03 +02:00
Bertrand Songis 0a616cee36 Merge pull request #2751 from opentx/bsongis/issue2635_timer_haptic_countdown
Fixes #2635 - Not tested yet
2015-09-05 20:33:54 +02:00
Bertrand Songis b8923b1411 Merge pull request #2831 from opentx/bsongis/arm_tasks_refactoring
Bsongis/arm tasks refactoring
2015-09-05 20:29:20 +02:00
Bertrand Songis 57e26f4b5e Automatic tests fix 2015-09-05 14:34:34 +02:00
Bertrand Songis ffd49691f5 #2810 - Other possibility (no EEPROM change, discover button added) 2015-09-05 13:36:58 +02:00
Bertrand Songis f956563444 Merge pull request #2829 from tmrttmrt/tmrtmrt/Fixes#2825_MEGA_2560_audio_output_not_working
tmrtmrt/Fixes#2825_MEGA_2560_audio_output_not_working
2015-09-05 11:53:50 +02:00
Bertrand Songis b54123f8a3 Fixes #2810 - Reject new sensor option 2015-09-05 11:44:26 +02:00
Bertrand Songis 976c01051d Compilation fix 2015-09-05 11:37:09 +02:00
Bertrand Songis d14931f77f [ARM] Tasks stack class created
New taskinfo command added to the CLI. CLI stack size increased as it
was too short for the ls command (the CLI did hang!)
2015-09-05 11:10:18 +02:00
Bertrand Songis 2a2650376c Cosmetics 2015-09-04 18:23:54 +02:00
Bertrand Songis 17302fb6e0 [Companion] Current calibration masked on Taranis 2015-09-04 18:21:47 +02:00
jtaylor2 54cc9e0545 Cosmetic, fix line indent. 2015-09-04 06:18:46 -04:00
Bertrand Songis ff2c2d41ad Update DONATIONS.txt 2015-09-04 06:35:30 +02:00
jtaylor2 db6a68e8ed Remove printf left over from testing and correct spacing. 2015-09-03 19:03:34 -04:00
jtaylor2 967ac584a4 Add ability to set sensor instance to telemetry simulator so that it can send data to existing sensors (D sensors with instance 25).
Add default sensor values to RSSI, SWR, A1, A2, RXBat so that
alarms set with LS/SF don't constantly alarm.
2015-09-03 18:02:51 -04:00
Bertrand Songis 50b080cf61 Update DONATIONS.txt 2015-09-03 22:05:12 +02:00
Tomaz Mertelj a975d40ceb tmrtmrt/Fixes#2825_MEGA_2560_audio_output_not_working 2015-09-03 20:50:38 +02:00
David S. Beach e1b1342655 using pre-allocated table space via lua_createtable() for GPS, DATETIME, and CELLS 2015-09-03 14:41:18 -04:00
Damjan Adamic 4acebc3186 Fixes #2815: some languages were not completelly disabled and caused Companion crash 2015-09-03 12:50:35 +02:00
Damjan Adamic bd206cbbd2 Readme updated 2015-09-03 12:23:35 +02:00
Bertrand Songis c846cc582a Missing bits on 9XRPRO 2015-09-02 21:57:29 +02:00
Bertrand Songis be7b4e5064 Warning removed 2015-09-02 21:05:24 +02:00
David S. Beach 61b701f930 uncommented call to isAvailable() that was used for testing 2015-09-02 14:09:50 -04:00
David S. Beach 8b83911017 Added getValue() support for UNIT_DATETIME and UNIT_CELLS 2015-09-02 13:52:25 -04:00
Bertrand Songis 2274e6395d Issue #2806 fix start 2015-09-02 19:32:41 +02:00
Bertrand Songis f7c9da6826 Fixes #2809 2015-09-02 18:12:38 +02:00
mhotar bf6c6ac0c4 CZ translations 2015-09-01 21:18:41 +02:00
Bertrand Songis 405d83b539 Compilation fix 2015-09-01 19:38:48 +02:00
Bertrand Songis 362e7c67db Cosmetics 2015-09-01 19:35:30 +02:00
Bertrand Songis 29e2ce7bd1 Fixes #2754 2015-09-01 19:24:46 +02:00
Bertrand Songis a985d021b6 Fixes #2754 2015-09-01 18:55:44 +02:00
Bertrand Songis c907c20705 Compilation fix for Visual Studio 2015-09-01 07:29:07 +02:00
Bertrand Songis 5b4d9cd7d7 Missing #ifdef 2015-08-31 23:24:59 +02:00
Bertrand Songis 6ae59ab67c Update DONATIONS.txt 2015-08-31 21:54:07 +02:00
Bertrand Songis 6374f52585 Fixes #2418 2015-08-31 21:37:41 +02:00
Bertrand Songis 398d32821e Refactoring putsSwitches
Will simplify things when we have 64 logical switches ...
2015-08-31 20:48:32 +02:00
Damjan Adamic 771206e1b2 Merge pull request #2696 from opentx/bsongis/issue2595_cli
Fixes #2595 and #2598: USB serial port and CLI added
2015-08-31 11:06:04 +02:00
Damjan Adamic c47a43e5ce Re #2595: buffer full check got stuck (volatile was missing) 2015-08-31 10:47:28 +02:00
Damjan Adamic 62edfbb651 Merge pull request #2814 from opentx/driver33/PL_TR
Fix Polish gramar error on thousands
2015-08-30 22:04:33 +02:00
driver33 b17f697f69 Sound gramar fixes 2015-08-30 21:56:02 +02:00
driver33 8b00509cb2 Sound gramar fixes 2015-08-30 21:49:06 +02:00
Damjan Adamic ac9e9665dc Merge pull request #2813 from opentx/projectkk2glider/issue_2808_multiplex_format
Fixes #2808: Mixes multiplex representation now the same as on the radio
2015-08-30 21:39:05 +02:00
Damjan Adamic 89bb1226ac Fixes #2808: Mixes multiplex representation now the same as on the radio 2015-08-30 21:35:53 +02:00
Damjan Adamic 94cc359c9f Release notes fixed 2015-08-30 21:10:04 +02:00
Damjan Adamic 8999839538 Fixes #2807: Telemetry sensor names were not displayed 2015-08-30 21:09:35 +02:00
Damjan Adamic 09b2cd7b46 Release notes updated 2015-08-30 20:49:24 +02:00
Damjan Adamic 4b1bd9bfd5 Utility to convert issue numbers into changelog strings 2015-08-30 20:49:03 +02:00
Bertrand Songis 468b5520bd Update DONATIONS.txt 2015-08-30 19:52:08 +02:00
Damjan Adamic c0dee366c0 Merge pull request #2773 from dsbeach/issue2758
Fixes #2758: added Lua support for Latitude and Longitude
2015-08-30 17:15:55 +02:00
Damjan Adamic c767ed7159 Fixes #2811: Anomaly in Dutch Translation 2015-08-30 16:01:18 +02:00
Bertrand Songis 10e72cc214 Compilation fix 2015-08-29 09:49:27 +02:00
Bertrand Songis 7e6e709031 Merge pull request #2802 from opentx/driver33/PL_TR
fixes
2015-08-29 09:44:05 +02:00
driver33 a2514545f4 fixes 2015-08-29 00:14:00 +02:00
Bertrand Songis 57e8fc1cb1 Update DONATIONS.txt 2015-08-28 21:41:47 +02:00
Bertrand Songis 6d0d0f9b0b Merge pull request #2801 from opentx/projectkk2glider/issue_2790_power_loop
Fixes #2790: power on/off lop if big VCC capcitor was used
2015-08-28 21:34:47 +02:00
Andre Bernet 88aea7f780 Fix #2738 2015-08-28 19:25:48 +02:00
Damjan Adamic e4f7fd910c Fixes #2790: power on/off lop if big VCC capcitor was used 2015-08-28 18:07:24 +02:00
Andre Bernet 7befb457f2 Improve mixer screen layout (fix #2785) 2015-08-28 15:58:53 +02:00
Andre Bernet c22784d5a4 Fix #2796 2015-08-28 15:35:59 +02:00
Bertrand Songis 404cab2548 Bootloader compilation fix 2015-08-28 14:58:44 +02:00
Bertrand Songis ef56bf3cb4 New type swsrc_t introduced 2015-08-28 14:47:07 +02:00
Andre Bernet 3920cc6919 Fix #2794
French translations
2015-08-28 12:49:40 +02:00
Damjan Adamic 5a049857f5 Fixes #2798: Dutch translations fixed 2015-08-28 10:23:04 +02:00
Bertrand Songis 97a9c91baf Cosmetics 2015-08-28 09:53:33 +02:00
Bertrand Songis 55b5acb62e Constants renamed 2015-08-28 09:19:02 +02:00
Andre Bernet 34f7c3a463 Fix #2787 2015-08-27 23:00:02 +02:00
Andre Bernet 3002c0a478 Cosmetics 2015-08-27 22:12:54 +02:00
Andre Bernet 433983e2ca Should solve #2787, but doesn't... 2015-08-27 21:05:41 +02:00
Bertrand Songis 0a33883d49 Companion compilation fix 2015-08-27 14:42:35 +02:00
Bertrand Songis 5d7f55fa97 Remark from projectkk2glider taken into account
Serial2 connection and USB CDC output now waits there is some free space
before adding anything to the buffer
2015-08-27 14:38:47 +02:00
Bertrand Songis acad63f838 Update DONATIONS.txt 2015-08-27 13:54:54 +02:00
Andre Bernet ed2ae75c8a Fix #2774 (out of bounds access to trim array when the source of an input is not a stick) 2015-08-27 12:01:01 +02:00
Bertrand Songis dbca85c0e8 3DR removed from the blacklist
I received some excuses, and a small 1000€ donation which I shared with
Mike
2015-08-27 11:03:07 +02:00
Bertrand Songis 78a55507cd Update DONATIONS.txt 2015-08-27 10:36:23 +02:00
Bertrand Songis c3e16dac92 Fix for ARM boards without Haptic (Taranis non plus) 2015-08-27 10:34:01 +02:00
Bertrand Songis 6412361680 Merge pull request #2771 from opentx/driver33/PL_TR
Sound gramar fixes
2015-08-26 19:29:37 +02:00
Bertrand Songis 3b3fe4d946 Merge pull request #2772 from opentx/projectkk2glider/issue_2681_watchdog_fix
Projectkk2glider/issue 2681 watchdog fix
2015-08-26 19:28:12 +02:00
Bertrand Songis d1d8a32cff Update DONATIONS.txt 2015-08-26 19:19:09 +02:00
David S. Beach 8739bd8ad9 fix for issue 2758 lua support for latitude and longitude' 2015-08-25 15:48:08 -04:00
Damjan Adamic 77d3eae4d6 Re #2681 and #2626: Power off refactoring, the 9XE RTC reset prevention code now active 2015-08-25 20:36:51 +02:00
Damjan Adamic e83b7c3a69 Fixes #2681: the PWR pin was not turned on correctly in _bootStart(). Watchdog reset now works on 9XE, the Bootloader exit also works.
Trim switch pull up not enabled for 9XE in _bootStart().
Added watchdog test option in DEBUG screen (long press MENU key), use WATCHDOG_TEST=YES compile option to enable it.
2015-08-25 20:35:07 +02:00
Kjell Kernen f4e55f9d45 Merge branch 'master' of https://github.com/opentx/opentx 2015-08-25 20:21:57 +02:00
Kjell Kernen 8bde8ca7b4 Swedish Companion translation 2015-08-25 20:20:35 +02:00
driver33 d00b9eb8ec Sound gramar fixes 2015-08-25 19:26:37 +02:00
Andre Bernet 2f5682e25a Typo, removed dead code 2015-08-25 16:57:00 +02:00
Andre Bernet 0d6907c76c Preliminary ar9x board support 2015-08-25 16:20:08 +02:00
Andre Bernet 710ed9c5d1 PXX wasn't enabled on sky9x 2015-08-25 16:18:20 +02:00
Andre Bernet c53ba92139 Sky9x platform fixes 2015-08-25 16:16:45 +02:00
Bertrand Songis 5e2fe112b0 Merge pull request #2729 from opentx/projectkk2glider/issue_2728_edge_bug
Fixes #2728: edge switch could trigger right after the logicalSwitche…
2015-08-25 10:00:36 +02:00
Bertrand Songis 001c400f47 Merge branch 'master' into projectkk2glider/issue_2728_edge_bug
# Conflicts:
#	radio/releasenotes.txt
2015-08-25 09:59:24 +02:00
Bertrand Songis 983a4da111 Merge pull request #2760 from opentx/driver33/PL_TR
Companioen pl translation fixes
2015-08-25 09:53:58 +02:00
driver33 d42a29570c Companioen pl translation fixes 2015-08-24 20:36:26 +02:00
Bertrand Songis c2e35ddd9c Update DONATIONS.txt 2015-08-24 18:22:06 +02:00
Damjan Adamic 0f91d66b49 Merge pull request #2752 from opentx/bsongis/comparedialog_printdialog_refactoring
PrintDialog / CompareDialog refactoring. Fixes #2737 and #2576. I also completes some of the tasks in #1063.
2015-08-23 22:31:39 +02:00
Damjan Adamic 6ac811076e Fixes #2576: display receiver number in model print/compare 2015-08-23 22:17:27 +02:00
Damjan Adamic 2530caa16e Flight mode representation reverted back (additional fix), unneeded condition removed 2015-08-23 21:56:51 +02:00
Damjan Adamic a1a50041dd Flight mode representation reverted back 2015-08-23 21:03:48 +02:00
Damjan Adamic 65bdd25173 Various fixes: modelPrinter free, mixer crash, trims display, channel names, monospace font 2015-08-23 16:00:37 +02:00
Bertrand Songis 096b3c98a4 Update DONATIONS.txt 2015-08-23 15:55:46 +02:00
Bertrand Songis fbd7fa4464 Update DONATIONS.txt 2015-08-23 15:41:00 +02:00
Damjan Adamic 0c7e545b42 Cosmetics 2015-08-23 15:33:09 +02:00
Bertrand Songis ed05174fc8 PrintDialog / CompareDialog refactoring 2015-08-23 09:54:15 +02:00
Bertrand Songis a8db4c4fa5 Fixes #2635 - Not tested yet 2015-08-23 09:21:45 +02:00
Damjan Adamic ab1ce7515c Removal of unneeded LUA_EXPORT_TELEMETRY() macro 2015-08-22 20:52:08 +02:00
Damjan Adamic 34090a1d3e Fix: former Lua telemetry fields were not exported correctly (tx-voltage, clock and timers1-3) 2015-08-22 20:44:11 +02:00
Damjan Adamic 60c925a721 Fixes #2733: Minor tweaks to Dutch Translation 2015-08-21 20:55:26 +02:00
Damjan Adamic 36d5f42b66 Merge pull request #2727 from opentx/MicheleVilla/FW_IT_Translations
Update it.h.txt
2015-08-21 20:36:06 +02:00
Damjan Adamic 3075ad857e Fixes #2734: fixed endless loop in model compare (varable i was used both in outer and inner for loops) 2015-08-19 22:23:37 +02:00
Damjan Adamic 4056287d3d Re #2728: Release notes updated 2015-08-18 20:12:54 +02:00
Damjan Adamic 537d7e089f Fixes #2728: edge switch could trigger right after the logicalSwitchesReset() was called 2015-08-18 20:03:54 +02:00
Damjan Adamic b10276bb34 Added missing keys initialization for simu 2015-08-18 19:54:25 +02:00
Damjan Adamic e685528fd3 Re #2623: fixed f_getcwd() on Windows 2015-08-18 17:31:49 +02:00
Michele 7498ab9957 Update it.h.txt 2015-08-17 21:11:16 +02:00
Bertrand Songis 9f19deb1e2 Update DONATIONS.txt 2015-08-17 13:57:39 +02:00
Bertrand Songis 616741888e Merge pull request #2701 from opentx/projectkk2glider/issue_2671_battery_bars
Re #2671: fixes difference between top and main LCD TX battery bars, …
2015-08-17 13:56:14 +02:00
Damjan Adamic 5b4f0a0bbb Re #2671: fixes difference between top and main LCD TX battery bars, code made more readable with macros 2015-08-17 13:55:41 +02:00
Bertrand Songis 00a5437dde Merge pull request #2721 from opentx/MicheleVilla/FW_IT_Translations
Update it.h.txt
2015-08-17 13:52:03 +02:00
Bertrand Songis 379d432365 Merge pull request #2691 from opentx/projectkk2glider/issue_2623_sd_manager_fixes
Fixes #2623: several fixes:
2015-08-17 13:51:35 +02:00
Damjan Adamic 744c560255 Fixes #2623: macro for node type introduced, cosmetics 2015-08-17 13:40:28 +02:00
Damjan Adamic 28b9a70e6b Fixes #2623: several fixes:
Disable menu for [..],
Refresh file list after delete,
Copy destination can be a directory,
Prevent copy/paste into the same directory,
Enabled renaming of directories and files without extension,
Removed delete menu option for directories,
Several simulator filesystem functions improved
2015-08-17 13:40:27 +02:00
Bertrand Songis f5f1a052ca Fixes #2580 2015-08-17 13:37:26 +02:00
Michele e8f28cc681 Update it.h.txt
update Italian translation
2015-08-16 13:30:34 +02:00
Damjan Adamic 23c985ffd6 Fixes #2719: Dutch translations by fraternl 2015-08-16 11:10:07 +02:00
Damjan Adamic 3dc781c89c Re #2714: more Italian translations fixed (changes ported from en.h.txt) 2015-08-16 11:03:10 +02:00
Damjan Adamic 4d7f456be5 Re #2714: Italian translations fixed 2015-08-16 10:25:32 +02:00
Damjan Adamic 154572e547 Separate context menu for "General Settings", cosmetics 2015-08-16 09:28:43 +02:00
Damjan Adamic 3469fa5c93 Release notes updated 2015-08-16 09:04:34 +02:00
Damjan Adamic dcce01fa9c Merge pull request #2712 from opentx/griebd/model_wizard_issue_2711
Griebd/model wizard issue 2711
2015-08-16 09:02:13 +02:00
Grieb 56bc0d817f Fix #2091 2015-08-15 11:14:37 -03:00
Grieb 71706d5e93 Cosmetcs. (editor save removes trailing spaces) 2015-08-15 11:13:57 -03:00
Damjan Adamic b8c51c9bf0 Release notes updated 2015-08-15 14:03:40 +02:00
Damjan Adamic e68b421de3 Release notes updated 2015-08-15 14:00:39 +02:00
Damjan Adamic 32ca88dbf8 Release notes updated 2015-08-15 13:16:56 +02:00
Damjan Adamic 4d83dd2c24 Fixes #2684: Lua model scripts outputs not working in a simulator 2015-08-15 12:59:35 +02:00
Damjan Adamic 330a91441a Compilation fixes for Bin Allocator 2015-08-15 12:39:27 +02:00
Bertrand Songis affda2d8fe Update DONATIONS.txt 2015-08-15 11:23:43 +02:00
Bertrand Songis e7f3c280f0 Update DONATIONS.txt 2015-08-15 11:06:14 +02:00
Bertrand Songis 89c27cfcca Fixes #2704 2015-08-14 11:45:09 +02:00
Bertrand Songis 9303361d6b Fixes #2702 2015-08-13 18:14:54 +02:00
Bertrand Songis 82c8246c25 Merge pull request #2703 from opentx/MicheleVilla/Fix_FW_IT_Translations
Some Fix for it.h.txt
2015-08-13 13:26:43 +02:00
Bertrand Songis c0f2dddfa1 Create DONATIONS.txt 2015-08-13 13:25:11 +02:00
Michele db8ee18b5d Update it.h.txt 2015-08-13 10:12:05 +02:00
Bertrand Songis e3c9ecd26e Merge pull request #2698 from opentx/driver33/PL_TR
companion translation fix
2015-08-12 10:24:28 +02:00
driver33 5df19e1c3d companion translation fix 2015-08-12 10:18:38 +02:00
Bertrand Songis 3384ad2235 Update DONATIONS.txt 2015-08-12 07:36:19 +02:00
Damjan Adamic d693ccd4f0 Top part of the 9XE startup graphics was not shown, lcdRefreshWait() was in wrong place 2015-08-11 23:33:41 +02:00
Bertrand Songis 47547e2397 Merge pull request #2697 from opentx/projectkk2glider/issue_2671_lcd_fixes
Projectkk2glider/issue 2671 lcd fixes
2015-08-11 22:49:34 +02:00
Bertrand Songis 51f46d9a69 Compilation fix 2015-08-11 22:26:43 +02:00
Damjan Adamic 04a8570d48 Re #2671: added TX battery blinking on batter warning, fixed display problem when battery voltage lower than batlow value. 2015-08-11 22:22:18 +02:00
Damjan Adamic 806c343b80 Re #2671: voltage symbol changed to upper case in putsVolts(). 2015-08-11 22:18:35 +02:00
Bertrand Songis 17cb8f9459 Cli fixes 2015-08-11 22:06:30 +02:00
Bertrand Songis 1fdecd1ad4 Gtests false positive error 2015-08-11 19:15:12 +02:00
Bertrand Songis 900b53f165 Fixes #2693 2015-08-11 19:00:01 +02:00
Bertrand Songis 6356fbb2f4 Comments from projectkk2glider addressed 2015-08-11 18:15:43 +02:00
Bertrand Songis 979ece9208 Update DONATIONS.txt 2015-08-11 18:07:13 +02:00
Bertrand Songis a1df80a7f7 Ignore list updated 2015-08-11 06:58:27 +02:00
Bertrand Songis a5bb41a31b Cosmetics 2015-08-11 06:56:02 +02:00
Bertrand Songis 9b527b1810 First compilation fixes, thanks to Jenkins first comments 2015-08-10 23:00:45 +02:00
bertrand 2b312fdbb4 Fixes #2595 - Cli added
Based on projectkk2glider work, with a lot of bugs I am sure. Still not
tested, this is why I preferred working on my own branch. I push it now
so that Jenkins do the first tests and you can review if I am on the
right track. 

I am really wondering if a merge with the Lua api would be possible /
nice, what do you think?
2015-08-10 22:52:26 +02:00
Andre Bernet 2d9c130839 Merge pull request #2687 from opentx/bsongis/osx
Mac libraries now loaded correctly (Fixes #2678)
2015-08-10 11:03:13 +02:00
Bertrand Songis a569c67371 Fixes #2678 2015-08-10 01:08:56 +02:00
Bertrand Songis ada0f3d8b4 Merge pull request #2686 from opentx/projectkk2glider/issue_2685_d-type_altitude_fix
Fixes #2685: D-type altitude fixes (negative values, hi/lo precision …
2015-08-09 22:48:25 +02:00
Damjan Adamic 192f5a1bd7 Fixes #2685: D-type altitude fixes (negative values, hi/lo precision vario) 2015-08-09 22:21:46 +02:00
Damjan Adamic 70d77fd851 Re #2598: removed bad include 2015-08-09 16:02:35 +02:00
Damjan Adamic f7a8715657 Fixes #2598: added USB serial port (with echo example), use USB=SERIAL to enable. If DEBUG=YES then debug output also goes to the USB serial port 2015-08-09 15:41:24 +02:00
Damjan Adamic 5d8c86923b Re #2607: gtest for hi precision VFAS added 2015-08-08 18:17:09 +02:00
Damjan Adamic a6e53bd419 Cosmetics 2015-08-08 17:46:22 +02:00
Andre Bernet 08756af9f5 Don't import install dir settings from old versions (fix #2645) 2015-08-08 11:21:48 +02:00
Bertrand Songis 447df60823 Revert "[9XR-PRO] HiFi audio now :)"
This reverts commit 3d792ea4df.
2015-08-08 11:11:53 +02:00
Bertrand Songis 3d792ea4df [9XR-PRO] HiFi audio now :) 2015-08-08 10:58:52 +02:00
Bertrand Songis 26a38913a8 Fixes #2668 2015-08-08 10:06:52 +02:00
Bertrand Songis 238335dec6 Compilation error on VC++ 2015-08-08 09:32:31 +02:00
Bertrand Songis 1efbde7d46 Fixes #2660 2015-08-08 00:41:50 +02:00
Bertrand Songis 1e92313dcd 2.1.2 start ... 2015-08-08 00:38:18 +02:00
Bertrand Songis e174255ddb Indentation 2015-08-08 00:20:30 +02:00
Bertrand Songis 4b0841b17d _NOCCM renamed to __DMA (which is 32bits aligned on Sky9x/9XR-PRO) 2015-08-08 00:16:51 +02:00
Bertrand Songis e136905e75 Better fix for #2665 2015-08-08 00:12:39 +02:00
Bertrand Songis 7c0d9c7009 Revert "Fixes #2665"
This reverts commit c251865538.
2015-08-08 00:11:46 +02:00
Bertrand Songis c251865538 Fixes #2665 2015-08-07 18:48:23 +02:00
Bertrand Songis e079148249 Typo in release notes 2015-08-07 15:31:20 +02:00
Bertrand Songis fab861e8bd Update DONATIONS.txt 2015-08-07 15:15:12 +02:00
Damjan Adamic d0c696c1bc Another typo in release notes 2015-08-06 22:39:42 +02:00
Damjan Adamic 7b75c04b30 Typo in release notes 2015-08-06 22:22:42 +02:00
Damjan Adamic 572cfd67af Fixes #2658: real fix 2015-08-06 22:09:34 +02:00
Bertrand Songis c7a07ded12 Merge pull request #2659 from opentx/projectkk2glider/issue_2658
Fixes #2658: Companion release notes before/after new version downloa…
2015-08-06 22:04:03 +02:00
Damjan Adamic 4e7181fb7e Fixes #2658: Companion release notes before/after new version download broken 2015-08-06 22:01:05 +02:00
Bertrand Songis fce1cc681a Fixes #2657 2015-08-06 20:06:48 +02:00
Bertrand Songis a7b62fc2a9 Merge pull request #2651 from opentx/projectkk2glider/additional_kts_conversions
Added conversions of knots to m/s and f/s
2015-08-06 19:28:45 +02:00
Bertrand Songis 6fcecb5666 Merge pull request #2653 from opentx/projectkk2glider/issue_2638_9xe_logs
Fixes #2638: header line for logs fixed for 9XE
2015-08-06 19:28:05 +02:00
Bertrand Songis d837739e4f Merge pull request #2654 from opentx/projectkk2glider/issue_2652
Fixes #2652:  Add missing presets to frskyDSetDefault()
2015-08-06 19:25:45 +02:00
Bertrand Songis a530bc7a6f Update DONATIONS.txt 2015-08-06 19:05:13 +02:00
Damjan Adamic 32a7c9aee6 Re #2652: filtering for Sport RSSI reverted (reason: too few samples per second) 2015-08-06 14:47:13 +02:00
Damjan Adamic 5fe10c118d Re #2638: Release notes update 2015-08-06 14:35:09 +02:00
Damjan Adamic 815fef458c Fixes #2652: Add missing presets to frskyDSetDefault() 2015-08-06 14:31:50 +02:00
Damjan Adamic 20eff3358a Fixes #2638: header line for logs fixed for 9XE 2015-08-06 14:24:40 +02:00
Damjan Adamic 98c1503bed Added conversions of knots to m/s and f/s 2015-08-06 12:37:45 +02:00
Damjan Adamic 7c8093b70f Fixes #2649: Fixed missing LUA script outputs in special function "Play Value" 2015-08-06 09:32:17 +02:00
Bertrand Songis edba5bcf89 Tonight ... 2015-08-06 06:45:19 +02:00
Bertrand Songis 0a75eb93d3 Cosmetics 2015-08-06 00:40:46 +02:00
Bertrand Songis a2c30b1849 [Companion] Blacklist added (for companies who don't respect the GPL) 2015-08-06 00:16:24 +02:00
Damjan Adamic 386cb2c912 Release notes updated, date set to today 2015-08-05 22:53:58 +02:00
Bertrand Songis 60dc533fe8 Update DONATIONS.txt 2015-08-05 21:49:54 +02:00
Bertrand Songis 6c0a9714fc [9XR-PRO] Wrong code comment
Thanks project2gglider! It was a copy-paste from Mike's code. When I
will have spare time I will replace those numbers by constants...
2015-08-05 21:43:24 +02:00
Bertrand Songis 15469aeaf7 Fixes #2643 2015-08-05 21:37:22 +02:00
Bertrand Songis a8ff8b524b Fixes #2634 - Option ALLOW_NIGHTLY_BUILDS added 2015-08-05 18:51:50 +02:00
Bertrand Songis 2378080ae8 Fixes #2631 2015-08-05 18:50:22 +02:00
Bertrand Songis 23e16b26f1 Fixes #2592 - No more reset on 9XR-PRO when leaving PXX protocol
I would like a code review for this one (both Taranis and 9XR-PRO),
thanks!
2015-08-05 18:49:41 +02:00
Bertrand Songis 3353d989bb [9X/9XR-PRO] Cosmetics in Model Select screen 2015-08-05 18:47:06 +02:00
Bertrand Songis 58659b9b1a [Companion] It now remembers the last flashed firmware 2015-08-05 18:36:14 +02:00
Bertrand Songis f4eab9bf58 [9XR-PRO] Valgrind warnings removed 2015-08-05 18:35:26 +02:00
Bertrand Songis 57f5f68804 [9XR-PRO] Bugfixes port from Taranis on Global Custom Functions 2015-08-05 18:34:41 +02:00
Bertrand Songis 5c4b12dfc2 [9XR-PRO] Cosmetics in Statistics view 2015-08-05 18:32:36 +02:00
mhotar 99ff846209 CZ translations 2015-08-05 12:13:51 +02:00
Bertrand Songis 37dd2b0064 Release notes date set to tomorrow 2015-08-05 07:00:09 +02:00
Bertrand Songis 9c20658e26 Update DONATIONS.txt 2015-08-04 21:36:22 +02:00
Bertrand Songis 6e6e80bcfc Fixes #2605 2015-08-04 20:21:37 +02:00
Andre Bernet 185ad88bc8 Dutch translations by fraternl 2015-08-04 09:31:16 +02:00
Bertrand Songis 54405135c0 Fixes #2618 2015-08-03 23:20:12 +02:00
Bertrand Songis d7cf14857e Cosmetics 2015-08-03 23:18:33 +02:00
Bertrand Songis 5417c426e3 Merge pull request #2622 from opentx/projectkk2glider/issue_2607
Fixes #2607: Added support for 0.01V resolution to D series VFAS ID 0x39
2015-08-03 22:38:32 +02:00
Bertrand Songis 3f6621b087 [9XR-PRO] Only the first 64k EEPROM could be written because of uint16_t 2015-08-03 22:36:57 +02:00
Bertrand Songis 151fb59e27 Cosmetics 2015-08-03 22:36:02 +02:00
Bertrand Songis a2902280b0 #2619 - Stupid bug
Only ~62 EEPROM write and then we get an INVALID EEPROM
2015-08-03 22:35:16 +02:00
Bertrand Songis 10832ad60a #2619 - Valgrind complains on EEPROM block erase
Should not change anything though.
2015-08-03 22:33:28 +02:00
Damjan Adamic 121f7780c2 Fixes #2607: Added support for 0.01V resolution to D series VFAS ID 0x39 2015-08-02 18:39:58 +02:00
Damjan Adamic 25d233e832 Release notes updated 2015-08-02 17:42:30 +02:00
Andre Bernet 46de8229dd Small screen platform string fixes 2015-08-02 17:06:20 +02:00
Andre Bernet 813956721d Ignore sensor IDs for small screen platforms 2015-08-02 17:05:29 +02:00
Andre Bernet 302bf05f57 Revert git attributes 2015-08-02 11:04:56 +02:00
Bertrand Songis 977e44d44a Fixes #2592 - Needs test with next nightly builds
Please confirm if this is fixed or not, I don't have a 9XR-PRO with me
here!
2015-08-01 22:43:54 +02:00
Bertrand Songis 105ac6306a Frsky-D Telemetry protocol bug (0x5D followed by 0x3D)
I should add a non regression test...
2015-08-01 22:29:09 +02:00
Bertrand Songis 3c1734bdb2 Fixes #2612 2015-08-01 22:21:24 +02:00
Bertrand Songis 9546843bc2 Cosmetics 2015-08-01 21:09:06 +02:00
Bertrand Songis bf89c53f33 #2106 - .gitattributes updated, please check what I did, thanks! 2015-08-01 20:24:47 +02:00
Bertrand Songis 406e69ab1d Cosmetics 2015-08-01 20:20:18 +02:00
Bertrand Songis 753cb4f01c #2106 - Script which will unify line endings (and code formatting) 2015-08-01 20:17:30 +02:00
Bertrand Songis 40c34644b8 Proposal for an uncrustify configuration 2015-08-01 20:14:03 +02:00
Bertrand Songis b3b534cd6d #2106 - Unify the include guards in all headers 2015-08-01 20:10:57 +02:00
Bertrand Songis 491886a5c2 #2106 - Unify the copyright in source files 2015-08-01 20:08:09 +02:00
Andre Bernet 44c096c366 Align airspeed units to S.Port spec (Fix #2305) 2015-08-01 19:22:59 +02:00
Bertrand Songis 68eafbfba7 Merge pull request #2614 from opentx/driver33/PL_TR
New lines translation
2015-08-01 19:22:09 +02:00
driver33 dd5fd62b41 New lines translation 2015-08-01 19:16:32 +02:00
Andre Bernet a1bc46e473 Fix SBUS trainer failsafe detection 2015-08-01 17:48:02 +02:00
Bertrand Songis eedaf1966e Merge pull request #2613 from opentx/mhotar/cz_sk_tts
#2610 Mhotar/cz sk tts
2015-08-01 17:40:14 +02:00
mhotar 3cbbcf18c8 #2610 CZ unicode fix in tts.py 2015-08-01 17:23:20 +02:00
Andre Bernet 9a70c84179 Companion translations updated for translators without build environment 2015-08-01 16:51:33 +02:00
Andre Bernet 9546636f0a French translations 2015-08-01 16:38:14 +02:00
Andre Bernet ecd9f1e2cf Missing translation 2015-08-01 15:34:00 +02:00
Andre Bernet 310321ce0e Add Timer3 to stats screen (Fix #2515) 2015-08-01 15:24:13 +02:00
Andre Bernet 39c0b79f85 Copy telemetry sensors (Fix #2513) 2015-08-01 15:07:55 +02:00
Andre Bernet 70e93fb493 X9E rotary encoder now generates EVT_KEY_BREAK events (Fix #2609) 2015-08-01 13:43:54 +02:00
mhotar 8a202f0ecc #2610 sk tts 2015-08-01 13:08:45 +02:00
mhotar 53a77a5bdb #2610 cz tts 2015-08-01 12:46:52 +02:00
Andre Bernet b83ad1899a Fix hardware menu navigation 2015-08-01 11:24:52 +02:00
Andre Bernet 80aee0d126 Revert "Bug in hardware menu, the "Serial port" could not be changed"
This reverts commit b9d0154e909df5131bd9139592bc0f1b4571f3a8.
2015-08-01 11:24:52 +02:00
Andre Bernet df82aeed76 French translations 2015-08-01 11:24:51 +02:00
Damjan Adamic 70d67dd7dd Export to Google Earth now working (only) with the new telemetry fields (GPS, GAlt and GSpd) 2015-08-01 10:53:06 +02:00
Damjan Adamic 922220c748 Re #2579: added missing source trainer_input.cpp to simulator 2015-08-01 10:23:21 +02:00
Bertrand Songis 819509b63a Merge pull request #2608 from opentx/raphaelcoeffic/issue2549
Fixes #2549 - Use PrefixPath to find the simulator libs
2015-08-01 08:44:27 +02:00
Bertrand Songis db072442c8 Merge pull request #2606 from opentx/raphaelcoeffic/issue2579
Fixes #2579: Added support for Trainer signal alarm
2015-08-01 08:41:50 +02:00
Damjan Adamic c1efd39df7 Better Lua traces 2015-07-31 18:59:20 +02:00
Damjan Adamic f5dca813fb Bug in hardware menu, the "Serial port" could not be changed 2015-07-31 18:59:02 +02:00
Damjan Adamic 1bc8e0d6c1 Added main stack painting for STM32F4 2015-07-31 18:58:50 +02:00
Raphael Coeffic 0fba4a638d removed PrefixPath debug line 2015-07-31 10:43:54 +02:00
Raphael Coeffic 71530f253d Fixes #2549 - Use PrefixPath to find the simulator libs 2015-07-31 10:41:16 +02:00
Bertrand Songis 274ed3a917 Update DONATIONS.txt 2015-07-31 09:40:01 +02:00
Raphael Coeffic ebae27272e renamed g_ppmInXXX into ppmInputXXX
g_ppmIns -> ppmInput
g_ppmInputValidityTimer -> ppmInputValidityTimer
2015-07-30 22:43:56 +02:00
Raphael Coeffic 3049ff768e changed ppmInValid in tests/mixer.cpp as well 2015-07-30 22:07:16 +02:00
Raphael Coeffic f6bff9683d Fixes #2579: Added support for Trainer signal alarm
- added alarm “Trainer signal lost” & “Trainer signal recovered”.
- moved PPM capture code to trainer_input.{h,cpp}
2015-07-30 21:53:44 +02:00
Bertrand Songis 013c10e7fb Update DONATIONS.txt 2015-07-30 20:42:58 +02:00
Bertrand Songis af38cb6dff Update DONATIONS.txt 2015-07-30 20:38:24 +02:00
Bertrand Songis 3d461b771f Update DONATIONS.txt 2015-07-30 20:20:33 +02:00
Bertrand Songis cee35869ba Update DONATIONS.txt 2015-07-30 20:12:52 +02:00
Bertrand Songis b6a2e89c17 Update DONATIONS.txt 2015-07-29 23:34:44 +02:00
Bertrand Songis 7cf03bd74e Merge pull request #2600 from opentx/MicheleVilla/FW_It_translation_fix
Fix FW Italian Translation
2015-07-29 21:52:40 +02:00
Michele 776dec5c74 Update it.h.txt 2015-07-29 21:14:14 +02:00
bsongis 23b9d77217 Fixes #2561 2015-07-29 20:48:37 +02:00
Bertrand Songis 06dc5136f7 Merge pull request #2599 from hrenz/patch-8
Patch 8
2015-07-29 20:35:00 +02:00
bsongis b8b6263c75 Fixes #2589 2015-07-29 20:13:16 +02:00
Bertrand Songis 8cc98a53f3 Merge pull request #2597 from opentx/driver33/PL_TR
new strings translation
2015-07-29 19:35:59 +02:00
Bertrand Songis 67e0ecfa0b Merge pull request #2594 from raphaelcoeffic/sbus_failsafe
Added support for SBUS failsafe bit
2015-07-29 19:34:06 +02:00
hrenz b7f52f2521 Update de.h.txt 2015-07-29 19:03:48 +02:00
hrenz c6e9939024 Update de.h.txt
only some chars changed
2015-07-29 18:42:42 +02:00
hrenz dd3cbda0c7 Update de.h.txt 2015-07-29 18:37:00 +02:00
hrenz 260c7cd0c0 Update de.h.txt
some changes for X9E
and master
2015-07-29 18:33:14 +02:00
Damjan Adamic ee6b2da037 Cosmetics related to #1063 2015-07-29 18:05:27 +02:00
driver33 f52c95ed55 new strings translation 2015-07-29 16:49:20 +02:00
Raphael Coeffic d2ed8d9287 Beautified SBUS code
- use “defines” for each constant.
- do not change the frame pointer while checking frame validity (improves readability).
2015-07-29 08:47:58 +02:00
bsongis a9c60a45e9 Fixes #2586 2015-07-28 23:50:46 +02:00
Raphael Coeffic 0cfe5b6c76 Added support for SBUS failsafe bit 2015-07-28 23:29:04 +02:00
Bertrand Songis c8115c674d Merge pull request #2590 from opentx/projectkk2glider/print_and_compare_refactoring_21
Projectkk2glider/print and compare refactoring 21
2015-07-28 21:48:45 +02:00
Damjan Adamic b67dfbd086 Cosmetics 2015-07-28 21:15:33 +02:00
Damjan Adamic 4e4d0fe883 Re #1063: Deduplication of code for Inputs, Mixers, Logical Switches and Special Functions 2015-07-28 20:57:06 +02:00
Bertrand Songis 34c311a562 Merge pull request #2582 from opentx/projectkk2glider/issue_2581
Fixes #2581: symbols for renamed physical inputs were missing
2015-07-28 00:55:49 +02:00
Damjan Adamic 1da0f157de Fixes #2581: symbols for renamed physical inputs were missing 2015-07-27 21:24:51 +02:00
Bertrand Songis 545f54a89c Merge pull request #2548 from opentx/bsongis/bad_sport_sensors
#2538 - Proposal for a fix.
2015-07-27 07:39:03 +02:00
bsongis dad815f631 [Companion] AutoCheckBox used instead of QCheckBox 2015-07-27 07:36:38 +02:00
bsongis 9ca09d0a85 Cosmetics 2015-07-27 01:00:48 +02:00
bsongis 71f8b663cb Fixes #2559 - Needs test (next nightly build) 2015-07-27 01:00:48 +02:00
Bertrand Songis be9a26611f Simulators added to the Resources directory 2015-07-26 17:28:25 +02:00
Bertrand Songis d9362d2634 Hardcoded path removed 2015-07-26 16:24:52 +02:00
Bertrand Songis 09d6fa833f Merge pull request #2571 from opentx/projectkk2glider/issue_2533
Fixes #2533: menu was wrong if all items on the end were hidden
2015-07-26 15:06:57 +02:00
Bertrand Songis c7ff93fdf4 Update DONATIONS.txt 2015-07-26 15:05:59 +02:00
Damjan Adamic c2e73c74a6 Fixes #2533: menu was wrong if all items on the end were hidden 2015-07-26 15:02:08 +02:00
bsongis d2e38364e6 [OSX] opentx-simulators-bundle now inside makedmg target. Perhaps still
a missing cp of the libs somewhere, inside companion.app?
2015-07-26 14:55:46 +02:00
Bertrand Songis 404eefc3da Run install_name_tool on all dylib files 2015-07-26 14:06:25 +02:00
Bertrand Songis ba1c429554 Merge pull request #2568 from opentx/driver33/PL_TR
Comapnion translation fixes
2015-07-26 14:03:52 +02:00
driver33 0df47c19c7 Comapnion translation fixes 2015-07-26 13:23:20 +02:00
Bertrand Songis 027df32564 Merge pull request #2566 from opentx/driver33/PL_TR
Small fixes in letters and ajustments.
2015-07-26 12:53:16 +02:00
Bertrand Songis 21353d2b31 OSX last commit fix 2015-07-26 12:43:13 +02:00
bsongis f1df8ead68 [OSX] It should not be needed to manually copy SDL into the bundle now 2015-07-26 12:37:50 +02:00
driver33 dbac5b773f Fixes in FW translation 2015-07-26 11:41:13 +02:00
Jacek Drewniak fb1cdeeac1 Merge pull request #2565 from opentx/master
make equal
2015-07-26 11:32:59 +02:00
bsongis 8a66e883ec Typo when porting the mod for simulators not working on OSX 2015-07-26 09:15:59 +02:00
bsongis 1922bc9edd #2563 - Still needs mods on the server 2015-07-26 08:43:56 +02:00
Andre Bernet cc41d69954 Companion part 2015-07-26 00:12:30 +02:00
bsongis 771b7a1821 Should add the simulators to the OSX platform. But here Companion
doesn't run anymore. Instead the standalone simulator is fine.
2015-07-25 21:40:35 +02:00
Andre Bernet a3fa0bd79d We need to ignore the instance, not the data Id ;) 2015-07-25 18:11:02 +02:00
Andre Bernet 19e68bac4d RSSI lacked unit (Fix #2557)
dBm renamed to dB (made no sense)
2015-07-25 18:02:14 +02:00
mhotar 983e9f2f2b CZ translations-telem.screen names fixed 2015-07-25 17:28:25 +02:00
Andre Bernet 311b5e1d04 Number of SFs was actually wrong too! 2015-07-24 22:02:46 +02:00
Andre Bernet 9b002b94ca GF enabled checkbox was missing (Fix #2558)
Number of GF in setup panel was not aligned with the radio
2015-07-24 21:54:46 +02:00
bsongis 69cbb06470 Fixes #2271 2015-07-24 16:35:05 +02:00
Bertrand Songis 2b25071e8c Merge pull request #2551 from opentx/driver33/PL_TR
Adds new translations, some letter and words fixes
2015-07-24 11:25:49 +02:00
Jacek Drewniak c9d465ca2a Adds new translations, some letter and words fixes 2015-07-24 11:07:31 +02:00
bsongis e1dfb15ba9 Fixes #2546 2015-07-24 10:42:12 +02:00
bsongis 7e44eab63c Fixes #2534 2015-07-24 10:07:11 +02:00
Bertrand Songis 7e7a762617 Fixes #2535 2015-07-24 09:31:04 +02:00
Bertrand Songis d5c2d51dea Update DONATIONS.txt 2015-07-24 00:31:33 +02:00
Bertrand Songis 7d2e48a99b Fixes #2544 2015-07-23 22:42:59 +02:00
Bertrand Songis 4ea9e5c11f The ':' separator is not a so good idea in Windows installer (ADS) 2015-07-23 21:17:18 +02:00
Bertrand Songis 8f96f50a84 New version format (mandatory for small screens) 2015-07-23 19:07:06 +02:00
bsongis c90bf43d17 [Companion] Possibility to have a suffix 2015-07-23 18:49:22 +02:00
bsongis 2549e2a2de [Companion] make clean now deletes the stamp in firmware sources 2015-07-23 18:48:11 +02:00
bsongis 658ca48137 OpenTX removed from radio type 2015-07-23 18:46:18 +02:00
bsongis c64369e95f Default tab is again 0 in Preferences Dialog 2015-07-23 18:45:00 +02:00
bsongis 6eec7789cc Cosmetics 2015-07-23 18:44:19 +02:00
bsongis 1b6f34069a Previous version-indexes were not anymore supported 2015-07-23 18:42:39 +02:00
bsongis 98b4d26676 Fixes #2542 2015-07-23 18:34:32 +02:00
bsongis 62ae7ef2bd Simplification - related to #2545 - Needs to be tested again 2015-07-23 18:30:15 +02:00
bsongis c9a58e5cfa EN Cosmetics 2015-07-23 18:28:21 +02:00
bsongis 4d5c4621c7 [Companion] French translations typos 2015-07-23 18:22:34 +02:00
bsongis 2af072ea7f [Companion] Missing errors when flashing/reading Firmware / EEPROM
(window closed really quickly)
2015-07-23 18:16:37 +02:00
bsongis 2341f5be68 Fixes #2543 2015-07-23 07:19:33 +02:00
bsongis a100af81be Fixes #2541 2015-07-22 22:56:36 +02:00
bsongis 6f21556b81 #2538 - Proposal for a fix. We have many wrong sensors, including
openXsensor. The first ID is stored in EEPROM, but not used during the
search loop
2015-07-22 22:30:37 +02:00
bsongis 8d97235f41 #2526 - Firmware nightly builds are now downloadable from Companion -
Tests needed
2015-07-22 22:25:03 +02:00
Damjan Adamic 0559abd323 Release notes updated 2015-07-22 20:28:49 +02:00
bsongis d0211c5dc6 Update DONATIONS.txt 2015-07-22 19:33:06 +02:00
bsongis f42cf4c0f4 Adds the possibility to have a suffix in the firmware version 2015-07-22 19:31:18 +02:00
bsongis a8d4ba5758 Warning removed. HELI option really needs to be tested 2015-07-22 18:58:12 +02:00
bsongis a94d08606f Fixes #2517 2015-07-22 18:55:54 +02:00
bsongis 0a213389f4 Fixes #2539 2015-07-22 18:42:02 +02:00
Bertrand Songis 7041a4dac6 Update DONATIONS.txt 2015-07-22 18:36:13 +02:00
Bertrand Songis 97cc519bcb Merge pull request #2536 from opentx/projectkk2glider/issue_2530_and_2531
Fixes #2531: VFAS id 0x39: was 10x to small
2015-07-21 23:03:46 +02:00
Damjan Adamic 6fffd7fbae Fixes #2531: VFAS id 0x39: was 10x to small
Fixes #2530: VFAS id 0x3A and 0x3B: wrong calculation of value
2015-07-21 21:43:02 +02:00
Damjan Adamic d2bd78b366 Release notes updated 2015-07-21 21:14:43 +02:00
bsongis e758d524de [Companion] Vario / Voltage / Current sources export problem 2015-07-21 20:46:07 +02:00
Damjan Adamic d967ec0b80 Re #2500: new names for Linux targets (companion21 and simulator21), the dot was removed 2015-07-21 20:32:04 +02:00
bsongis 4509b1a2a7 Fixes #2533 2015-07-21 20:24:13 +02:00
Andre Bernet 4626550c53 D-type RPM sensor was broken (Fix #2509) 2015-07-21 20:21:30 +02:00
Damjan Adamic 7b469016c1 Fixes #2532: symbol for volts was in lower case, it is now in upper case 2015-07-21 20:06:44 +02:00
bsongis 29e9039176 Telemetry sources removed from the Reset Global Function 2015-07-21 19:22:19 +02:00
bsongis 370728433a Needed for #2518 2015-07-20 22:32:25 +02:00
Bertrand Songis f6b07ceda8 Merge pull request #2528 from opentx/driver33/PL_TR
Hot Fixes translation for 2.1.x
2015-07-20 22:10:07 +02:00
Jacek Drewniak 2c08118d6d Hot Fixes translation for 2.1.x 2015-07-20 21:56:07 +02:00
bsongis 7c8deb8a48 Fixes #2518 - Needs a test 2015-07-20 21:38:57 +02:00
Bertrand Songis b427fd1364 Merge pull request #2523 from opentx/projectkk2glider/issue_2513_duplicate_sensors
Fixes #2513: set value of duplicated telemetry sensors
2015-07-20 21:25:55 +02:00
Bertrand Songis 611f85113c Merge pull request #2522 from opentx/projectkk2glider/issue_2519_global_functions_play_value_fix
Fixes #2519: removed telemetry values from available selection in Glo…
2015-07-20 21:21:02 +02:00
Damjan Adamic 76791c1961 Unreachable code removed 2015-07-20 21:17:12 +02:00
Damjan Adamic 7b28910cc2 Re #2513: set value of duplicated telemetry sensors 2015-07-20 21:13:30 +02:00
Damjan Adamic 841f11c21a Fixes #2519: removed telemetry values from available selection in Global Functions for "Play Value" 2015-07-20 20:34:15 +02:00
bsongis f845be683c Fixes #2512 2015-07-20 19:55:36 +02:00
Bertrand Songis a1e2132c12 Update DONATIONS.txt 2015-07-20 18:38:46 +02:00
bsongis dec83e2ef5 Fixes #2514 2015-07-20 18:35:51 +02:00
bsongis f9897c0191 Fixes #2506 2015-07-20 07:16:21 +02:00
bsongis 668fadb737 Revert "Fixes #2506"
This reverts commit 1f06e7982a.
2015-07-20 07:09:05 +02:00
bsongis 1f06e7982a Fixes #2506 2015-07-19 22:27:06 +02:00
bsongis 7336d92a6d Fixes #2502 2015-07-19 22:16:12 +02:00
Damjan Adamic 7b490b03d9 Fix for windows installer build for 2.1 2015-07-19 18:15:41 +02:00
Bertrand Songis 7958ff7105 Merge pull request #2482 from opentx/projectkk2glider/companion_2.1_and_2.0_alongside_on_linux
Enables side by side installation of Companion 2.1 and 2.0 on Linux
2015-07-19 16:35:21 +02:00
Bertrand Songis 1492d808f3 Merge pull request #2501 from opentx/projectkk2glider/issue_2404_play_model_name
Fixes #2404: model name played when model is loaded
2015-07-19 15:33:07 +02:00
Damjan Adamic 84fe232b0c Re #2503: Standalone simulator now remembers which radio was simulated in previous session 2015-07-19 14:54:33 +02:00
Damjan Adamic 51b8d70cc6 Several lintian errors removed:
E: companion2.1: unstripped-binary-or-object usr/local/bin/companion2.1
E: companion2.1: unstripped-binary-or-object usr/local/bin/simulator2.1
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-9x-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-9x128-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-9xr-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-9xr128-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-9xrpro-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-gruvin9x-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-mega2560-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-sky9x-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-taranis-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-taranisplus-simulator.so
E: companion2.1: unstripped-binary-or-object usr/local/lib/companion2.1/libopentx-taranisx9e-simulator.so
E: companion2.1: udev-rule-in-etc etc/udev/rules.d/45-companion2.1-taranis.rules
2015-07-19 14:32:59 +02:00
Andre Bernet 576ce4983d Fix #2504 2015-07-19 14:18:03 +02:00
Damjan Adamic b1170b2ab9 Enables side by side installation of Companion 2.1 and 2.0 on Linux
Adds missing simulator libraries on Linux
Installs Standalone Simulator icon on Linux
2015-07-19 14:06:58 +02:00
Damjan Adamic 41d0675886 Fixes #2503: Standalone simulator radio selection display problem 2015-07-19 13:19:38 +02:00
Damjan Adamic 5048ce5d45 Re #2404: better definition of PLAY_MODEL_NAME() for various platforms 2015-07-19 12:44:40 +02:00
Damjan Adamic 268f168218 Re #2404: Compilation fix 2015-07-19 11:13:51 +02:00
Damjan Adamic 08d4cb15aa Fixes #2404: model name played when model is loaded (if file "SOUNDS/<language>/<model_name>/name.wav" exists) 2015-07-19 11:07:57 +02:00
bsongis 2e252aacac Compilation error fix 2015-07-19 09:54:14 +02:00
bsongis d23a1f5739 Fixes #2492 - Thanks go to Kilrah 2015-07-18 22:59:59 +02:00
bsongis 863ed513c0 We move to 2.1.1 2015-07-18 22:55:57 +02:00
bsongis 18f28270f0 Fixes #2493 2015-07-18 22:52:15 +02:00
Andre Bernet 11ced4eecf de was missing from voice file download dropdown (fix #2497) 2015-07-18 20:01:24 +02:00
Damjan Adamic 44e73bac96 Fixes #2466: "Range" changed to "Ratio" in Companion telemetry sensor configuration (as is on the radio)
Translations re-generated
2015-07-18 19:38:58 +02:00
Damjan Adamic 8ba9016580 Fixes #2494: "Play Haptic" renamed to "Haptic" in Companion (as is on the radio) 2015-07-18 19:19:07 +02:00
Damjan Adamic 17171b2166 Release notes updated 2015-07-18 19:00:11 +02:00
bsongis 34731af074 Fixes #2491 2015-07-18 18:55:30 +02:00
bsongis 654dac1acc [Companion] ComboBox for audio / scripts list was not cleared before all
itemps inserted
2015-07-18 18:04:44 +02:00
bsongis 90ebaf2d88 Fixes #2465 - A little bit refactoring done while fixing this one 2015-07-18 17:22:26 +02:00
bsongis 2b804f92b5 Fixes #2478 2015-07-18 14:16:09 +02:00
bsongis e1e60b5572 Fixes #2487 2015-07-18 13:34:49 +02:00
bsongis 4b9f69a666 Fixes #2160 2015-07-18 13:23:12 +02:00
bsongis 1c86a16c84 [ARM boards] Shift in CSV logs when no GPS fix 2015-07-18 13:18:19 +02:00
bsongis 0cf3aeef57 Fixes #2484 2015-07-18 13:09:14 +02:00
bsongis b04295ad44 [Taranis] New gauge in Mixers/Expos screen was not right when there was
no line associated to the Mix/Input channel. Now the gauge is not
displayed in such case. Needs tests again, thanks!
2015-07-18 12:38:13 +02:00
bsongis 6147c23c0f [Taranis] Compilation error when INTERNAL_MODULE_PPM and
MODULE_D16_EU_ONLY_SUPPORT both defined
2015-07-18 09:44:29 +02:00
Andre Bernet cad3b7726d Fix #2485 2015-07-18 09:13:26 +02:00
Bertrand Songis 895afcc58c Update DONATIONS.txt 2015-07-18 09:03:55 +02:00
Jacek Drewniak df6d77289c Fixes 2015-07-18 01:10:48 +02:00
bsongis 4ad6ea8190 When sorting the issues I found a graphic from Martin in #1945 which was
not implemented. What do you think of it?
2015-07-17 11:14:56 +02:00
Andre Bernet a480c6ce87 Fix #2479 2015-07-17 09:43:04 +02:00
Bertrand Songis 17c176084c Update DONATIONS.txt 2015-07-17 08:02:44 +02:00
bsongis 5fdff961a6 Fixes #2474 - Needs test, thanks! 2015-07-17 00:13:24 +02:00
bsongis 475f1f1b2a Fixes #2476 2015-07-17 00:05:20 +02:00
Bertrand Songis 1a23b0c8d1 Update DONATIONS.txt 2015-07-16 23:20:22 +02:00
bsongis 92b5b72350 Fixes #2472 2015-07-16 23:15:35 +02:00
Bertrand Songis b639466a4f Update DONATIONS.txt 2015-07-16 19:11:22 +02:00
Bertrand Songis 0347883fdd Update README.md 2015-07-16 18:48:57 +02:00
Bertrand Songis 46cc410da7 Update README.md 2015-07-16 18:47:49 +02:00
bsongis f3778e8d5b OpenTX 2.1.0 release 2015-07-16 18:20:48 +02:00
bsongis f51a313708 [Taranis] Display of shutdown bitmap instead of the message "SHUTDOWN"
in the popup
2015-07-14 22:12:24 +02:00
bsongis 7d9cd8c869 [Taranis X9E] A little vibration on startup / shutdown to wake the user
up
2015-07-14 19:16:16 +02:00
Andre Bernet 13958c9396 NL 2015-07-14 18:56:40 +02:00
bsongis 4f9e041a50 [Taranis X9E] Bootloader updated according to Mike's suggestion 2015-07-14 18:43:11 +02:00
Andre Bernet b609ad750f Max startup duration corrected 2015-07-14 12:19:09 +02:00
bsongis 0d4facd4ae [Taranis X9E] Startup / shutdown bitmaps were not centered vertically 2015-07-14 12:12:44 +02:00
bsongis 4ab0b31ed8 Nederlands compilation error 2015-07-14 11:49:39 +02:00
bsongis 0355a25b5a [Taranis X9E] Startup animation more fluid 2015-07-14 11:14:40 +02:00
bsongis 1cb78610f7 [Taranis X9E] Startup animation changed. Comments please! 2015-07-14 10:22:07 +02:00
bsongis e35720a24a [Taranis] The bootloader executed code from the application! 2015-07-14 09:50:29 +02:00
Andre Bernet 030588b992 NL update, enable it for simulation 2015-07-13 21:01:06 +02:00
bsongis 5fb12915e5 Fixes #2463 - Code review needed, thanks! 2015-07-13 14:13:49 +02:00
bsongis a1f713c721 [Taranis X9E] The firmware start check was not right on X9E 2015-07-13 11:37:44 +02:00
bsongis ff9d866550 [Taranis] "BOOT" string was optimized out from the bootloader! 2015-07-13 11:05:03 +02:00
bsongis d183bbd05e [Taranis] I rename the Lua scripts directory for telemetry "TELEMETRY"
instead of "TELEM"
2015-07-13 08:52:50 +02:00
bsongis 385536ab73 Fixes #2460 2015-07-13 08:35:10 +02:00
bsongis 5c3cfd9cdd Fixes #2461 2015-07-13 01:28:00 +02:00
bsongis b4364e13d4 Fixes #2456 2015-07-13 00:50:07 +02:00
bsongis 418bd90037 Fixes #2459 2015-07-13 00:32:17 +02:00
bsongis 0a3bcd2737 Fixes #2462 2015-07-12 22:46:53 +02:00
bsongis 00c62b13d6 Fixes #2453 2015-07-12 11:46:54 +02:00
Bertrand Songis a61195010a Merge pull request #2458 from opentx/driver33/PL_TR
small fixes
2015-07-12 11:10:36 +02:00
Jacek Drewniak 336da8f061 small fixes 2015-07-12 10:55:00 +02:00
bsongis 7b35b4bcc8 [Taranis X9E] The battery is a NI-MH 9.6V - 2000mAh 2015-07-11 19:15:57 +02:00
bsongis 1f665561eb [Taranis X9E] Makefile option "SHUTDOWN_CONFIRMATION=YES/NO" added 2015-07-11 17:21:20 +02:00
Bertrand Songis ede587f2e1 Merge pull request #2452 from opentx/frsky_2.1
Frsky 2.1
2015-07-11 10:49:47 +02:00
bsongis 8296f508de Fixes #2451 2015-07-11 10:46:46 +02:00
bsongis d4544f11f5 Fixes #2425 2015-07-11 10:37:55 +02:00
Bertrand Songis 5bf370295d Merge pull request #2450 from hrenz/patch-6
Update de.h.txt
2015-07-11 08:55:17 +02:00
bsongis d4ff8c99c7 Script for resizing / removing audio from videos 2015-07-11 08:53:37 +02:00
bsongis 5db809841a [Taranis] Bootloader cosmetics 2015-07-11 08:52:57 +02:00
bsongis a7462157c5 [Taranis X9E] Bitmaps added on startup 2015-07-11 08:52:30 +02:00
hrenz aa0aeece3c Update de.h.txt
Screenshot funktion added at german  line 308
2015-07-11 08:44:57 +02:00
JivaroFAD 51fffc6e1b M2560 JackPPM correction + sch update 2015-07-10 21:38:24 +02:00
bsongis 62e3e98da4 Fixes #2449 2015-07-10 19:34:44 +02:00
Damjan Adamic 87d90e391a Fixes #2446: some function static variables were dependent on continuity of g_tmr10ms value between simulator sessions. 2015-07-10 18:28:49 +02:00
bsongis 17f465bff5 [Taranis X9E] Shutdown procedure modified (popup with confirmation
added)
2015-07-10 17:34:55 +02:00
bsongis 5fc99e61d5 [Taranis] There is no v215=>v217 EEPROM conversion 2015-07-10 14:11:22 +02:00
bsongis 1f0d0433bb [Taranis X9E] Constants added 2015-07-10 11:03:38 +02:00
bsongis e4698d10a3 [Taranis X9E] Second version for the startup procedure 2015-07-10 09:15:18 +02:00
bsongis bfb72bb0a9 [Taranis X9E] The radio starts if the PWR button is pressed between 2s
and 5s
2015-07-10 00:08:08 +02:00
martin 14e248bec7 CZ translations 2015-07-10 00:06:30 +02:00
bsongis dd3eaf4ec9 [Taranis] Hardcoded timer removed 2015-07-09 23:49:23 +02:00
Damjan Adamic 1ebce293c9 Release notes updated (found more new features) 2015-07-09 23:06:21 +02:00
Damjan Adamic 1422deb42b simu switches for X9E fixed 2015-07-09 22:49:44 +02:00
Damjan Adamic 449829ea70 Switches warning: limited display to first 5 wrong switches 2015-07-09 22:46:13 +02:00
bsongis 9133558bed [Taranis] I had a Pot warning on Pot3 even if configured as None 2015-07-09 22:30:40 +02:00
Bertrand Songis 6ab60d2e84 Merge pull request #2445 from opentx/projectkk2glider/issue_2444_9XE_simu_keys
Fixes #2444: Wrong scroll direction in simulators for X9E
2015-07-09 22:24:14 +02:00
bsongis a738f674cc Mavlink compilation failure 2015-07-09 22:22:28 +02:00
bsongis ef21053b3d It was possible to reset Timer3 in custom functions even if Timer3
unavailable
2015-07-09 22:17:55 +02:00
Damjan Adamic 8ed9774b9a Fixes #2444: Wrong scroll direction in simulators for X9E 2015-07-09 21:41:05 +02:00
bsongis d0bee7d666 Nederlands added 2015-07-09 00:01:33 +02:00
bsongis 8c2b963395 Missing test 2015-07-08 23:17:35 +02:00
bsongis 999aab206a Timer3 was not reset on FlightReset (when present) 2015-07-08 19:42:18 +02:00
bsongis 19f5db6fe7 Fixes #2442 2015-07-08 19:42:18 +02:00
bsongis df7f715dd3 Contributors / Release notes dialogs refactoring 2015-07-08 19:42:18 +02:00
mhotar 46d7fb3ff6 CZ translations - Companion 2015-07-08 17:55:04 +02:00
bsongis 6bc7c62adc #2432 - ä added in special chars which need conversion 2015-07-08 07:09:41 +02:00
bsongis 9b7e913fbf Fixes #2434 2015-07-08 00:19:29 +02:00
bsongis be24ff122b [Taranis X9E] Bluetooth can be stopped and device name is now
configurable
2015-07-08 00:01:55 +02:00
Bertrand Songis a3c267b9be Merge pull request #2431 from opentx/mhotar/companionsplash21
Companion splash images 21 #2427
2015-07-07 23:47:00 +02:00
bsongis aac7384414 Fixes #2432 - Perhaps some chars missing? 2015-07-07 23:42:40 +02:00
martin c063dbbbb3 image files cleanup #2427 2015-07-07 22:33:35 +02:00
Damjan Adamic 6d5ed8409c simu was creating too small eeprom.bin file 2015-07-07 20:16:55 +02:00
bsongis 423580c260 Taranis X9E simulator was broken inside Companion 2015-07-07 20:03:23 +02:00
bsongis d43764a526 Cosmetics 2015-07-07 19:34:39 +02:00
bsongis a3df4120e1 Valgrind complained in some menus 2015-07-07 19:33:33 +02:00
mhotar bbc43a908e Companion CZ translation -still unfinished 2015-07-07 17:43:46 +02:00
mhotar 7c0f568251 Companion splash images 21 #2427 2015-07-07 11:30:17 +02:00
bsongis 1e44380c2d Release notes updated. Anything else I forgot? 2015-07-07 07:38:37 +02:00
bsongis 6dda06016b Donations updated 2015-07-07 07:28:09 +02:00
bsongis 66fe08f72e Option TARANIS_INTERNAL_PPM compilation fix 2015-07-07 07:22:41 +02:00
Romolo Manfredini 31b981e63e Italian TTS, fully fixed 2015-07-07 02:22:45 +02:00
bsongis 24630133cb Simu compilation fix 2015-07-07 00:22:20 +02:00
bsongis a56f75f3d9 [Taranis X9E] Bluetooth
- baudrate configured automatically to 115200bauds (factory
reset=9600bauds)
- device name is now "Taranis"
- Telemetry is mirrored
2015-07-06 23:55:58 +02:00
mhotar 7f65075af2 companion - some missing icons added 2015-07-06 19:26:50 +02:00
Damjan Adamic 12c87c820f Release notes updated for 2.1 (there might still be some (important) changes missing) 2015-07-06 19:10:42 +02:00
bsongis 8723c110b4 Fixes #2424 - ReplaceCHx should not be present in global functions 2015-07-06 18:42:54 +02:00
bsongis 5b567fc057 Fixes #2425 2015-07-06 18:30:58 +02:00
bsongis fc7c7f1a70 Fixes #2426 2015-07-06 17:53:43 +02:00
Romolo Manfredini c389f6621b German tts and some translation fix (companion is still missing) 2015-07-06 16:38:49 +02:00
bsongis 01b0c015f6 Fixes #2421 - Full check of I2C errors / infinite wait. In case of
eeprom read/write error, the I2C is reinitialized and the operation
started again.
2015-07-06 07:55:02 +02:00
Romolo Manfredini e090078401 Italian translations in companion - fix for singular/plural forms in italian 2015-07-06 02:58:25 +02:00
Romolo Manfredini 14ca8f3427 Italian translations - fix reading of time. 2015-07-05 21:35:05 +02:00
bsongis fd3f79a8d5 Possible fix for #2421 - Code review and tests needed 2015-07-05 19:57:14 +02:00
Damjan Adamic c09d4278c3 Fixes #2420: input name buffer overflow in Companion (ported from master) 2015-07-05 18:26:19 +02:00
bsongis 6bd9717315 TTS fixes 2015-07-05 13:09:17 +02:00
bsongis 79e36b8711 PlayDuration was broken 2015-07-05 12:28:41 +02:00
Andre Bernet 0683e60bec French translations 2015-07-05 12:09:53 +02:00
bsongis 9dc459ec43 Temporary fix for #2418 - We will do something better later when we have
more time, as the +/-1 / GVAR / VALUE could be integrated in the Source
menu ...
2015-07-05 11:42:26 +02:00
bsongis c05dd4597d Fixes #2411 2015-07-04 18:12:10 +02:00
bsongis 017c13dbdc Fixes #2415 2015-07-04 17:50:50 +02:00
bsongis 396ded7ee3 Fixes #2414 2015-07-04 17:40:50 +02:00
bsongis 40a6db3af4 Fixes #2417 2015-07-04 17:32:48 +02:00
bsongis 12171ef266 Script to capitalize model bitmaps 2015-07-04 17:22:13 +02:00
bsongis 4c4d3bc24d Fixes #2413 2015-07-04 14:17:09 +02:00
bsongis 6ca949d033 Fixes #2412 2015-07-04 12:43:55 +02:00
Andre Bernet 18eaca9135 French translations 2015-07-04 12:10:13 +02:00
bsongis 76e312ed5e DE translations 2015-07-04 10:41:01 +02:00
bsongis ffaf3401a2 Fixes #2405 - Trims were shifted by 2 2015-07-04 00:33:05 +02:00
bsongis ae4fc0888a [Taranis X9E] Wrong import of model settings in Companion 2015-07-03 23:24:09 +02:00
bsongis 9cedd8364c Fixes #2408 - Needs a test 2015-07-03 22:48:05 +02:00
bsongis 332ac86069 Fixes #2407 - Good catch! 2015-07-03 15:15:44 +02:00
bsongis 22f598cdac [Taranis] Fixes #2403 - Differential changes we did in 2.1 reverted 2015-07-03 14:03:11 +02:00
bsongis d6cba75510 [Taranis X9E] BT Cosmetics 2015-07-03 13:57:55 +02:00
martin 8fc7859cf1 CZ translations - partial 2015-07-03 00:26:49 +02:00
bsongis 1ad54b241d Fixes #2401 2015-07-02 19:50:40 +02:00
Damjan Adamic d73f3ed19a Re #1732: stack corruption fixed (ported from master) 2015-07-02 19:35:35 +02:00
Andre Bernet 07ac7db085 Failsafe mode was converted wrong when coming from a 216 eeprom (Fix #2400) 2015-07-02 17:50:50 +02:00
Andre Bernet 9f1c5666aa Companion French translations first part (rest tomorrow hopefully) 2015-07-01 23:48:35 +02:00
Andre Bernet b26cec42bb Update all companion translation files for translators without build environment 2015-07-01 22:52:31 +02:00
bsongis 34240377e0 Fixes #2399 2015-07-01 21:21:04 +02:00
Bertrand Songis a26b938d72 Merge pull request #2398 from opentx/driver33/PL_Tr
small fixes
2015-07-01 21:02:10 +02:00
bsongis d2d5cebb29 Compilation fix 2015-07-01 20:51:36 +02:00
bsongis 6c167fd6f0 Test code removed 2015-07-01 20:31:21 +02:00
bsongis 06cd8656f9 [Taranis X9E] Possibility to shutdown the radio during an ALERT, with
the small animation ...
2015-07-01 20:27:54 +02:00
bsongis b58fff1261 [Taranis X9E] We need to have a VARIANT in eeprom to recognize a Taranis
from a Taranis X9E EEPROM
2015-07-01 19:27:37 +02:00
Jacek Drewniak a956797ae3 small fixes 2015-07-01 17:27:57 +02:00
bsongis 9dc1f2d5f8 [Taranis X9E] Problem when pressing long the PWR button on power off, I
revert Mike's change for now
2015-07-01 08:00:50 +02:00
bsongis eef6bb0342 Fixes #2396 2015-07-01 06:53:48 +02:00
bsongis ce1982dad1 [Taranis X9E] I forgot to change the pins mask for the switches 2015-07-01 06:37:34 +02:00
bsongis 4957cbfef5 [Taranis X9E] Last minute hardware modifications! 2015-06-30 18:49:55 +02:00
bsongis f9ff77ea7b Cosmetics 2015-06-30 18:27:20 +02:00
bsongis 6abd888bf3 Compilation fix 2015-06-30 06:36:14 +02:00
bsongis 222440a5e3 Fixes #2391 2015-06-29 23:23:15 +02:00
bsongis 7800de54b0 Fixes #2390 2015-06-29 23:18:26 +02:00
Bertrand Songis ff409321ff Merge pull request #2290 from opentx/bsongis/issue_2266_set_failsafe_custom_function
Fixes #2266
2015-06-29 22:57:23 +02:00
Bertrand Songis 8b9265a3c7 Fixes #2360 2015-06-29 22:40:55 +02:00
bsongis e9f1471eba [Taranis X9E] Conversions from EEPROM v216 disabled 2015-06-29 22:20:51 +02:00
Bertrand Songis 7d5c392078 Merge pull request #2288 from opentx/bsongis/ccm_memory_on_f4
Bsongis/ccm memory on f4
2015-06-29 22:17:28 +02:00
Bertrand Songis ec4e843c52 Merge pull request #2392 from opentx/projectkk2glider/log_viewer_session_duration
Added session duration information in Log Viewer
2015-06-29 22:15:42 +02:00
Damjan Adamic 64315baf3a Added session duraton information in Log Viewer 2015-06-29 20:38:20 +02:00
bsongis a4ff92d299 [Taranis X9E] Inverted keys in bootloader 2015-06-29 19:23:14 +02:00
bsongis 8eae895c83 [Taranis X9E] The bootloader was not started (trims masks hardcoded) 2015-06-29 19:11:22 +02:00
Damjan Adamic 00a3e8b404 Typo in release notes 2015-06-29 18:37:00 +02:00
Damjan Adamic f592a78b4b Release notes updated 2015-06-29 18:30:24 +02:00
Damjan Adamic 106e32c5cc Donations copied from master 2015-06-29 18:27:58 +02:00
bsongis 5680f00fd3 [Taranis X9E] Variables moved to CCM Memory. Around 45k RAM saved. 2015-06-29 18:25:25 +02:00
Bertrand Songis 1086ae85e5 Merge pull request #2389 from opentx/driver33/PL_TR
Small fixes
2015-06-29 18:05:38 +02:00
Jacek Drewniak af2a79b43e Small fixes 2015-06-29 10:49:21 +02:00
bsongis 86c2788454 Compilation fix 2015-06-29 06:51:46 +02:00
bsongis 2b397b7433 [Taranis] Wrong PIN used for SPORT direction. SPORT devices flashing
need tests, it was broken for sure
2015-06-29 06:43:52 +02:00
bsongis 55356baea8 Fixes #2266 - SetFailsafe Custom Function. Version without an EEPROM
shift. It removes the ModuleOff function which nobody will need I hope
...
2015-06-28 22:28:18 +02:00
Bertrand Songis dab2267e10 Merge pull request #2297 from opentx/bsongis/dangerous_module_functions
Dangerous module functions fix
2015-06-28 20:53:16 +02:00
bsongis cc9b222175 Almost ready for a 2.1.0 release? 2015-06-28 19:43:21 +02:00
bsongis e19d56c66c Another fix for #2378 (various EEPROM import issues) 2015-06-28 19:15:29 +02:00
bsongis 2009c00dd0 And now? Issue #2378 2015-06-28 18:22:12 +02:00
bsongis e4b14233b5 Should fix #2378 - Who can confirm? 2015-06-28 17:52:42 +02:00
Andre Bernet 039b2e943c Add EU-only option to companion. Compile script is updated 2015-06-28 17:42:01 +02:00
Bertrand Songis 5baa5f588d Merge pull request #2388 from opentx/projectkk2glider/issue_2381
Fixes #2381: time based V2 params were not formated properly. Time un…
2015-06-28 17:31:02 +02:00
Damjan Adamic f8a2ec0aee Fixes #2381: time based V2 params were not formated properly. Time unit also added. 2015-06-28 17:28:24 +02:00
bsongis 447ea6fb39 [Taranis X9E] Patch from Mike to save power on shutdown 2015-06-28 17:20:57 +02:00
bsongis bfb10cd539 [Taranis X9E] Top LCD display problem when the timer becomes negative 2015-06-28 17:15:57 +02:00
bsongis 224a937825 Compilation fix 2015-06-28 16:46:08 +02:00
bsongis 871df6e913 [Taranis] Wrong audio volume scale 2015-06-28 16:41:17 +02:00
bsongis 8d5b178fc2 [Taranis X9E] Last minute modifications 2015-06-28 16:37:26 +02:00
bsongis 18d8edce36 Fixes #2360 2015-06-28 16:12:49 +02:00
Bertrand Songis d96f1f3400 Merge pull request #2320 from opentx/bsongis/special_eu_taranis_firmware
Special EU firmware for Taranis
2015-06-28 15:39:52 +02:00
bsongis 641e7335f7 Cosmetics 2015-06-28 15:38:30 +02:00
bsongis 688cd9f724 Special EU firmware for Taranis
Only D16 mode is EU-compatible. This version will hide both D8 and LR12
modes.
2015-06-28 15:33:42 +02:00
Damjan Adamic 7312bd2655 Fixes #2382: new atribute onlyPositive for telemetry sensor
Conflicts:
	radio/src/translations/it.h.txt
2015-06-28 12:37:55 +02:00
Bertrand Songis add90b3a88 Merge pull request #2387 from opentx/projectkk2glider/eeprom_import_debug
Debug output for eeprom import
2015-06-28 12:32:31 +02:00
bsongis 27b0052f06 Translations fixes 2015-06-28 12:27:31 +02:00
bsongis bfcb7dfeac Spanish translations by Jose Carlos Lorenzo Garcia, thanks! 2015-06-28 12:14:22 +02:00
Damjan Adamic 8a49645c14 Debug output for eeprom import. Use "cmake -D CMAKE_BUILD_TYPE=Debug -D DEBUG_IMPORT=ON ../src" to turn it on 2015-06-28 09:34:46 +02:00
Damjan Adamic 56d12d88c1 Re #2378: SHdown switch was missing 2015-06-27 19:00:41 +02:00
Damjan Adamic 4e10c965a9 Re #2378: fixed v216 inputs import 2015-06-27 19:00:41 +02:00
Damjan Adamic 40adc23d78 Dupliate declaration removed 2015-06-26 20:58:35 +02:00
Damjan Adamic 516be9d9d3 Trace fixed 2015-06-25 21:11:22 +02:00
Damjan Adamic 260da330c4 Fixes #2372: SWR telemetry value not available on Taranis 2015-06-25 21:04:00 +02:00
Damjan Adamic 56c249326f Fixes #2382: Vario only showing positive values (reverted from commit a88cace888) 2015-06-25 20:10:59 +02:00
Damjan Adamic a88cace888 Fixes #2382: Vario only showing positive values 2015-06-25 19:45:05 +02:00
Damjan Adamic 2f2b5e2ebe Fixed pot and slider names for 9XE 2015-06-25 18:38:16 +02:00
Damjan Adamic a8a3a7e29a Fixes #2380: can't select LS or RS as source in INPUT and MIXERS 2015-06-25 11:22:27 +02:00
Damjan Adamic 5ab974e140 GeneralEdit initial tab selection fix 2015-06-25 11:22:27 +02:00
Andre Bernet 134cf38617 Fix switch conversion issues on radio 2015-06-22 12:45:11 +02:00
Bertrand Songis 662b0dacf0 Merge pull request #2376 from opentx/driver33/PL_translation
Translation fixes
2015-06-20 12:04:16 +02:00
Jacek Drewniak 3a4ca2be05 Translation fixes 2015-06-20 10:51:57 +02:00
Damjan Adamic c0afcb51f7 Fixes #2326: Google Earth export GPS glitch filtering and lat/lon synchronization (ported from master) 2015-06-19 18:40:42 +02:00
bsongis 6a3f277fde Fixes #2371 (french sounds shifted) - Now only en / fr TTS sounds are
correct, I need help for all other languages!
2015-06-19 10:55:14 +02:00
bsongis 5d2a04467c Fixes #2368 2015-06-18 19:11:07 +02:00
bsongis f4e0518cd9 [Taranis] Precision was not good enough when displaying trim values on
main view
2015-06-18 19:10:39 +02:00
bsongis 98b23b348e Fixes #2369 2015-06-18 19:10:05 +02:00
Bertrand Songis 81abf548a3 Merge pull request #2370 from opentx/projectkk2glider/issue_2364_s3_ghost_readings_for_next
Fixes #2364: use fixed analog value for non-connected pots (ported fr…
2015-06-17 18:08:11 +02:00
Damjan Adamic 873871d9f4 Fixes #2364: use fixed analog value for non-connected pots (ported from master) 2015-06-17 10:34:16 +02:00
bsongis 0b44e10e0f [Taranis X9E] Trims exchanged 2015-06-17 07:02:47 +02:00
bsongis 5764cdee57 [Taranis] More stuff moved to hal 2015-06-16 22:44:10 +02:00
bsongis bbdadf57e7 [Taranis X9E] F1, F2, F4 and S2 direction inverted 2015-06-16 18:19:58 +02:00
bsongis f7af41c81c [Taranis X9E] Sliders S1 and S2 were not shown in the calibration screen 2015-06-16 18:18:34 +02:00
bsongis 07444b002c [Taranis] Switches selection menu 2015-06-16 18:10:16 +02:00
bsongis 0283096ac7 Different voices directory (voices-21) on the web server 2015-06-16 07:54:04 +02:00
bsongis 770f7b3174 [Taranis] Logical switch not saved when only v2 parameter modified 2015-06-15 22:27:39 +02:00
bsongis 34d096e115 All disabled telemetry google tests are now enabled 2015-06-15 22:05:53 +02:00
bsongis 414070bde1 [Taranis X9E] Again back to S1 / S2 instead of F5 / F6 2015-06-15 18:30:52 +02:00
Bertrand Songis 862dc273f0 [Taranis X9E] 2 optional sliders are now named LS and RS (as today on
Taranis)
2015-06-15 07:14:34 +02:00
Bertrand Songis b119e5552c [Taranis X9E] Sliders in the middle are called F5 and F6 2015-06-15 07:08:47 +02:00
bsongis fc492a7709 Fixes #2359 2015-06-14 23:16:19 +02:00
bsongis f4d1389c4d Cells sensor can now be displayed in PREC1 or even PREC0 2015-06-13 23:18:52 +02:00
Bertrand Songis 2d8b43fa9b [Taranis X9E] SWA not working (typo) 2015-06-13 10:33:23 +02:00
Bertrand Songis 3424c1f2d6 [Taranis] Keys shifted in the bootloader 2015-06-13 10:29:16 +02:00
Bertrand Songis 460847b425 [Taranis X9E] F1, F2 and F4 direction reversed 2015-06-13 10:24:07 +02:00
bsongis 590aa0620c Fixes #2346 2015-06-12 21:39:44 +02:00
bsongis 390781de7c [Taranis] Now the Modelsel screen comes quickly, eeCheck() is not any
more called when entering, but only when really needed ...
2015-06-12 21:21:01 +02:00
Bertrand Songis 74b43c478b Cosmetics 2015-06-12 16:26:36 +02:00
Bertrand Songis e88dd59c93 [Taranis X9E] SWM problem fix 2015-06-12 16:24:02 +02:00
Bertrand Songis 2953346b6b Refactoring 2015-06-12 14:17:06 +02:00
Bertrand Songis b32bc91385 Compilation fixes 2015-06-12 13:56:29 +02:00
Bertrand Songis 7e50b2e466 Cosmetics 2015-06-12 13:27:25 +02:00
Bertrand Songis 0e5299e32d [Taranis X9E] F3 and F4 inverted, S2 not working 2015-06-12 12:21:50 +02:00
Bertrand Songis 7dcbd3ae90 [Taranis X9E] F1 reversed direction 2015-06-12 12:01:12 +02:00
bsongis 103bfe4b79 [Taranis X9E] SWF reversed. SWR not answering 2015-06-12 11:05:28 +02:00
bsongis b0a4de5a14 [Taranis) Switch names displayed below bars in calibration screen 2015-06-12 08:16:22 +02:00
Bertrand Songis ed7cb82d3b Compilation fix 2015-06-12 07:17:41 +02:00
Bertrand Songis 5a9882a069 Cosmetics 2015-06-12 07:02:58 +02:00
Bertrand Songis f4659a55ba [Taranis X9E] Changes on SWO and SWP 2015-06-12 06:58:42 +02:00
Bertrand Songis 744b3139b8 Compilation fix 2015-06-12 06:57:41 +02:00
Bertrand Songis fa0e4b9964 Cosmetics 2015-06-11 23:18:37 +02:00
bsongis 63bed89a52 Compilation fixes 2015-06-11 20:29:21 +02:00
bsongis 95de75ba41 [Taranis X9E] Last minute changes taken into account. It remains a bug
in SWF and SWP definitions (they share the same pins in the spec)
2015-06-11 19:21:30 +02:00
JivaroFAD 08f97e08c6 M2560 sch update 2015-06-10 20:03:46 +02:00
bsongis 878f97a52c Compilation error (strange char inserted it seems) 2015-06-10 18:11:38 +02:00
bsongis 11e4278add Compilation fixes 2015-06-09 21:24:50 +02:00
bsongis 3ce0eecbb3 OpenOCD st-link config files now saved on git 2015-06-09 21:15:11 +02:00
bsongis 8365a8dbaf Constants renamed (so that Taranis hal is now nice) 2015-06-09 21:15:10 +02:00
bsongis bab4168ac4 lcd.drawNumber now takes a float instead of an integer as argument. Some
parameters declared as optional in the Lua API.
2015-06-09 21:15:10 +02:00
bsongis ac638f2020 Include fixed 2015-06-09 21:15:10 +02:00
bsongis 85329a67e4 Fixes #1689 - Vario silent when within zero range 2015-06-09 21:15:10 +02:00
bsongis 1ae43970b4 Cosmetics 2015-06-09 21:15:10 +02:00
Michał Wróbel 9b66a9b971 [9X] DRY, just use the BOLD_SPECIFIC_FONT macro 2015-06-08 23:35:44 +02:00
Michał Wróbel bbf88744cb [AVR] Fix last column of last row of DBLSIZE text (off-by-one error) 2015-06-07 19:34:53 +02:00
bsongis 3b6322181c [Taranis] Simplification of PWR driver 2015-06-06 18:17:21 +02:00
JivaroFAD c2c7fabfde M2560 : haptic state inversion + sch update 2015-06-06 12:15:18 +02:00
bsongis 0f9df195ad Compilation fix for Taranis X9E bootloader 2015-06-06 08:07:44 +02:00
Bertrand Songis 85411d28fc Merge pull request #2307 from cmarzer/internalPPM_2306
Internal ppm 2306
2015-06-05 09:47:32 +02:00
Bertrand Songis 49c455aa27 Merge pull request #2345 from opentx/bsongis/i2c_hardware_on_taranis
Bsongis/i2c hardware on taranis
2015-06-05 09:45:50 +02:00
bsongis f49a23b635 I2C speed now 400kHz except on REV4a boards 2015-06-05 09:45:04 +02:00
Damjan Adamic 67cd321400 Re #2260: class Profile dependency removed from simulatorinterface 2015-06-01 21:37:25 +02:00
JivaroFAD 61c7abf214 M2560 update
makefile option for soft-off and haptic added
audio&voice desactivated on Companion (not yet implemented)
doc update (LCD resistor added)
2015-06-01 00:11:35 +02:00
Cedric Marzer 8564500151 Cosmetic fixes 2015-05-31 21:49:42 +02:00
Bertrand Songis 05f7286eb8 Merge pull request #2349 from opentx/projectkk2glider/issue_2260_simulator_volume_gain_for_next
Fixes #2260: added volumeGain in simulator (ported from master)
2015-05-31 16:53:27 +02:00
bsongis 23adad950a REV4a only supports 100kHz, this is why I had random errors! Now I need
tests at 400kHz for the standard (non Plus) Taranis. I keep 200kHz for
now.
2015-05-31 16:43:15 +02:00
bsongis bbb5cd9fdb Code used to test I2C speeds 2015-05-31 16:09:14 +02:00
bsongis 6682d0c6d3 200kHz on non REVPLUS boards 2015-05-31 16:08:17 +02:00
Damjan Adamic 70ff6b06ed Fixes #2260: added volumeGain in simulator (ported from master) 2015-05-31 15:59:31 +02:00
bsongis d3b55e8ad6 Compilation fix. Now I2C @ 240kHz 2015-05-29 21:45:05 +02:00
bsongis 8bf7a78b77 240kHz 2015-05-29 21:23:44 +02:00
bsongis bb761f8cf6 EEPROM write added. Speed slowed down to 200kHz 2015-05-29 21:14:00 +02:00
bsongis 5401ead546 Makefile simplification. Fixes simu compilation error 2015-05-29 21:14:00 +02:00
bsongis ca9f250f64 Missing optimizations in the bootloader 2015-05-29 21:14:00 +02:00
bsongis 4a13a65024 I2C Read at 400MHz (hardware). I2C Write still not implemented 2015-05-29 21:14:00 +02:00
Andre Bernet bef5165f68 French translations 2015-05-27 10:15:06 +02:00
bsongis 51ae30cc27 Fixes #2335 2015-05-27 07:12:19 +02:00
bsongis f35148ed2d Cosmetics 2015-05-27 06:42:10 +02:00
bsongis 07c10f1256 Telemetry sensors not populated inside Companion simulator 2015-05-27 06:40:51 +02:00
JivaroFAD 88f907abc5 Revert 1dc10122 2015-05-26 23:10:21 +02:00
Cedric Marzer 2d7330d1bb Changed internalModule to gmodel.moduleData[INTERNAL_MODULE].type 2015-05-26 22:46:46 +02:00
Cedric Marzer e8e8daff11 Changed internalModule to gmodel.moduleData[INTERNAL_MODULE].type 2015-05-26 22:43:42 +02:00
Cedric Marzer 00cac49972 Merge remote-tracking branch 'upstream/next' into internalPPM_2306
Conflicts:
	radio/src/gui/Taranis/menu_model_setup.cpp
	radio/src/myeeprom.h
	radio/src/opentx.h
2015-05-26 22:09:12 +02:00
bsongis ca515a9edb Fixes #2343 2015-05-26 21:25:41 +02:00
bsongis 0f99e07d9a Telemetry fixes 2015-05-26 20:07:28 +02:00
JivaroFAD 33de4e903e MEGA2560 missing in avrdude arguments 2015-05-26 09:46:07 +02:00
Bertrand Songis cc1382e5e2 Merge pull request #2332 from opentx/bsongis/module_struct_change_for_2307
Bsongis/module struct change for 2307
2015-05-26 07:15:28 +02:00
bsongis 0c01f66272 Fixes #2299 2015-05-26 07:14:25 +02:00
bsongis 22f4c11bd9 DE translation error 2015-05-26 06:36:30 +02:00
bsongis 5e7ef29083 Bad use of signal / slot in 9X simulator 2015-05-25 23:40:09 +02:00
Bertrand Songis 69b6a98777 Merge pull request #2342 from opentx/projectkk2glider/issue_2301_findTrueFileName_fix_on_windows_for_next
Fixes #2301: findTrueFileName() was not finding any files on Windows
2015-05-25 22:21:57 +02:00
JivaroFAD 1dc10122ea Mega2560 ST7565P LCD + Companion flash dialog 2015-05-25 22:19:09 +02:00
Damjan Adamic e9c4274503 Fixes #2301: findTrueFileName() was not finding any files on Windows 2015-05-25 22:14:34 +02:00
JivaroFAD 4af46ec8dc Merge branch 'next' of https://github.com/opentx/opentx into next 2015-05-25 21:08:45 +02:00
JivaroFAD ed93edf8d9 Mega2560 update
FrSky was missing and heli was listed two times
Doc update
2015-05-25 21:08:00 +02:00
bsongis ae833f98d0 Cosmetics 2015-05-25 20:09:31 +02:00
bsongis 6f51fc9da6 Core in 9X simulator 2015-05-25 20:08:39 +02:00
JivaroFAD 9c87dcfba3 MEGA2560 pcb update 2015-05-24 12:05:32 +02:00
bsongis cd38ecd1ca Companion part 2015-05-24 09:58:44 +02:00
bsongis 18ab76718e #2307 - ModuleData structure modification 2015-05-24 08:58:47 +02:00
JivaroFAD e665f4a176 Mega2560 cleaning 2015-05-23 21:48:22 +02:00
Bertrand Songis 5a94a0db72 Merge pull request #2330 from opentx/romolo/writeerrors
Write errors to the radio are not correctly handled
2015-05-22 19:57:07 +02:00
Romolo Manfredini 0f867f2f3d Write errors to the radio are not correctly handled 2015-05-22 19:16:07 +02:00
bsongis a7a69d5529 [DE firmware] D16 becomes D16-EU (when only this mode is available)
Conflicts:
	radio/src/translations/de.h.txt
2015-05-22 12:21:01 +02:00
bsongis 66a0f264d3 [Mega2560] 2 more LCD options added 2015-05-22 08:41:12 +02:00
Bertrand Songis 2e066f08f6 Merge pull request #2328 from opentx/griebd/log_viewer_enhancement_2267_next
log viewer enhancement, now for next
2015-05-22 08:16:04 +02:00
Grieb 546aa42f56 logsdialog.cpp: removes unused function. 2015-05-21 22:08:47 -03:00
Grieb 3609e2df56 Log Viewer: add a second legend and reference to axes in the legends. 2015-05-21 22:08:47 -03:00
Grieb 46ccd15924 Log Viewer multi-axes. Fixes #2267. 2015-05-21 22:08:46 -03:00
Grieb 22dab11ccf No real changes, just preparing for multi axes in Log Viewer. 2015-05-21 22:08:45 -03:00
Grieb 70c5714775 Updated QCustomPlot to 1.3.1. 2015-05-21 22:08:45 -03:00
Grieb 7f4567c165 Solves item 2 of #2267. And add top/botton margin in graphs. 2015-05-21 22:08:44 -03:00
Andre Bernet 3929ea7845 Fix #2327 2015-05-21 22:58:07 +02:00
Michał Wróbel 04abe29c7c Fix help for string formatting codes in translation files 2015-05-21 19:58:09 +02:00
bsongis 59235fcfcb Indentation fixes 2015-05-21 19:14:00 +02:00
Bertrand Songis 483cc6c190 Merge pull request #2325 from opentx/jivarofad/M2560
LCD driver for stock and M2560
2015-05-21 19:07:01 +02:00
Bertrand Songis fcf417cf5d Merge pull request #2324 from xmxwx/no-buzzer
Support totally silent build (BUZZER=NO && AUDIO=NO)
2015-05-20 23:23:13 +02:00
Michał Wróbel 4d185f78db Support totally silent build (BUZZER=NO && AUDIO=NO) 2015-05-20 23:14:58 +02:00
JivaroFAD eb70ec38d7 M2560 schematics update
ST7920 pinout correction
2015-05-20 18:40:33 +02:00
JivaroFAD de13291db1 LCD driver simplification, 8 bytes saved (ST7565) 2015-05-20 18:08:33 +02:00
JivaroFAD 28812997ab Power-circuit schematic update 2015-05-20 00:00:08 +02:00
JivaroFAD 65017fc243 LCD driver update 2015-05-18 23:33:35 +02:00
Cedric Marzer 167734b755 more changes 2015-05-18 22:26:57 +02:00
Cedric Marzer 9a42cac661 More changes 2015-05-18 22:18:11 +02:00
Cedric Marzer a2c7e788c5 More changes, most of them cosmetic 2015-05-18 21:39:59 +02:00
Cedric Marzer 81835d476d Merge remote-tracking branch 'upstream/next' into internalPPM_2306 2015-05-18 19:47:50 +02:00
Cedric Marzer e9e717a271 Merge remote-tracking branch 'origin/internalPPM_2306' into internalPPM_2306 2015-05-18 13:35:09 +02:00
JivaroFAD a838344e5c M2560 doc update 2015-05-17 21:03:10 +02:00
JivaroFAD 744c797e30 ST7920 support added for 9x and M2560 boards
Merge of olterion ST7920 driver, thanks :)
Draft... please check !
2015-05-17 20:26:41 +02:00
JivaroFAD b5a47a9f57 Mega2560 doc update 2015-05-17 19:53:37 +02:00
Bertrand Songis 366bb5c962 Merge pull request #2317 from opentx/projectkk2glider/issue_2084_max_expos_for_next
Fixes #2084: wrong constant used to limit maximum number of expos (po…
2015-05-17 19:39:28 +02:00
Bertrand Songis 4a15c49561 Merge pull request #2314 from opentx/driver33/PL_translation
Driver33/pl translation
2015-05-17 19:37:29 +02:00
Damjan Adamic 74af80e8be Fixes #2084: wrong constant used to limit maximum number of expos (ported from master) 2015-05-17 18:57:20 +02:00
Jacek Drewniak 72ecd16046 Fixes from Bertrnd suggestion 2015-05-17 14:23:11 +02:00
Jacek Drewniak 6d12d57abe PL Translation fixes 2015-05-17 00:58:01 +02:00
bsongis ddf88e2721 EEPROM was readonly since my latest cosmetics (line removed by mistake) 2015-05-16 11:34:24 +02:00
Cedric Marzer 520df52951 Changed some stuff after bsongis kind review. 2015-05-15 17:52:32 +02:00
Cedric Marzer 9de8cefa79 issue_2306_fixed 2015-05-15 17:52:32 +02:00
Cedric Marzer a54e1605ba PPM internal module GUI added 2015-05-15 17:52:32 +02:00
bsongis 08a198ae66 Compilation error fix 2015-05-15 10:45:18 +02:00
Cedric Marzer 501b712163 Changed some stuff after bsongis kind review. 2015-05-14 23:11:23 +02:00
Cedric Marzer bab05340cf issue_2306_fixed 2015-05-14 22:43:49 +02:00
Cedric Marzer 3108b450b3 PPM internal module GUI added 2015-05-14 22:27:54 +02:00
bsongis 463e23f15b Cosmetics 2015-05-14 19:34:18 +02:00
bsongis 502582a896 Cosmetics 2015-05-14 19:27:02 +02:00
bsongis fc42b19a2f Compilation fix 2015-05-12 06:42:49 +02:00
Romolo Manfredini f134619f7d Typos 2015-05-11 22:31:31 +02:00
bsongis 0c17833ab7 Dangerous module functions fix 2015-05-11 20:34:24 +02:00
Andre Bernet 54a5a34fe8 Disable DANGEROUS_MODULE_FUNCTIONS execution for now, it's broken and _really_ dangerous... 2015-05-11 10:32:38 +04:00
Bertrand Songis 67da88ceb0 Merge pull request #2273 from opentx/bsongis/issue_2183_failsafe_settings_on_individual_channels
Bsongis/issue 2183 failsafe settings on individual channels
2015-05-11 06:45:39 +02:00
bsongis 059ea49f2f Fixes #2183
Failsafe settings on individual channels
2015-05-11 06:43:26 +02:00
Bertrand Songis 218e6a77ba Merge pull request #2281 from opentx/romolo/curveeditor_cutandpaste
Romolo/curveeditor cutandpaste
2015-05-11 06:40:51 +02:00
Romolo Manfredini 3a69982985 Curve editor cut & paste Fixes #1788 2015-05-11 00:36:31 +02:00
Bertrand Songis 68e3e28557 Merge pull request #2287 from opentx/romolo/simulator_s3
Fixes #1917
2015-05-10 12:38:42 +02:00
bsongis 274303a658 Fixes #1917 2015-05-10 12:36:24 +02:00
Andre Bernet cde0824f05 Avoid double logging of RSSI, SWR will need manual selection 2015-05-09 23:14:40 +04:00
Andre Bernet 28e92d964a Fix lots of broken stuff in companion telemetry sensor handling, sync displayed items/units/formulas with firmware (should fix #2285) 2015-05-09 21:49:27 +04:00
Andre Bernet 6d0537988f Failsafe warning only for protocols that support failsafe 2015-05-09 14:22:41 +04:00
Andre Bernet 86f4957c8c Fix #2283 2015-05-09 14:08:49 +04:00
Michał Wróbel ce58a11e73 New Makefile variable SIMUCPPFLAGS used for simu and gtests target 2015-05-09 00:45:18 +02:00
Michał Wróbel e20e66d9bb Fix simu and gtests compilation with TELEMETRY_MOD={14051,14051_SWAPPED} 2015-05-08 23:35:28 +02:00
bsongis fdc47640e2 system_stm32 files moved to targets directory 2015-05-08 18:55:16 +02:00
Andre Bernet dc94820442 Merge pull request #2264 from opentx/bsongis/issue_2186_different_rx_numbers_on_modules
Fixes #2186
2015-05-08 13:28:58 +04:00
Andre Bernet 28cd92253e Merge pull request #2272 from opentx/bsongis/issue_2117_failsafe_warning
#2117 failsafe warning
2015-05-08 13:18:28 +04:00
Andre Bernet 73078f1fc0 Magic number removed 2015-05-08 11:47:29 +04:00
Andre Bernet 6c045cf30b Correct shift 2015-05-08 10:59:21 +04:00
bsongis 6b41b558dd Companion part 2015-05-07 19:46:06 +02:00
bsongis 88881843d6 Compilation fix 2015-05-07 19:36:13 +02:00
bsongis 8cb6539264 Fixes #2117 2015-05-07 19:27:55 +02:00
Bertrand Songis 2c3eb5e313 Fixes #2268 2015-05-07 07:04:26 +02:00
Bertrand Songis 7755bf0341 Merge pull request #2270 from xmxwx/next
Fixes #2250
2015-05-07 06:39:20 +02:00
Michał Wróbel d63f6bcaf7 Fixes #2250 2015-05-07 03:14:31 +02:00
bsongis bda87be10e Damjan and Kilrah remarks taken into account 2015-05-06 18:37:55 +02:00
Bertrand Songis 5f79e7e428 Merge pull request #2244 from opentx/profilebackupfolder_next
Profilebackupfolder next
2015-05-05 20:42:35 +02:00
bsongis 9ed37ab21b Google tests broken with my last commit 2015-05-05 20:07:58 +02:00
bsongis eb6ba88f5a Fixes #2186
Also provides a lua function to retrieve module settings
2015-05-05 20:02:02 +02:00
Andre Bernet f4c3610a8c Mixers monitor in simulator (Fix #2258) 2015-05-05 11:51:55 +04:00
Andre Bernet 10b54312d8 VC++ compilation 2015-05-05 11:51:40 +04:00
Bertrand Songis 5751a6a06a Merge pull request #2255 from opentx/projectkk2glider/issue_2239_ppm_pushpull__for_9xrpro
Projectkk2glider/issue 2239 ppm pushpull  for 9xrpro
2015-05-04 20:37:17 +02:00
Damjan Adamic 60b2a378dd Re #2239: PPM output type added for 9XR-PRO (open drain or push-pull) 2015-05-04 20:35:29 +02:00
Bertrand Songis 1609b1236d Fixes #2253 2015-05-04 07:28:14 +02:00
Romolo Manfredini fc409adeca Small optimization 2015-05-03 21:17:03 +02:00
Bertrand Songis 88f76bf230 Update mainwindow.cpp 2015-05-03 17:22:02 +02:00
bsongis 133f5fee0f PXX pulses fix improved (thanks to Mike for the idea!) 2015-05-03 16:07:16 +02:00
Michał Wróbel 4bab22f797 A more natural fix for #2249 2015-05-03 15:16:49 +02:00
JivaroFAD 2d6933d5ec M2560 board : adc_drive MUX5 correction 2015-05-03 09:45:20 +02:00
Romolo Manfredini bd463e5422 Remove unneeded code: spared few uS in cpu time.. 2015-05-02 19:21:12 +02:00
Romolo Manfredini 1ec7eaad0a Merge origin/next into profilebackupfolder_next 2015-05-02 19:20:53 +02:00
Damjan Adamic 3db6191284 Re #2090: segmentation fault fixed when play button was pressed for the first time 2015-05-02 18:30:36 +02:00
Romolo Manfredini 28419db178 Fix small bug, override of profilebackup folder 2015-05-02 13:50:05 +02:00
Romolo Manfredini 04edf114ae Merge origin/profilebackupfolder_next into profilebackupfolder_next 2015-05-02 13:31:23 +02:00
Romolo Manfredini 78961a1146 As two field were added and binary structure changed we change also the internal version.
The new version will be 210 for opentx2.1
2015-05-02 12:58:47 +02:00
Romolo Manfredini c2db7f029c Allow direct editing of paths 2015-05-02 12:58:47 +02:00
Romolo Manfredini 3a7e4c5005 Fix identing in the code 2015-05-02 12:58:46 +02:00
Romolo Manfredini de6d9f427c Fix scan of floppy drive under win
This should fix scan of floppy drives and also detection of non
removable drives
2015-05-02 12:58:46 +02:00
Romolo Manfredini dc5e36c543 Implement profile specific settings for backup folder.
Profile backup path if set overrides general one, in any case the backup will be performed if either profile specific setting or general settings ones are enabled.
Disabling backup in profile will not disable backups if generic settings are enabled
2015-05-02 12:58:46 +02:00
Romolo Manfredini 19914fb26b Implement profile specific settings for backup folder.
Profile backup path if set overrides general one, in any case the backup will be performed if either profile specific setting or general settings ones are enabled.
Disabling backup in profile will not disable backups if generic settings are enabled
2015-05-02 12:58:45 +02:00
Romolo Manfredini f8059b5295 As two field were added and binary structure changed we change also the internal version.
The new version will be 210 for opentx2.1
2015-05-02 12:57:57 +02:00
Romolo Manfredini d99752b458 Allow direct editing of paths 2015-05-02 12:18:07 +02:00
Damjan Adamic 3e37b9c256 Merge pull request #2245 from opentx/romolo/potreset_next
Reset pots to the middle by right double clicking them
2015-05-02 12:14:14 +02:00
Romolo Manfredini c98cbbcd12 Fix identing in the code 2015-05-02 11:47:11 +02:00
Romolo Manfredini da6524c5ee Reset pots to the middle by right double clicking them 2015-05-02 06:28:58 +02:00
Romolo Manfredini d9fb195443 Fix scan of floppy drive under win
This should fix scan of floppy drives and also detection of non
removable drives
2015-05-02 01:00:24 +02:00
Romolo Manfredini 116b147c51 Implement profile specific settings for backup folder.
Profile backup path if set overrides general one, in any case the backup will be performed if either profile specific setting or general settings ones are enabled.
Disabling backup in profile will not disable backups if generic settings are enabled
2015-05-01 18:13:23 +02:00
Romolo Manfredini deb08e8f68 Implement profile specific settings for backup folder.
Profile backup path if set overrides general one, in any case the backup will be performed if either profile specific setting or general settings ones are enabled.
Disabling backup in profile will not disable backups if generic settings are enabled
2015-05-01 17:44:57 +02:00
bsongis 7ba457be50 I found it ... 3 hours just for this #ifdef missing! 2015-04-30 19:37:02 +02:00
bsongis 1c1f45251b Warning removed 2015-04-29 21:17:05 +02:00
bsongis 252384e910 Another dirty hack for the new Sky9x EEPROM format. This class should be
splitted in 3 or 4 classes ...
2015-04-28 23:08:28 +02:00
Bertrand Songis 4d474288a3 Merge pull request #2238 from opentx/projectkk2glider/issue_2154_64bit_overflow_for_next
Fixes #2154: USB mass storage problem with cards bigger than 4GB
2015-04-28 20:44:14 +02:00
Bertrand Songis 62ecb99e74 Merge pull request #2231 from opentx/driver33/PL_TR_update
Driver33/pl tr update
2015-04-28 20:41:42 +02:00
bsongis a7c1a39c4b [Companion] 9XR-PRO simulator added 2015-04-28 20:41:09 +02:00
Damjan Adamic a1e467aaa0 Fixes #2154: USB mass storage problem with cards bigger than 4GB 2015-04-28 20:41:07 +02:00
bsongis b4dcde3aa8 Constant renamed 2015-04-28 20:40:06 +02:00
bsongis 886431f396 [Sky9x] EEPROM fixes 2015-04-28 20:38:05 +02:00
Damjan Adamic 8343e57c1c Merge pull request #2235 from opentx/griebd/companion_logsdialog_small_glitch_on_next
[companion][logsdialog]Small glitch when loading a second file.
2015-04-28 18:08:33 +02:00
Grieb 99ee35f88c [companion][logsdialog]Small glitch when loading a second file. 2015-04-28 09:48:11 -03:00
bsongis 8e2bc06623 [MEGA2560] LCD options changed (only possible options are visible) 2015-04-28 07:28:03 +02:00
Michał Wróbel 31820a0520 Fix switch warning false negatives occuring when splash screen is disabled (#2220) 2015-04-28 01:13:45 +02:00
Romolo Manfredini 3f193831e7 Partial fixes for it translation in next 2015-04-26 23:39:49 +02:00
Jacek Drewniak 4358b20faf Length fixes 2015-04-26 22:58:54 +02:00
mhotar 3147777713 CZ translation - icon+ 4char stick name 2015-04-26 19:35:42 +02:00
Romolo Manfredini 1ecbd4fc33 Improve readability of gvar tab in the simulator 2015-04-26 18:48:34 +02:00
Romolo Manfredini c57dc13d14 Translation too long for small display. 2015-04-26 18:48:34 +02:00
bsongis fde3267b53 Compilation fix 2015-04-26 17:42:49 +02:00
bsongis f6dcb75b8e Another compilation fix (and more boyscout work) 2015-04-26 13:58:24 +02:00
Andre Bernet 5421eb59cb Fix logging of negative values 2015-04-26 15:50:00 +04:00
bsongis 0dd3c710c1 Compilation error fixes 2015-04-26 13:39:15 +02:00
bsongis a85240d665 Boyscout changes 2015-04-26 13:27:05 +02:00
Andre Bernet 873cdd70e9 More insisting recommendation about reading firmware release notes 2015-04-26 14:18:55 +04:00
bsongis 4fc5427d52 Compilation error fix 2015-04-26 12:08:23 +02:00
Andre Bernet be4d9ea09d Add GPS course item 2015-04-26 14:03:38 +04:00
Romolo Manfredini e549224c53 Fix for FM trims 2015-04-26 11:57:28 +02:00
Romolo Manfredini 6a1f3d5d96 Trainermode in printdialog 2015-04-26 11:57:27 +02:00
Romolo Manfredini c0e9b196f9 Modeledit, rearrange curve dialog to avoid vertical scrolls 2015-04-26 11:57:27 +02:00
Romolo Manfredini 2fdde52fcd printdialog - internal and external modules, skip not defined curves in printing 2015-04-26 11:57:27 +02:00
Romolo Manfredini 6e0eec364c comparedialog - compare curves and special functions 2015-04-26 11:57:26 +02:00
Bertrand Songis 27ee3e3ab4 Merge pull request #2220 from xmxwx/telemetry_mod_14051_swapped
TELEMETRY_MOD=14051_SWAPPED
2015-04-26 11:26:46 +02:00
Bertrand Songis b589cd6289 Merge pull request #2228 from xmxwx/#2221
Fixes #2221 (LCD contents shifted upwards by 6 pixels on 9XR).
2015-04-26 11:24:31 +02:00
Damjan Adamic a82e07d191 Link error on VC++ 2015-04-26 08:34:33 +02:00
Damjan Adamic 4ff2a62f6c Merge pull request #2230 from opentx/griebd/fix_error_in_X_axis_ploting
Fix bug found in #2229
2015-04-25 21:15:35 +02:00
Grieb 647693909a Fix bug found by @projectkk2glider: X axis was messed up in fly sessions. 2015-04-25 14:11:52 -03:00
Damjan Adamic eac8c0a535 Fixes #2227: removed wrong check for SDL Audio initialization 2015-04-25 18:03:47 +02:00
Damjan Adamic 2a667d1d53 Proper SDL library initialization for Audio and Joystick subsystems (ported from master) 2015-04-25 18:03:47 +02:00
Andre Bernet df2318a45d Prevent mAh from becoming old when counting slowly 2015-04-25 19:33:49 +04:00
Andre Bernet b40b1dadff mAh needs persistent option 2015-04-25 19:23:18 +04:00
Andre Bernet 8dfa324fc6 Reinstate INCDEC_REP10 where useful 2015-04-25 18:57:28 +04:00
Andre Bernet bc83156a65 Fix TTS decimals to account for bigger number of units 2015-04-25 18:09:15 +04:00
Romolo Manfredini ed506d61a8 Better layout of general setup 2015-04-25 16:07:56 +02:00
Michał Wróbel 8e074aaafc Fixes #2221 (LCD contents shifted upwards by 6 pixels on 9XR). 2015-04-25 15:36:24 +02:00
Michał Wróbel 485edb579d TELEMETRY_MOD=14051_SWAPPED
TELEMETRY_MOD=14051 (by gerardv @ forum.turnigy9xr.com) makes USART0 available
by reallocating AIL and THR onto pins 14 and 15 of the 14051 multiplexer.

TELEMETRY_MOD=14051_SWAPPED is based on TELEMETRY_MOD=14051, but uses USART1
instead of USART0, freeing USART0 for other purposes (debugging, interfacing
via AVRISP port). USART1 is freed up by reallocating LVert Trim Dn/Up onto
14051's 12 and 1 pins respectively.

Additionally, this commit cleans a few things up:
 * moves AVR ADC-related code to adc_driver.cpp,
 * provides #defines to have a convenient way to access either USART0 or USART1
   registers depending on static (build-time) configuration
 * moves code related to this telemetry mod to board_stock
 * replaces a few magic numbers with enums.

Thanks to Bernard Songis for review and suggestions!
2015-04-25 14:25:34 +02:00
bsongis ba05538920 EEPROM save process unification on ARM boards 2015-04-25 11:09:09 +02:00
bsongis 5ed9bfcee9 Warning fix 2015-04-25 10:58:26 +02:00
bsongis becad53951 Cosmetics 2015-04-25 10:52:01 +02:00
bsongis 27005f57d5 Cosmetics 2015-04-25 09:06:08 +02:00
bsongis 627d3fcfd6 [Sky9x] EEPROM format changed to allow a recovery in case of EEPROM file
system error
2015-04-25 09:01:23 +02:00
bsongis 3cdcb0e203 [Sky9x] EEPROM code moved to driver 2015-04-25 08:16:01 +02:00
Bertrand Songis ef0e55bc10 Merge pull request #2225 from opentx/griebd/companion_batt_meter_range_on_next_2195
Add Battery Meter Range on Companion
2015-04-25 08:01:48 +02:00
bsongis dbd452aefd [Sky9x] EEPROM fixes 2015-04-24 22:32:23 +02:00
Grieb dc34596f2d [companion][general settings]Add Battery Range Meter to companion eepe General Settings. Fixes #2195. 2015-04-24 14:28:31 -03:00
Grieb ce2e8ac1ca [companion][general settings]Just cosmetcs (re-indent and spaces). 2015-04-24 12:13:51 -03:00
Bertrand Songis 62239aac0e Merge pull request #2223 from opentx/griebd/find_lupdate_executable_2222
[companion]CMake find QT lupdate. Fixes #2222.
2015-04-24 06:36:56 +02:00
Grieb df37e17b9d [companion]CMake find QT lupdate. Fixes #2222. 2015-04-24 01:06:03 -03:00
Jacek Drewniak 1ec20a71c1 Making pl.h.txt equal to en.h.txt of all IFDEFS and TR()s 2015-04-23 12:08:30 +02:00
Bertrand Songis 41f78440db Merge pull request #2215 from opentx/girebd/next_log_viewer_performance_2163
log viewer performance #2163
2015-04-22 06:49:01 +02:00
Grieb a1d9e31bac [companion][logsDialog]Removed some old comented out code. 2015-04-21 22:50:48 -03:00
Bertrand Songis 48913c4132 Merge pull request #2214 from opentx/driver33/PL_TR
Small fixes
2015-04-21 18:12:25 +02:00
Grieb da62ac501f [companion][logsDialog]A 50% improvement performance on open file. 2015-04-21 12:47:29 -03:00
Jacek Drewniak dfcca38596 Small fixes 2015-04-21 11:33:00 +02:00
Bertrand Songis df573ac99e Merge pull request #2209 from opentx/bsongis/sky9x_eeprom
EEPROM on Sky9x
2015-04-21 06:40:16 +02:00
Bertrand Songis 78b1c118c1 Merge pull request #2145 from opentx/bsongis/issue_1471_Lua_read_write_SD
#1471 - libio added to Lua. For tests, can be simplified and expanded
2015-04-21 06:39:59 +02:00
Andre Bernet 38452ca4d0 3pos mid pos delay only for 3pos switches 2015-04-20 20:52:51 +04:00
bsongis 74b546a9fa Ignore list updated 2015-04-20 18:21:54 +02:00
bsongis 8425024eb9 eepromCheck called inside eepromOpen 2015-04-20 18:17:57 +02:00
bsongis 2ed15a8388 [Sky9x] EEPROM format change
Addresses remarks from Mike about new EEPROM format
2015-04-20 18:08:04 +02:00
Bertrand Songis ee0b07040e Merge pull request #2211 from opentx/driver33/PL_Translation
a lot of new translation and fixes
2015-04-20 06:36:41 +02:00
bsongis 5c25d10622 [Sky9x] Translations added 2015-04-19 22:37:55 +02:00
Bertrand Songis 1964ac207c EEPROM on Sky9x 2015-04-19 22:37:55 +02:00
Jacek Drewniak 2a8c566e7e a lot of new translation and fixes 2015-04-19 21:02:13 +02:00
JivaroFAD c6cf0f915e Mega2560 LCD refactoring 2015-04-19 12:13:24 +02:00
bsongis b469bc5906 Problem when gauges telemetry screen empty 2015-04-18 11:02:06 +02:00
Grieb a341c7f4f2 [companion][logsDialog]Two recomendations from QCustomPlot for performance. 2015-04-14 15:52:45 -03:00
bsongis 905e3c7871 Fixes #2203 2015-04-14 19:26:04 +02:00
Grieb bf7c083590 [companion][logsDialog]Fixed last commit performance decrease when closing log viewer. 2015-04-14 14:18:07 -03:00
Grieb 5707e89ddd [companion][logsDialog]Improved, a bit, performance when opening a new log file. 2015-04-14 12:37:17 -03:00
Grieb 208f80f07e [companion][logsDialog]Updated qCustomPlot. Made fly sessions selection instantaneous. 2015-04-14 01:39:31 -03:00
Bertrand Songis e3bdffd051 Merge pull request #2202 from opentx/griebd/missing_tr_on_next_logsdialog_2201
Add missing tr() in logsDialog.cpp on next.
2015-04-13 21:07:34 +02:00
Grieb bc60135f86 [companion][logsDialog]Add missing tr(). 2015-04-13 09:58:04 -03:00
Bertrand Songis 2e1a47dc2a Merge pull request #2189 from universam1/LCD-ERC12864FSF
Add support for LCD ERC12864FSF
2015-04-12 22:51:39 +02:00
Damjan Adamic 8417aa5aae Merge pull request #2191 from opentx/griebd/log_viewer_on_next_1863
log viewer #1863 for next
2015-04-12 09:22:47 +02:00
Grieb ce29561184 [Companion][logsDialog]Forgot the translations. 2015-04-11 00:54:47 -03:00
Grieb e150310715 [Companion][logsDialog]Fixes for #1863 in next. 2015-04-11 00:49:26 -03:00
bsongis 6840b88337 [Taranis] Internal conversions fixed 2015-04-08 20:17:59 +02:00
Bertrand Songis 2a8155c61c TTS script updated (english only for now) 2015-04-08 19:24:35 +02:00
bsongis ae26f4c4d5 Cosmetics 2015-04-07 22:38:36 +02:00
universam1 170c589067 Add support for LCD ERC12864FSF
common replacement LCD needs different init data
2015-04-07 11:34:12 +02:00
Damjan Adamic 0f15828093 X9E: turn off top lcd and both backlights when powering off 2015-04-06 18:22:34 +02:00
Damjan Adamic 8f75c8a1e0 X9E power off fixed in case of constantly pressed power button 2015-04-06 18:12:59 +02:00
Bertrand Songis 17b16e4670 [Taranis] Asynchronous screenshots (to ensure the LCD will be fully
refreshed before doing the screenshot)
2015-04-02 23:06:11 +02:00
Andre Bernet 4e4be82875 ft/s unit added 2015-04-02 23:55:55 +04:00
Andre Bernet 7000d3bf82 Enable source popup in Play Value SF 2015-04-02 23:28:53 +04:00
Andre Bernet 96fa393954 Fix #2062 2015-04-01 09:45:43 +04:00
Bertrand Songis ad1506a97b [ARM boards] If I am not mistaken, the imperial conversions should work
automatically for meters/feet in Telemetry
2015-04-01 07:17:08 +02:00
bsongis 8dadb5346b Revert "[ARM boards] Imperial parameter removed"
This reverts commit 79e727a149.
2015-03-31 23:08:37 +02:00
bsongis 9886dede73 [Taranis] Saves around 800bytes RAM (the same space is used for
DSM2/PPM/PXX pulses on external module)
2015-03-31 22:35:13 +02:00
Andre Bernet 4d2b387098 Translation 2015-03-31 22:39:47 +04:00
bsongis 84fc2007f5 Lua f_open in "a" mode added 2015-03-31 20:39:46 +02:00
Andre Bernet ed1db975ea Force PREC0 for °F sensors to avoid breaking the conversion 2015-03-31 22:35:12 +04:00
bsongis 79e727a149 [ARM boards] Imperial parameter removed 2015-03-31 19:47:56 +02:00
Andre Bernet 75999c06d7 Distance unit needs to be configurable 2015-03-31 21:44:53 +04:00
bsongis 004fe01242 Cosmetics 2015-03-31 19:10:14 +02:00
Andre Bernet ad9c2e0818 Simu compilation 2015-03-31 20:34:02 +04:00
Andre Bernet 10d70e7d00 Merge branch 'next' into bsongis/issue_1471_Lua_read_write_SD 2015-03-31 20:04:39 +04:00
Andre Bernet 82d11abb2e Display trims problem (Fix #2157) 2015-03-31 19:21:11 +04:00
Andre Bernet 8b29aa1e9b Add multiplier to RPM sensor (Fix #1688), fix offset/ratio DSBs 2015-03-31 17:49:43 +04:00
Andre Bernet 4110de0e64 Fix shift on X9E 2015-03-31 17:48:10 +04:00
Andre Bernet 50fa9a4dfd [Companion] Telemetry sensor ratio/offset weren't imported 2015-03-31 16:14:37 +04:00
bsongis 4a9aa52f28 One less configure_pins, still a lot to remove :) 2015-03-31 07:53:43 +02:00
bsongis 80c5c2f5f7 [Companion] Hide items in Switches Lists rather than disable them 2015-03-30 23:09:55 +02:00
bsongis 70f84b5dad [Taranis Plus] Amber backlight was broken 2015-03-30 22:43:48 +02:00
bsongis fe71712b18 [Taranis] Trainer inputs were not working in mixers 2015-03-30 21:48:37 +02:00
Jim 459837d6f3 Fix for Issue 2090 on next 2015-03-30 11:24:38 -04:00
Andre Bernet 9a12963da9 Make version more obvious 2015-03-30 14:18:35 +04:00
Andre Bernet aa2542f9c0 Separate major companion versions - 2.1 part, copy settings the most recent prior installation found and store them separately, and install in OpenTX\Companion 2.1 to allow running both versions 2015-03-30 14:11:21 +04:00
Andre Bernet 37ed485282 Bad copy /paste in uninstaller section 2015-03-30 13:29:45 +04:00
Andre Bernet fb7629530f Leftover files when uninstalling 2015-03-30 11:00:56 +04:00
Bertrand Songis f68e297185 Merge pull request #2175 from dkisselev/fix-2129
Fix trim switch labels on 9X
2015-03-30 06:49:53 +02:00
bsongis 4e6bc9db2f [ARM boards] Haptic was broken on 'next' 2015-03-30 00:18:26 +02:00
Denis Kisselev b3d48bab49 Clean up trim switch labels across platforms and languages 2015-03-29 14:34:19 -07:00
Andre Bernet 16c04b5ef7 Merge pull request #2173 from mpaperno/telemetrysimu_add_fields_next
Companion/Sim: [next] Add more fields to telemetry simulator UI
2015-03-28 18:25:38 +04:00
maxpaperno 2e65466184 Fix missing ifdef. 2015-03-28 10:23:22 -04:00
maxpaperno f98b032477 Companion/Sim: Add more fields to telemetry simulator UI;
Allow using hex notation for values;
Don't send blank values.
2015-03-28 10:10:44 -04:00
Andre Bernet 8a9686716c GVARs added to source popup 2015-03-28 15:16:52 +04:00
Andre Bernet 531854dd97 Add source popup in telemetry screen settings 2015-03-28 14:37:56 +04:00
bsongis 3c7d70328a Fixes #2050 2015-03-28 10:01:20 +01:00
Andre Bernet 0e6d9d35d9 Switch warnings were broken on all platforms 2015-03-28 12:56:28 +04:00
Bertrand Songis 5dfb3ae75e Merge pull request #2170 from opentx/kilrah/switches
Fix switch handling on X9E, cleanup/harmonize code for all revisions
2015-03-28 09:38:41 +01:00
Andre Bernet 930fd7443e Companion UI support 2015-03-28 11:42:45 +04:00
Andre Bernet 19ff2d6f39 Missing switches in companion 2015-03-28 02:10:13 +04:00
Andre Bernet 26fdac072a Taranis only 2015-03-28 01:31:22 +04:00
Andre Bernet d8fa6beb83 Should fix gtest 2015-03-28 01:24:00 +04:00
Andre Bernet 95be0729cf Fix switch handling on X9E, cleanup/harmonize code for all revisions 2015-03-28 00:51:39 +04:00
Andre Bernet 2325b0ea50 Heli translations 2015-03-27 12:48:30 +04:00
Andre Bernet 41d4bad0cc Switch mode translations 2015-03-27 11:53:02 +04:00
Andre Bernet 9593021ee1 Switch availability fixes 2015-03-27 11:34:02 +04:00
Andre Bernet a9e42b30e9 About bitmap had been lost 2015-03-26 12:09:55 +04:00
Andre Bernet ba64077182 Restore splash during EEPROM load for Taranis 2015-03-26 11:25:56 +04:00
Bertrand Songis fa5b9eec83 Merge pull request #2167 from opentx/bsongis/telemetry_totalize
Bsongis/telemetry totalize
2015-03-25 18:44:31 +01:00
Andre Bernet 7507f1a857 ...but only for ARM 2015-03-25 21:09:05 +04:00
Andre Bernet 438090536b TTS for new units 2015-03-25 21:03:03 +04:00
Andre Bernet 0bea656cd2 Don't show ID for calculated sensors 2015-03-25 14:05:02 +04:00
Andre Bernet c778a4756f Missing units in companion 2015-03-25 11:58:24 +04:00
Andre Bernet e6b0a01165 Fluid units 2015-03-25 11:49:25 +04:00
Andre Bernet 47274050ed messed up )'s 2015-03-25 10:32:32 +04:00
Andre Bernet f7372000c5 Totalizer needs unit 2015-03-25 10:22:57 +04:00
Bertrand Songis 2eed25986d Merge pull request #2166 from jtaylor2/Issue_2164
Fix to allow Companion to compile on Windows using Cygwin (posix) Issue 2164
2015-03-24 22:37:49 +01:00
U-HP-dv7\Jim 56323a330e Fix to allow Companion to compile on Windows using Cygwin (posix) 2015-03-24 16:52:21 -04:00
bsongis a6e86089ec Telemetry totalizer started ... 2015-03-24 21:45:16 +01:00
bsongis ce38605c11 Cosmetics 2015-03-24 21:05:11 +01:00
bsongis 1236714c04 No DateTime or GPS in Inputs sources 2015-03-24 20:45:50 +01:00
bsongis 2b4fb9fbe2 Same problem with Input curve 2015-03-24 20:35:08 +01:00
bsongis fa898e19cd Input scale unit was wrong 2015-03-24 20:30:39 +01:00
Andre Bernet 2c204c8231 Translations 2015-03-24 22:52:24 +04:00
bsongis 8cb67d3e2c Ignore list updated 2015-03-24 19:49:56 +01:00
bsongis dea8de4ef0 getFileExtension must now always checked against to NULL 2015-03-24 19:43:58 +01:00
bsongis 9ccb7e672f Should fix the problem with the bootloader flash (file extension search
was wrong)
2015-03-24 19:41:33 +01:00
bsongis 0b7a85daa7 #1471 - Lua moved to thirdparty directory - io.seek added 2015-03-24 18:58:58 +01:00
bsongis 360356b7e4 [Taranis] Shift in telemetry sources allowed in Inputs 2015-03-24 18:38:44 +01:00
bsongis a75ff0187f [Taranis] New inputs / mixes created with a default weight = GV1 instead
of 100%
2015-03-24 18:27:53 +01:00
Bertrand Songis 2003d11f1c Merge pull request #2162 from opentx/kilrah/765_source_popup
Source category selection popup (Fix #765)
2015-03-24 16:43:55 +01:00
Andre Bernet b82e9d5400 Fix scrollbar 2015-03-24 10:54:00 +04:00
Andre Bernet a966408570 Martin's graphics 2015-03-24 10:39:30 +04:00
Andre Bernet 5d6e86e2ad Cosmetics 2015-03-24 10:05:27 +04:00
Damjan Adamic ca0c5c02b0 Re #2160: create only one timer for updateSdsyncAction() 2015-03-23 20:02:49 +01:00
Andre Bernet 372f6e6d7b Refactoring 2015-03-23 14:01:26 +04:00
Andre Bernet f59b8f961e Source popup menu 2015-03-23 13:32:43 +04:00
Andre Bernet 863a30a5ed Cosmetics 2015-03-23 11:24:10 +04:00
bsongis fa33924ec7 Preparation for 2.1 firmwares downloads 2015-03-22 22:02:11 +01:00
Andre Bernet f93dad845d Cosmetics 2015-03-23 00:08:13 +04:00
bsongis 566dfea9bd EEPROM shift fix 2015-03-22 20:55:00 +01:00
Andre Bernet 6f6257dec3 Cosmetics 2015-03-22 23:37:36 +04:00
Andre Bernet 319160c72f Merge pull request #2161 from opentx/kilrah/telemetry_enhancements
Kilrah/telemetry enhancements
2015-03-22 22:59:47 +04:00
Andre Bernet 9245d7038c Companion support for new flags 2015-03-22 22:40:31 +04:00
Andre Bernet 11ede465ac Cosmetics 2015-03-22 22:25:58 +04:00
Andre Bernet 916d462b5b Merge branch 'next' into kilrah/telemetry_enhancements 2015-03-22 22:00:34 +04:00
Andre Bernet 25a0463d2d Warning if all telemetry slots are full 2015-03-22 22:00:04 +04:00
Bertrand Songis d161866544 Merge pull request #2087 from opentx/bsongis/issue_2056_set_rtc_from_gps
Fixes #2056 - Needs tests!
2015-03-22 18:53:59 +01:00
bsongis 763f906244 [Taranis X9E] Bluetooth driver 2015-03-22 18:50:08 +01:00
Andre Bernet 7f6d77e441 Translations 2015-03-22 21:38:28 +04:00
Andre Bernet d9cc451338 RPM blades 2015-03-22 20:56:03 +04:00
Andre Bernet 91f5205c4f Auto Offset / Filter now independent 2015-03-22 20:13:18 +04:00
Andre Bernet f735597210 Support for multiple items with the same value (allows different units/flags) 2015-03-22 18:33:40 +04:00
Andre Bernet aced02f2bb Reset SF can now reset individual telemetry items (fix #161) 2015-03-22 17:58:14 +04:00
Michele 51500d4455 Fix telemetry sensor navigation 2015-03-22 13:56:02 +04:00
Andre Bernet 405567ac11 Compilation fix when RTCLOCK not defined 2015-03-22 13:17:47 +04:00
Andre Bernet 1b5543698b Fix X9E clocks 2015-03-21 17:41:58 +04:00
Andre Bernet 609f701f90 Time/date marked as invalid when sensor is old 2015-03-21 12:30:12 +04:00
Andre Bernet c3cc3bd7d2 Merge branch 'next' into bsongis/issue_2056_set_rtc_from_gps 2015-03-21 12:19:01 +04:00
Andre Bernet 7ab483d469 Improve GPS date/time display 2015-03-21 11:13:29 +04:00
Andre Bernet 4318d04707 Fix date adjustment, avoid setting time/date before GPS reception is good (GPS sends 0:0:0 0-0-0). Doesn't handle disconnection/reconnection of GPS module while radio is on, datetime.datestate and datetime.timestate should be reset when sensor is considered old 2015-03-21 11:12:19 +04:00
Andre Bernet edb080903b A-type SP2UART can also send analog values 2015-03-21 00:33:29 +04:00
Andre Bernet d54a0389ea Source list can now exceed 8bit range 2015-03-21 00:20:27 +04:00
Andre Bernet 02cbd9db6a Add A3/A4, Hide SP2UART data channel, translations 2015-03-20 23:38:46 +04:00
Andre Bernet 52d1a399be Align simulated telemetry sensor IDs to default real ones 2015-03-20 18:19:20 +04:00
Andre Bernet 81a14c1732 Instance numbers synced with FrSky servo channel changer, and displayed on telemetry page to ease choosing a new ID 2015-03-20 17:52:49 +04:00
Andre Bernet 21f8eb7e9d ZSTR for all languages 2015-03-20 16:58:00 +04:00
Andre Bernet 3afd10011a Fix #2152, Fix SWR value 2015-03-20 16:53:51 +04:00
Andre Bernet da2d821e22 Compilation fix 2015-03-20 16:07:58 +04:00
Andre Bernet 99e5576af3 [X9E] More obvious power off screen 2015-03-20 16:01:09 +04:00
bsongis dc7fcf0b95 Merge branch 'next' of https://github.com/opentx/opentx into next 2015-03-20 12:09:44 +01:00
bsongis a458c78dbe [Taranis] USB=MASSSTORAGE option again OK 2015-03-20 12:09:37 +01:00
Andre Bernet c756815ad2 Fix #2153 2015-03-20 14:49:58 +04:00
bsongis 5a2d373edd [Taranis X9E] 2.5s Timer with small graphics for Power OFF 2015-03-20 11:34:48 +01:00
Andre Bernet b80cc973fe Fix simu compilation, simu will now quit after a manual EEPROM reset 2015-03-20 14:17:34 +04:00
Bertrand Songis bf0a914471 Merge pull request #2151 from opentx/kilrah/factorydefault
Factory reset function (manual EEPROM format)
2015-03-20 00:53:13 +01:00
bsongis 4e1f04fa04 Fixes #2144 - Needs tests 2015-03-18 19:38:00 +01:00
Andre Bernet 9275158694 SWR present in simu (Fix #2146) 2015-03-18 21:06:17 +04:00
Andre Bernet 5442cc917b SWR added to preset sensors 2015-03-18 21:04:33 +04:00
Andre Bernet 827e1e2b43 Factory reset function (manual EEPROM format) 2015-03-18 20:23:20 +04:00
Andre Bernet ce2a278862 GVAR names not available for 9x in companion (Fix #2150) 2015-03-18 20:21:47 +04:00
martin 62ac99b52e CZ translations 2015-03-17 23:13:46 +01:00
bsongis c44a355573 Fixes #2056 - Companion part 2015-03-17 06:42:47 +01:00
bsongis 0886873f54 Fix for the bug projectkk2glider noticed, thanks! 2015-03-17 06:42:47 +01:00
bsongis 01e6c60cf5 Companion compilation fix 2015-03-17 06:42:47 +01:00
bsongis 2a3c5958ad Fixes #2056 - Needs tests! 2015-03-17 06:41:46 +01:00
bsongis d0db790e5e [MEGA2560] PWR OFF fix. Thanks André for the review! 2015-03-16 20:18:36 +01:00
bsongis 4e55213ae6 #1471 - libio added to Lua. For tests, can be simplified and expanded 2015-03-16 20:15:32 +01:00
bsongis 7863bb23b9 Script small error when given action is wrong 2015-03-16 19:03:54 +01:00
bsongis 51ea69edcd font2png script updated 2015-03-16 19:02:59 +01:00
bsongis 3a4c0799e3 Cosmetics 2015-03-16 19:01:44 +01:00
bsongis 85422d11d3 Ignore list updated 2015-03-16 18:58:11 +01:00
bsongis 76ff70b59f DE translations by Helle 2015-03-15 18:29:54 +01:00
bsongis b6b14d69f7 VC++ compilation fix 2015-03-14 22:58:18 +01:00
Andre Bernet 3edacafcf1 Fix detection of other language simulators 2015-03-15 01:21:27 +04:00
bsongis 07bbcce093 Mega2560 board simulation added 2015-03-14 21:55:36 +01:00
Andre Bernet d2ae29544e Simulator libs wouldn't be found on linux (works on Win too) 2015-03-14 23:58:18 +04:00
Andre Bernet 1abc93bc0f Optimize build and fix VC parallel build issues 2015-03-14 23:45:43 +04:00
Andre Bernet bdfa29d31c Standalone simulator uses user's documents folder to store eeproms again 2015-03-14 20:25:45 +04:00
bsongis c496bb0606 Compilation fix 2015-03-14 16:16:41 +01:00
Andre Bernet dbff381dc5 Merge pull request #2102 from opentx/bsongis/issue_1599_sport_update
Bsongis/issue 1599 sport update
2015-03-14 18:37:49 +04:00
Andre Bernet f2b29505ec Cosmetics 2015-03-14 18:37:31 +04:00
Andre Bernet 170acef7c9 Cosmetics 2015-03-14 18:31:17 +04:00
Andre Bernet 99169b6a45 Save/restore previous module power state after SPORT upgrade 2015-03-14 18:07:30 +04:00
bsongis 821a198e92 Compilation fixes 2015-03-14 14:56:59 +01:00
Andre Bernet 940543cd38 Fix SPORT update state machine 2015-03-14 17:33:23 +04:00
bsongis 2817866ad2 Directories FatFS / CoOS / STM32 libs moved to thirdparty 2015-03-14 11:56:24 +01:00
Andre Bernet 996433db81 Missing { 2015-03-14 14:55:25 +04:00
bsongis d885807c11 [Taranis] SPORT Rx must be OFF when Tx is ON (otherwise it receives what
it sends...)
2015-03-14 11:48:54 +01:00
bsongis 318fc79dfe Cosmetics 2015-03-14 11:36:10 +01:00
bsongis fdb48528f9 Fixes #1599 - SPORT devices firmware update 2015-03-14 11:34:35 +01:00
bsongis da0b422dce Cosmetics 2015-03-14 11:27:08 +01:00
bsongis 8700b93ccb Code refactoring 2015-03-14 11:19:20 +01:00
bsongis fe3cbab84f Cosmetics 2015-03-14 11:09:58 +01:00
Bertrand Songis d9ef482dc0 Compilation fixes 2015-03-14 11:08:18 +01:00
Bertrand Songis 04bb6b7835 Cosmetics again 2015-03-14 10:37:19 +01:00
Bertrand Songis 2cb536469f [ARM boards] Automatic initialization of trainer parameters with non 0
values
2015-03-14 10:27:49 +01:00
Bertrand Songis 74779cc525 Cosmetics 2015-03-14 10:26:05 +01:00
Bertrand Songis 9b6422b534 Ignore list updated 2015-03-14 10:12:06 +01:00
Bertrand Songis 9b07493152 Merge pull request #2142 from griebd/limit_special_characters_in_model_name_2122
Fix #2122 on next branch
2015-03-13 20:44:52 +01:00
Bertrand Songis 3c1e59a69d Merge pull request #2141 from griebd/linux_xsd_compile_error_2138
Fix #2138 on next branch
2015-03-13 20:44:05 +01:00
Grieb 51a8da252d Fix #2122 on next branch 2015-03-13 16:24:36 -03:00
Grieb 3aa857edd0 Fix #2138 on next branch 2015-03-13 16:04:58 -03:00
Andre Bernet 98c136eff7 Navigation fix 2015-03-11 20:14:05 +04:00
Andre Bernet 10e693475f Graphics fixes 2015-03-11 19:55:02 +04:00
bsongis 9e3ef837bb Google tests again ok (missing initialization) 2015-03-11 06:50:37 +01:00
bsongis a61a7228da [Companion] Latest changes taken into account 2015-03-10 22:58:51 +01:00
bsongis 8dfeb9826e [Taranis] Icons in Pots warnings removed (line too long) 2015-03-10 22:58:06 +01:00
bsongis 3063126d75 [Taranis X9E] Sliders configuration (LS2 and RS2 will be optional) 2015-03-10 19:20:16 +01:00
bsongis fb73547b8f [Taranis] PAGE key disabled once EXIT press in the middle of calibration 2015-03-10 19:18:52 +01:00
bsongis fd1d640b40 [Taranis] Now the trims in switches list 2015-03-09 22:38:58 +01:00
bsongis 3393d0f409 [Taranis] Now the trims ... 2015-03-09 22:35:13 +01:00
bsongis 711e8894f4 #2129 - It looks nice ... Let'add the switches now! 2015-03-09 22:25:06 +01:00
bsongis 5c9809555b Fixes #2129 - Only EN and FR done, I will leave the others to the
translators
2015-03-09 21:41:47 +01:00
bsongis e7071e26ea [Taranis] Disabled Pots skipped in ExpoOne menu 2015-03-09 21:41:47 +01:00
Andre Bernet 8b228e5291 X9E top LCD timer can't display more than 99:99 2015-03-10 00:24:56 +04:00
Damjan Adamic 37a6f83f1b Changelog links now open in external browser (ported from master) 2015-03-09 21:16:42 +01:00
Andre Bernet bda7fef6db Relics removed 2015-03-09 23:57:37 +04:00
Andre Bernet 24d67c44ea MENU key shortcut was broken on Taranis since approximately forever 2015-03-09 23:56:36 +04:00
Andre Bernet 4bd71c8a62 X9E in simu 2015-03-09 23:11:22 +04:00
bsongis 22582cefc7 [Taranis X9E] Shift in Pots Warn when POT4 is None 2015-03-09 20:08:49 +01:00
bsongis 7451a8f7cb Warning removed 2015-03-09 19:57:00 +01:00
Bertrand Songis 937d426cbd Merge pull request #2131 from opentx/projectkk2glider/issue_2123_lcd_buffer_overflow_for_next
Fixes #2123: lcd_bmp() could write outside the LCD buffer
2015-03-09 19:54:10 +01:00
Damjan Adamic 579e38ee0b Fixes #2123: lcd_bmp() could write outside the LCD buffer 2015-03-09 19:47:31 +01:00
bsongis b2e4ede68a [Taranis] Display trims translation error 2015-03-09 19:44:29 +01:00
Andre Bernet cb06202c66 Tiny switch warming navigation bug 2015-03-09 22:31:20 +04:00
bsongis aaaee8e694 [Taranis X9E] Switches warning problem with the 2 last switches (SQ and
SR)
2015-03-09 19:13:04 +01:00
bsongis 8d82ee2009 [Sky9x] Compilation fixed. Thanks Jenkins! 2015-03-09 19:04:02 +01:00
bsongis 76b1111cf7 French translations updated 2015-03-09 18:51:14 +01:00
bsongis 2e514565cc [Taranis] Possibility to rename a directory in SD Manager 2015-03-09 18:51:14 +01:00
bsongis 0eeb0437db [Taranis X9E] Pots and Switches full support. Removed 2x2 switches
feature
2015-03-09 18:51:14 +01:00
bsongis dd0d34ba14 [Taranis] REV3 board support removed 2015-03-09 18:51:14 +01:00
Kjell Kernen bbd0541f78 Brought the swedish OpenTX translation up to date. 2015-03-09 11:31:45 +01:00
Kjell Kernen 9db80e074a Translated all new and changed Companion strings into Swedish 2015-03-09 11:04:55 +01:00
bsongis cebb1d39d6 VC++ Compilation error 2015-03-08 09:15:09 +01:00
bsongis 850caf741a [Taranis X9E] Top LCD now working. Only timer can be configured (top
line)
2015-03-07 20:16:56 +01:00
bsongis 91ee3e8d46 Warning removed 2015-03-04 23:10:30 +01:00
bsongis fc2dd028b4 Warning fixed 2015-03-04 23:07:03 +01:00
Bertrand Songis fff8f5f67e Fixes for VC++ Companion compilation 2015-03-04 22:30:20 +01:00
bsongis 13999cc65e [Taranis X9E] Top LCD Initialisation. All segments should be ON after
this commit.
2015-03-04 22:03:15 +01:00
bsongis b0cc60ccb2 [Taranis X9E] PLL fix 2015-03-04 18:24:46 +01:00
bsongis 67e6490136 Copy/Paste bug in CoOs config 2015-03-04 18:06:42 +01:00
bsongis bce5d64f05 Try to fix VC++ compilation error 2015-03-04 06:53:36 +01:00
bsongis c4ed923ae1 Rotary encoder was going the wrong direction in contextual menus 2015-03-03 23:43:19 +01:00
bsongis 3bd1e52e49 [Taranis X9E] Audio now OK. I don't understand for now why this *2 is
needed though!
2015-03-03 20:55:49 +01:00
bsongis 01cd86f6f6 [MEGA2560/GRUVIN9X] Overflow in Custom Functions switch (no ON and One) 2015-03-03 20:14:23 +01:00
bsongis 4c0515ab91 [Taranis X9E] Fixes (frequencies on M4, pots calibration, soft power
delay after startup)
2015-03-03 20:14:23 +01:00
bsongis fffa39a286 [Taranis] Cosmetics 2015-03-03 20:14:22 +01:00
bsongis 38d865694a [Taranis X9E] Simulator segfault since new timers used 2015-03-03 20:14:22 +01:00
bsongis 8604faa23a [MEGA2560] Typo completely broking the simulator! 2015-03-03 20:14:22 +01:00
bsongis 9cb8bfb43d [MEGA2560] Missing permanent timers configuration 2015-03-03 20:14:22 +01:00
Damjan Adamic 04acd54a44 Fixed compiler error introduced in 92ceaa948c 2015-02-28 20:54:13 +01:00
Damjan Adamic 471f68beb9 Fixes #2002: Companion audio tracks not alphabetically sorted 2015-02-28 20:48:44 +01:00
JivaroFAD 92ceaa948c MEGA2560 update
Build option for Companion
Default LCD = ST7565P and not ST7565R
2015-02-27 18:35:39 +01:00
Damjan Adamic 41cd128ad5 Re #457: audio working in Companion, Simulator and simu using SDL library (use SIMU_AUDIO=YES to enable)
Re #457: case insensitive f_stat() and f_open() for SIMU
2015-02-22 15:49:15 +01:00
Damjan Adamic 434baf15c4 Re #2026: DISKIO_SIMU renamed to SIMU_DISKIO 2015-02-22 15:13:10 +01:00
bsongis 52a2df4215 Mega2560 docs moved 2015-02-22 15:03:48 +01:00
Bertrand Songis ab559f334b Merge pull request #2105 from davxlw/davxlw_mixers_monitor_next
Mixers monitor + build option
2015-02-22 11:39:00 +01:00
davxlw 47025a3ffc Mixers monitor + build option 2015-02-22 11:12:06 +01:00
JivaroFAD e23ff880d8 Mega2560 update
Bootloader now ok
2015-02-21 20:34:54 +01:00
bsongis 8c7f702310 [X9E] White backlight now OK 2015-02-21 10:48:01 +01:00
bsongis b494f66e89 [Taranis] Antenna problem not any more raised when no module enabled. To
be tested and ported to 'master'
2015-02-21 09:53:08 +01:00
Andre Bernet b66e7cc26f Merge pull request #2098 from opentx/bsongis/move_to_STM32F4
Bsongis/move to stm32 f4
2015-02-21 12:20:00 +04:00
Bertrand Songis 7fae34d38e Merge pull request #2093 from opentx/projectkk2glider/issue_2007_sdcard_full_for_next
Projectkk2glider/issue 2007 sdcard full for next
2015-02-20 22:12:15 +01:00
Damjan Adamic 0cfc484c0e Re #2007: fixed line endings 2015-02-20 22:03:44 +01:00
Damjan Adamic beaa59888e Re #2007: return FR_NO_PATH on f_opendir() failure (simulator) 2015-02-20 22:00:21 +01:00
Damjan Adamic 8e6b898ca1 Re #2007: Companion build error (thanks to Jenkins) 2015-02-20 22:00:21 +01:00
Damjan Adamic 9d777f799d Fixes #2007: Handle full SD card in openLogs(). SD card info menu implemented for Taranis, added display of free sectors. Disk IO simulation (all ported from master) 2015-02-20 21:59:24 +01:00
Bertrand Songis 9e65cd386b Merge pull request #2101 from opentx/projectkk2glider/ram_savings
Projectkk2glider/ram savings
2015-02-20 21:24:07 +01:00
Damjan Adamic 3ef447b714 Compilation failure (thanks to Jenkins) 2015-02-20 21:03:41 +01:00
Damjan Adamic 83dd03d654 failsafeCounter reduced to uint16_t (needed max value is 1000) 2015-02-20 20:36:21 +01:00
Damjan Adamic a5e8c85557 Interrupt stack size reduced to 1kB, enabled painting and display of free interrupt stack space 2015-02-20 20:36:21 +01:00
bsongis 5ec4dd499c Rotary encoder now running in the right directions 2015-02-20 19:41:05 +01:00
bsongis fcafb4d374 LCD, Power Button, Rotary Encoder now OK 2015-02-20 19:01:42 +01:00
bsongis 8047fcbd92 [Taranis X9E] Power button now ok. Needs a graphical improvement. 2015-02-20 19:01:42 +01:00
bsongis 5617c1eefa Vectors table was not correctly relocated on STM32F4 2015-02-20 19:01:42 +01:00
bsongis 9c3e331162 Compilation problem on STM32F4 2015-02-20 19:01:42 +01:00
Damjan Adamic 6bf0418520 Fixes #1834
Fixes #1848
2015-02-20 19:01:42 +01:00
bsongis 25e5f2ef81 Compilation fixes 2015-02-20 19:01:42 +01:00
bsongis 315934f8d0 Move to latest CoOS 2015-02-20 19:01:42 +01:00
bsongis b456b630b5 STM32F4 move started 2015-02-20 19:00:20 +01:00
Bertrand Songis 785a814e68 Merge pull request #2073 from opentx/bsongis/issue_1925_screenshots_on_taranis
Bsongis/issue 1925 screenshots on taranis
2015-02-19 23:42:26 +01:00
Damjan Adamic 673001ec15 Re #1937: added TARANIS_INTERNAL_PPM option to Makefile (this change was not ported from master in commit 76937ea566) 2015-02-18 21:06:08 +01:00
Damjan Adamic bc2dd3dc8b Re #2084: gests for Lua Inputs manipulation 2015-02-18 20:27:45 +01:00
Damjan Adamic b0277ed057 Re #2084: Lua model.getInput() now also returns switch 2015-02-18 20:25:27 +01:00
Damjan Adamic ab3114d164 Fixes #2084: index changed to unsigned for Lua mixer funcitons 2015-02-18 20:25:07 +01:00
Damjan Adamic 2b8374f418 Fixes #2084: Lua model.insertInput() could not add a line to an empty input or at the end of the existing input lines
Also added unsigned to various vars (ported from master)
2015-02-18 20:24:15 +01:00
bsongis 23c4712bbf Date+Time append to screenshots filenames 2015-02-17 19:57:20 +01:00
bsongis 3c4a23a3c6 Palette inverted 2015-02-17 19:57:20 +01:00
bsongis 20f69fc294 Missing translations 2015-02-17 19:57:20 +01:00
bsongis c343a80b1b Fixes #1925 2015-02-17 19:57:20 +01:00
bsongis 895bc26f77 Fixes #1925 2015-02-17 19:53:20 +01:00
bsongis ae16191e76 Constant MENU_TITLE_HEIGHT renamed to MENU_HEADER_HEIGHT 2015-02-17 19:50:03 +01:00
bsongis 8c95e02ceb Missing HELI translations 2015-02-17 18:52:52 +01:00
bsongis 8e37225eb9 Heli tests now OK 2015-02-16 06:46:22 +01:00
bsongis d4b2bd2142 Trims bug fixed 2015-02-16 06:40:10 +01:00
Bertrand Songis 1e76e24dd7 Merge pull request #2057 from opentx/bsongis/issue_2032_CCPM_on_taranis
Fixes #2032
2015-02-15 13:04:02 +01:00
JivaroFAD 946a854efc mega2560 update
Documentation
2015-02-14 20:17:37 +01:00
bsongis a132d4cdea Some files forgotten 2015-02-14 18:49:21 +01:00
bsongis 856317ee4f Some files forgotten 2015-02-14 18:35:14 +01:00
bsongis 88f85aef06 #2032 fixed 2015-02-14 17:22:33 +01:00
bsongis 4a9c87cc9c Fixes #2032 2015-02-05 22:25:13 +01:00
bsongis 7e9435c721 BT driver fixes 2015-01-31 18:34:08 +01:00
bsongis ce257527f3 BT Pins were not correctly defined in the driver 2015-01-31 15:01:21 +01:00
bsongis abe631b1eb BT driver added (I only converted Adela's one to STM32F2 and got rid of
FreeRTOS)
2015-01-31 14:20:56 +01:00
bsongis d7472c0b07 Companion compilation failure 2015-01-31 08:25:08 +01:00
bsongis 3a13f07e96 Compilation failure 2015-01-31 08:19:50 +01:00
bsongis 33dfcbe2f4 Makefile option for Timers count 2015-01-31 08:14:00 +01:00
bsongis be024051e7 Icons generation problem on Jenkins server 2015-01-30 08:21:26 +01:00
Bertrand Songis d8146bb71c Merge pull request #2048 from opentx/projectkk2glider/issue_2009_timers_refactoring_for_next
Fixes #2009: Timer Voice minute call not working for persistent timers
2015-01-29 21:40:49 +01:00
bsongis f67f0ffb1d Issue #1608 start - What do you think? 2015-01-29 21:39:52 +01:00
bsongis 2a0445e41e Cosmetics 2015-01-29 21:39:52 +01:00
martin 3c27d898de Taranis icons
mainview_setup is model specific
model_checklist is useless here, can be as an option for mainviews
instead of its own menu icon
2015-01-29 21:02:05 +01:00
Damjan Adamic 4f8df3b973 Fixed line endings 2015-01-29 19:31:01 +01:00
Damjan Adamic afc41f082e Fixes #2009: Timer Voice minute call not working for persistent timers
Timers moved to timer.cpp
Added timer overflow protection
Added timer gtests
THt mode now triggers on THR>10%
2015-01-29 19:26:54 +01:00
bsongis 76937ea566 Fixes #1968 - I ported the last changes from Damjan in the same time.
Please review (I push it anyway as there was a freeze before on startup
when radio in Slave mode)
2015-01-28 23:22:04 +01:00
bsongis a63bb7f9be Taranis navigation simplified (there was an unuseful line 0 - needed on
9x - in all menus which shifted everything).
2015-01-28 19:53:42 +01:00
bsongis db1de54314 Sanity check added 2015-01-28 19:36:28 +01:00
bsongis 15378b8f19 Fixes #2015 2015-01-28 19:34:38 +01:00
bsongis fa3891192c Fixes #2046 2015-01-28 06:59:47 +01:00
martin c63be24106 Taranis icons 2015-01-28 00:14:01 +01:00
bsongis d77bfae7aa Fixes #2040 2015-01-27 23:56:32 +01:00
Kjell Kernen 435d7a79b2 Finnish translation by Janne Huuskonen 2015-01-27 22:11:04 +01:00
bsongis 23b373f80c Sensors timeout simulated in SIMU mode 2015-01-26 18:58:24 +01:00
JivaroFAD 215af55a2e mega2560 update
new pcb for rotary encoders
2015-01-25 11:00:53 +01:00
martin c159e02706 Taranis icons 2015-01-24 19:43:37 +01:00
Damjan Adamic 1cccbac519 Fixes #2027: Deleting file on radio does not actually frees clusters (patch from upstream) 2015-01-23 18:49:07 +01:00
Damjan Adamic f131119ca1 Fixes #2034: ldc_line() was wrong for slanted lines 2015-01-23 18:12:33 +01:00
bsongis d6b67899ff message function moved to GUI directories 2015-01-23 12:56:36 +01:00
bsongis db722da7c5 Bug introduced in Text View (Taranis) 2015-01-22 22:49:29 +01:00
Bertrand Songis 90e7264a40 Merge pull request #2036 from opentx/bsongis/issue1924_file_copy_rename_in_sdmanager
Bsongis/issue1924 file copy rename in sdmanager
2015-01-22 22:41:45 +01:00
martin 975568b149 Taranis icons 2015-01-22 22:09:38 +01:00
bsongis 30e1d09584 Adresses comments in #2036 - Thanks to Damjan for the review! 2015-01-22 20:17:26 +01:00
bsongis c615a35e14 #define of GUI forgotten in Makefile and Companion 2015-01-22 07:19:27 +01:00
bsongis bf0f4cae13 More flash savings when GUI=NO 2015-01-22 07:08:22 +01:00
martin d129d6eefd Merge branch 'next' of https://github.com/opentx/opentx into next 2015-01-21 22:57:10 +01:00
martin 1b7b402c0c Taranis icons 2015-01-21 22:56:02 +01:00
bsongis c0c9b5ae83 Option GUI=NO added 2015-01-21 22:41:43 +01:00
bsongis e05b74b05c Compilation error 2015-01-21 21:33:48 +01:00
bsongis aca3d01adc #1924 fixed with rename function added. Code review needed, I also saved
2kb RAM here ... Needs more tests than only mine, thanks!
2015-01-21 21:23:29 +01:00
bsongis f8aa77a82d STM32F4 StdPeriph Lib added for Taranis X9E 2015-01-20 23:52:38 +01:00
bsongis bbae10fae1 #1924 - Copy function implemented on Taranis - Uses around 64bytes in
RAM
2015-01-20 21:48:14 +01:00
bsongis 4e9ac498d0 Encoding problem in license.txt 2015-01-18 23:42:22 +01:00
bsongis a90f9d4937 splash code moved 2015-01-18 23:17:43 +01:00
bsongis 51cd77b450 LCD files moved 2015-01-18 22:27:10 +01:00
Bertrand Songis 79b5d84221 Merge pull request #2029 from davxlw/davxlw_override_next
Typo correction
2015-01-18 22:11:12 +01:00
davxlw 46a52cad89 Typo correction 2015-01-18 20:51:56 +01:00
bsongis 2d51e2140b Create a new installer for simulator only 2015-01-18 14:47:12 +01:00
bsongis 64d4219bfb Files movement continued (GUI finished). I will do the same for LCD
functions where we have too many ifdef
2015-01-18 14:26:44 +01:00
bsongis 35207ce6f6 More files moved 2015-01-18 00:21:35 +01:00
Bertrand Songis 2eb3779a18 Merge pull request #2019 from davxlw/davxlw_lcd_puts_center_next
Little lcd_putsCenter correction
2015-01-17 09:54:06 +01:00
davxlw 51ba359330 Little lcd_putsCenter correction 2015-01-17 09:44:27 +01:00
Bertrand Songis d0ad644045 Merge pull request #2018 from davxlw/davxlw_SF_SetTimer_Format_next
Companion: Time format for Special Functions Set Timers
2015-01-17 09:38:05 +01:00
davxlw f9e959be33 Companion: Time format for Special Functions Set Timers 2015-01-17 09:32:11 +01:00
Damjan Adamic fcbe4572b8 Fixes #1997: firmware upload failed when "Check Firmware Compatibility" was selected (ported from master) 2015-01-14 19:23:12 +01:00
Damjan Adamic 27314d04cf Fixes #1996: Include simulator in linux package 2015-01-13 17:41:20 +01:00
JivaroFAD 55a7fbaa2e mega2560 update
SW rework
2015-01-10 20:42:32 +01:00
bsongis 1f6e7e2c2f Fixes #1992 2015-01-10 11:10:30 +01:00
bsongis f51d8e1b6c Files movement continued ... 2015-01-10 09:11:28 +01:00
bsongis bfeab1402c New bunch of files moved ... 2015-01-09 23:56:16 +01:00
bsongis 2d19692038 #1942 - Test inverted as requested by the majority ;) 2015-01-09 21:46:11 +01:00
Damjan Adamic a9dfcdfd68 Fixes #1981: Edge function INSTANT bug for V1>2s (ported from master) 2015-01-09 20:21:53 +01:00
Damjan Adamic b878dc6736 Fixes #1987: first pixel not drawn by Lua lcd.drawLine(), bmpLoad() last column not loaded for some bitmap widths, gtests added (ported from master) 2015-01-09 20:11:30 +01:00
Damjan Adamic 891109a89d Bootloader now uses NANO setting from the main Makefile (ported from master) 2015-01-09 20:07:55 +01:00
bsongis 217a41e1d9 Fixes #1775 - Review and tests needed 2015-01-09 16:02:15 +01:00
bsongis 507947c4f6 Fixes #1942 - Review needed, thanks! If it works it could be used in
some other places.
Conflicts:
	radio/src/gui/menus.h
2015-01-09 15:17:26 +01:00
bsongis 62ea9c2648 #1876 fixed. Still needs tests on Taranis (I only tested on Taranis+) 2015-01-09 12:50:03 +01:00
Bertrand Songis fac4ff10c3 Merge pull request #1988 from kh90909/pwm-bl-fix-next-branch
Port ATmega2561 PWM_BACKLIGHT fix from master branch
2015-01-09 08:47:11 +01:00
Ken a7179f5b77 Tested fix for PWM_BACKLIGHT on ATmega2561 MCUs
The functionality of timer0 and timer2 are switched between ATmega64/128
and 641/1281/2561. When compiled for ATmega2561, this commit sets up timer0
in the same way as timer2 on ATmega64/128 (phase correct PWM, clk/64 count
rate, inverted if SP22 is defined).

The previous quick fix had a typo in the initialization of TCCR0B (0b111 is
an invalid value for the clock select bits CS2:0). It also did not respect
the SP22 define which indicates the PWM must be inverted. Smartieparts
v2.2 or later programmer boards have an inverted backlight driver. Finally,
it is unnecessary to set DDB7 as it is already set in boardInit() (line
101).
2015-01-08 21:29:01 -05:00
bsongis fe500463fd Quick fix for #1970 - I don't have any 2561 for testing, I let you test
and fix if needed!
2015-01-08 21:29:01 -05:00
JivaroFAD 3f371493c2 mega2560 update 2015-01-07 21:20:24 +01:00
bsongis 6c0c52094a VC++ compilation failure 2015-01-07 07:15:54 +01:00
JivaroFAD b95b66e69e mega2560 update
Nearly the end... transmitter is built and works, the first fly is for
next we !
2015-01-06 22:45:58 +01:00
bsongis 286aa677d0 Macro added for functions definitions in the Lua LateX document 2015-01-06 21:59:17 +01:00
bsongis dd17eee876 Compilation fix 2015-01-05 20:34:10 +01:00
Damjan Adamic 5c26f16dff Debian package maintainer changed to Bertrand Songis <bsongis-nosp@m-gmail.com> 2015-01-05 20:20:18 +01:00
Damjan Adamic 348f686084 45-taranis.rules renamed to 45-companion-taranis.rules to solve the clash with the same file name from Companion9x debian package 2015-01-05 20:20:04 +01:00
bsongis 20122512cb Companion compilation fixes 2015-01-05 20:07:27 +01:00
bsongis 7a135a75c4 GUI files moved 2015-01-05 19:33:31 +01:00
bsongis cc1c121c1f Avoid building of all lbms for all targets after a make clean 2015-01-05 19:19:05 +01:00
Damjan Adamic 6620cfa2c3 #1466: XJT_VERSION_ID sending disabled until defined 2015-01-04 20:13:22 +01:00
Damjan Adamic 5037dff0d4 Re #1489, #1270, Re #1466: Allow only one instance of new dialogs 2015-01-04 20:07:39 +01:00
Damjan Adamic bb921a0a7f Ported from master to next:
#1489: TRACE() output intercepted and shown in Companion (shortcut F6)
#1270: simple Trainer Simulator (shortcut F5)
#1466: telemetry simulator (shorcut F5)
2015-01-04 20:07:39 +01:00
bsongis a2dc0040b0 Cosmetics 2015-01-04 17:33:34 +01:00
bsongis c50677881f Fixes #1961 2015-01-04 17:13:50 +01:00
bsongis 9e9b0ff77d VC++ compilation error 2015-01-04 16:25:41 +01:00
bsongis 006256bce8 Wrong window name 2015-01-04 16:22:37 +01:00
bsongis 9df46efcd8 Cosmetics 2015-01-04 16:18:38 +01:00
bsongis fb0df7d058 Compilation error fixed 2015-01-04 15:58:33 +01:00
bsongis 1d7740ef4c Fixes #1793 - cp won't work on some Linux distributions 2015-01-04 15:50:57 +01:00
mhotar 513dd347c3 Taranis icons #1608 2015-01-03 21:07:21 +01:00
Damjan Adamic d9f51d21f4 Typo in comment 2015-01-03 19:17:34 +01:00
mhotar f8c94315bd Taranis icons 2015-01-03 13:01:01 +01:00
Damjan Adamic e14797ecf0 Re #457: AUDIO_FILENAME_MAXLEN to small 2015-01-03 12:53:05 +01:00
bsongis 80840602c9 Display problem in Logical Switches screen (telemetry values) 2015-01-02 21:02:02 +01:00
bsongis 2a64ae3720 Logical Switches screen splitted for better maintainability ... 2015-01-02 21:02:02 +01:00
mhotar 742b79f977 Taranis icons 2015-01-02 20:38:56 +01:00
bsongis e5d3810b6e Compilation failure fixed 2015-01-02 19:23:36 +01:00
bsongis eef904e9d4 Fixes #1940 - Also adds a "stops" feature in checkIncDec that could be
useful in a next future
2015-01-02 19:19:02 +01:00
bsongis 74f8df3a55 #1876 - Companion now recognizes the radio type from the binary file 2015-01-02 19:00:35 +01:00
bsongis 40f496e7fb #1876 - Radio identifier added inside the firmware - it will help
Companion to recognize the radio type and avoid to flash a wrong
firmware.
Conflicts:
	radio/src/Makefile
2015-01-02 19:00:05 +01:00
bsongis c27392b454 Shift in switches display (on Taranis / Taranis+) 2015-01-02 12:02:31 +01:00
bsongis 6f9d1795db Fixes #1965
Conflicts:
	companion/src/modeledit/telemetry.cpp
2015-01-01 21:46:58 +01:00
bsongis ea6dd2c9c4 Fixes #1960 2015-01-01 20:16:27 +01:00
JivaroFAD 661657588e mega2560 update
schmatics
2015-01-01 18:06:13 +01:00
Damjan Adamic 56670fc212 Re #1963: fixes the case of power switch fast OFF->ON sequence. 2015-01-01 09:30:16 +01:00
Damjan Adamic 7b19afa96f Fixes #1964 and possibly #1963: TIM13 was used bootloader and delays.c, lcdInitFinish() was missing from lcdSetRefVolt(), simplified LCD init interface for Taranis, delaysInit() was missing from Bootloader 2014-12-31 18:54:37 +01:00
bsongis 9e434c49d5 First LateX doc, special thanks to Olivier ;) I only changed the
longtable columns, there was a margin issue in the nested tabular.
Linked to issue #1432. Comments appreciated!
2014-12-30 08:20:20 +01:00
Bertrand Songis 93403e6f9b Merge pull request #1944 from opentx/projectkk2glider/9xe_adc3_driver
Working ADC3 driver for 9XE additional analog inputs (driver source base...
2014-12-29 20:33:53 +01:00
Damjan Adamic eca81904d2 Merge branch 'next' into projectkk2glider/9xe_adc3_driver
Conflicts:
	radio/src/myeeprom.h
2014-12-27 16:20:14 +01:00
Damjan Adamic d6cc03bef6 Switches warning: limited display to first 6 wrong switches
getMovedSwitch(): was not working on 9XE (too many switches, uint64_t needed)
simu: mapped UP and DOWN keyboard keys
2014-12-27 15:41:03 +01:00
Damjan Adamic f69e6c174e Default changed to link with nano lib (NANO=YES), reduces opentx size from 340040 to 323056 bytes 2014-12-27 13:00:45 +01:00
Damjan Adamic 05cfad13ea Using nano lib reduces bootloader size for Taranis from 31880 to 31004 bytes. 2014-12-27 13:00:45 +01:00
JivaroFAD f3d6e0825e mega2560 update
schematic correction
2014-12-27 11:47:49 +01:00
JivaroFAD 03067344c9 mega2560 update
Kicad sch & listing
2014-12-23 23:07:25 +01:00
Damjan Adamic e4e8efec96 Fixes #1927: THt persistent timer running after model load (with Throttle at -100%) 2014-12-21 20:14:13 +01:00
Damjan Adamic 579834587b Re #1937: reverse polarity on external CPPM output (Taranis all) 2014-12-21 16:02:48 +01:00
Damjan Adamic dffdd2d6c5 Fixes #1800: suppress center beep for non-existing pots 2014-12-21 16:02:21 +01:00
Bertrand Songis 3043163468 Merge pull request #1938 from opentx/driver33/pl_translation_fixes
translation fixes, compilation successful
2014-12-21 00:12:19 +01:00
Damjan Adamic ebd44a0c22 Turn on back-light in LCD_BL_Config() for REVPLUS (normal Taranis already did this) 2014-12-20 18:57:43 +01:00
Damjan Adamic 6304679582 Working ADC3 driver for 9XE additional analog inputs (driver source based on Michael Blandford's code) 2014-12-19 20:16:23 +01:00
JivaroFAD 36ec97c5fb mega2560 update
option LCD
2014-12-18 22:28:27 +01:00
bsongis cf87849c5b LCD bugfix on EEPROM alerts. No more Splash if splash disabled 2014-12-18 19:11:06 +01:00
martin 1ee17dddbc Horus bitmaps 2014-12-17 22:37:33 +01:00
bsongis 5046f77cd9 Refactoring fixes 2014-12-17 20:13:25 +01:00
bsongis 567dcd74f0 Visual C++ compilation error 2014-12-17 07:14:31 +01:00
JivaroFAD 5ca286c171 mega2560 update
Junk pulses on PORTB_4 with SD-Card option
2014-12-16 22:29:10 +01:00
bsongis 8d812d5314 Compilation fix 2014-12-16 21:53:56 +01:00
bsongis 38a639cef6 Refactoring 2014-12-16 21:17:39 +01:00
bsongis 62b64862d8 Fixes #1918 2014-12-16 21:15:06 +01:00
Damjan Adamic e647c8623b Fixes #1919: Shortcuts keys for inverting values don't work correctly with GVs, disabled DBLKEYS for !ARM 2014-12-16 08:35:55 +01:00
Jacek Drewniak 319ad3a6aa translation fixes, compilation successful 2014-12-16 02:52:50 +01:00
Bertrand Songis 28db217a50 Merge pull request #1934 from opentx/projectkk2glider/issue1909_tab_order_2_for_next
Projectkk2glider/issue1909 tab order 2 for next
2014-12-15 21:27:20 +01:00
Damjan Adamic c80f050038 Reverted changes in burndialog.ui 2014-12-15 20:43:19 +01:00
bsongis 4394d18b13 MenuGeneral split - 2nd part 2014-12-15 20:39:06 +01:00
Damjan Adamic 62ca755d5b 2MHz timer was not working on Taranis 2014-12-14 21:48:15 +01:00
bsongis b781455b61 MenuGeneral split - part 1 2014-12-14 20:34:51 +01:00
bsongis d8d12f0185 MenuModel split - 8th part 2014-12-14 20:08:55 +01:00
bsongis 0305a948c8 ModelMenu split - 7th part 2014-12-14 20:05:19 +01:00
bsongis 221b28aafa ModelMenu split - 6th part 2014-12-14 19:10:22 +01:00
bsongis 8c68d1e6d1 MenuModel split - 5th part 2014-12-14 18:54:52 +01:00
bsongis 52b92604e3 MenuModel split - 4th part 2014-12-14 18:49:52 +01:00
bsongis 32c9dc95d6 MenuModel split - 3rd part 2014-12-14 18:44:49 +01:00
bsongis 849bf8fab3 ModelMenu split - second part 2014-12-14 18:14:58 +01:00
bsongis 5e5c207f1e ModelMenu split - started 2014-12-14 17:55:00 +01:00
Damjan Adamic 2ac04e60ae Re #1909: tabs fixed in .ui files 2014-12-14 16:41:42 +01:00
Damjan Adamic e9e9ef45a7 Re #1909: tabs fixed for Model Edit -> Setup tab 2014-12-14 16:41:13 +01:00
Damjan Adamic c6c0f530c8 Re #1909: tabs fixed for Radio Profile firmware options 2014-12-14 16:11:17 +01:00
bsongis 3428edcc90 Bigger screens preparation 2014-12-14 15:32:31 +01:00
bsongis 594856565a New script for generating a bitmap from any font, any size (with anti
aliasing)
2014-12-14 15:14:45 +01:00
Damjan Adamic 95462b75e6 Re #1835: fix for negative trim index 2014-12-14 14:17:46 +01:00
Damjan Adamic 0e39aaaf72 Fixed #1835: Issue with heli swash plate mixing (notrim) 2014-12-14 12:42:28 +01:00
Damjan Adamic d732bb836c Fixes #1869: Google Earth additional fields exported as strings, support for variable number of columns 2014-12-14 10:05:43 +01:00
Damjan Adamic 34a2ed0419 Re #1926: SMLSIZE last line drawn, gtests expanded with LCD character overlapped test 2014-12-14 09:08:17 +01:00
Damjan Adamic 2d8eacd629 Re #1926: Fixed SMLSIZE gtests 2014-12-13 20:37:59 +01:00
Damjan Adamic f18a46a2a1 Fixes #1926: Little display glitches 2014-12-13 20:27:53 +01:00
bsongis cb5e283d74 Fixes #1923 2014-12-12 18:12:32 +01:00
Bertrand Songis 6a83b846d5 Fixes #1921 2014-12-12 07:15:44 +01:00
Bertrand Songis b66096107f MEGA2560 board added to Companion 2014-12-11 21:11:19 +01:00
Bertrand Songis 5ddc741732 Merge pull request #1916 from parched/1907_Python_version_error
Fixes #1907
2014-12-11 20:49:22 +01:00
JivaroFAD 5aed69ff85 mega2560 update
Power management finalization
2014-12-11 19:47:44 +01:00
bsongis 4a4478cd2e Fixes #1915 2014-12-11 18:49:32 +01:00
bsongis f008e6ad88 Fixes #1879 - Tests needed (differential is now applied before
weight/offset), just like other curves
2014-12-11 07:26:10 +01:00
James Duley e41139a397 Fixes #1907 2014-12-11 13:36:58 +13:00
bsongis 91e52f82c6 Fixes #1908 2014-12-09 21:38:27 +01:00
JivaroFAD 602fcfe4a9 mega2560 update
trim rework
2014-12-09 19:52:38 +01:00
Bertrand Songis e3406e12f8 Merge pull request #1901 from opentx/projectkk2glider/issue_1017_key_stuck
Fixes #1017: Startup key stuck display
2014-12-09 19:04:44 +01:00
Bertrand Songis 2a73656865 Merge pull request #1912 from opentx/MEGA2560
Mega2560
2014-12-09 19:00:05 +01:00
bsongis 404b55c87f MEGA2560 update (all commits merged in only one) 2014-12-09 18:57:43 +01:00
bsongis 361fbd83dc A lot of warnings removed 2014-12-09 07:22:30 +01:00
bsongis f608985a54 Fixes #1903
Conflicts:
	companion/src/modeledit/customfunctions.cpp
	companion/src/modeledit/customfunctions.h
2014-12-08 23:14:00 +01:00
bsongis 65ff9dcefa Remaining trace 2014-12-08 21:40:47 +01:00
bsongis 7ee2f911a8 Companion didn't compile 2014-12-08 21:39:56 +01:00
bsongis 4c2c85fe9f MEGA2560 didn't compile correctly 2014-12-08 20:20:13 +01:00
Damjan Adamic 2c591e810d Bootloader rotary encoder working, added missing lcdRefreshWait(), only 783 bytes of FLASH left 2014-12-08 19:59:09 +01:00
bsongis d43a49d845 Fixes #1905 2014-12-08 19:46:38 +01:00
bsongis a9e64c3603 #1761 - Radio part done 2014-12-08 19:39:54 +01:00
bsongis 9dd572c191 Warnings removed 2014-12-08 19:12:12 +01:00
Bertrand Songis 8c9e5687f1 Merge pull request #1893 from opentx/projectkk2glider/lcd_dma_in_background
Projectkk2glider/lcd dma in background
2014-12-08 18:53:43 +01:00
Damjan Adamic 36a7d4732f luaDoOneRunPermanentScript() param optimization, todo for luaLcdLock() removal 2014-12-08 17:51:53 +01:00
Damjan Adamic 55f0781bc9 Lua task timing done in perMain() 2014-12-07 17:23:44 +01:00
Damjan Adamic f0cd4fbe8d Compilation fixes (thanks to Jenkins) 2014-12-07 17:12:51 +01:00
Damjan Adamic 62f2a321f2 Refactored luaTask() based on script type 2014-12-07 17:05:16 +01:00
JivaroFAD d5c6fade8f MEGA2560 update 2014-12-07 12:07:29 +01:00
JivaroFAD 5ce8b9bc47 MEGA2560 update 2014-12-07 11:26:35 +01:00
Damjan Adamic bf39981b1b Re #1017: key stuck removed for AVR platforms, fixed bug in wait 2014-12-07 10:47:26 +01:00
Damjan Adamic 6f46ef23da Do lcdWaitDmaEnd() in perMain() 2014-12-07 10:24:27 +01:00
Damjan Adamic f8203b72f7 perMainArm() renamed to perMain() 2014-12-07 10:12:26 +01:00
Damjan Adamic afedd86fae perMain() moved into main_avr.cpp and main_arm.cpp 2014-12-07 09:58:46 +01:00
Damjan Adamic e55b7504c3 Cosmetic changes (thanks to Bertrand's review) 2014-12-07 09:41:31 +01:00
Damjan Adamic e9f8b14f8b Bootloader for 9XE 2014-12-06 19:16:05 +01:00
Damjan Adamic 8854ccd231 Companion fix 2014-12-06 18:35:39 +01:00
Damjan Adamic f2ed441916 LCD_DUAL_BUFFER optional (speed vs RAM) 2014-12-06 18:19:32 +01:00
Damjan Adamic e4de0da0bb Fixed Companion build 2014-12-06 15:55:07 +01:00
Damjan Adamic 8aeb35c912 Refactoring continued: Try to run lua scripts before the first LCD function 2014-12-06 15:36:10 +01:00
Damjan Adamic fac8571c29 Refactoring of perMainArm(), hw specific stuff moved to targets 2014-12-06 13:13:51 +01:00
Damjan Adamic 5c8e8ebbe5 Separated perMain() for ARM and other platforms 2014-12-06 12:44:30 +01:00
Damjan Adamic 5ad4df344e Fixes #1017: Startup key stuck display 2014-12-05 20:45:54 +01:00
Damjan Adamic 5566439e76 Fixed simu build 2014-12-04 22:17:06 +01:00
Damjan Adamic 271dae71f7 Try to keep perMain() execution period of 20ms 2014-12-04 21:23:09 +01:00
Damjan Adamic 0d1362e476 Dual-buffer for LCD 2014-12-04 21:11:27 +01:00
Damjan Adamic e32da2ba4a No more waiting in lcdRefresh() for SPI transfer to finish 2014-12-04 20:13:42 +01:00
Damjan Adamic 1b4834b547 Another simu build failure (thanks to Jenkins) 2014-12-03 22:28:10 +01:00
Damjan Adamic c10ff3880b Simu build failure (thanks to Jenkins) 2014-12-03 22:11:28 +01:00
Damjan Adamic a539add020 Re #1875 and #1849: implemented LCD initialization for low temperatures. Initialization skipped in case of watchdog reset or boot-loader exit. 2014-12-03 21:14:07 +01:00
bsongis e19684063a Bitmaps splitted into different directories 2014-12-03 21:11:01 +01:00
bsongis 4a5f5432dd #1808 - Synchronization done. Still missing a nice progress dialog with
a cancel button.
2014-12-03 19:58:07 +01:00
bsongis c2d772cfd6 Fixes #1888 2014-12-03 18:40:26 +01:00
bsongis 9c0dc91667 Trims display parameter added to Companion 2014-12-02 19:16:37 +01:00
bsongis 22c2846992 Trims displayed on main view - related to #1419 2014-12-02 07:26:12 +01:00
bsongis 7302d1b9af Fixes #1884 2014-12-01 22:42:27 +01:00
bsongis fa963041ef Taranis X9E Simulator - with rotary encoder 2014-12-01 22:08:19 +01:00
Damjan Adamic de43ce71df Re #1881: notice displayed while saving model at radio shutdown 2014-12-01 19:31:25 +01:00
Damjan Adamic 7717348bf5 Fixed missing mutex unlock in FatFs f_close() and f_closedir() 2014-12-01 19:11:38 +01:00
bsongis 8177fb7f3b Fixes #1872 2014-12-01 18:56:03 +01:00
bsongis 845e9890bb 18 switches displayed on main screen, thanks Martin for the graphics and
font!
2014-11-30 22:53:05 +01:00
Bertrand Songis 5d926eeffd Merge pull request #1886 from opentx/projectkk2glider/9xde_rotary_encoder_take2
Rotary encoder emulates PLUS and MINUS keys on X9DE
2014-11-30 13:04:40 -08:00
Damjan Adamic 382e5a0eef Missing stuff 2014-11-30 19:56:33 +01:00
Damjan Adamic 9980d11740 Rotary encoder emulates PLUS and MINUS keys 2014-11-30 19:46:44 +01:00
bsongis 8419513318 Main View code splitted (Taranis / others) 2014-11-30 19:31:54 +01:00
bsongis b5d3922f41 Fixes #1872 2014-11-30 19:01:29 +01:00
bsongis f62c4ff3e1 Some more chars in 3x5 font added 2014-11-30 18:40:27 +01:00
Damjan Adamic b64d200c94 Back-light PWM frequency changed from 100 to 500Hz (LCD was flickering at lower light levels) 2014-11-29 19:21:40 +01:00
bsongis d64989baac All X9E switches now working 2014-11-27 23:09:14 +01:00
bsongis 18a1006d4b Fixes #1872 2014-11-27 19:04:58 +01:00
Damjan Adamic 3eac23dc39 Fixes #1874: Wrong clock configuration for CoOS on Taranis 2014-11-26 17:33:27 +01:00
bsongis e5006769be X9E Trims should now be ok 2014-11-25 23:42:06 +01:00
bsongis ea0d7577c8 This interrupt had his priority assigned 2 times with different values 2014-11-25 22:32:48 +01:00
bsongis dfa32b805b X9E added to Makefile, [ENTER] moved to PF0 2014-11-25 21:57:48 +01:00
Kjell Kernen 17d61ef300 Swedish translation of Companion. 2014-11-25 13:29:56 +01:00
Kjell Kernen 25bb624e36 Swedish translation of OpenTX FW strings 2014-11-24 13:56:31 +01:00
bsongis 978e9a260c Partly fixes #1861 2014-11-22 19:23:42 +01:00
Bertrand Songis ed6811ffce Merge pull request #1866 from opentx/bsongis/switches_configuration
Bsongis/switches configuration
2014-11-22 10:02:00 -08:00
bsongis a2c16302a4 Fixes #1867
Conflicts:
	companion/src/modeledit/logicalswitches.cpp
2014-11-22 14:36:56 +01:00
bsongis 50978c15c5 Companion switches / anas names configuration 2014-11-21 19:32:41 +01:00
bsongis 06437b2954 Switches configuration + Switches/Pots/Sliders/Sticks custom names 2014-11-21 18:22:13 +01:00
bsongis 59d72f93ce Fixes #1858 2014-11-21 00:01:03 +01:00
bsongis b492d43f73 Cosmetics 2014-11-20 23:22:43 +01:00
bsongis 1f76ea106a Fixes #1864 2014-11-20 23:22:27 +01:00
bsongis f2751979e6 Removes one warning here 2014-11-20 20:10:57 +01:00
bsongis b46b049ba3 Fixes #1834
Fixes #1848
2014-11-19 22:35:57 +01:00
bsongis a690352100 Fixes #1852
Conflicts:
	companion/src/firmwares/opentx/opentxeeprom.cpp
	companion/src/modeledit/customfunctions.cpp
2014-11-19 21:19:20 +01:00
bsongis 47067b9169 Fixes #1851 2014-11-19 19:48:06 +01:00
bsongis 317c4657be Mutex lock check added as suggested by projectkk2glider 2014-11-19 19:41:15 +01:00
Bertrand Songis aa037f28d9 Merge pull request #1855 from kylemanna/perms_fix
Fix Permissions
2014-11-19 19:36:53 +01:00
Kyle Manna da8160f1ff permissions: Remove execute bit from src files
* Remove the execute permission on all c, cpp, and header files.
* These files will never need to be executed.
2014-11-19 09:52:44 -08:00
Kyle Manna ad65a95f3e permissions: Remove execute bit from txt and ui files
* Remove the execute permission on all ui and txt files.
* These files will never need to be executed.
2014-11-19 09:52:44 -08:00
Kyle Manna 9c37ba7beb permissions: Remove execute bit from images
* Remove the execute permission on all png and bmp images.
* These files will never need to be executed.
2014-11-19 09:52:30 -08:00
bsongis b099a8bf2b Merge error 2014-11-19 07:52:29 +01:00
bsongis e322fba277 ioMutex removed 2014-11-19 07:34:52 +01:00
bsongis 72f58e0b0b Optimization mode always -Os 2014-11-19 07:31:41 +01:00
bsongis 82e2d5d809 #1834 - Switch to lastest FatFS 0.10c
Conflicts:
	radio/src/FatFs/ff.h
2014-11-19 07:28:08 +01:00
bsongis 5e530d12b3 Fixes #1850 2014-11-16 22:39:04 +01:00
bsongis 8eef4cd0bd #1850 2014-11-16 22:18:37 +01:00
Damjan Adamic 35eb25d46e Conditon was always true 2014-11-16 20:12:58 +01:00
Damjan Adamic ede1f7ff6f Fixed bmpLoad():
* added gtests
 * fixed various memory leaks
 * fixed wrong display of images with width < 8
 * fixed wrong display of images with odd width and/or height
2014-11-16 19:56:04 +01:00
Damjan Adamic 3449118e07 Enabled more complier warnings and removed one for Taranis. Other targets still have some warnings. 2014-11-16 19:51:49 +01:00
bsongis a3f712b3dc Fixes #1844 2014-11-15 20:02:52 +01:00
bsongis b79c4ea79e Better this value for Cells testing 2014-11-09 22:09:42 +01:00
Damjan Adamic b22e52ae6f Solution for Windows Companion compile problem (lua_exports) 2014-11-09 21:29:00 +01:00
Damjan Adamic 89a855380d Fixes #1839: Companion simulator Lua crash on Mac 2014-11-09 10:39:48 +01:00
bsongis b84799e845 Cells sensor unit is not modifiable 2014-11-09 00:52:22 +01:00
Bertrand Songis 327a5dcffa Merge pull request #1840 from opentx/bsongis/Telemetry_refactoring
Telemetry refactoring - Fixes #1634
2014-11-08 14:32:41 +01:00
bsongis 88d9691d16 Telemetry refactoring - Fixes #1634 2014-11-08 12:06:42 +01:00
Bertrand Songis 7d8ca6931b Merge pull request #1804 from opentx/projectkk2glider/bin_allocator_issue_1791
Fixes #1791: Port Lua Bin Allocator to next:
2014-11-08 11:27:41 +01:00
bsongis 82c21b8c56 In MixerDialog GVar checkbox for Curves was visible even when GVARS
disabled
2014-11-08 11:24:52 +01:00
Damjan Adamic 8a80463476 Re #1783: NOT curves removed from inputs (for non ARM platforms) 2014-11-08 11:24:51 +01:00
Damjan Adamic 525d956935 Re #1783: NOT curves exported incorrectly (for non ARM platforms) 2014-11-08 11:24:51 +01:00
Damjan Adamic 1c053a7d0b Re #1783: Companion shows too many curve types in input/mixer for 9x 2014-11-08 11:24:51 +01:00
Damjan Adamic fdeb15253d This enables build of Companion on OS X
Remove the check for arm-gcc version when doing Companion build
2014-11-08 10:16:58 +01:00
mhotar 98895aad30 Yerico icons are ready. Other themes will be later. #1808 2014-11-06 19:47:03 +01:00
bsongis 1c6f938723 Synchronization function for #1808 added. Still missing a button
somewhere to call it.
2014-11-05 07:29:26 +01:00
bsongis 227a565a4e Fixes #1829 2014-11-04 07:25:23 +01:00
bsongis aa28af6235 Add a new parameter "Use Global Functions" for model where they are not
needed
2014-11-04 07:25:23 +01:00
Bertrand Songis 13772429f9 Merge pull request #1828 from opentx/projectkk2glider/issue_1811_for_next
Fixes #1811: Companion 2.0.12 Gvar import error (for limits)
2014-11-03 23:57:00 +01:00
Damjan Adamic 1d72831364 Fixes #1811: Companion 2.0.12 Gvar import error (for limits) 2014-11-03 20:02:24 +01:00
Bertrand Songis fb070d8621 Merge pull request #1823 from opentx/projectkk2glider/issue_1731_for_next
Fixes #1731: Joystick calibration crash after channel assignment
2014-11-02 19:17:33 +01:00
Damjan Adamic 24e97a78af Fixes #1731: Joystick calibration crash after channel assignment
also additional fixes to stick postion mapping
2014-11-02 18:54:03 +01:00
Damjan Adamic 5dc38fffe3 Fixes #1815: Stick icons missing next to trim key states on switch diag page 2014-11-02 13:35:31 +01:00
Damjan Adamic 5680c8e580 Fixes #1737: virtual inputs not selectable in SF Volume and heli Collective Source 2014-11-02 12:58:43 +01:00
bsongis b671ba4e40 Change temporary version to 2.0.99 2014-11-02 10:34:15 +01:00
Bertrand Songis 3fdca6e51d Merge pull request #1821 from opentx/projectkk2glider/issue_1818_for_next
Fixes #1818: added Lua model.resetTimer() function
2014-11-02 10:01:39 +01:00
Damjan Adamic 22c7ec6a39 Fixes #1818: added Lua model.resetTimer() function 2014-11-02 09:31:31 +01:00
bsongis 884d762de8 Fixes #1805 2014-10-26 16:00:53 +01:00
Damjan Adamic c89381bae5 Fixes #1791: Port Lua Bin Allocator to next:
* Bin Allocator
* Lua memory allocaton fixes
* Simulator memory leak fixes
2014-10-26 09:14:45 +01:00
mhotar 56a4cf5d26 scrolling for weight/offset gauge for ARM and small LCD 2014-10-25 21:32:21 +02:00
Damjan Adamic e34ce57a3f Missing screenshots for previous commit 2014-10-25 20:07:26 +02:00
Damjan Adamic f53df98f70 Fixed buffer overflow in lcd_hlineStip() 2014-10-25 19:58:59 +02:00
Damjan Adamic d5eed897fd Fixed buffer overflow in bmp_load() 2014-10-25 19:35:52 +02:00
Bertrand Songis b6d1c13a5d Merge pull request #1802 from opentx/mhotar/weightoffsetgauge
offset and weight gauge for almost all boards #1780
2014-10-24 23:12:06 +02:00
mhotar cba90cb283 offset and weight gauge for almost all boards #1780 2014-10-24 22:22:09 +02:00
Bertrand Songis 60fc8c11b6 VC++ compilation fixes 2014-10-24 20:50:29 +02:00
bsongis f8ace16258 Mike's latest fixes on SBUS (size check) 2014-10-24 12:32:39 +02:00
bsongis aa4bf2f508 Fixes #1780 2014-10-24 12:23:03 +02:00
bsongis 2673ab9b8f Does SBUS trainer still have reboots with this fix? 2014-10-24 12:18:41 +02:00
bsongis 1066176b0f Fixes #1796 - needs tests on the nightly builds. Caution I removed the
lcd.lock() function completely
2014-10-22 20:39:19 +02:00
bsongis ed16ed9cc4 Little display problem for negative curves on 9X 2014-10-21 07:19:09 +02:00
bsongis 1dada04b66 SWR added in the firmware as an option (SWR=YES) 2014-10-19 22:53:43 +02:00
bsongis 2fd5140e46 SWR added for latest Taranis+ production 2014-10-19 22:35:05 +02:00
bsongis e130c54e47 Cosmetics 2014-10-19 22:34:55 +02:00
Andre Bernet fb6b158999 Merge error 2014-10-17 23:35:54 +04:00
Andre Bernet 0de8acd608 Fix receiver number range (Fix #1790) 2014-10-17 22:55:44 +04:00
Damjan Adamic ce303b2f4a Bug in numbering of Lua multiple fields (only in generated documentation file, all numbers were too small by 1) 2014-10-16 18:27:28 +02:00
bsongis 0b8963b15e Shutdown sound - bye.wav - A little bit related to #719 2014-10-15 23:27:18 +02:00
Damjan Adamic 6839c02aba Fixes for simu 2014-10-15 20:04:06 +02:00
bsongis 52040406a4 Cosmetics 2014-10-14 22:43:47 +02:00
Damjan Adamic 874156122d Re #1610:
* sport.log only active if SPORT_FILE_LOG=YES
* audio concurrent access fixes
* added IO mutex
* added Event Trace Buffer
* fixed SD card error

Conflicts:
	radio/src/Makefile
	radio/src/targets/taranis/diskio.cpp
2014-10-14 22:43:05 +02:00
bsongis c4c7fed727 It was possible to have the Limits contextual menu displayed in
READ_ONLY mode
2014-10-14 22:34:49 +02:00
bsongis 8354f4d842 Sky9x Coprocessor bug fix 2014-10-14 22:33:34 +02:00
bsongis c53e85b702 Sky9x binary was built with the bootloader present on disk (was not
removed by make clean). So 99% it was a Taranis bootloader.
2014-10-14 22:33:25 +02:00
bsongis 35ba4b68b1 Companion bug in model import fixed (after changing radio in the same
session)
2014-10-14 22:32:58 +02:00
bsongis a26c83bd30 Fixes #1785 2014-10-12 19:42:58 +02:00
Bertrand Songis e35eb2029d Merge pull request #1757 from opentx/mhotar/cz_inputs
Mhotar/cz inputs
2014-10-06 21:55:46 +02:00
Bertrand Songis a062bda7d0 Merge pull request #1756 from opentx/driver33/PL_TR_fix
Translation fixes
2014-10-06 21:54:06 +02:00
Damjan Adamic f8e6fd7b2d Fixes #1755 (on next branch): LUA get/setTimer(): inconsistent timer struct 2014-10-05 14:54:29 +02:00
bsongis e234180f43 Note added to Companion: if you have a Taranis that has not had the
firmware upgraded to 2.0 then this version of Companion will not work
2014-10-03 16:37:08 +02:00
mhotar df44114903 merge conflicts 2014-09-29 22:09:26 +02:00
mhotar f639e4aab4 cz tts.py updated 2014-09-29 21:38:14 +02:00
Jacek Drewniak 11e7b86ce7 Translation fixes 2014-09-29 21:19:54 +02:00
Bertrand Songis 4e8ef3185c Merge pull request #1753 from opentx/bsongis/New_trainer_modes
Bsongis/new trainer modes
2014-09-29 11:04:52 +02:00
bsongis e73b0120cc New trainer modes added in Companion 2014-09-29 09:01:13 +02:00
bsongis 908b54d14b Translations updated 2014-09-29 08:12:42 +02:00
bsongis d7eb8eb0a9 Now SBUS / Battery compartment works! 2014-09-29 07:47:08 +02:00
bsongis f57444f1cb Master/SBUS Module now working 2014-09-29 07:47:08 +02:00
bsongis 440cd6a162 New trainer modes:
- Master / SBUS module
- Master / CPPM module
- Master / SBUS in battery compartment
Thanks to Mike for this feature!
2014-09-29 07:47:08 +02:00
bsongis 3aaa4b014b Conversions shift fixed 2014-09-29 07:44:02 +02:00
Bertrand Songis f1429cd8e0 Merge pull request #1751 from opentx/projectkk2glider/issue_1657_vario_limits
Fixes #1657:
2014-09-28 21:45:58 +02:00
bsongis f71cf21a02 Warning removed 2014-09-27 22:08:27 +02:00
Damjan Adamic be20e91314 Re #1696: fixed incorrect display of "<" and ">" characters 2014-09-27 19:44:49 +02:00
Damjan Adamic 2fb2590579 Fixes #1657:
* corrected varioLimitCenterMin range
* removed varioLimitMinOff checkbox (it is not used anymore in any radio)
2014-09-27 19:00:26 +02:00
JivaroFAD 9327cffbe6 RotaryA ok
Interrupts 0 and 1 changed to 4 and 5
2014-09-26 16:37:37 +02:00
JivaroFAD 1c24ef3c45 mega2560 RotaryB ok 2014-09-25 00:35:53 +02:00
bsongis b26187f759 Fixes #1630 - Thanks to projectkk2glider for his pull request #1738 - I
only added a google test
2014-09-24 12:07:15 +02:00
JivaroFAD f39650bf16 MEGA2560 update 2014-09-21 20:26:19 +02:00
bsongis 37e6819a57 Fixes #1740 - not tested on hardware 2014-09-21 10:46:46 +02:00
bsongis 8032d6ee66 Constructors called on static objects - I really need them now :) 2014-09-20 13:02:20 +02:00
Damjan Adamic 80eb34cea2 Fixes #1714: getting radio setting of imperial or metric in lua 2014-09-20 11:33:48 +02:00
Damjan Adamic 7497be4d28 Fixes #1649: added getDateTime() in lua which returns current date and time 2014-09-20 11:23:33 +02:00
mhotar 5ecb2f2305 No special character in CZ names of Inputs. 2014-09-20 01:44:06 +02:00
bsongis e4bb750c1f Fixes #1735 2014-09-19 20:19:55 +02:00
bsongis ef7bbea285 Global Functions now integrated inside Companion - Fixes #502 2014-09-18 15:32:55 +02:00
bsongis 343e395652 GeneralEdit class splitted as done previously for ModelEdit 2014-09-18 11:44:09 +02:00
bsongis 2f8b9347a4 Global functions (only Firmware) - saves 20bytes flash on 9X stock 2014-09-18 11:44:09 +02:00
bsongis 5173907efd Fixes #1727 2014-09-18 08:35:33 +02:00
bsongis 555a529a9b Fixes #1725 2014-09-16 20:08:23 +02:00
Bertrand Songis 79f7c83c24 Merge pull request #1724 from opentx/driver33/PL_Fix
some fixes
2014-09-16 19:08:45 +02:00
Jacek Drewniak cf2372d139 some fixes 2014-09-16 19:00:37 +02:00
bsongis c234b72d05 Inversion of S3 on Taranis+ (S3 should be wired as S2) - Issue #1716 2014-09-16 17:15:40 +02:00
Andre Bernet 1424667ff3 S2 inverted on T+ (Fix #1716) 2014-09-16 17:15:32 +02:00
bsongis 99e87050f3 Overflow on OverrideCHxx functions on ARM boards (range is now
-150:+150)
2014-09-15 18:50:23 +02:00
bsongis 93d2837dee #1647 - bitmap set/get added to the Lua interpreter 2014-09-15 18:50:11 +02:00
bsongis 829567a2c1 #1647 - getCurve exported to the Lua interpreter 2014-09-15 18:49:58 +02:00
bsongis 74252f787b Fixes #1633 2014-09-15 15:47:46 +02:00
bsongis 6c5d53194a S.PORT logs traced in sport.log when SPORT_FILE_LOG=YES taken from #1644 2014-09-15 12:30:37 +02:00
bsongis c751e3e4cd Makefile typos from #1644 2014-09-15 12:23:12 +02:00
bsongis 141e8322ec SD access part from #1644 2014-09-15 12:19:19 +02:00
bsongis 6190c399c5 Fixes #1709 2014-09-15 11:51:18 +02:00
bsongis 9ec17f6e68 Fixes #1669
Conflicts:
	radio/src/gui/view_main.cpp
2014-09-15 11:32:09 +02:00
bsongis 0ac40ab41f Automatic Model conversion problem on ARM boards (v216 to v217) 2014-09-15 10:57:54 +02:00
bsongis 4b9287ef8a Fixed last merge round 2014-09-15 10:28:34 +02:00
bsongis 31a7f877c9 MEGA2560 simu compilation now ok 2014-09-15 10:20:18 +02:00
bsongis b6824e772a Fixes #1656 - Throttle Source everywhere (english and french) 2014-09-15 10:20:07 +02:00
bsongis bdb8e0ef44 No THR warning when a new model is created / the wizard is called 2014-09-15 10:19:56 +02:00
bsongis 22ec446d16 Added NANO option in Makefile (default: NANO=NO) 2014-09-15 10:19:46 +02:00
bsongis 329458e138 Fixes #1715
Conflicts:
	radio/releasenotes.txt
2014-09-15 10:19:35 +02:00
bsongis a7831d68db This luaFree is not needed and could do a mess in RAM 2014-09-15 10:17:38 +02:00
mhotar f6a99f23c9 CZ translations - Companion 2014-09-15 10:17:19 +02:00
mhotar 6306c9da27 CZ translations - Radio
Conflicts:
	radio/src/translations/cz.h.txt
2014-09-15 10:16:31 +02:00
bsongis f705adde02 Companion compilation failure (missing files) 2014-09-15 10:14:00 +02:00
bsongis ea122610ef LTR patch (modified) applied. Saves around 8-10k RAM during the
interpreter initialization
Conflicts:
	radio/src/Makefile
	radio/src/lua.cpp
	radio/src/lua/src/linit.c
2014-09-15 10:12:57 +02:00
bsongis fff69c74f4 Tests added to avoid doing anything in the Lua interpreter after a Lua
Panic
2014-09-15 10:07:24 +02:00
mhotar e05a16988f No special characters in edit fields for CZ language, but enabled in internally defined strings.
It fixes autogenerated Input names.
2014-09-15 10:06:20 +02:00
bsongis 871e9f0be3 Revert some last changes so that there is no problem with Lua
Conflicts:
	radio/src/Makefile
	radio/src/opentx.cpp
2014-09-15 10:05:55 +02:00
bsongis 47499e9e7d Fixes #1656 2014-09-13 18:16:22 +02:00
bsongis 4f5a2ab884 Fixes #1675 2014-09-12 12:37:30 +02:00
bsongis 2237de99ed Mega2560 target didn't compile 2014-09-12 08:32:57 +02:00
Andre Bernet 36660505d2 SG switch warning was unreachable on Taranis 2014-09-10 20:13:40 +02:00
Andre Bernet 125e2539b6 On Taranis S3 was only hidden when the cursor was in the pot positions line 2014-09-10 20:06:41 +02:00
bsongis 9ee3da4a59 Compilation failure 2014-09-10 20:06:04 +02:00
bsongis 1f77806017 #1692 - We flush the queue instead of stopping the audio (the TADA sound
is cut otherwise)
2014-09-10 20:05:54 +02:00
bsongis 5254c553b2 Fixes #1697 2014-09-10 20:05:42 +02:00
bsongis f584766fc7 The Lua Wizard was broken in 2.0.11 2014-09-10 15:35:53 +02:00
bsongis e22c658ee9 Small alignment problem in protocols on 9X/9XR 2014-09-10 12:15:47 +02:00
bsongis a5296ca3c6 Fixes #1692 2014-09-10 12:15:38 +02:00
bsongis 50e7b9b7af Fixes #1566 2014-09-10 12:15:22 +02:00
bsongis 11ae62cff9 Navigation bug in protocol selection (9X/9XR only) 2014-09-10 12:15:09 +02:00
bsongis 651b1247fb Fixes the neutral value for PXX as described in #1694 2014-09-10 12:14:59 +02:00
bsongis 40d705af15 Fixes #1695 2014-09-10 12:14:41 +02:00
bsongis a60876f259 Fixes #1690 2014-09-10 12:14:25 +02:00
bsongis ace4ae07a8 Little display bug in DEBUG page 2014-09-10 12:13:46 +02:00
bsongis 46cd5eeb87 Simu compilation failure 2014-09-06 12:59:43 +02:00
bsongis 23b2602f41 [Sky9x] Linker error (no newlib-nano needed, no _sbrk) 2014-09-05 17:54:12 +02:00
bsongis 056d915d37 Added DEBUG information (thanks again projectkk2glider!)
Conflicts:
	radio/src/opentx.cpp
2014-09-05 17:54:12 +02:00
bsongis 500602e8cc Fixes #1643 - Thanks to projectkk2glider for his help on this one
Conflicts:
	radio/src/lua.cpp
	radio/src/opentx.cpp
2014-09-05 17:54:12 +02:00
Bertrand Songis 04f9eb5c0f Update DONATIONS.txt 2014-09-05 15:35:00 +02:00
bsongis 2cc432344b Compilation failure 2014-09-05 08:43:33 +02:00
Damjan Adamic df56b94135 Fixes #1666: fixed bootloader 2014-09-03 23:37:05 +02:00
Damjan Adamic 3dcf40b596 Fixes #1666: Missing constructor calls for static objects 2014-09-03 23:05:34 +02:00
bsongis 78f8b60f85 Menus refactoring (idea taken from er9x). Saves around 200bytes flash on
9X stock
2014-09-03 19:07:12 +02:00
bsongis f865af2cbe tasks.cpp added to deal with OpenTX tasks on ARM 2014-09-03 19:07:12 +02:00
Bertrand Songis 544449c499 Merge pull request #1664 from opentx/projectkk2glider/ram_savings
Saved 872 btyes of ram by moving variables to code
2014-09-02 15:28:18 +02:00
Damjan Adamic e506a001bf const language packs (can't be const in simu (linker can't find it)) 2014-09-02 10:18:17 +02:00
Damjan Adamic 13a1c5ca39 const APBAHBPrescTable
const splash_lbm
removed fnSwitchDuration
2014-09-02 10:14:26 +02:00
Damjan Adamic aa4ba74e1a added const (Audio) 2014-09-02 10:12:40 +02:00
Damjan Adamic a3d9ec8a65 added const (USB) 2014-09-02 10:07:22 +02:00
Bertrand Songis 9f8a908ff5 Update DONATIONS.txt 2014-09-02 07:09:47 +02:00
bsongis 0a86153843 SBUS 2014-09-01 15:15:26 +02:00
Bertrand Songis d4e64d9c2b Update DONATIONS.txt 2014-09-01 09:44:51 +02:00
bsongis 43f8e13c14 Fixes #1656 2014-09-01 09:44:22 +02:00
bsongis 8562bee9c1 Copy/Paste error on second serial port Rx 2014-08-31 22:46:36 +02:00
Bertrand Songis 4eebdfb39d Update DONATIONS.txt 2014-08-31 20:51:31 +02:00
bsongis 69b5f2fddf Fixes #1658 2014-08-29 23:06:53 +02:00
Bertrand Songis 419f133fb1 Update DONATIONS.txt 2014-08-29 21:31:59 +02:00
Bertrand Songis 81e8c8a519 Update DONATIONS.txt 2014-08-29 16:23:35 +02:00
bsongis 5ead4d8582 Fixes #1655 2014-08-29 16:03:46 +02:00
bsongis 6195f5ecc1 Fixes #1646 2014-08-29 11:53:41 +02:00
bsongis 3e1825aa54 Fixes #1651
Conflicts:
	radio/src/lua.cpp
2014-08-28 21:56:06 +02:00
bsongis 174cc164c5 Companion part for #1646 2014-08-28 21:03:15 +02:00
bsongis e620230e44 STAY replaced by EDGE in constants names 2014-08-28 21:03:15 +02:00
bsongis c107a1bc8e Fixes #1650 2014-08-28 21:03:15 +02:00
bsongis c2166c8a67 Fixes #1646 2014-08-28 21:03:15 +02:00
Bertrand Songis adacee2060 Update DONATIONS.txt 2014-08-28 13:54:19 +02:00
mhotar a5836fdc28 CZ translations 2014-08-28 01:24:55 +02:00
bsongis b0cf67a97e Fixes #1643 - no more freeze but now I have to understand why we go over
4k there
2014-08-27 23:45:15 +02:00
bsongis 784ec0f05a Fixes #1635 2014-08-27 23:15:34 +02:00
bsongis 0bfb1da97f [9X] Display problem of the battery range 2014-08-27 20:41:40 +02:00
bsongis f8d043b75f Compilation error 2014-08-27 15:39:13 +02:00
bsongis 18ec9006af lua_fields.txt removed 2014-08-27 15:33:16 +02:00
bsongis 03039a1c5a [9XR-PRO] Telemetry fix 2014-08-27 15:30:12 +02:00
bsongis bb7b37de62 lua_fields.txt removed from git as it is automatically generated 2014-08-27 12:26:03 +02:00
bsongis 92d17c7a86 Fixes #1621 2014-08-27 10:22:30 +02:00
bsongis 1f8b3725c4 [Companion] Servos limits are displayed in us if ppmus option selected 2014-08-26 16:51:55 +02:00
bsongis 1721fd635e Fixes #1596
Conflicts:
	companion/src/firmwares/opentx/opentxeeprom.cpp
More EEPROM saving in Mixes
2014-08-26 11:57:58 +02:00
Bertrand Songis 2f3664145d Update DONATIONS.txt 2014-08-26 10:16:11 +02:00
Bertrand Songis 1e82290d25 Update DONATIONS.txt 2014-08-25 20:46:26 +02:00
bsongis 46a5ea1377 RSSI initialization added in google tests 2014-08-25 11:51:47 +02:00
bsongis b2ed6e3e0d Fixes #1617 2014-08-25 11:35:35 +02:00
bsongis 18ebb79f20 Fixes #1636 2014-08-25 11:29:08 +02:00
bsongis 3e31f33b64 Bug in menus scroll system (not needed in master) 2014-08-25 11:28:50 +02:00
bsongis 9050cd64b1 Cosmetics 2014-08-25 11:28:50 +02:00
Damjan Adamic 4971820f40 Re #1547: commit 5949be30fa disabled delay for STICKY (which was wrong) now disabled for EDGE 2014-08-25 10:51:27 +02:00
Bertrand Songis af4c0c7aab Merge pull request #1624 from hrenz/patch-5
Update de.h.txt
2014-08-24 23:45:06 +02:00
Bertrand Songis 3a6a7540f1 Update DONATIONS.txt 2014-08-24 22:16:50 +02:00
Damjan Adamic 98e352b8e3 Fixes #1622: Lua function script not called for SF >= 8 2014-08-23 18:29:38 +02:00
Damjan Adamic 1e3f3fe029 limit.name was missing from 07fe45ec5f 2014-08-23 18:11:22 +02:00
Damjan Adamic 69aef74036 Fixes #1626: forgot Companion part (thanks Jenkins) 2014-08-23 17:27:16 +02:00
Damjan Adamic 8d49b1076b Fixes #1626: Enable the Lua bit32 library 2014-08-23 17:14:06 +02:00
bsongis 07fe45ec5f [Taranis] PPM Center will now have a bigger range [-500:+500] 2014-08-21 21:41:21 +02:00
Damjan Adamic b5c63e339f Added generation of Lua fields documentation file: lua_fields.txt 2014-08-21 10:00:40 +02:00
bsongis 4d84ba4c19 LCD refactoring - saves 6 bytes on 9x stock 2014-08-20 22:29:45 +02:00
Bertrand Songis 749afc103e Update DONATIONS.txt 2014-08-20 12:58:57 +02:00
bsongis d6639aec3d New donations, thanks! 2014-08-18 14:19:22 +02:00
bsongis 1454eff428 Fixes #1092 - Chronos names 2014-08-18 14:17:59 +02:00
bsongis 2d43ecdd05 Companion installer new name 2014-08-18 14:14:39 +02:00
Andre Bernet c373642686 French translation fix 2014-08-17 19:00:31 +02:00
hrenz 46d856ab57 Update de.h.txt
only line 482 483  changed
Filesafe Optinos Text
2014-08-17 18:01:11 +02:00
Kjell Kernen e01e0efebd German OpenTX translation from Helle 2014-08-17 12:21:10 +02:00
Damjan Adamic d77de08a68 gtests corrections: Timer3 addition changed source values 2014-08-16 18:03:07 +02:00
bsongis e89c920c4e Fixes #1612 2014-08-16 11:38:00 +02:00
bsongis 18748b4d6a SWR hidden on Taranis+ 2014-08-16 11:37:59 +02:00
bsongis 5cbfcc45a4 Timer3 added in sources 2014-08-16 11:37:59 +02:00
bsongis 7714c5779f 24bits for timers should be enough 2014-08-16 11:37:59 +02:00
Kjell Kernen 906a20738b German Companion translation by Helle 2014-08-15 15:37:10 +02:00
Kjell Kernen 8164fe4f07 German OpenTX translatin from Helle 2014-08-15 15:35:25 +02:00
Bertrand Songis 77fae410ad Merge pull request #1544 from opentx/projectkk2glider/tx_time_optimization
RTC time related optimizations
2014-08-14 21:39:35 +02:00
Bertrand Songis 6e754e9d30 Merge pull request #1597 from opentx/projectkk2glider/lua_new_features
Projectkk2glider/lua new features
2014-08-14 21:39:14 +02:00
Bertrand Songis 5bdea6ed26 Merge pull request #1531 from opentx/mhotar/trims
Mhotar/trims
2014-08-14 21:36:50 +02:00
Bertrand Songis 9ae66c0fb5 Update DONATIONS.txt 2014-08-14 21:13:20 +02:00
bsongis 4cb598bcaa Fixes #1228 2014-08-13 12:48:12 +02:00
bsongis 36481471a3 Fixes #1595 2014-08-13 11:37:03 +02:00
Bertrand Songis dd08886f2c Update DONATIONS.txt 2014-08-10 19:20:33 +02:00
Bertrand Songis 76ef4b5948 Update DONATIONS.txt 2014-08-10 19:19:41 +02:00
Damjan Adamic 3152ac1121 Fixes #1532: added Lua playTone() 2014-08-09 20:24:21 +02:00
Damjan Adamic c813cacb1b (reverted from commit fd3790519a) newlib-nano on my comp has a malloc/free bug, memory gets used but not freed 2014-08-09 20:19:01 +02:00
Damjan Adamic e13f2913df Fixes #1540: added Lua playDuration() 2014-08-09 18:04:48 +02:00
Damjan Adamic 07728782c8 Fixes #1538: Lua playFile(): current language sound path added to the file name in case of a relative path 2014-08-09 17:37:04 +02:00
Damjan Adamic fd3790519a new compile option NANO=YES triggers usage of newlib-nano when linking ARM code. 2014-08-09 17:05:17 +02:00
Bertrand Songis eaa247f46d Update DONATIONS.txt 2014-08-08 22:44:53 +02:00
Damjan Adamic ee2a23c19d Optimization: less gettime() calls 2014-08-08 20:35:27 +02:00
Damjan Adamic 43598fb6df Optimization: removed usage of gettime() where possible 2014-08-08 20:33:35 +02:00
bsongis 3ada9f7cf5 Companion PrintDialog bugfixes 2014-08-08 18:08:42 +02:00
bsongis 10a5e4dc89 Fixes #1527 2014-08-08 17:05:12 +02:00
bsongis 50e4850745 Fixes #1580 2014-08-08 16:29:13 +02:00
bsongis a92de216ac Fixes #1585 2014-08-08 11:48:03 +02:00
bsongis 3f3708f0f1 Fixes #1546
// TODO check if the vario / background music are stopped correctly if
switching to a model which doesn't have these functions enabled
2014-08-08 11:19:04 +02:00
Bertrand Songis 72c433ce9d Update DONATIONS.txt 2014-08-06 20:58:31 +02:00
Damjan Adamic f123b69521 Fixes #1548: bad Swedish Cell translation 2014-08-05 20:35:16 +02:00
Bertrand Songis 80369f0e8f Update DONATIONS.txt 2014-08-05 10:56:27 +02:00
Kjell Kernen 8cd67bf31e Swedish OpenTX translation updated 2014-08-05 10:38:24 +02:00
Kjell Kernen 34ef060e16 Swedish Companion translation updated 2014-08-05 10:24:09 +02:00
Bertrand Songis 1f07f88dce Update DONATIONS.txt 2014-08-04 14:32:05 +02:00
Bertrand Songis 4db5bdd486 Update DONATIONS.txt 2014-08-04 12:03:46 +02:00
bsongis 05ac0682f0 Fixes #1583 2014-08-04 12:02:50 +02:00
bsongis f12c3072b5 Fixes #1579 2014-08-04 11:54:35 +02:00
bsongis 35aea83c89 Fixes #1582 2014-08-04 11:38:39 +02:00
bsongis cf9b5d05a8 Fixes #1568 2014-08-04 11:29:35 +02:00
bsongis d5393be5cb Fixes #1584 2014-08-04 11:20:07 +02:00
Bertrand Songis 10c9936fa0 Merge pull request #1586 from opentx/projectkk2glider/issue_1567
Projectkk2glider/issue 1567
2014-08-04 11:08:00 +02:00
Bertrand Songis 7a74d3ac85 Update DONATIONS.txt 2014-08-04 10:57:23 +02:00
bsongis 39edaff669 Problems with S3 on Taranis (not plus) 2014-08-04 10:19:31 +02:00
bsongis c5aed5f79b Companion MAC compilation fix 2014-08-04 10:01:32 +02:00
bsongis 9b07a77e14 #1566 Companion conversion issue when importing Logical Switches with a
stick as v1 or v2 in previous EEPROM
2014-08-04 10:01:32 +02:00
Bertrand Songis 380fe5e44d Update DONATIONS.txt 2014-08-04 09:58:11 +02:00
Damjan Adamic 8bd2c120d6 Re #1567: cleanup 2014-08-03 19:27:02 +02:00
Damjan Adamic 741ef45f3e Re #1567:
introduced generateProcessUniqueTempFileName() which is used everywhere we need temporary file
renamed unlink() into qunlink()
fixed missing deletion of curve pngs in print dialog
2014-08-03 19:21:46 +02:00
Damjan Adamic 4103adf75d Re #1567: introduced unlink() function that takes QString parameter 2014-08-03 18:03:13 +02:00
Damjan Adamic c0e612531d Re #1567: writeBackup(): added PID to temporary file name 2014-08-03 17:38:24 +02:00
Damjan Adamic 55cb5dce87 Re #1567: readEeprom():
* added PID to temporary file name
 * better error message
 * temporary file deletion
2014-08-03 17:38:24 +02:00
Bertrand Songis 12ba27247e Update DONATIONS.txt 2014-08-02 09:41:10 +02:00
Bertrand Songis 1e33e99655 Update DONATIONS.txt 2014-08-01 07:43:31 +02:00
Damjan Adamic 50acd1fd92 Expanded non regression tests for #1569 2014-07-31 20:23:11 +02:00
bsongis c3626225aa Non regression tests for #1569 2014-07-31 17:24:10 +02:00
Bertrand Songis b71a96ed55 Update DONATIONS.txt 2014-07-31 16:43:23 +02:00
Bertrand Songis d2fcd544d8 Merge pull request #1576 from opentx/projectkk2glider/dirty_hack_issue_1569
Projectkk2glider/dirty hack issue 1569
2014-07-31 16:06:55 +02:00
Damjan Adamic 50997721e2 Using anas instead for getValue 2014-07-31 15:57:50 +02:00
Damjan Adamic 828372ab29 Fix for the case of extended trims
Code cleanup
2014-07-31 15:47:32 +02:00
Damjan Adamic 21ae270c0e Fixes #1569 2014-07-31 15:08:37 +02:00
bsongis 1b2efd1121 Fixes #1572 2014-07-31 11:26:05 +02:00
bsongis 8d6a7c9495 Simu name fixed 2014-07-31 11:22:41 +02:00
bsongis 189becfbb2 Fixes #1569 2014-07-31 11:22:18 +02:00
Bertrand Songis 5a19e147fd Update DONATIONS.txt 2014-07-30 07:45:00 +02:00
Bertrand Songis 062f93ae38 Update DONATIONS.txt 2014-07-28 23:41:37 +02:00
bsongis 9861a08150 Fixes #1562 2014-07-28 21:02:42 +02:00
Bertrand Songis de15d0a5a4 Update DONATIONS.txt 2014-07-28 18:54:56 +02:00
Andre Bernet 1e77bb3c02 French translations 2014-07-27 18:40:16 +02:00
bsongis adadbe06ad Fixes #1559 2014-07-27 17:37:39 +02:00
Andre Bernet 92f2c48de9 French translation fix 2014-07-27 17:31:06 +02:00
Bertrand Songis 1d4fa2a8b0 Update DONATIONS.txt 2014-07-26 22:27:25 +02:00
Bertrand Songis 5493776b9c Update DONATIONS.txt 2014-07-26 19:48:32 +02:00
bsongis b166b77c3e New french TTS prompts 2014-07-26 19:47:40 +02:00
Bertrand Songis 0ecb978364 Update DONATIONS.txt 2014-07-26 19:14:46 +02:00
Bertrand Songis c8d792d3d8 Merge pull request #1556 from opentx/driver33/PL_TR
TR fixes
2014-07-26 12:24:22 +02:00
Jacek Drewniak e9663e40e2 TR fixes 2014-07-26 11:51:23 +02:00
bsongis a7e906dea9 All other Off are uppercase! 2014-07-25 23:30:19 +02:00
Bertrand Songis 685ab3d101 Update DONATIONS.txt 2014-07-25 22:25:49 +02:00
Bertrand Songis 77564d74a4 Merge pull request #1554 from opentx/MicheleVilla/IT_translation_FW
Update it.h.txt
2014-07-25 19:38:14 +02:00
Bertrand Songis a0142d65be Update DONATIONS.txt 2014-07-25 19:29:08 +02:00
bsongis 662bf15562 Fixes #1555 2014-07-25 19:28:08 +02:00
Bertrand Songis 79b928af56 Update DONATIONS.txt 2014-07-25 17:10:32 +02:00
Bertrand Songis 8c28f4bc48 Update DONATIONS.txt 2014-07-25 15:06:16 +02:00
bsongis 7a4d6c89a1 2.0.9 preparation 2014-07-25 12:05:34 +02:00
bsongis 38347becca Cosmetics 2014-07-25 12:05:34 +02:00
Michele 49036dbb40 Update it.h.txt
One change in Italian translation
2014-07-25 11:58:05 +02:00
Bertrand Songis abf36de157 Update DONATIONS.txt 2014-07-25 08:41:56 +02:00
bsongis 32afbf5a5a Fixes #1552 2014-07-25 08:39:41 +02:00
bsongis cba4a02cc1 Fixes #1551 2014-07-25 07:31:58 +02:00
bsongis 4062555605 FAI option tooltip updated (too many users select it without knowing
what it means)
2014-07-24 21:02:15 +02:00
bsongis 9cb38ce839 Companion default firmware is now OpenTX for Taranis 2014-07-24 20:51:31 +02:00
Bertrand Songis 905090ef09 Update DONATIONS.txt 2014-07-24 14:44:59 +02:00
Bertrand Songis 62e5820082 Update DONATIONS.txt 2014-07-24 12:07:18 +02:00
bsongis 2d21e16201 In Companion Wizard, Delta Wing has now 50% weight on elevons (as in
OpenTX Wizard)
2014-07-23 19:19:10 +02:00
bsongis 07303f4301 Taranis calibration better fix 2014-07-23 18:23:24 +02:00
bsongis 91228f803c snprintf undefined on VC++ 2014-07-23 18:02:46 +02:00
bsongis e5d7e1f7c2 Taranis calibration bug 2014-07-23 17:55:02 +02:00
bsongis 81573537eb Fixes #1549 2014-07-23 17:09:55 +02:00
bsongis 7a85328b86 #1549 (Firmware part) 2014-07-23 17:05:14 +02:00
bsongis fd84c62ff4 Dead code removed 2014-07-23 16:31:20 +02:00
bsongis 13e0b21656 The firmware should compile correctly on Windows now 2014-07-23 15:55:27 +02:00
bsongis 5949be30fa Fixes #1547 2014-07-23 15:46:51 +02:00
bsongis 0117c2da68 Fixes #1259 2014-07-23 15:15:26 +02:00
bsongis 943f70c599 OpenTX 2.0.8 preparation 2014-07-22 17:27:33 +02:00
Bertrand Songis 52a48fc4b1 Update DONATIONS.txt 2014-07-22 17:04:17 +02:00
Damjan Adamic 2712ffabb0 Re #1486: gtest improvements in Lua section 2014-07-22 11:39:36 +02:00
Bertrand Songis fa8c8a7094 Update DONATIONS.txt 2014-07-22 07:44:49 +02:00
bsongis 5907193571 Fixes #1543 2014-07-21 23:21:35 +02:00
bsongis 45abfb872f Fixes #1486 2014-07-21 22:25:55 +02:00
bsongis 4d5962b15b Fixes #1533 2014-07-21 20:41:57 +02:00
bsongis eea1c3a84c SAFETY renamed to OVERRIDE 2014-07-21 20:38:44 +02:00
bsongis deed7fc20f Curve index is correctly resetted when its type is changed 2014-07-21 20:23:56 +02:00
bsongis 62fca3f8b6 Fixes #1534 2014-07-21 20:09:39 +02:00
bsongis 9377e58407 Change Lua field name from vario-speed to vertical-speed 2014-07-21 19:22:40 +02:00
bsongis 9b53f69038 Fixes #1535 2014-07-21 19:15:24 +02:00
Bertrand Songis 3680149b52 Merge pull request #1529 from opentx/projectkk2glider/lua_constants_issue_1480
Projectkk2glider/lua constants issue 1480
2014-07-21 19:12:06 +02:00
Bertrand Songis 93faeeafbe Update DONATIONS.txt 2014-07-21 18:34:39 +02:00
Damjan Adamic 2d5d1cb357 Re #1480: couple corrections of field names 2014-07-21 12:04:08 +02:00
Damjan Adamic 2a5364dc8c Re #1480: wrong field.id for multiple fields 2014-07-21 11:51:30 +02:00
bsongis 7f47a4fe10 Fixes #1542 2014-07-20 18:51:24 +02:00
Bertrand Songis a0cc428228 Update DONATIONS.txt 2014-07-19 13:15:16 +02:00
Andre Bernet 61985f7d6a All companion translation files updated 2014-07-19 12:26:49 +02:00
Andre Bernet 3baf64f123 French translations 2014-07-19 12:26:10 +02:00
Andre Bernet 4fd40c154e Rename of "SafetyCH" to "OverrideCH" was not done in companion - UPDATE SERVER SCRIPT! 2014-07-19 12:22:32 +02:00
Andre Bernet 3c360618b9 nosafetych option was duplicated for 9x 2014-07-19 12:19:07 +02:00
Andre Bernet 1d96731ad5 Typo 2014-07-19 12:09:34 +02:00
Andre Bernet 9d1d31d26a lupdate-qt4 is just lupdate on Win 2014-07-19 12:09:04 +02:00
Bertrand Songis 0b52ccfaf1 Update DONATIONS.txt 2014-07-19 07:41:55 +02:00
bsongis 484566083e A little refactoring to avoid all the sprintf and too many string
comparaisons. Completely untested
2014-07-18 22:13:02 +02:00
Bertrand Songis 0f33dc6113 Update DONATIONS.txt 2014-07-18 18:49:59 +02:00
mhotar afad17be7e exttrim sign added #1419 2014-07-18 14:05:45 +02:00
Damjan Adamic 7f3778fc3c Re #1480: units updated 2014-07-18 10:41:16 +02:00
Damjan Adamic 0a9dcc5ce6 Re #1480: added TELEM_MAX_ASPEED conversion in luaGetValueAndPush() 2014-07-18 10:41:16 +02:00
Damjan Adamic 2f01f139cc Re #1480: Cosmetics 2014-07-18 09:07:36 +02:00
Damjan Adamic fb3e615008 Fixes #1480: How to handle the increasing number of Lua constants 2014-07-18 08:59:38 +02:00
mhotar 5ee76f57cc Merge branch 'mhotar/trims' of https://github.com/opentx/opentx into mhotar/trims 2014-07-18 01:34:59 +02:00
mhotar d32484406e trim marks showing direction #1419 2014-07-18 01:30:10 +02:00
Bertrand Songis ce6d0807fa Update DONATIONS.txt 2014-07-17 23:14:29 +02:00
Bertrand Songis cab8f3db71 Update DONATIONS.txt 2014-07-17 08:53:18 +02:00
bsongis 399a8b2e35 Fixes #1517 2014-07-16 20:27:05 +02:00
1222 changed files with 332917 additions and 130068 deletions
+1 -1
View File
@@ -5,4 +5,4 @@ radio/src/bootloader/.dep/
radio/src/bootloader/bootloader_ramBoot*
*.lbm
*.o
/doc
/doc/
+10 -13
View File
@@ -1,11 +1,14 @@
Bertrand Songis
Romolo Manfredini
André Bernet
Bertrand Songis (bsongis)
André Bernet (kilrah)
Michael Blandford
Damjan Adamic (projectkk2glider)
Franck Aguerre (jivarofad)
Romolo Manfredini (romoloman)
Martin Hotař (mhotar)
Rob Thomson
Bryan J. Rentoul (aka Gruvin)
Cameron Weeks
Martin Hotař
Bryan J. Rentoul (gruvin)
Cameron Weeks (th9xer)
Andreas Weitl
Kjell Kernen
Gabriel Birkus
@@ -13,10 +16,4 @@ Jean-Pierre Parisy
Karl Szmutny
Michal Hlavinka
Pat Mackenzie
Michael Byrne (logos and official splashes)
Severino Anedda (splash screens)
Grootwitbaas - 9xforums.com (mac)
Adrian Amberg (splash screens)
Wallaguest1 - 9xforums.com (splash screens)
HC1969 - 9xforums.com (splash screens)
Michael Byrne
+314 -27
View File
@@ -1,3 +1,15 @@
<a href="http://frsky-rc.com">FrSky (monthly)</a>
<a href="http://alofthobbies.com">Aloft Hobbies</a>
<a href="http://jonathan.it">Jonathan Modellismo</a>
<a href="http://wstech.de">WsTech</a>
<a href="http://aviomotive.com">Aviomotive</a>
<a href="http://boltrc.com">BoltRC</a>
<a href="http://aerialtechhobbies.com">Aerial Tech Hobbies</a>
<a href="http://litepilots.com">LitePilots</a>
<a href="http://openpilot.com">David Ankers (OpenPilot)</a>
<a href="http://3drobotics.com">3D Robotics</a>
<a href="http://rcstudio.cz">RC Studio (monthly)</a>
Mario Sette
Felice Baratto
Alessandro Mari
@@ -17,8 +29,8 @@ Marc Lucht
Michel Baily
Zdenek Trojanek
Martin Hotar
[Devo] Stefan Grundevik
[Devo] Fabio Eboli
Stefan Grundevik
Fabio Eboli
Federico Zotti
Albin Esbjörnsson
Kilian Hüttenhofer
@@ -37,7 +49,6 @@ R. Scott Page
Johan Cronje
Renato Aranghelovici
Jeffrey Irvin
Aloft Hobbies
John Rodgers
Kenneth Crump
Damjan Adamic
@@ -80,7 +91,6 @@ Christian Schulz
Gregory J Shepherd
Michael Shellim
Ming Wang
R. Scott Page
Bernard Lukaschek
Nigel Chippindale
Mike Perkins
@@ -93,7 +103,6 @@ Heinrich Illig
Michael Collins
Michael Manning
Craig Lorentz
Jonathan Modellismo - jonathan.it
André Lasseret
Felipe Alexandre de Oliveira
Brian Harris
@@ -121,7 +130,6 @@ Christophe Rodriguez
Larisa Filocamo
Hartmut Sahm
Åke Brodin
Aloft Hobbies - www.alofthobbies.com
Ted Moss
Filippos Tigarakis
Chewytm
@@ -169,16 +177,13 @@ Willie Swanepoel
Satoru Sasaki
Tyler Darby
Nicholas Crego
Keith Hertzog
Johan Moelich
Timo Esser
Dean Church (monthly)
Brian Paddock (monthly)
Brian Paddock
Jean Pierre Parisy
Norbert Martsch
Jean-Marie Guitard
Mike Perkins
Tilman Baumann (monthly)
Tilman Baumann
Fred Larssen
Ari Aalto
Robert Sams
@@ -189,7 +194,7 @@ Paul Robinson
Dave Matison
Mike Matheny
Pino Agostino
Graham Boucher (monthly)
Graham Boucher
Nelson Noura
Joel Allamy
Philip David Martin
@@ -199,8 +204,7 @@ Blake Spilman
Timothy Pelletier
Glen Roe (ShowMaster)
Jan Van Ooteghem
David Ankers - Special thanks here to the OpenPilot project!
Lawrence Christensen (monthly)
Lawrence Christensen
Leo Duflou
Bruce Wood
Arnd Feige
@@ -253,13 +257,12 @@ Terry McKinley
Марков Алексей
Offer Shmuely
Ian Lobley
Keith Hertzog
Stéphane Fortas
Peter Mitrik
Thomas Majewski
ANF King
Henrik Hammarström
Kenneth Lilja (monthly)
Kenneth Lilja
R Wells
Uwe Jordt
Harald Wilczak
@@ -272,7 +275,6 @@ Miguel Villalpando
Kim Dong Hoon
Terry McKinley
Walter Bell
wsTech - http://wstech.de
Clinton Linck
Josep Clodas Sola
Thierry Martin
@@ -306,7 +308,6 @@ Henry Deucker
Christian Fuchs
Arold Reinders
Robert Miller
Aviomotive - www.aviomotive.com
Mark Gaskievicz
Roland Müller
Frank Gewalt
@@ -320,7 +321,6 @@ Steve Coley
Sean Cull
Roberto Orsello
David Finger
FrSky - www.frsky-rc.com (monthly)
Jean-Marie Oddo
Mike Matheny
Glen Roe (Showmaster)
@@ -347,7 +347,6 @@ Sven Assmus
Markus Eberl
Nicholas Field
Harald Wilczak
Michel Baily
John Grepps
Anthony Burbidge
Sherba Baine
@@ -359,7 +358,6 @@ Aaron Stringer
Alan J Wasserman
Wolfgang Rauser
Samuel Cook
BoltRC - www.boltrc.com
Friedrich Ipolt
Barrington Cole
Charles Lakins
@@ -404,7 +402,6 @@ Colin Rycroft
Emanuel Stassar
Michael Gregory
Robert Russell
Gordon Stahl
Felix Kaiser
Joshua Bardwell
Davd Goodall
@@ -426,14 +423,11 @@ Markus Wolf
Andrew Fazio
Stefan Künst
Stephen Adams
Arold Reinders
Tauno Rautakorpi
Frank Houvenaghel
Aerial Tech Hobbies - www.aerialtechhobbies.com
George Neusse
Andreja Rusjakovski
Axel Stöckle
Mike Perkins
Erwin Störrle
Rodger Hopper
Fernando Cesar
@@ -489,7 +483,6 @@ Robert Ferguson
CY Enterprise
Michel Stathakis Neto
Beat Zurflueh
Heinrich Illig
Portstate Pty Ltd
Jens Hoffmann
Ricardo Santos
@@ -504,7 +497,6 @@ Cecil Porter
Robert Canavan
Greg Higginbottom
Tim Walker
Thos. O'Meara Photography
Spis Ltd/TurboNote
Patricia Cox
Matthew Lukes
@@ -525,3 +517,298 @@ Adilson Oliveira
Joseph Ordille
Michael Shellim
Teddie Holmes
Alexandre Rault
Eric Albin
Lukas Kliment
Bernard Philippe
Bernard Delpy
Didier Klein
Arnaldo Guedes
Cyberauto Systems
John Alsbrooks
John Kearney
Christopher Borden
Marc Virgilio Ricci
Frederick Davie
Jürgen Enders
Terrence Pitts
Thomas Sandner
Marco Coltorti
Harald Wilczak
Rodney Lorimor
Richard Davis
Stephen Palmer
Michael Napolitan
Joshua Bardwell
Fred Dawson
Jim Wagner
Peter Johnson
Fredrik Lewerth
Arvin Stenersen
Daniel Morgan
Roy Nixon
Joachim Blunck
Karl-Heinz Gansel
Monrovia Mountain Enterprises
Alessandro Villa
Jan-Åke Nilsson
Matthias Rei
DVR Solutions BV
Bertrand Condevaux Lanloy
Henri Mirra
Aurélien Planiol
Kevin Caldwell
Andrew Garello
Tomasz Maziarz
Russell Flack
Fernando Rimoldi
Greg Reid
Dietmar Drees
Holger Landwehr
Arno Loehdorf
Boon Sripattha
Patrik Åkerfeldt
Alonzo Fretwell
Renjith Chandrasekharan
Ruben Gomez Hernandez
Michael Gardner
Judith Green
Timo Ruppell
John Lipscomb
Norbert Wenke
Erik Frieberg
Raimo Ruotsalainen
Brian Harris
Sebastian Blüml
Efisio Maxia
Jeff Theobald
Anthony Rizzo
Rodney Huddleston
Dietmar Drees
Jürgen Monden
David Morgan
Andrew Fernie
Michel Baily
Donald Burke
Ronald Donker
Fredie Singh
Patrizio Simoncini
Harald Gabler
Michael Brown
Julien Gérard
Alexandre d'Alton
Peter Mergaerts
Jan Houwers
Christian Grandjean
Roger Bergevin
NorthSide
Sigmund Martinsen
Lionel Lafraise
Gisli Ofeigsson
The Gruvin9x Project
Manuel McLure
Fernando Rimoldi
Hiltenkamp Stephan
Sandeep Kishore Jain
Greg Parker
Norman Maaß
Adriano Del Ben
Justin Poole
Kenneth Harrison
Eugene LaFaille
John O'Shaughnessy
Uwe Jordt
Stuart Olson
Frédéric Devillard
Cheung Leo
Peter Webster
Jean-Claude Bachetta
Delfin Perena
Sae-wook Yoon
Focus on Excellence
Jeffery Golias
Nick Milton
Paul Zasso
Reidar Johannes Lillebotn
Handley William
Luke Williams
Michael Shellim
Brian Spearing
Derek Foster
Pasi Pitkänen
Lexington S Morley
Jeff Roberson
Volkov Victor
Bryan Anderson
Daniel Garber
Pavel Stein
Ravi Gupta
Patrick Tuxbury
Mark Deverell
John Capell
Neil McVean
Matthew Elyash
Kerry Cochrell
Willem Aandewiel
Reg Bell
Jean Chenoz
Philippe Grand
Tauno Rautakorpi
Jeff Dillingham
Brad Kelley
Shaun Currier
Danilo Schiara
John Hennig
RK Custom Homes
James Houck
Piet Teekens
Tommy Widenflycht
Johan Petrus Theophilus
Maria van Melis
Ralph Gustafson
Paul Luby
Andrew Duncan
Stephen Crowther
Edward Glover
Kelly Byrd
Brad Curtis
Wolfgang Kuhl
John Beidl
Roy Nixon
Glen Roe
CY Enterprise
Evening Shade Pottery
Gilles Dando
Patrick Richard
Justin Altemeier
Constant Dupuis
Tony Kenward
Pierre Rondel
Ernest Luguera Sanchez
Adam Brackney
Joe Baker
单 雷平
Ben Fay
Chris Monk
Stan von Miller
Christian Krebs
Michel Motte
Graziano Rampinelli
Joe Baker
Jean-Philippe Laurent
Romain Rouzaud
Michel Garbarino
Henri Mirra
Otto Fröhlich
Thomas Cramer
Anthony Trombetta
Fernando Rimoldi
Dietmar Drees
Michal Kowalski
Ivan Correa
Modellbau
Massimo Luigi Stara
Graham Baldwin
Tomasz Rejman
Wolfgang Lang
John Greenwood
Till von Reumont
Paul Pereira Brunner
Donald L Singer
Junsun Lee
Guy Lamaison
Erwin Dulken
Mike H Dailey
Jon Cammarata
Martin Krueger
Adolfo Perogio
Sylvain Techer
Wes Warner
Kevin Caldwell
Ali Ersan Gur
Hans-Rudolf Riniker
Sébastien Boutard
Jean Chessé
Mike H Dailey
Don Polk
Roberto Orsello
Borovikov Dmitriy
John Lipscomb
Peter Glassey
Joseph Kramer
F.Javier Martinez Velasco
Claudio Piccinini
John Jackson
John Beech
Rene TraaJohn Jackson
Sebastien Charpentier (monthly)
Nigel Hendriks
Frédéric Devillard
Albert Herzog
Anindya Mukerjee
Kenny Stanberry
Tauno Rautakorpi
Mathias Krapp
Fernando Rimoldi
Wolfgang Rauser
Richard Shagam
Stephen Bailey
DK-System
Casa Kuxtal
Christopher Potts
Douglas George
Michael Banks
Jon Wiltshire
David Green
Guy Willems
Xavier Mestelan Pinon
Maik Gottschalk
Scott Sparks
John Dunning
RAD51
Ron Powell
Alain Labonne
Carol Sills
Franck Aßmann
Larry Anderson
Mikael Wallbäck
Wes Warner
Christoffer H Henni
Donna Bayer
Garry Ogilvie
Karlheinz Sirsch
Fred Larssen
Rob Coppock
Franz Josef Hahn
Serge Ribault
Tanguy Le Moign
Barrett Powell
Patrice Lafeuille
Martin Blume
Marek Kopyto
Marco Lange
Gary Nix
Jack Oliphant
John Lever
Adolphe Montefiore
Steven De Weerdt
Håkan Berggen
Ayelet Egosi
Jean-Frederic Gaudreault
Jim Wagner
Lee Scott
Roger Keatley
Sherman Lovell
Hugh Caldwell
JB Fisher Company
Michels Bernhard
Pietro Rossin
Carsten Wache
Brock White
Steven Poretz
David Huelster
Gordon Stahl (monthly)
John Mathison
Richard Duczmal
Gregory Barron
Marcel Fischer
+2 -5
View File
@@ -1,8 +1,5 @@
##OpenTX Next Branch
##OpenTX 2.1 Branch
You have found your way to the GitHub repository site for the OpenTX Next Branch. This code branch holds the source code for the ongoing development.
The stable release code is not here, it is in the master branch.
Under no circumstances build and use software from this branch for real world application. At times you will be more or less guaranteed to crash your plane and destroy all your model settings.
The ongoing development on 2.1.x is done in this branch.
Refer to the opentx.wiki for information about setting up the tool chains for building OpenTX and OpenTX Companion as well as other development related issues.
+160 -1
View File
@@ -1,3 +1,162 @@
<h2>Version 2.1.2 / 2015-09-07</h2>
<ul>
<li>Fixed: Lua model scripts outputs not working in a simulator (<a href=https://github.com/opentx/opentx/issues/2684>#2684</a>)</li>
<li>Fixed a problem of Companion 2.1 trying to install into 2.0 path.
The effect will only be visible for the users that did not install any of the previous 2.1.x versions.
(<a href=https://github.com/opentx/opentx/issues/2645>#2645</a>)</li>
<li>Added missing SDL libraries to MAC package (<a href=https://github.com/opentx/opentx/issues/2678>#2678</a>)</li>
<li>Added used channels check/warning in Wizard (<a href=https://github.com/opentx/opentx/issues/2091>#2091</a>)</li>
<li>Model Print and Model Compare improvements and fixes (<a href=https://github.com/opentx/opentx/issues/2734>#2734</a>, <a href=https://github.com/opentx/opentx/issues/2737>#2737</a>, <a href=https://github.com/opentx/opentx/issues/2576>#2576</a>)</li>
<li>Negative telemetry offset value was reset when writing back to radio (<a href=https://github.com/opentx/opentx/issues/2738>#2738</a>)</li>
<li>Telemetry sensor names were not displayed (<a href=https://github.com/opentx/opentx/issues/2807>#2807</a>)</li>
<li>Mixes multiplex representation now the same as on the radio (<a href=https://github.com/opentx/opentx/issues/2808>#2808</a>)</li>
<li>Fixed language-related startup crash on Mac (<a href=https://github.com/opentx/opentx/issues/2815>#2815</a>)</li>
<li>Fixed issues with conversion from 2.0 (<a href=https://github.com/opentx/opentx/issues/2809>#2809</a>, <a href=https://github.com/opentx/opentx/issues/2800>#2800</a>)</li>
<li>Fixed Throttle source export issue on X9E (<a href=https://github.com/opentx/opentx/issues/2844>#2844</a>)</li>
<li>Added support for the AR9X replacement board (prototype) for the Turnigy 9X radio, info <a href=http://www.rcgroups.com/forums/showthread.php?t=2479552>here</a></li>
</ul>
<h2>Version 2.1.1 / 2015-08-06</h2>
<ul>
<li>Vario source and center silent options were not saved(<a href=https://github.com/opentx/opentx/issues/2476>#2476</a>)</li>
<li>DSM receiver numbers for external module were not converted from previous version EEPROM (<a href=https://github.com/opentx/opentx/issues/2474>#2474</a>)</li>
<li>Precision incorrectly set for Calculated->Cells sensor (<a href=https://github.com/opentx/opentx/issues/2479>#2479</a>)</li>
<li>Unit incorrectly set for Calculated->Cells sensor (<a href=https://github.com/opentx/opentx/issues/2485>#2485</a>)</li>
<li>Fixed import/export of trim values (<a href=https://github.com/opentx/opentx/issues/2484>#2484</a>)</li>
<li>Removed constant access to floppy disk (<a href=https://github.com/opentx/opentx/issues/2160>#2160</a>)</li>
<li>Telemetry view script combo box list was empty (<a href=https://github.com/opentx/opentx/issues/2465>#2465</a>)</li>
<li>Telemetry view bars ranges not transfered to radio (<a href=https://github.com/opentx/opentx/issues/2491>#2491</a>)</li>
<li>Fixed Standalone simulator radio selection display problem (<a href=https://github.com/opentx/opentx/issues/2503>#2503</a>)</li>
<li>Added missing simulation libraries and enabled side by side installation of Companion 2.0 and 2.1 on Linux (<a href=https://github.com/opentx/opentx/issues/2500>#2500</a>)</li>
<li>Standalone simulator now remembers which radio was simulated in previous session (<a href=https://github.com/opentx/opentx/issues/2503>#2503</a>)</li>
<li>Radio calibration value were not displayed (<a href=https://github.com/opentx/opentx/issues/2502>#2502</a>)</li>
<li>Fixed Vario / Voltage / Current sources export problem</li>
<li>Writing model settings to 9XR-PRO did not work (<a href=https://github.com/opentx/opentx/issues/2402>#2402</a>, <a href=https://github.com/opentx/opentx/issues/2517>#2517</a>)</li>
<li>Model Print and Model Compare improvements</li>
<li>Fixed Companion OSX version (<a href=https://github.com/opentx/opentx/issues/2549>#2549</a>)</li>
<li>Firmware nightly builds are now downloadable from nightly builds of Companion (<a href=https://github.com/opentx/opentx/issues/2526>#2526</a>, <a href=https://github.com/opentx/opentx/issues/2634>#2634</a>)</li>
<li>Fixed telemetry item lists (<a href=https://github.com/opentx/opentx/issues/2541>#2541</a>)</li>
<li>Fixed missing pots P1..P3 for 9X (<a href=https://github.com/opentx/opentx/issues/2543>#2543</a>)</li>
<li>Fixed "Invalid model and settings" error message when writing models and settings to the radio (<a href=https://github.com/opentx/opentx/issues/2544>#2544</a>)</li>
<li>Global Functions fixes (<a href=https://github.com/opentx/opentx/issues/2558>#2558</a>)</li>
<li>Export to Google Earth now working (only) with the new telemetry fields (GPS, GAlt and GSpd) (<a href=https://github.com/opentx/opentx/issues/2546>#2546</a>)</li>
<li>Fixed unsuccessful writing of setting to the radio for 9XR PRO (<a href=https://github.com/opentx/opentx/issues/2605>#2605</a>)</li>
<li>Fixed missing LUA script outputs in special function "Play Value" (<a href=https://github.com/opentx/opentx/issues/2649>#2649</a>)</li>
<li>Various texts and translations corrections</li>
<li>Various small bug-fixes</li>
</ul>
<h2>Version 2.1.0 / 2015-07-16</h2>
<ul>
<li>SD card synchronizaton tool</li>
<li>Added session duraton information in Log Viewer</li>
<li>Enabled <i>Mixers monitor</i> in Taranis simulator</li>
<li>Better support for multi-axes in Log Viewer (<a href=https://github.com/opentx/opentx/issues/2267>#2267</a>)</li>
<li>File path issue in Taranis simulator function <i>findTrueFileName()</i> on Windows (<a href=https://github.com/opentx/opentx/issues/2301>#2301</a>)</li>
<li>Added simulator volume gain setting (<a href=https://github.com/opentx/opentx/issues/2260>#2260</a>)</li>
<li>Added GPS glitch filtering and Latitude/Longitude position synchronization to Google Earth export (<a href=https://github.com/opentx/opentx/issues/2326>#2326</a>)</li>
<li>Fixed a rare program crash when editing Input for 9X radio (<a href=https://github.com/opentx/opentx/issues/2420>#2420</a>)</li>
<li>Fixed missing RSSI audio warnings if simulator was started multiple times (<a href=https://github.com/opentx/opentx/issues/2446>#2446</a>)</li>
</ul>
<h2>Version 2.0.17 / 2015-05-04</h2>
<ul>
<li>Simulator crash (<a href=https://github.com/opentx/opentx/issues/2253>#2253</a>)</li>
</ul>
<h2>Version 2.0.16 / 2015-05-03</h2>
<ul>
<li><i>nooverridech</i> firmware option was not working</li>
<li>Fixed setting Expo from gvars for 9XR-Pro (<a href=https://github.com/opentx/opentx/issues/2040>#2040</a>)</li>
<li>Added Mixers Monitor screen option <i>mixersmon</i> (<a href=https://github.com/opentx/opentx/issues/1945>#1945</a>)</li>
<li>Added audio playing in simulator (<a href=https://github.com/opentx/opentx/issues/457>#457</a>)</li>
<li>Fixed sorting of audio tracks (<a href=https://github.com/opentx/opentx/issues/2002>#2002</a>)</li>
<li>Model wizard fixes (<a href=https://github.com/opentx/opentx/issues/2091>#2091</a>)</li>
<li>GVAR names removed for 9x, radio doesn't support them (<a href=https://github.com/opentx/opentx/issues/2150>#2150</a>)</li>
<li>Some LS sources didn't follow the Imperial units setting (<a href=https://github.com/opentx/opentx/issues/2180>#2180</a>)</li>
<li>Added more fields to the telemetry simulator (<a href=https://github.com/opentx/opentx/issues/2171>#2171</a>)</li>
<li>Log viewer improvements and massive speed increase (<a href=https://github.com/opentx/opentx/issues/1863>#1863</a>, <a href=https://github.com/opentx/opentx/issues/2163>#2163</a>)</li>
<li>Added Battery meter range setting (<a href=https://github.com/opentx/opentx/issues/2195>#2195</a>)</li>
<li>Improvements in Print and Compare dialogs (<a href=https://github.com/opentx/opentx/issues/2219>#2219</a>)</li>
<li>Reset pots to the middle by right double clicking them in Simulator (<a href=https://github.com/opentx/opentx/issues/1939>#1939</a>)</li>
<li>Minor fixes: <a href=https://github.com/opentx/opentx/issues/2153>#2153</a>,
<a href=https://github.com/opentx/opentx/issues/2138>#2138</a>,
<a href=https://github.com/opentx/opentx/issues/2090>#2090</a>,
<a href=https://github.com/opentx/opentx/issues/2122>#2122</a>
</li>
</ul>
<h2>Version 2.0.15 / 2015-01-13</h2>
<ul>
<li>Firmware was not written correctly on radio when compatibility warning check enabled</li>
<li>Time format for Special Functions Set Timers</li>
</ul>
<h2>Version 2.0.14 / 2015-01-12</h2>
<ul>
<li>OpenTX Companion and Companion9x can now be installed side by side on Linux</li>
<li>Improved TAB order in dialogs</li>
<li>Special Function <i>Start Logs</i> renamed to more appropriate <i>SD Logs</i></li>
<li>Improvements for MAC build</li>
<li>Fixes to Google Earth logs export</li>
<li>Firmware compatibility warning check added when flashing new firmware to radio</li>
<li>Fixed issue with Telemetry Type setting on 9XR-PRO</li>
<li>Added Telemetry simulator</li>
<li>Added Trainer simulator</li>
<li>Added Debug Output window</li>
<li>Various texts and translations corrections</li>
<li>Various small bug-fixes</li>
<li>More reliable method of writing EEPROM.BIN and FIRMWARE.BIN to radio</li>
<li>Fixed issue with Edge function INSTANT for V1>2s</li>
<li>Fixed buffer overflow in Joystick code</li>
</ul>
<h2>Version 2.0.13 / 2014-11-20</h2>
<ul>
<li>Too many curves shown on non ARM boards</li>
<li>Fixed vario limits</li>
<li>Fixes in compare dialog</li>
<li>Fixed receiver number range</li>
<li>Virtual inputs not selectable in SF Volume and heli Collective Source</li>
<li>Joystick calibration crash after channel assignment</li>
<li>Gvar import error for limits</li>
<li>Companion shows too many curve types in input/mixer for 9x</li>
<li>NOT curves removed from inputs (for non ARM platforms)</li>
<li>Companion again builds on OS X (Mac)</li>
<li>Companion simulator Lua crash on OS X 64bit (Mac)</li>
<li>Companion didn't take care of PlayScript functions</li>
</ul>
<h2>Version 2.0.12 / 2014-09-15</h2>
<ul>
<li>Typos & Translations updated</li>
</ul>
<h2>Version 2.0.11 / 2014-09-10</h2>
<ul>
<li>Limits EEPROM export was broken (all boards except Taranis)</li>
<li>Fix issue when a GVAR was used as Offset</li>
</ul>
<h2>Version 2.0.10 / 2014-09-08</h2>
<ul>
<li>Taranis is now the default board in General Settings</li>
<li>GVARS allowed in Limits min/max/offset</li>
<li>Limits displayed in us when ppmus option selected
</ul>
<h2>Version 2.0.8 / 2014-07-23</h2>
<ul>
<li>Compare dialog bugfixes</li>
<li>Curve index correctly resetted when type changed</li>
</ul>
<h2>Version 2.0.7</h2>
<ul>
<li>SafetyCH function was missing in simulator</li>
@@ -208,4 +367,4 @@
<li>Try to reduce modeledit window form MAC</li>
<li>Wrong init of RF-Module data</li>
<li>Read flash from TX didn't worked for Taranis</li>
</ul>
</ul>
+149 -130
View File
@@ -1,14 +1,38 @@
PROJECT( companion )
SET( C9X_VERSION_MAJOR "2" )
SET( C9X_VERSION_MINOR "0" )
SET( C9X_VERSION_REVISION "7" )
SET( C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION} )
SET(C9X_VERSION_MAJOR "2")
SET(C9X_VERSION_MINOR "1")
SET(C9X_VERSION_REVISION "2")
SET(C9X_VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
SET(C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION}${C9X_VERSION_SUFFIX})
MESSAGE(STATUS "OpenTX Companion ${C9X_VERSION}")
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(C9X_NAME_SUFFIX ${C9X_VERSION_MAJOR}${C9X_VERSION_MINOR})
SET(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
SET(SIMULATOR_NAME "simulator${C9X_NAME_SUFFIX}")
SET( SIMULATOR_LIB_PATH ${CMAKE_INSTALL_PREFIX}/lib/companion${C9X_NAME_SUFFIX} )
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(COMPANION_NAME "companion")
SET(SIMULATOR_NAME "simulator")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
OPTION(ALLOW_NIGHTLY_BUILDS "Allow nightly builds download / update") # Disabled by default
IF(ALLOW_NIGHTLY_BUILDS)
ADD_DEFINITIONS(-DALLOW_NIGHTLY_BUILDS)
ENDIF(ALLOW_NIGHTLY_BUILDS)
OPTION(DEBUG_IMPORT "Turn on debug output for EEPROM import") # Disabled by default
IF(DEBUG_IMPORT)
ADD_DEFINITIONS( -DDEBUG_MODEL_IMPORT)
MESSAGE( STATUS "EEPROM import debugging enabled" )
ENDIF(DEBUG_IMPORT)
MESSAGE( STATUS "Looking for XercesC " )
FIND_PACKAGE(XercesC)
IF ( XERCESC_FOUND )
@@ -33,8 +57,9 @@ 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" )
MESSAGE( "SDL not found! Joysticks support will be disabled. Simulator audio will not work." )
ENDIF()
FIND_PACKAGE(Qt4 4.8.4 REQUIRED)
@@ -52,6 +77,14 @@ ELSE()
MESSAGE( "PHONON not found!" )
ENDIF()
MESSAGE( STATUS "Looking for QT lupdate " )
FIND_PACKAGE(Lupdate)
if( LUPDATE_FOUND )
MESSAGE( "QT lupdate: " ${LUPDATE_EXECUTABLE} )
ELSE()
MESSAGE( "QT lupdate not found!" )
ENDIF()
ADD_CUSTOM_COMMAND(
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
@@ -73,32 +106,20 @@ set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
set(SIMU_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/simulation)
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR})
add_custom_command(
OUTPUT ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
COMMAND make lbm
DEPENDS ${RADIO_SRC_DIRECTORY}/bitmaps/sticks_4x1.xbm
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_command(
OUTPUT ${RADIO_SRC_DIRECTORY}/translations/en.h
COMMAND make tra
DEPENDS ${RADIO_SRC_DIRECTORY}/translations/en.h.txt
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/../..
${PROJECT_SOURCE_DIR}/shared
${SIMU_SRC_DIRECTORY}
${RADIO_SRC_DIRECTORY}
${RADIO_SRC_DIRECTORY}/fonts/std
${RADIO_SRC_DIRECTORY}/lua/src
${XSD_INCLUDE_DIR}
)
add_subdirectory(shared)
add_subdirectory(modeledit)
add_subdirectory(generaledit)
add_subdirectory(simulation)
add_subdirectory(firmwares/opentx/simulator)
add_subdirectory(qcustomplot)
set(common_SRCS
eeprominterface.cpp
@@ -107,21 +128,14 @@ set(common_SRCS
firmwares/er9x/er9xeeprom.cpp
firmwares/er9x/er9xinterface.cpp
firmwares/gruvin9x/gruvin9xeeprom.cpp
firmwares/gruvin9x/gruvin9xinterface.cpp
firmwares/gruvin9x/gruvin9xinterface.cpp
firmwares/ersky9x/ersky9xeeprom.cpp
firmwares/ersky9x/ersky9xinterface.cpp
${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
${RADIO_SRC_DIRECTORY}/translations/en.h
firmwares/opentx/opentxeeprom.cpp
firmwares/opentx/open9xStockeeprom.cpp
firmwares/opentx/open9xGruvin9xeeprom.cpp
firmwares/opentx/open9xSky9xeeprom.cpp
firmwares/opentx/opentxinterface.cpp
firmwares/opentx/opentxTaranisSimulator.cpp
firmwares/opentx/opentxSky9xsimulator.cpp
firmwares/opentx/opentxGruvin9xsimulator.cpp
firmwares/opentx/opentxM128simulator.cpp
firmwares/opentx/opentxM64simulator.cpp
file.cpp
appdata.cpp
)
@@ -132,37 +146,46 @@ add_library(common ${common_SRCS})
set(companion_SRCS
hexinterface.cpp
flashinterface.cpp
firmwareinterface.cpp
converteeprom.cpp
# xmlinterface.cpp
# ${PROJECT_BINARY_DIR}/radio.cxx
helpers.cpp
helpers_html.cpp
mdichild.cpp
generaledit.cpp
modelslist.cpp
mountlist.cpp
avroutputdialog.cpp
mountlist.cpp
apppreferencesdialog.cpp
fwpreferencesdialog.cpp
burnconfigdialog.cpp
multimodelprinter.cpp
comparedialog.cpp
contributorsdialog.cpp
releasenotesdialog.cpp
releasenotesfirmwaredialog.cpp
customizesplashdialog.cpp
burndialog.cpp
radiointerface.cpp
progresswidget.cpp
progressdialog.cpp
process_copy.cpp
process_flash.cpp
process_sync.cpp
flashfirmwaredialog.cpp
flasheepromdialog.cpp
printdialog.cpp
modelprinter.cpp
fusesdialog.cpp
logsdialog.cpp
downloaddialog.cpp
splashlibrary.cpp
splashlibrarydialog.cpp
mainwindow.cpp
companion.cpp
radionotfound.cpp
qcustomplot.cpp
wizarddata.cpp
wizarddialog.cpp
)
set(companion_MOC_HDRS
avroutputdialog.h
apppreferencesdialog.h
fwpreferencesdialog.h
burnconfigdialog.h
@@ -171,25 +194,29 @@ set(companion_MOC_HDRS
fusesdialog.h
logsdialog.h
contributorsdialog.h
releasenotesdialog.h
releasenotesfirmwaredialog.h
customizesplashdialog.h
splashlibrary.h
splashlibrarydialog.h
splashlabel.h
burndialog.h
progresswidget.h
progressdialog.h
process_copy.h
process_flash.h
process_sync.h
flashfirmwaredialog.h
flasheepromdialog.h
downloaddialog.h
generaledit.h
modelslist.h
mdichild.h
mainwindow.h
radionotfound.h
qcustomplot.h
qautocombobox.h
helpers.h
wizarddialog.h
)
set(companion_UIS
mdichild.ui
avroutputdialog.ui
comparedialog.ui
fusesdialog.ui
logsdialog.ui
@@ -197,12 +224,14 @@ set(companion_UIS
fwpreferencesdialog.ui
burnconfigdialog.ui
downloaddialog.ui
generaledit.ui
printdialog.ui
contributorsdialog.ui
htmldialog.ui
customizesplashdialog.ui
splashlibrary.ui
burndialog.ui
splashlibrarydialog.ui
progresswidget.ui
progressdialog.ui
flashfirmwaredialog.ui
flasheepromdialog.ui
radionotfound.ui
)
@@ -243,6 +272,8 @@ NOW(TIME)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/translations.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/firmwares/opentx/stamp-opentx.h.in ${CMAKE_CURRENT_BINARY_DIR}/stamp-opentx.h @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/companion.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simulator.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop @ONLY)
IF( WIN32 )
SET( companion_SRCS ${companion_SRCS} icon.rc )
@@ -254,7 +285,7 @@ ENDIF( )
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
SET( LANGUAGES he pl pt ru de fr it sv cs fi nl)
SET( LANGUAGES he pl pt ru de fr es it sv cs fi nl)
FOREACH( language ${LANGUAGES} )
SET( companion_TS ${companion_TS} translations/companion_${language}.ts )
ENDFOREACH( language )
@@ -268,50 +299,18 @@ QT4_ADD_RESOURCES( companion_SRCS ${companion_RCS} )
ADD_DEFINITIONS( -DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}" )
IF( APPLE )
ADD_EXECUTABLE( ${PROJECT_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_QM} )
ADD_EXECUTABLE( ${COMPANION_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_QM} )
# OS X compiler no longer automatically includes /Library/Frameworks in search path
SET( CMAKE_EXE_LINKER_FLAGS -F/Library/Frameworks )
ELSE( )
ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${companion_SRCS} ${companion_QM} )
ADD_EXECUTABLE( ${COMPANION_NAME} WIN32 ${companion_SRCS} ${companion_QM} )
ENDIF( )
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} modeledit simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} )
target_link_libraries(${COMPANION_NAME} generaledit modeledit simulation common qcustomplot shared ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
############# Standalone simu ###############
set(TH9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/th9x)
add_custom_command(
OUTPUT ${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${TH9X_CHECKOUT_DIRECTORY}
COMMAND cd ${TH9X_CHECKOUT_DIRECTORY} && svn checkout http://th9x.googlecode.com/svn/trunk/src@285 .
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp ${TH9X_CHECKOUT_DIRECTORY}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp
)
set(ER9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/er9x)
add_custom_command(
OUTPUT ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${ER9X_CHECKOUT_DIRECTORY}
COMMAND cd ${ER9X_CHECKOUT_DIRECTORY} && svn checkout http://er9x.googlecode.com/svn/trunk/src@790 .
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp ${ER9X_CHECKOUT_DIRECTORY}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp
)
set(ERSKY9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/ersky9x)
add_custom_command(
OUTPUT ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${ERSKY9X_CHECKOUT_DIRECTORY}
COMMAND cd ${ERSKY9X_CHECKOUT_DIRECTORY} && svn checkout http://ersky9x.googlecode.com/svn/trunk/src@170 .
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp ${ERSKY9X_CHECKOUT_DIRECTORY}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp
)
set(simu_SRCS
${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp
${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp
${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp
${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
${RADIO_SRC_DIRECTORY}/translations/en.h
modeledit/node.cpp
modeledit/edge.cpp # TODO not needed
simulator.cpp
@@ -329,102 +328,122 @@ if(WIN32)
set(simu_SRCS ${simu_SRCS} icon.rc)
endif()
add_executable(simulator WIN32 ${simu_SRCS})
if(SDL_FOUND)
target_link_libraries(simulator simulation common ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
if(APPLE)
add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE ${simu_SRCS})
else()
target_link_libraries(simulator simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
add_executable(${SIMULATOR_NAME} WIN32 ${simu_SRCS})
endif()
target_link_libraries(${SIMULATOR_NAME} simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ${OPENTX_SIMULATOR_LIBS})
############# Packaging ####################
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
INSTALL( TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
INSTALL( FILES companion.desktop DESTINATION share/applications )
INSTALL( FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps )
INSTALL( FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps )
INSTALL( FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps )
INSTALL( FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps )
INSTALL( FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps )
INSTALL( FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps )
INSTALL( FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps )
INSTALL( FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps )
INSTALL( FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps )
INSTALL( FILES ../targets/linux/45-taranis.rules DESTINATION /etc/udev/rules.d/ )
INSTALL( TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
INSTALL( TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop)
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop)
INSTALL( FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png )
INSTALL( FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg )
INSTALL( FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
# Linux specific code
SET(OperatingSystem "Linux")
ELSE (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
INSTALL( TARGETS ${PROJECT_NAME} DESTINATION ${QT_BINARY_DIR} )
INSTALL( TARGETS ${COMPANION_NAME} DESTINATION ${QT_BINARY_DIR} )
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF( WIN32 )
IF( MSVC )
SET( NSI_IN_FILE companion-vs.nsi.in )
SET(COMPANION_NSI_IN_FILE companion-vs.nsi.in)
SET(SIMULATOR_NSI_IN_FILE simulator-vs.nsi.in)
ELSE( )
SET( NSI_IN_FILE companion-msys.nsi.in )
SET(COMPANION_NSI_IN_FILE companion-msys.nsi.in)
SET(SIMULATOR_NSI_IN_FILE simulator-msys.nsi.in)
ENDIF( )
SET( SYSDIR "$ENV{windir}/system32" )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion.nsi @ONLY)
SET( SYSDIR "$ENV{windir}/system32" )
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${COMPANION_NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion.nsi @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${SIMULATOR_NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/simulator.nsi @ONLY)
FIND_PROGRAM(NSIS_EXE makensis.exe PATHS
"C:/Program Files/NSIS"
"C:/Program Files (x86)/NSIS"
"C:/Program Files (x86)/NSIS"
"C:/Programs/NSIS"
)
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companionInstall.exe
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companion-windows.exe
COMMAND "${NSIS_EXE}" ARGS companion.nsi
DEPENDS ${PROJECT_NAME} simulator ${PROJECT_BINARY_DIR}/companion.nsi
COMMENT "Windows NSIS Installer")
DEPENDS companion simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion.nsi
COMMENT "Companion Windows NSIS Installer")
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/simulator-install.exe
COMMAND "${NSIS_EXE}" ARGS simulator.nsi
DEPENDS simulator opentx-simulators ${PROJECT_BINARY_DIR}/simulator.nsi
COMMENT "Simulator Windows NSIS Installer")
ADD_CUSTOM_TARGET( installer
DEPENDS ${PROJECT_BINARY_DIR}/companionInstall.exe
DEPENDS ${PROJECT_BINARY_DIR}/companion-windows.exe
DEPENDS ${PROJECT_BINARY_DIR}/simulator-windows.exe
SOURCES ${PROJECT_BINARY_DIR}/companion.nsi
SOURCES ${PROJECT_BINARY_DIR}/simulator.nsi
)
ENDIF( )
IF( APPLE )
SET(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
SET(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
IF( CMAKE_GENERATOR STREQUAL Xcode )
SET( WORK_DIR ${CMAKE_BINARY_DIR}/Debug )
ELSE( )
SET( WORK_DIR ${PROJECT_BINARY_DIR} )
ENDIF()
ADD_CUSTOM_TARGET( addframeworks ALL
ADD_CUSTOM_TARGET( addframeworks
COMMAND mkdir -p companion.app/Contents/Frameworks
COMMAND mkdir -p companion.app/Contents/Resources
COMMAND mkdir -p companion.app/Contents/translations
COMMAND mkdir -p companion.app/Contents/translations
COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files
#COMMAND rsync ${PROJECT_SOURCE_DIR}/../targets/mac/lib* companion.app/Contents/Frameworks
#COMMAND rsync ${PROJECT_SOURCE_DIR}/../targets/mac/libcrypto.1.0.0.dylib companion.app/Contents/Frameworks
COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../targets/mac/qt_menu.nib companion.app/Contents/Resources/
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync -r ${XSD_INCLUDE_DIR}/.. companion.app/Contents/Frameworks/
COMMAND rsync -r /Library/Frameworks/SDL.framework companion.app/Contents/Frameworks/
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app
COMMAND install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL companion.app/Contents/MacOS/companion
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS ${PROJECT_NAME} )
DEPENDS ${COMPANION_NAME} )
ADD_CUSTOM_TARGET( makedmg
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app -dmg -no-plugins
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS addframeworks )
DEPENDS addframeworks opentx-simulators-bundle)
ENDIF( )
ADD_CUSTOM_TARGET( stamp
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/version.h ${CMAKE_SOURCE_DIR}/../companion.stamp
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/version.h ${CMAKE_SOURCE_DIR}/../companion.stamp
DEPENDS ${CMAKE_BINARY_DIR}/version.h )
ADD_CUSTOM_TARGET( translations
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND lupdate-qt4 ${CMAKE_SOURCE_DIR} -ts ${companion_TS} )
IF( LUPDATE_FOUND )
ADD_CUSTOM_TARGET( translations
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -ts ${companion_TS}
)
ELSE()
ADD_CUSTOM_TARGET( translations
COMMAND echo "Sorry, QT lupdate was not found."
)
ENDIF()
SET(CPACK_PACKAGE_NAME "COMPANION")
SET(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTx open source firmware")
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
SET( CPACK_STRIP_FILES TRUE )
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
if(DPKG_PROGRAM)
SET(CPACK_GENERATOR "DEB")
@@ -434,7 +453,7 @@ if(DPKG_PROGRAM)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}_${C9X_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Romolo Manfredini <romolo.manfredini-nosp@m-gmail.com>")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Bertrand Songis <bsongis-nosp@m-gmail.com>")
SET(CPACK_DEBIAN_PACKAGE_VERSION ${C9X_VERSION})
SET(CPACK_DEBIAN_PACKAGE_VERSION_MAJOR ${C9X_VERSION_MAJOR})
SET(CPACK_DEBIAN_PACKAGE_VERSION_MINOR ${C9X_VERSION_MINOR})
@@ -445,6 +464,6 @@ else(DPKG_PROGRAM)
SET(CPACK_RPM_PACKAGE_VERSION ${C9X_VERSION})
SET(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}-${C9X_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
endif(DPKG_PROGRAM)
endif(DPKG_PROGRAM)
INCLUDE(CPack)
+106 -38
View File
@@ -1,6 +1,6 @@
/*
* Author - Kjell Kernen
*
*
* 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.
@@ -20,7 +20,7 @@ AppData g;
// ** CompStoreObj class********************
void CompStoreObj::clear (const QString tag1, const QString tag2, const QString tag3)
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (tag2.isEmpty())
{
settings.remove(tag1);
@@ -43,7 +43,7 @@ void CompStoreObj::clear (const QString tag1, const QString tag2, const QString
void CompStoreObj::store(const QByteArray newArray, QByteArray &array, const QString tag, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -56,7 +56,7 @@ void CompStoreObj::store(const QByteArray newArray, QByteArray &array, const QSt
void CompStoreObj::store(const QStringList newSList, QStringList &stringList, const QString tag, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -69,7 +69,7 @@ void CompStoreObj::store(const QStringList newSList, QStringList &stringList, co
void CompStoreObj::store(const QString newString, QString &string, const QString tag, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -82,7 +82,7 @@ void CompStoreObj::store(const QString newString, QString &string, const QString
void CompStoreObj::store(const bool newTruth, bool &truth, const QString tag, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -95,7 +95,7 @@ void CompStoreObj::store(const bool newTruth, bool &truth, const QString tag, co
void CompStoreObj::store(const int newNumber, int &number, const QString tag, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -109,7 +109,7 @@ void CompStoreObj::store(const int newNumber, int &number, const QString tag, co
// Retrieval functions
void CompStoreObj::retrieve( QByteArray &array, const QString tag, const QString def, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -121,7 +121,7 @@ void CompStoreObj::retrieve( QByteArray &array, const QString tag, const QString
void CompStoreObj::retrieve( QStringList &stringList, const QString tag, const QString def, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -133,7 +133,7 @@ void CompStoreObj::retrieve( QStringList &stringList, const QString tag, const Q
void CompStoreObj::retrieve( QString &string, const QString tag, const QString def, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -145,7 +145,7 @@ void CompStoreObj::retrieve( QString &string, const QString tag, const QString d
void CompStoreObj::retrieve( bool &truth, const QString tag, const bool def, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -157,7 +157,7 @@ void CompStoreObj::retrieve( bool &truth, const QString tag, const bool def, con
void CompStoreObj::retrieve( int &number, const QString tag, const int def, const QString group1, const QString group2 )
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
if (!group1.isEmpty()) settings.beginGroup(group1);
if (!group2.isEmpty()) settings.beginGroup(group2);
@@ -241,7 +241,7 @@ JStickData::JStickData()
void JStickData::remove()
{
// Remove all JStickData values from settings file
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
settings.beginGroup( "JsCalibration" );
settings.remove( QString( "stick%1_axe").arg(index) );
settings.remove( QString( "stick%1_min").arg(index) );
@@ -256,7 +256,7 @@ void JStickData::remove()
bool JStickData::existsOnDisk()
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
settings.beginGroup("JsCalibration");
int axe = settings.value( QString("stick%1_axe").arg(index), -1 ).toInt();
settings.endGroup();
@@ -295,8 +295,11 @@ QString Profile::fwName() const { return _fwName; }
QString Profile::fwType() const { return _fwType; }
QString Profile::name() const { return _name; }
QString Profile::sdPath() const { return _sdPath; }
int Profile::volumeGain() const { return _volumeGain; }
QString Profile::pBackupDir() const { return _pBackupDir; }
QString Profile::splashFile() const { return _splashFile; }
bool Profile::burnFirmware() const { return _burnFirmware; }
bool Profile::penableBackup() const { return _penableBackup; }
bool Profile::renameFwFiles() const { return _renameFwFiles; }
int Profile::channelOrder() const { return _channelOrder; }
int Profile::defaultMode() const { return _defaultMode; }
@@ -309,20 +312,25 @@ QString Profile::speaker() const { return _speaker; }
QString Profile::stickPotCalib() const { return _stickPotCalib; }
QString Profile::timeStamp() const { return _timeStamp; }
QString Profile::trainerCalib() const { return _trainerCalib; }
int Profile::currentCalib() const { return _currentCalib; }
int Profile::txCurrentCalibration() const { return _txCurrentCalibration; }
int Profile::gsStickMode() const { return _gsStickMode; }
int Profile::ppmMultiplier() const { return _ppmMultiplier; }
int Profile::vBatCalib() const { return _vBatCalib; }
int Profile::txVoltageCalibration() const { return _txVoltageCalibration; }
int Profile::vBatWarn() const { return _vBatWarn; }
int Profile::vBatMin() const { return _vBatMin; }
int Profile::vBatMax() const { return _vBatMax; }
// Set declarations
void Profile::name (const QString x) { store(x, _name, "Name" ,"Profiles", QString("profile%1").arg(index));}
void Profile::fwName (const QString x) { store(x, _fwName, "fwName" ,"Profiles", QString("profile%1").arg(index));}
void Profile::fwType (const QString x) { store(x, _fwType, "fwType" ,"Profiles", QString("profile%1").arg(index));}
void Profile::sdPath (const QString x) { store(x, _sdPath, "sdPath" ,"Profiles", QString("profile%1").arg(index));}
void Profile::volumeGain (const int x) { store(x, _volumeGain, "volumeGain" ,"Profiles", QString("profile%1").arg(index));}
void Profile::pBackupDir (const QString x) { store(x, _pBackupDir, "pBackupDir" ,"Profiles", QString("profile%1").arg(index));}
void Profile::splashFile (const QString x) { store(x, _splashFile, "SplashFileName" ,"Profiles", QString("profile%1").arg(index));}
void Profile::burnFirmware (const bool x) { store(x, _burnFirmware, "burnFirmware" ,"Profiles", QString("profile%1").arg(index));}
void Profile::renameFwFiles (const bool x) { store(x, _renameFwFiles, "rename_firmware_files" ,"Profiles", QString("profile%1").arg(index));}
void Profile::penableBackup (const bool x) { store(x, _penableBackup, "penableBackup" ,"Profiles", QString("profile%1").arg(index));}
void Profile::channelOrder (const int x) { store(x, _channelOrder, "default_channel_order" ,"Profiles", QString("profile%1").arg(index));}
void Profile::defaultMode (const int x) { store(x, _defaultMode, "default_mode" ,"Profiles", QString("profile%1").arg(index));}
@@ -334,11 +342,13 @@ 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::currentCalib (const int x) { store(x, _currentCalib, "currentCalib" ,"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));}
void Profile::vBatCalib (const int x) { store(x, _vBatCalib, "VbatCalib" ,"Profiles", QString("profile%1").arg(index));}
void Profile::txVoltageCalibration (const int x) { store(x, _txVoltageCalibration, "VbatCalib","Profiles", QString("profile%1").arg(index));}
void Profile::vBatWarn (const int x) { store(x, _vBatWarn, "vBatWarn" ,"Profiles", QString("profile%1").arg(index));}
void Profile::vBatMin (const int x) { store(x, _vBatMin, "VbatMin" ,"Profiles", QString("profile%1").arg(index));}
void Profile::vBatMax (const int x) { store(x, _vBatMax, "VbatMax" ,"Profiles", QString("profile%1").arg(index));}
// Constructor
Profile::Profile()
@@ -346,16 +356,19 @@ Profile::Profile()
index = -1;
}
// The default copy operator can not be used since the index variable would be destroyed
// The default copy operator can not be used since the index variable would be destroyed
Profile& Profile::operator=(const Profile& rhs)
{
name ( rhs.name() );
fwName ( rhs.fwName() );
fwType ( rhs.fwType() );
sdPath ( rhs.sdPath() );
volumeGain ( rhs.volumeGain() );
pBackupDir ( rhs.pBackupDir() );
splashFile ( rhs.splashFile() );
burnFirmware ( rhs.burnFirmware() );
renameFwFiles( rhs.renameFwFiles() );
penableBackup( rhs.penableBackup() );
channelOrder ( rhs.channelOrder() );
defaultMode ( rhs.defaultMode() );
beeper ( rhs.beeper() );
@@ -365,11 +378,13 @@ Profile& Profile::operator=(const Profile& rhs)
speaker ( rhs.speaker() );
stickPotCalib( rhs.stickPotCalib() );
trainerCalib ( rhs.trainerCalib() );
currentCalib ( rhs.currentCalib() );
txCurrentCalibration ( rhs.txCurrentCalibration() );
gsStickMode ( rhs.gsStickMode() );
ppmMultiplier( rhs.ppmMultiplier() );
vBatCalib ( rhs.vBatCalib() );
txVoltageCalibration ( rhs.txVoltageCalibration() );
vBatWarn ( rhs.vBatWarn() );
vBatMin ( rhs.vBatMin() );
vBatMax ( rhs.vBatMax() );
return *this;
}
@@ -377,7 +392,7 @@ Profile& Profile::operator=(const Profile& rhs)
void Profile::remove()
{
// Remove all profile values from settings file
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
settings.beginGroup("Profiles");
settings.remove(QString("profile%1").arg(index));
settings.endGroup();
@@ -388,7 +403,7 @@ void Profile::remove()
bool Profile::existsOnDisk()
{
QSettings settings(PRODUCT, COMPANY);
QSettings settings(COMPANY, PRODUCT);
settings.beginGroup("Profiles");
settings.beginGroup(QString("profile%1").arg(index));
QStringList keyList = settings.allKeys();
@@ -409,11 +424,13 @@ void Profile::initFwVariables()
_timeStamp = "";
_trainerCalib = "";
_currentCalib = 0;
_txCurrentCalibration = 0;
_gsStickMode = 0;
_ppmMultiplier = 0;
_vBatCalib = 0;
_txVoltageCalibration = 0;
_vBatWarn = 0;
_vBatMin = 0;
_vBatMax = 0;
}
void Profile::init(int newIndex)
@@ -424,9 +441,12 @@ void Profile::init(int newIndex)
_fwType = "";
_name = "";
_sdPath = "";
_volumeGain = 10;
_pBackupDir = "";
_splashFile = "";
_burnFirmware = false;
_renameFwFiles = false;
_penableBackup = false;
_channelOrder = 0;
_defaultMode = 1;
@@ -446,8 +466,11 @@ void Profile::flush()
getset( _fwType, "fwType" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _name, "Name" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _sdPath, "sdPath" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _volumeGain, "volumeGain" ,10 ,"Profiles", QString("profile%1").arg(index));
getset( _pBackupDir, "pBackupDir" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _splashFile, "SplashFileName" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _burnFirmware, "burnFirmware" ,false ,"Profiles", QString("profile%1").arg(index));
getset( _penableBackup, "penableBackup" ,false ,"Profiles", QString("profile%1").arg(index));
getset( _renameFwFiles, "rename_firmware_files" ,false ,"Profiles", QString("profile%1").arg(index));
getset( _channelOrder, "default_channel_order" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _defaultMode, "default_mode" ,1 ,"Profiles", QString("profile%1").arg(index));
@@ -460,11 +483,13 @@ 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( _currentCalib, "currentCalib" ,0 ,"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));
getset( _vBatCalib, "VbatCalib" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _txVoltageCalibration, "VbatCalib" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _vBatWarn, "vBatWarn" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _vBatMin, "VbatMin" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _vBatMax, "VbatMax" ,0 ,"Profiles", QString("profile%1").arg(index));
}
@@ -487,6 +512,7 @@ QString AppData::mcu() { return _mcu; }
QString AppData::programmer() { return _programmer; }
QString AppData::sambaLocation() { return _sambaLocation; }
QString AppData::sambaPort() { return _sambaPort; }
QString AppData::lastSimulator() { return _lastSimulator; }
QString AppData::backupDir() { return _backupDir; }
QString AppData::gePath() { return _gePath; }
@@ -498,8 +524,6 @@ QString AppData::libDir() { return _libDir; }
QString AppData::snapshotDir() { return _snapshotDir; }
QString AppData::updatesDir() { return _updatesDir; }
bool AppData::enableBackup() { return _enableBackup; }
bool AppData::backupOnFlash() { return _backupOnFlash; }
bool AppData::jsSupport() { return _jsSupport; }
bool AppData::maximized() { return _maximized; }
bool AppData::showSplash() { return _showSplash; }
@@ -537,6 +561,7 @@ void AppData::mcu (const QString x) { store(x, _mcu,
void AppData::programmer (const QString x) { store(x, _programmer, "programmer" );}
void AppData::sambaLocation (const QString x) { store(x, _sambaLocation, "samba_location" );}
void AppData::sambaPort (const QString x) { store(x, _sambaPort, "samba_port" );}
void AppData::lastSimulator (const QString x) { store(x, _lastSimulator, "last_simulator" );}
void AppData::backupDir (const QString x) { store(x, _backupDir, "backupPath" );}
void AppData::gePath (const QString x) { store(x, _gePath, "gePath" );}
@@ -548,8 +573,6 @@ void AppData::libDir (const QString x) { store(x, _libDir,
void AppData::snapshotDir (const QString x) { store(x, _snapshotDir, "snapshotpath" );}
void AppData::updatesDir (const QString x) { store(x, _updatesDir, "lastUpdatesDir" );}
void AppData::enableBackup (const bool x) { store(x, _enableBackup, "backupEnable" );}
void AppData::backupOnFlash (const bool x) { store(x, _backupOnFlash, "backupOnFlash" );}
void AppData::maximized (const bool x) { store(x, _maximized, "maximized" );}
void AppData::jsSupport (const bool x) { store(x, _jsSupport, "js_support" );}
void AppData::showSplash (const bool x) { store(x, _showSplash, "show_splash" );}
@@ -581,11 +604,49 @@ AppData::AppData()
for (int i=0; i<MAX_JOYSTICKS; i++)
joystick[i].init( i );
// Import settings from companion9x, but only do it one time.
QSettings c9x_settings("companion9x", "companion9x");
QSettings settings(PRODUCT, COMPANY);
if (profile[0].name().isEmpty() )
// Copy existing 2.0.16 settings if present
QSettings settings(COMPANY, PRODUCT);
if (profile[0].name().isEmpty())
{
QSettings settings20("OpenTX", "Companion 2.0");
QStringList keys = settings20.allKeys();
for (QStringList::iterator i=keys.begin(); i!=keys.end(); i++)
{
if (settings20.value(*i) != QString("") && settings20.value(*i) != QString("Start Menu Folder"))
{
settings.setValue(*i, settings20.value(*i));
}
}
//Reload profiles
for (int i=0; i<MAX_PROFILES; i++)
profile[i].init( i );
}
// Else copy existing <2.0.16 settings if present
if (profile[0].name().isEmpty())
{
QSettings pre2016settings("OpenTX", "OpenTX Companion");
QStringList keys = pre2016settings.allKeys();
for (QStringList::iterator i=keys.begin(); i!=keys.end(); i++)
{
if (pre2016settings.value(*i) != QString("") && pre2016settings.value(*i) != QString("Start Menu Folder"))
{
settings.setValue(*i, pre2016settings.value(*i));
}
}
//Reload profiles
for (int i=0; i<MAX_PROFILES; i++)
profile[i].init( i );
}
// Else import settings from companion9x if present
if (profile[0].name().isEmpty())
{
QSettings c9x_settings("companion9x", "companion9x");
// Copy all settings from companion9x to companion
QStringList keys = c9x_settings.allKeys();
for (QStringList::iterator i=keys.begin(); i!=keys.end(); i++)
@@ -629,7 +690,7 @@ AppData::AppData()
settings.remove("patchImage");
settings.remove("rename_firmware_files");
settings.remove("sdPath");
settings.remove("SplashFileName");
settings.remove("SplashFileName");
settings.remove("startup_check_companion9x");
settings.remove("wizardEnable");
@@ -644,8 +705,8 @@ AppData::AppData()
settings.remove("compilation-server");
// 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" ,"20" ); // This is a version marker. Will be used to upgrade the settings later on.
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( _recentFiles, "recentFileList" ,"" );
getset( _mainWinGeo, "mainWindowGeometry" ,"" );
@@ -663,6 +724,7 @@ AppData::AppData()
getset( _programmer, "programmer" ,"usbasp" );
getset( _sambaLocation, "samba_location" ,"" );
getset( _sambaPort, "samba_port" ,"\\USBserial\\COM23" );
getset( _lastSimulator, "last_simulator" ,"" );
getset( _backupDir, "backupPath" ,"" );
getset( _gePath, "gePath" ,"" );
@@ -674,8 +736,14 @@ AppData::AppData()
getset( _snapshotDir, "snapshotpath" ,"" );
getset( _updatesDir, "lastUpdatesDir" ,"" );
getset( _outputDisplayDetails, "outputDisplayDetails" ,false );
getset( _enableBackup, "backupEnable" ,false );
getset( _backupOnFlash, "backupOnFlash" ,true );
getset( _checkHardwareCompatibility, "checkHardwareCompatibility" ,true );
getset( _useCompanionNightlyBuilds, "useCompanionNightlyBuilds" ,false );
getset( _useFirmwareNightlyBuilds, "useFirmwareNightlyBuilds" ,false );
getset( _jsSupport, "js_support" ,false );
getset( _maximized, "maximized" ,false );
getset( _showSplash, "show_splash" ,true );
+44 -18
View File
@@ -1,6 +1,6 @@
/*
* Author - Kjell Kernen
*
*
* 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.
@@ -12,7 +12,7 @@
*
*/
// All temporary and permanent global variables are defined here to make
// All temporary and permanent global variables are defined here to make
// initialization and storage safe and visible.
// Do not access variables in QSettings directly, it is not type safe!
@@ -24,8 +24,8 @@
#include <QString>
#include <QSettings>
#define COMPANY "OpenTX Companion"
#define PRODUCT "OpenTX"
#define COMPANY "OpenTX"
#define PRODUCT "Companion 2.1"
#define MAX_PROFILES 15
#define MAX_JOYSTICKS 8
@@ -53,7 +53,7 @@ class CompStoreObj
void getset( QString &string, const QString tag, const QString def, const QString group1="", const QString group2="" );
void getset( bool &truth, const QString tag, const bool def, const QString group1="", const QString group2="" );
void getset( int &number, const QString tag, const int def, const QString group1="", const QString group2="" );
};
};
class FwRevision: protected CompStoreObj
{
@@ -107,8 +107,11 @@ class Profile: protected CompStoreObj
QString _fwType;
QString _name;
QString _sdPath;
int _volumeGain;
QString _pBackupDir;
QString _splashFile;
bool _burnFirmware;
bool _penableBackup;
bool _renameFwFiles;
int _channelOrder;
int _defaultMode;
@@ -122,11 +125,13 @@ class Profile: protected CompStoreObj
QString _stickPotCalib;
QString _timeStamp;
QString _trainerCalib;
int _currentCalib;
int _txCurrentCalibration;
int _gsStickMode;
int _ppmMultiplier;
int _vBatCalib;
int _txVoltageCalibration;
int _vBatWarn;
int _vBatMin;
int _vBatMax;
public:
// All the get definitions
@@ -134,9 +139,12 @@ class Profile: protected CompStoreObj
QString fwType() const;
QString name() const;
QString sdPath() const;
int volumeGain() const;
QString pBackupDir() const;
QString splashFile() const;
bool burnFirmware() const;
bool renameFwFiles() const;
bool penableBackup() const;
int channelOrder() const;
int defaultMode() const;
@@ -148,20 +156,25 @@ class Profile: protected CompStoreObj
QString stickPotCalib() const;
QString timeStamp() const;
QString trainerCalib() const;
int currentCalib() const;
int txCurrentCalibration() const;
int gsStickMode() const;
int ppmMultiplier() const;
int vBatCalib() const;
int txVoltageCalibration() const;
int vBatWarn() const;
int vBatMin() const;
int vBatMax() const;
// All the set definitions
void name (const QString);
void fwName (const QString);
void fwType (const QString);
void volumeGain (const int);
void sdPath (const QString);
void pBackupDir (const QString);
void splashFile (const QString);
void burnFirmware (const bool);
void renameFwFiles (const bool);
void penableBackup (const bool);
void channelOrder (const int);
void defaultMode (const int);
@@ -173,11 +186,13 @@ class Profile: protected CompStoreObj
void stickPotCalib (const QString);
void timeStamp (const QString);
void trainerCalib (const QString);
void currentCalib (const int);
void txCurrentCalibration (const int);
void gsStickMode (const int);
void ppmMultiplier (const int);
void vBatCalib (const int);
void txVoltageCalibration (const int);
void vBatWarn (const int);
void vBatMin (const int);
void vBatMax (const int);
Profile();
Profile& operator=(const Profile&);
@@ -188,8 +203,22 @@ class Profile: protected CompStoreObj
void flush();
};
#define BOOL_PROPERTY(name, dflt) \
public: \
inline bool name() { return _ ## name; } \
void name(const bool val) { store(val, _ ## name, # name); } \
private: \
bool _ ## name;
class AppData: protected CompStoreObj
{
BOOL_PROPERTY(enableBackup, false)
BOOL_PROPERTY(outputDisplayDetails, false)
BOOL_PROPERTY(backupOnFlash, true)
BOOL_PROPERTY(checkHardwareCompatibility, true)
BOOL_PROPERTY(useCompanionNightlyBuilds, false)
BOOL_PROPERTY(useFirmwareNightlyBuilds, false)
// All the global variables
public:
Profile profile[MAX_PROFILES];
@@ -213,6 +242,7 @@ class AppData: protected CompStoreObj
QString _programmer;
QString _sambaLocation;
QString _sambaPort;
QString _lastSimulator;
QString _backupDir;
QString _gePath;
@@ -224,8 +254,6 @@ class AppData: protected CompStoreObj
QString _snapshotDir;
QString _updatesDir;
bool _enableBackup;
bool _backupOnFlash;
bool _maximized;
bool _jsSupport;
bool _showSplash;
@@ -259,12 +287,13 @@ class AppData: protected CompStoreObj
QString avrdudeLocation();
QString dfuArguments();
QString dfuLocation();
QString lastFw();
QString lastFw();
QString locale();
QString mcu();
QString programmer();
QString sambaLocation();
QString sambaPort();
QString lastSimulator();
QString backupDir();
QString gePath();
@@ -276,8 +305,6 @@ class AppData: protected CompStoreObj
QString snapshotDir();
QString updatesDir();
bool enableBackup();
bool backupOnFlash();
bool jsSupport();
bool maximized();
bool showSplash();
@@ -316,6 +343,7 @@ class AppData: protected CompStoreObj
void programmer (const QString);
void sambaLocation (const QString);
void sambaPort (const QString);
void lastSimulator (const QString);
void backupDir (const QString);
void gePath (const QString);
@@ -327,8 +355,6 @@ class AppData: protected CompStoreObj
void snapshotDir (const QString);
void updatesDir (const QString);
void enableBackup (const bool);
void backupOnFlash (const bool);
void maximized (const bool);
void jsSupport (const bool);
void showSplash (const bool);
+53 -14
View File
@@ -3,7 +3,7 @@
#include "mainwindow.h"
#include "appdata.h"
#include "helpers.h"
#include "flashinterface.h"
#include "firmwareinterface.h"
#ifdef JOYSTICKS
#include "joystick.h"
#include "joystickdialog.h"
@@ -41,13 +41,16 @@ AppPreferencesDialog::~AppPreferencesDialog()
void AppPreferencesDialog::writeValues()
{
g.autoCheckApp(ui->startupCheck_companion9x->isChecked());
g.autoCheckFw(ui->startupCheck_fw->isChecked());
g.useCompanionNightlyBuilds(ui->useCompanionNightlyBuilds->isChecked());
g.autoCheckApp(ui->autoCheckCompanion->isChecked());
g.useFirmwareNightlyBuilds(ui->useFirmwareNightlyBuilds->isChecked());
g.autoCheckFw(ui->autoCheckFirmware->isChecked());
g.showSplash(ui->showSplash->isChecked());
g.simuSW(ui->simuSW->isChecked());
g.useWizard(ui->modelWizard_CB->isChecked());
g.historySize(ui->historySize->value());
g.backLight(ui->backLightColor->currentIndex());
g.profile[g.id()].volumeGain(round(ui->volumeGain->value() * 10.0));
g.libDir(ui->libraryPath->text());
g.gePath(ui->ge_lineedit->text());
g.embedSplashes(ui->splashincludeCB->currentIndex());
@@ -66,6 +69,8 @@ void AppPreferencesDialog::writeValues()
g.profile[g.id()].renameFwFiles(ui->renameFirmware->isChecked());
g.profile[g.id()].burnFirmware(ui->burnFirmware->isChecked());
g.profile[g.id()].sdPath(ui->sdPath->text());
g.profile[g.id()].pBackupDir(ui->profilebackupPath->text());
g.profile[g.id()].penableBackup(ui->pbackupEnable->isChecked());
g.profile[g.id()].splashFile(ui->SplashFileName->text());
// The profile name may NEVER be empty
@@ -104,11 +109,19 @@ void AppPreferencesDialog::initSettings()
ui->snapshotPath->setDisabled(true);
ui->snapshotPathButton->setDisabled(true);
}
ui->startupCheck_companion9x->setChecked(g.autoCheckApp());
ui->startupCheck_fw->setChecked(g.autoCheckFw());
#if defined(ALLOW_NIGHTLY_BUILDS)
ui->useCompanionNightlyBuilds->setChecked(g.useCompanionNightlyBuilds());
ui->useFirmwareNightlyBuilds->setChecked(g.useFirmwareNightlyBuilds());
#else
ui->useCompanionNightlyBuilds->hide();
ui->useFirmwareNightlyBuilds->hide();
#endif
ui->autoCheckCompanion->setChecked(g.autoCheckApp());
ui->autoCheckFirmware->setChecked(g.autoCheckFw());
ui->showSplash->setChecked(g.showSplash());
ui->historySize->setValue(g.historySize());
ui->backLightColor->setCurrentIndex(g.backLight());
ui->volumeGain->setValue(g.profile[g.id()].volumeGain() / 10.0);
if (IS_TARANIS(GetCurrentFirmware()->getBoard())) {
ui->backLightColor->setEnabled(false);
@@ -164,6 +177,18 @@ void AppPreferencesDialog::initSettings()
ui->stickmodeCB->setCurrentIndex(g.profile[g.id()].defaultMode());
ui->renameFirmware->setChecked(g.profile[g.id()].renameFwFiles());
ui->sdPath->setText(g.profile[g.id()].sdPath());
if (!g.profile[g.id()].pBackupDir().isEmpty()) {
if (QDir(g.profile[g.id()].pBackupDir()).exists()) {
ui->profilebackupPath->setText(g.profile[g.id()].pBackupDir());
ui->pbackupEnable->setEnabled(true);
ui->pbackupEnable->setChecked(g.profile[g.id()].penableBackup());
} else {
ui->pbackupEnable->setDisabled(true);
}
} else {
ui->pbackupEnable->setDisabled(true);
}
ui->profileNameLE->setText(g.profile[g.id()].name());
ui->SplashFileName->setText(g.profile[g.id()].splashFile());
@@ -182,9 +207,9 @@ void AppPreferencesDialog::initSettings()
}
ui->lblGeneralSettings->setText(hwSettings);
FirmwareInterface * current_firmware = GetCurrentFirmware();
Firmware * current_firmware = GetCurrentFirmware();
foreach(FirmwareInterface * firmware, firmwares) {
foreach(Firmware * firmware, firmwares) {
ui->downloadVerCB->addItem(firmware->getName(), firmware->getId());
if (current_firmware->getFirmwareBase() == firmware) {
ui->downloadVerCB->setCurrentIndex(ui->downloadVerCB->count() - 1);
@@ -224,8 +249,17 @@ void AppPreferencesDialog::on_backupPathButton_clicked()
if (!fileName.isEmpty()) {
g.backupDir(fileName);
ui->backupPath->setText(fileName);
ui->backupEnable->setEnabled(true);
}
}
void AppPreferencesDialog::on_ProfilebackupPathButton_clicked()
{
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your Models and Settings backup folder"), g.backupDir());
if (!fileName.isEmpty()) {
ui->profilebackupPath->setText(fileName);
ui->pbackupEnable->setEnabled(true);
}
ui->backupEnable->setEnabled(true);
}
void AppPreferencesDialog::on_ge_pathButton_clicked()
@@ -347,7 +381,7 @@ void AppPreferencesDialog::baseFirmwareChanged()
{
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
foreach(FirmwareInterface * firmware, firmwares) {
foreach(Firmware * firmware, firmwares) {
if (firmware->getId() == selected_firmware) {
populateFirmwareOptions(firmware);
break;
@@ -355,11 +389,11 @@ void AppPreferencesDialog::baseFirmwareChanged()
}
}
FirmwareInterface * AppPreferencesDialog::getFirmwareVariant()
Firmware * AppPreferencesDialog::getFirmwareVariant()
{
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
foreach(FirmwareInterface * firmware, firmwares) {
foreach(Firmware * firmware, firmwares) {
QString id = firmware->getId();
if (id == selected_firmware) {
foreach(QCheckBox *cb, optionsCheckBoxes) {
@@ -390,7 +424,7 @@ void AppPreferencesDialog::firmwareOptionChanged(bool state)
if (cb == voice) {
showVoice(voice->isChecked());
}
FirmwareInterface * firmware=NULL;
Firmware * firmware=NULL;
if (cb && state) {
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
foreach(firmware, firmwares) {
@@ -416,9 +450,9 @@ void AppPreferencesDialog::firmwareOptionChanged(bool state)
}
}
void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * firmware)
void AppPreferencesDialog::populateFirmwareOptions(const Firmware * firmware)
{
const FirmwareInterface * parent = firmware->getFirmwareBase();
const Firmware * parent = firmware->getFirmwareBase();
updateLock = true;
@@ -434,6 +468,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
voice = NULL; // we will search for a voice checkbox
int index = 0;
QWidget * prevFocus = ui->voiceCombo;
foreach(QList<Option> opts, parent->opts) {
foreach(Option opt, opts) {
if (index >= optionsCheckBoxes.size()) {
@@ -441,6 +476,9 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
ui->optionsLayout->addWidget(checkbox, optionsCheckBoxes.count()/5, optionsCheckBoxes.count()%5, 1, 1);
optionsCheckBoxes.push_back(checkbox);
connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(firmwareOptionChanged(bool)));
if (prevFocus) {
QWidget::setTabOrder(prevFocus, checkbox);
}
}
QCheckBox *cb = optionsCheckBoxes.at(index++);
@@ -452,6 +490,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
if (opt.name == QString("voice")) {
voice = cb;
}
prevFocus = cb;
}
}
}
+4 -3
View File
@@ -27,8 +27,8 @@ class AppPreferencesDialog : public QDialog
void showVoice();
void hideVoice();
void populateLocale();
void populateFirmwareOptions(const FirmwareInterface *);
FirmwareInterface * getFirmwareVariant();
void populateFirmwareOptions(const Firmware *);
Firmware * getFirmwareVariant();
QCheckBox * voice;
Ui::AppPreferencesDialog *ui;
@@ -47,8 +47,9 @@ class AppPreferencesDialog : public QDialog
void on_snapshotPathButton_clicked();
void on_snapshotClipboardCKB_clicked();
void on_backupPathButton_clicked();
void on_ProfilebackupPathButton_clicked();
void on_ge_pathButton_clicked();
void on_sdPathButton_clicked();
void on_removeProfileButton_clicked();
void on_SplashSelect_clicked();
File diff suppressed because it is too large Load Diff
-504
View File
@@ -1,504 +0,0 @@
#include "avroutputdialog.h"
#include "ui_avroutputdialog.h"
#include <QtGui>
#include "eeprominterface.h"
#include "flashinterface.h"
#if defined WIN32 || !defined __GNUC__
#include <Windows.h>
#include <WinBase.h>
#include <tlhelp32.h>
#define sleep(x) Sleep(x*1000)
#else
#include <unistd.h>
#include "mountlist.h"
#endif
avrOutputDialog::avrOutputDialog(QWidget *parent, QString prog, QStringList arg, QString wTitle, int closeBehaviour, bool displayDetails) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::avrOutputDialog),
kill_timer(NULL),
hasErrors(false)
{
ui->setupUi(this);
#ifdef __APPLE__
QFont newFont("Courier", 13);
ui->plainTextEdit->setFont(newFont);
ui->plainTextEdit->setAttribute(Qt::WA_MacNormalSize);
#endif
#if defined WIN32 || !defined __GNUC__
QFont newFont("Courier", 9);
ui->plainTextEdit->setFont(newFont);
#endif
cmdLine = prog;
closeOpt = closeBehaviour;
if (cmdLine.isEmpty()) {
if (arg.count()<2) {
closeOpt = AVR_DIALOG_FORCE_CLOSE;
QTimer::singleShot(0, this, SLOT(forceClose()));
}
else {
sourceFile=arg.at(0);
destFile=arg.at(1);
if (!displayDetails) {
ui->plainTextEdit->hide();
QTimer::singleShot(0, this, SLOT(shrink()));
} else {
ui->checkBox->setChecked(true);
}
ui->progressBar->setMaximum(127);
QTimer::singleShot(500, this, SLOT(doCopy()));
}
}
else {
if (wTitle.isEmpty())
setWindowTitle(getProgrammer() + " " + tr("result"));
else
setWindowTitle(getProgrammer() + " - " + wTitle);
QFile exec;
winTitle=wTitle;
if (!(exec.exists(prog))) {
QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("executable not found"));
closeOpt = AVR_DIALOG_FORCE_CLOSE;
QTimer::singleShot(0, this, SLOT(forceClose()));
}
else {
foreach(QString str, arg) cmdLine.append(" " + str);
lfuse = 0;
hfuse = 0;
efuse = 0;
phase=0;
currLine.clear();
if (!displayDetails) {
ui->plainTextEdit->hide();
QTimer::singleShot(0, this, SLOT(shrink()));
}
else {
ui->checkBox->setChecked(true);
}
process = new QProcess(this);
connect(process,SIGNAL(readyReadStandardError()), this, SLOT(doAddTextStdErr()));
connect(process,SIGNAL(started()),this,SLOT(doProcessStarted()));
connect(process,SIGNAL(readyReadStandardOutput()),this,SLOT(doAddTextStdOut()));
connect(process,SIGNAL(finished(int)),this,SLOT(doFinished(int)));
#if !__GNUC__
kill_timer = new QTimer(this);
connect(kill_timer, SIGNAL(timeout()), this, SLOT(killTimerElapsed()));
kill_timer->start(2000);
#endif
process->start(prog,arg);
}
}
}
# if !__GNUC__
BOOL KillProcessByName(char *szProcessToKill){
HANDLE hProcessSnap;
HANDLE hProcess;
PROCESSENTRY32 pe32;
DWORD dwPriorityClass;
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); // Takes a snapshot of all the processes
if(hProcessSnap == INVALID_HANDLE_VALUE){
return( FALSE );
}
pe32.dwSize = sizeof(PROCESSENTRY32);
if(!Process32First(hProcessSnap, &pe32)){
CloseHandle(hProcessSnap);
return( FALSE );
}
do{
if(!strcmp(pe32.szExeFile,szProcessToKill)){ // checks if process at current position has the name of to be killed app
hProcess = OpenProcess(PROCESS_TERMINATE,0, pe32.th32ProcessID); // gets handle to process
TerminateProcess(hProcess,0); // Terminate process by handle
CloseHandle(hProcess); // close the handle
}
}while(Process32Next(hProcessSnap,&pe32)); // gets next member of snapshot
CloseHandle(hProcessSnap); // closes the snapshot handle
return( TRUE );
}
#endif
void avrOutputDialog::doCopy()
{
char buf[BLKSIZE];
QFile source(sourceFile);
int blocks = (source.size() + BLKSIZE - 1) / BLKSIZE;
ui->progressBar->setMaximum(blocks-1);
if (source.open(QIODevice::ReadOnly)) {
QFile dest(destFile);
if (dest.open(QIODevice::WriteOnly)) {
addText(tr("Writing file: "));
for (int i=0; i<blocks; i++) {
int read = source.read(buf, BLKSIZE);
if (dest.write(buf, read) == read) {
dest.flush();
ui->progressBar->setValue(i);
if ((i%2) != 0)
addText("#");
}
else {
QMessageBox::warning(this, tr("Error"), tr("Write error"));
break;
}
}
dest.close();
}
else {
QMessageBox::warning(this, tr("Error"),tr("Cannot write destination") + ": " + dest.errorString());
}
}
else {
QMessageBox::warning(this, tr("Error"),tr("Cannot open source file") + ": " + source.errorString());
}
source.close();
doFinished(0);
}
void avrOutputDialog::killTimerElapsed()
{
delete kill_timer;
kill_timer = NULL;
# if !__GNUC__
KillProcessByName("tasklist.exe");
#endif
}
avrOutputDialog::~avrOutputDialog()
{
delete ui;
delete kill_timer;
}
void avrOutputDialog::runAgain(QString prog, QStringList arg, int closeBehaviour)
{
cmdLine = prog;
foreach(QString str, arg) cmdLine.append(" " + str);
closeOpt = closeBehaviour;
currLine.clear();
process->start(prog,arg);
}
void avrOutputDialog::waitForFinish()
{
process->waitForFinished();
}
void avrOutputDialog::addText(const QString &text)
{
QTextCursor cursor(ui->plainTextEdit->textCursor());
// is the scrollbar at the end?
bool atEnd = (ui->plainTextEdit->verticalScrollBar()->value() == ui->plainTextEdit->verticalScrollBar()->maximum());
cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor, 1);
cursor.insertText(text);
if (atEnd) {
ui->plainTextEdit->verticalScrollBar()->triggerAction(QAbstractSlider::SliderToMaximum);
}
}
void avrOutputDialog::doAddTextStdOut()
{
QByteArray data = process->readAllStandardOutput();
QString text = QString(data);
QString temp;
int nlPos, pos, size;
addText(text);
currStdLine.append(text);
if (currStdLine.contains("size = ")) {
pos = currStdLine.lastIndexOf("size = ");
temp = currStdLine.mid(pos+7);
pos = temp.lastIndexOf("\n");
size = temp.left(pos).toInt();
ui->progressBar->setMaximum(size/2048);
}
if (currStdLine.contains("\n")) {
nlPos = currStdLine.lastIndexOf("\n");
currStdLine = currStdLine.mid(nlPos+1);
}
if (!currStdLine.isEmpty()) {
if (currStdLine.at(0) == QChar('.')) {
pos = currStdLine.lastIndexOf(".");
ui->progressBar->setValue(pos);
}
else if (currStdLine.startsWith("Starting upload: [")) {
pos = (currStdLine.lastIndexOf("#")-19)/(MAX_FSIZE/204800.0);
ui->progressBar->setValue(pos);
}
}
if (text.contains("Complete ")) {
#if !__GNUC__
delete kill_timer;
kill_timer = NULL;
#endif
int start = text.indexOf("Complete ");
int end = text.indexOf("%");
if (start > 0) {
start += 9;
int value = text.mid(start, end-start).toInt();
ui->progressBar->setValue(value);
}
}
if (text.contains(":010000")) {
//contains fuse info
QStringList stl = text.split(":01000000");
foreach (QString t, stl) {
bool ok = false;
if (!lfuse) lfuse = t.left(2).toInt(&ok,16);
if (!hfuse && !ok) hfuse = t.left(2).toInt(&ok,16);
if (!efuse && !ok) efuse = t.left(2).toInt(&ok,16);
}
}
if (text.contains("-E-")) {
hasErrors = true;
}
}
QString avrOutputDialog::getProgrammer()
{
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_TARANIS(eepromInterface->getBoard())) {
return "DFU Util";
}
else if IS_SKY9X(eepromInterface->getBoard()) {
return "SAM-BA";
}
else {
return "AVRDUDE";
}
}
void avrOutputDialog::errorWizard()
{
QString output=ui->plainTextEdit->toPlainText();
if (output.contains("avrdude: Expected signature for")) { // wrong signature
int pos=output.indexOf("avrdude: Device signature = ");
bool fwexist=false;
QString DeviceStr="Unknown";
QString FwStr="";
if (pos>0) {
QString DeviceId=output.mid(pos+28,8);
if (DeviceId=="0x1e9602") {
DeviceStr="Atmega 64";
FwStr="\n"+tr("ie: OpenTX for 9X board or OpenTX for 9XR board");
fwexist=true;
}
else if (DeviceId=="0x1e9702") {
DeviceStr="Atmega 128";
FwStr="\n"+tr("ie: OpenTX for M128 / 9X board or OpenTX for 9XR board with M128 chip");
fwexist=true;
}
else if (DeviceId=="0x1e9703") {
DeviceStr="Atmega 1280";
}
else if (DeviceId=="0x1e9704") {
DeviceStr="Atmega 1281";
}
else if (DeviceId=="0x1e9801") {
DeviceStr="Atmega 2560";
FwStr="\n"+tr("ie: OpenTX for Gruvin9X board");
fwexist=true;
}
else if (DeviceId=="0x1e9802") {
DeviceStr="Atmega 2561";
}
}
if (fwexist==false) {
QMessageBox::warning(this, "Companion - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease check advanced burn options to set the correct cpu type.").arg(DeviceStr));
}
else {
FirmwareInterface *firmware = GetCurrentFirmware();
QMessageBox::warning(this, "Companion - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease select an appropriate firmware type to program it.").arg(DeviceStr)+FwStr+tr("\nYou are currently using:\n %1").arg(firmware->getName()));
}
}
}
void avrOutputDialog::doAddTextStdErr()
{
int nlPos;
int pbvalue;
QString avrphase;
QByteArray data = process->readAllStandardError();
QString text = QString(data);
currLine.append(text);
if (currLine.contains("#")) {
avrphase = currLine.left(1).toLower();
if (avrphase=="w") {
ui->progressBar->setStyleSheet("QProgressBar {text-align: center;} QProgressBar::chunk { background-color: #ff0000; text-align:center;}:");
phase=1;
if(winTitle.isEmpty())
setWindowTitle(getProgrammer() + " - " + tr("Writing"));
else
setWindowTitle(getProgrammer() + " - " + winTitle + " - " + tr("Writing"));
pbvalue=currLine.count("#")*2;
ui->progressBar->setValue(pbvalue);
}
else if (avrphase=="r") {
if (phase==0) {
ui->progressBar->setStyleSheet("QProgressBar {text-align: center;} QProgressBar::chunk { background-color: #00ff00; text-align:center;}:");
if(winTitle.isEmpty())
setWindowTitle(getProgrammer() + " - " + tr("Reading"));
else
setWindowTitle(getProgrammer() + " - " + winTitle + " - " + tr("Reading"));
}
else {
ui->progressBar->setStyleSheet("QProgressBar {text-align: center;} QProgressBar::chunk { background-color: #0000ff; text-align:center;}:");
phase=2;
if(winTitle.isEmpty())
setWindowTitle(getProgrammer() + " - " + tr("Verifying"));
else
setWindowTitle(getProgrammer() + " - " + winTitle + " - " + tr("Verifying"));
}
pbvalue=currLine.count("#")*2;
ui->progressBar->setValue(pbvalue);
}
}
if (currLine.contains("\n")) {
nlPos = currLine.lastIndexOf("\n");
currLine = currLine.mid(nlPos+1);
}
if (text.contains("-E-") && !text.contains("-E- No receive file name")) {
hasErrors = true;
}
addText(text);
}
#define HLINE_SEPARATOR "================================================================================="
void avrOutputDialog::doFinished(int code=0)
{
addText("\n" HLINE_SEPARATOR);
if (code==1 && getProgrammer()=="SAM-BA")
code=0;
if (code) {
ui->checkBox->setChecked(true);
addText("\n" + getProgrammer() + " " + tr("done - exit code %1").arg(code));
}
else if (hasErrors) {
ui->checkBox->setChecked(true);
addText("\n" + getProgrammer() + " " + tr("done with errors"));
}
else if (!cmdLine.isEmpty()) {
addText("\n" + getProgrammer() + " " + tr("done - SUCCESSFUL"));
}
else {
addText(tr("done - SUCCESSFUL"));
}
addText("\n" HLINE_SEPARATOR "\n");
if(lfuse || hfuse || efuse) {
addReadFuses();
}
switch(closeOpt)
{
case AVR_DIALOG_CLOSE_IF_SUCCESSFUL:
if (!hasErrors && !code) accept();
if (code) {
errorWizard();
}
break;
case AVR_DIALOG_FORCE_CLOSE:
if (hasErrors || code)
reject();
else
accept();
break;
case AVR_DIALOG_SHOW_DONE:
if (hasErrors || code) {
if (!cmdLine.isEmpty()) {
if (getProgrammer()!="AVRDUDE") {
QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly"));
}
else {
int res = QMessageBox::question(this, "Companion",getProgrammer() + " " + tr("did not finish correctly!\nDo you want some help ?"),QMessageBox::Yes | QMessageBox::No);
if (res != QMessageBox::No) {
errorWizard();
}
}
}
else {
QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly"));
}
// reject();
}
else {
if (!cmdLine.isEmpty()) {
ui->progressBar->setValue(ui->progressBar->maximum());
QMessageBox::information(this, "Companion", getProgrammer() + " " + tr("finished correctly"));
accept();
}
else {
QMessageBox::information(this, "Companion", tr("Copy finished correctly"));
accept();
}
}
break;
default: //AVR_DIALOG_KEEP_OPEN
break;
}
}
void avrOutputDialog::doProcessStarted()
{
addText(HLINE_SEPARATOR "\n");
addText(tr("Started") + " " + getProgrammer() + "\n");
addText(cmdLine);
addText("\n" HLINE_SEPARATOR "\n");
}
void avrOutputDialog::addReadFuses()
{
addText(HLINE_SEPARATOR "\n");
addText(tr("FUSES: Low=%1 High=%2 Ext=%3").arg(lfuse,2,16,QChar('0')).arg(hfuse,2,16,QChar('0')).arg(efuse,2,16,QChar('0')));
addText("\n" HLINE_SEPARATOR "\n");
}
void avrOutputDialog::on_checkBox_toggled(bool checked)
{
if (checked) {
ui->plainTextEdit->show();
}
else {
ui->plainTextEdit->hide();
QTimer::singleShot(0, this, SLOT(shrink()));
}
}
void avrOutputDialog::shrink()
{
resize(0,0);
}
void avrOutputDialog::forceClose()
{
accept();
}
-65
View File
@@ -1,65 +0,0 @@
#ifndef AVROUTPUTDIALOG_H
#define AVROUTPUTDIALOG_H
#include <QDialog>
#include <QtGui>
#define AVR_DIALOG_CLOSE_IF_SUCCESSFUL 0x00
#define AVR_DIALOG_KEEP_OPEN 0x01
#define AVR_DIALOG_FORCE_CLOSE 0x02
#define AVR_DIALOG_SHOW_DONE 0x04
#define READBUF 65536
#define BLKSIZE 512
namespace Ui {
class avrOutputDialog;
}
class avrOutputDialog : public QDialog
{
Q_OBJECT
public:
explicit avrOutputDialog(QWidget *parent, QString prog, QStringList arg, QString wTitle, int closeBehaviour=AVR_DIALOG_CLOSE_IF_SUCCESSFUL, bool displayDetails=false);
~avrOutputDialog();
void addText(const QString &text);
void runAgain(QString prog, QStringList arg, int closeBehaviour=AVR_DIALOG_CLOSE_IF_SUCCESSFUL);
void waitForFinish();
void addReadFuses();
protected slots:
void doAddTextStdOut();
void doAddTextStdErr();
void doProcessStarted();
void doCopy();
void doFinished(int code);
void on_checkBox_toggled(bool checked);
void shrink();
void forceClose();
void killTimerElapsed();
void errorWizard();
private:
QString getProgrammer();
Ui::avrOutputDialog *ui;
QProcess *process;
QTimer *kill_timer;
QString cmdLine;
int closeOpt;
quint8 lfuse;
quint8 hfuse;
quint8 efuse;
QString currLine;
QString currStdLine;
int phase;
QString winTitle;
bool hasErrors;
QString sourceFile;
QString destFile;
};
#endif // AVROUTPUTDIALOG_H
+13 -108
View File
@@ -1,10 +1,10 @@
#include "burnconfigdialog.h"
#include "ui_burnconfigdialog.h"
#include "avroutputdialog.h"
#include "eeprominterface.h"
#include "helpers.h"
#include "appdata.h"
#include <QtGui>
#include "progressdialog.h"
#include "process_flash.h"
#if !defined WIN32 && defined __GNUC__
#include <unistd.h>
@@ -123,7 +123,7 @@ void burnConfigDialog::getSettings()
sambaPort = g.sambaPort();
ui->avrdude_location->setText(getAVRDUDE());
ui->avrArgs->setText(getAVRArgs().join(" "));
ui->avrArgs->setText(avrArgs.join(" "));
ui->samba_location->setText(getSAMBA());
ui->samba_port->setText(getSambaPort());
@@ -285,120 +285,25 @@ void burnConfigDialog::on_dfuArgs_editingFinished()
dfuArgs = ui->dfuArgs->text().split(" ", QString::SkipEmptyParts);
}
void burnConfigDialog::listProgrammers()
void burnConfigDialog::listAvrdudeProgrammers()
{
QStringList arguments;
arguments << "-c?";
avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "List available programmers", AVR_DIALOG_KEEP_OPEN, TRUE);
ad->setWindowIcon(CompanionIcon("list.png"));
ad->show();
delete ad;
ProgressDialog progressDialog(this, tr("List available programmers"), CompanionIcon("list.png"), true);
FlashProcess flashProcess(ui->avrdude_location->text(), QStringList() << "-c?", progressDialog.progress());
flashProcess.run();
}
// TODO choose better name when no merge in progress....
void burnConfigDialog::on_pushButton_3_clicked()
{
listProgrammers();
listAvrdudeProgrammers();
}
// TODO choose better name when no merge in progress....
void burnConfigDialog::on_pushButton_4_clicked()
{
QStringList arguments;
arguments << "-?";
avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "Show help", AVR_DIALOG_KEEP_OPEN,TRUE);
ad->setWindowIcon(CompanionIcon("configure.png"));
ad->show();
delete ad;
}
void burnConfigDialog::readFuses()
{
QStringList args = avrArgs;
if(!avrPort.isEmpty()) args << "-P" << avrPort;
QStringList str;
str << "-U" << "lfuse:r:-:i" << "-U" << "hfuse:r:-:i" << "-U" << "efuse:r:-:i";
QStringList arguments;
arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << str;
avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Read Fuses",AVR_DIALOG_KEEP_OPEN,TRUE);
ad->setWindowIcon(CompanionIcon("fuses.png"));
ad->show();
delete ad;
}
void burnConfigDialog::restFuses(bool eeProtect)
{
//fuses
//avrdude -c usbasp -p m64 -U lfuse:w:<0x0E>:m
//avrdude -c usbasp -p m64 -U hfuse:w:<0x89>:m 0x81 for eeprom protection
//avrdude -c usbasp -p m64 -U efuse:w:<0xFF>:m
QMessageBox::StandardButton ret = QMessageBox::No;
ret = QMessageBox::warning(this, tr("Companion"),
tr("<b><u>WARNING!</u></b><br>This will reset the fuses of %1 to the factory settings.<br>Writing fuses can mess up your radio.<br>Do this only if you are sure they are wrong!<br>Are you sure you want to continue?").arg(avrMCU),
QMessageBox::Yes | QMessageBox::No);
if (ret == QMessageBox::Yes)
{
QStringList args = avrArgs;
if(!avrPort.isEmpty()) args << "-P" << avrPort;
QStringList str;
if (avrMCU=="m2560") {
args << "-B8";
QString erStr = eeProtect ? "hfuse:w:0x11:m" : "hfuse:w:0x19:m";
str << "-U" << "lfuse:w:0xD7:m" << "-U" << erStr << "-U" << "efuse:w:0xFC:m";
//use hfuse = 0x81 to prevent eeprom being erased with every flashing
}
else {
QString tempDir = QDir::tempPath();
QString tempFile;
QString lfuses;
tempFile = tempDir + "/ftemp.bin";
QStringList argread;
argread << "-c" << avrProgrammer << "-p" << avrMCU << args <<"-U" << "lfuse:r:"+tempFile+":r" ;
avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, argread, "Reset Fuses",AVR_DIALOG_CLOSE_IF_SUCCESSFUL,FALSE);
ad->setWindowIcon(CompanionIcon("fuses.png"));
ad->exec();
delete ad;
QFile file(tempFile);
if (file.exists() && file.size()==1) {
file.open(QIODevice::ReadOnly);
char bin_flash[1];
file.read(bin_flash, 1);
if (bin_flash[0]==0x0E) {
lfuses="lfuse:w:0x0E:m";
}
else {
lfuses="lfuse:w:0x3F:m";
}
file.close();
unlink(tempFile.toAscii());
}
else {
lfuses="lfuse:w:0x3F:m";
}
QString erStr = eeProtect ? "hfuse:w:0x81:m" : "hfuse:w:0x89:m";
str << "-U" << lfuses << "-U" << erStr << "-U" << "efuse:w:0xFF:m";
//use hfuse = 0x81 to prevent eeprom being erased with every flashing
}
QStringList arguments;
if (avrMCU=="m2560") {
arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << "-u" << str;
}
else {
arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << "-B" << "100" << "-u" << str;
}
avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Reset Fuses",AVR_DIALOG_KEEP_OPEN,TRUE);
ad->setWindowIcon(CompanionIcon("fuses.png"));
ad->show();
delete ad;
}
ProgressDialog progressDialog(this, tr("Avrdude help"), CompanionIcon("configure.png"), true);
FlashProcess flashProcess(ui->avrdude_location->text(), QStringList() << "-?", progressDialog.progress());
flashProcess.run();
}
void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
+5 -7
View File
@@ -1,5 +1,5 @@
#ifndef BURNCONFIGDIALOG_H
#define BURNCONFIGDIALOG_H
#ifndef BURNCONFIGDIALOG_H_
#define BURNCONFIGDIALOG_H_
#include <QDialog>
#include <QtGui>
@@ -23,7 +23,7 @@ public:
QString getAVRDUDE() {return avrLoc;}
QString getSAMBA() {return sambaLoc;}
QString getDFU() {return dfuLoc;}
QStringList getAVRArgs() {return avrArgs;}
QStringList getAvrdudeArgs() { QStringList args = avrArgs; if (!avrPort.isEmpty()) args << "-P" << avrPort; return args; }
QStringList getDFUArgs() {return dfuArgs;}
QString getProgrammer() {return avrProgrammer;}
QString getMCU() {return avrMCU;}
@@ -31,9 +31,7 @@ public:
QString getPort() {return avrPort;}
QString getSambaPort() {return sambaPort;}
void listProgrammers();
void restFuses(bool eeProtect);
void readFuses();
void listAvrdudeProgrammers();
private:
Ui::burnConfigDialog *ui;
@@ -73,4 +71,4 @@ private slots:
void putSettings();
};
#endif // BURNCONFIGDIALOG_H
#endif // BURNCONFIGDIALOG_H_
+9 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>531</width>
<height>335</height>
<height>422</height>
</rect>
</property>
<property name="sizePolicy">
@@ -817,6 +817,14 @@ Please only use this if you know what you are doing. There are no error checks
<tabstop>avrdude_port</tabstop>
<tabstop>avrArgs</tabstop>
<tabstop>pushButton_4</tabstop>
<tabstop>samba_location</tabstop>
<tabstop>sb_browse</tabstop>
<tabstop>arm_mcu</tabstop>
<tabstop>samba_port</tabstop>
<tabstop>dfu_location</tabstop>
<tabstop>dfu_browse</tabstop>
<tabstop>dfuArgs</tabstop>
<tabstop>advCtrChkB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
-617
View File
@@ -1,617 +0,0 @@
#include "burndialog.h"
#include "ui_burndialog.h"
#include <QtGui>
#include "eeprominterface.h"
#include "helpers.h"
#include "splashlibrary.h"
#include "flashinterface.h"
#include "hexinterface.h"
#include "appdata.h"
// Type 1 = Burn EEPROM, Type 2= Burn Flash
burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * backupEE, QString DocName):
QDialog(parent),
ui(new Ui::burnDialog),
hexfileName(fileName),
backup(backupEE),
hexType(Type)
{
ui->setupUi(this);
setWindowIcon(CompanionIcon("write_flash.png"));
if (!g.profile[g.id()].splashFile().isEmpty()){
imageSource=PROFILE;
imageFile=g.profile[g.id()].splashFile();
}
else {
ui->useProfileImageCB->setDisabled(true);
imageSource=FIRMWARE;
imageFile="";
}
ui->SplashFrame->hide();
ui->FramFWInfo->hide();
ui->EEbackupCB->hide();
ui->EEbackupCB->setCheckState(*backup ? Qt::Checked : Qt::Unchecked);
if (Type == FLASH_FILE_TYPE ) {
ui->EEpromCB->hide();
ui->profile_label->hide();
ui->patchcalib_CB->hide();
ui->patchhw_CB->hide();
setWindowTitle(tr("Write firmware to Radio"));
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEbackupCB->hide();
}
}
else {
ui->FlashLoadButton->setText(tr("Browse for file"));
ui->profile_label->hide();
ui->patchcalib_CB->hide();
ui->patchhw_CB->hide();
ui->EEpromCB->hide();
ui->BurnFlashButton->setDisabled(true);
ui->FWFileName->clear();
ui->DateField->clear();
ui->versionField->clear();
ui->ModField->clear();
ui->FramFWInfo->hide();
ui->SplashFrame->hide();
ui->BurnFlashButton->setDisabled(true);
ui->EEbackupCB->hide();
if (DocName.isEmpty()) {
setWindowTitle(tr("Write Backup to Radio"));
}
else {
setWindowTitle(tr("Write Backup from %1 to Radio").arg(DocName));
}
ui->profile_label->setText(tr("Current profile")+QString(": ")+g.profile[g.id()].name());
}
if (!hexfileName->isEmpty()) {
ui->FWFileName->setText(*hexfileName);
if (Type==FLASH_FILE_TYPE) {
checkFw(*hexfileName);
}
else {
burnraw=false;
if (checkeEprom(*hexfileName)) {
QString Name = g.profile[g.id()].name();
QString calib = g.profile[g.id()].stickPotCalib();
QString trainercalib = g.profile[g.id()].trainerCalib();
QString DisplaySet = g.profile[g.id()].display();
QString BeeperSet = g.profile[g.id()].beeper();
QString HapticSet = g.profile[g.id()].haptic();
QString SpeakerSet = g.profile[g.id()].speaker();
if (!Name.isEmpty()) {
ui->profile_label->show();
ui->patchcalib_CB->show();
ui->patchhw_CB->show();
// TODO I hardcode the number of pots here, should be dependant on the board?
if (!((calib.length()==(NUM_STICKS+3)*12) && (trainercalib.length()==16))) {
ui->patchcalib_CB->setDisabled(true);
}
if (!((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6))) {
ui->patchhw_CB->setDisabled(true);
}
}
else {
ui->profile_label->hide();
}
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEpromCB->show();
}
else {
ui->EEpromCB->setChecked(false);
}
ui->BurnFlashButton->setEnabled(true);
}
}
ui->FWFileName->hide();
ui->FlashLoadButton->hide();
hexfileName->clear();
}
else if (Type==FLASH_FILE_TYPE) {
QString FileName = g.profile[g.id()].fwName();
QFile file(FileName);
if (file.exists()) {
checkFw(FileName);
}
}
updateUI();
resize(0, 0);
}
burnDialog::~burnDialog()
{
delete ui;
}
void burnDialog::on_FlashLoadButton_clicked()
{
QString fileName;
ui->BurnFlashButton->setDisabled(true);
ui->FWFileName->clear();
ui->DateField->clear();
ui->versionField->clear();
ui->ModField->clear();
ui->FramFWInfo->hide();
ui->SplashFrame->hide();
ui->BurnFlashButton->setDisabled(true);
ui->EEbackupCB->hide();
QTimer::singleShot(0, this, SLOT(shrink()));
if (hexType==FLASH_FILE_TYPE) {
fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER);
if(fileName.isEmpty())
return;
checkFw(fileName);
}
else {
QString fileName = QFileDialog::getOpenFileName(this,tr("Choose Radio Backup file"), g.eepromDir(), tr(EXTERNAL_EEPROM_FILES_FILTER));
if (checkeEprom(fileName)) {
if (burnraw==false) {
ui->BurnFlashButton->setEnabled(true);
ui->profile_label->show();
ui->patchcalib_CB->show();
ui->patchhw_CB->show();
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEpromCB->show();
}
else {
ui->EEpromCB->setChecked(false);
}
}
else {
ui->BurnFlashButton->setEnabled(true);
ui->profile_label->hide();
ui->patchcalib_CB->setChecked(false);
ui->patchhw_CB->setChecked(false);
ui->patchhw_CB->hide();
ui->patchcalib_CB->hide();
}
QTimer::singleShot(0, this, SLOT(shrink()));
}
}
updateUI();
}
void burnDialog::checkFw(QString fileName)
{
if (fileName.isEmpty()) {
return;
}
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEbackupCB->show();
}
else {
ui->EEbackupCB->setChecked(false);
*backup=false;
}
ui->FWFileName->setText(fileName);
FlashInterface flash(fileName);
if (flash.isValid()) {
ui->FramFWInfo->show();
ui->DateField->setText(flash.getDate() + " " + flash.getTime());
ui->versionField->setText(flash.getVersion());
ui->ModField->setText(flash.getEEpromId());
ui->SplashFrame->hide();
if (flash.hasSplash()) {
ui->SplashFrame->show();
ui->imageLabel->setFixedSize(flash.getSplashWidth(), flash.getSplashHeight());
}
}
else {
QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fileName));
}
ui->BurnFlashButton->setEnabled(true);
QTimer::singleShot(0, this, SLOT(shrink()));
g.flashDir( QFileInfo(fileName).dir().absolutePath() );
}
bool burnDialog::checkeEprom(QString fileName)
{
if (fileName.isEmpty()) {
return false;
}
QFile file(fileName);
if (!file.exists()) {
QMessageBox::critical(this, tr("Error"), tr("Unable to find file %1!").arg(fileName));
return false;
}
burnraw=false;
int fileType = getFileType(fileName);
#if 0
if (fileType==FILE_TYPE_XML) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
return false;
}
QTextStream inputStream(&file);
XmlInterface(inputStream).load(radioData);
}
else
#endif
if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
return false;
}
QDomDocument doc(ER9X_EEPROM_FILE_TYPE);
bool xmlOK = doc.setContent(&file);
if(xmlOK) {
if (!LoadEepromXml(radioData, doc)){
return false;
}
}
file.reset();
QTextStream inputStream(&file);
if (fileType==FILE_TYPE_EEPE) { // read EEPE file header
QString hline = inputStream.readLine();
if (hline!=EEPE_EEPROM_FILE_HEADER) {
file.close();
return false;
}
}
uint8_t eeprom[EESIZE_RLC_MAX];
int eeprom_size = HexInterface(inputStream).load(eeprom, EESIZE_RLC_MAX);
if (!eeprom_size) {
int res = QMessageBox::question(this, "Companion",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::No) {
return false;
}
burnraw=true;
ui->FWFileName->setText(fileName);
return true;
}
file.close();
if (!LoadEeprom(radioData, eeprom, eeprom_size)) {
int res = QMessageBox::question(this, "Companion",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::No) {
return false;
}
burnraw=true;
ui->FWFileName->setText(fileName);
return true;
}
}
else if (fileType==FILE_TYPE_BIN) { //read binary
int eeprom_size = file.size();
if (!file.open(QFile::ReadOnly)) { //reading binary file - TODO HEX support
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
return false;
}
uint8_t *eeprom = (uint8_t *)malloc(eeprom_size);
memset(eeprom, 0, eeprom_size);
long result = file.read((char*)eeprom, eeprom_size);
file.close();
if (result != eeprom_size) {
QMessageBox::critical(this, tr("Error"),tr("Error reading file %1:\n%2.").arg(fileName).arg(file.errorString()));
return false;
}
if (!LoadEeprom(radioData, eeprom, eeprom_size)) {
int res = QMessageBox::question(this, "Companion",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::No) {
return false;
}
burnraw=true;
}
}
ui->FWFileName->setText(fileName);
return true;
}
void burnDialog::displaySplash()
{
QImage image;
if (imageSource == FIRMWARE){
FlashInterface flash(ui->FWFileName->text());
image = flash.getSplash();
}
else {
image.load(imageFile);
}
if (image.isNull()) {
return;
}
ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType()));
}
void burnDialog::updateUI()
{
if (hexType==EEPROM_FILE_TYPE)
return;
ui->useProfileImageCB->setChecked( imageSource == PROFILE );
ui->useFwImageCB->setChecked( imageSource == FIRMWARE );
ui->useLibraryImageCB->setChecked( imageSource == LIBRARY );
ui->useAnotherImageCB->setChecked( imageSource == ANOTHER );
displaySplash();
}
void burnDialog::on_useFwImageCB_clicked()
{
QString fileName = ui->FWFileName->text();
FlashInterface flash(fileName);
if (!flash.isValid()) {
QMessageBox::critical(this, tr("Error"), tr( "The firmware file is not valid." ));
}
else {
if (!flash.hasSplash()) {
QMessageBox::critical(this, tr("Error"), tr( "There is no start screen image in the firmware file." ));
}
else{
imageSource = FIRMWARE;
imageFile = fileName;
}
}
updateUI();
}
void burnDialog::on_useProfileImageCB_clicked()
{
QString fileName = g.profile[g.id()].splashFile();
if (!fileName.isEmpty()){
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Profile image %1 is invalid.").arg(fileName));
}
else {
imageSource = PROFILE;
imageFile = fileName;
}
}
updateUI();
}
void burnDialog::on_useAnotherImageCB_clicked()
{
QString supportedImageFormats;
for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) {
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
}
QString fileName = QFileDialog::getOpenFileName(this, tr("Open image file to use as radio start screen"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats));
if (!fileName.isEmpty()){
g.imagesDir( QFileInfo(fileName).dir().absolutePath() );
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Image could not be loaded from %1").arg(fileName));
}
else{
imageSource = ANOTHER;
imageFile = fileName;
}
}
updateUI();
}
void burnDialog::on_useLibraryImageCB_clicked()
{
QString fileName;
splashLibrary *ld = new splashLibrary(this,&fileName);
ld->exec();
if (!fileName.isEmpty()) {
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("The library image could not be loaded"));
}
else{
imageSource = LIBRARY;
imageFile = fileName;
}
}
updateUI();
}
void burnDialog::on_BurnFlashButton_clicked()
{
if (hexType==FLASH_FILE_TYPE) {
QString fileName=ui->FWFileName->text();
if (!fileName.isEmpty()) {
g.flashDir( QFileInfo(fileName).dir().absolutePath() );
if (!ui->useFwImageCB->isChecked()) {
const QPixmap * pixmap = ui->imageLabel->pixmap();
QImage image;
if (pixmap) {
image = pixmap->toImage().scaled(ui->imageLabel->width(), ui->imageLabel->height());
}
if (!image.isNull()) {
QString tempDir = QDir::tempPath();
QString tempFile;
if (getFileType(fileName) == FILE_TYPE_HEX)
tempFile = tempDir + "/flash.hex";
else
tempFile = tempDir + "/flash.bin";
FlashInterface flash(fileName);
flash.setSplash(image);
if (flash.saveFlash(tempFile) > 0) {
hexfileName->clear();
hexfileName->append(tempFile);
}
else {
hexfileName->clear();
QMessageBox::critical(this, tr("Warning"), tr("Cannot save customized firmware"));
}
}
else {
hexfileName->clear();
QMessageBox::critical(this, tr("Warning"), tr("Custom image not found"));
}
}
else {
hexfileName->clear();
hexfileName->append(fileName);
}
}
else {
QMessageBox::critical(this, tr("Warning"), tr("No firmware selected"));
hexfileName->clear();
}
}
if (hexType==EEPROM_FILE_TYPE) {
QString calib = g.profile[g.id()].stickPotCalib();
QString trainercalib = g.profile[g.id()].trainerCalib();
int potsnum=GetCurrentFirmware()->getCapability(Pots);
int8_t vBatCalib=(int8_t) g.profile[g.id()].vBatCalib();
int8_t currentCalib=(int8_t) g.profile[g.id()].currentCalib();
int8_t PPM_Multiplier=(int8_t) g.profile[g.id()].ppmMultiplier();
uint8_t GSStickMode=(uint8_t) g.profile[g.id()].gsStickMode();
uint8_t vBatWarn=(uint8_t) g.profile[g.id()].vBatWarn();
QString DisplaySet= g.profile[g.id()].display();
QString BeeperSet= g.profile[g.id()].beeper();
QString HapticSet= g.profile[g.id()].haptic();
QString SpeakerSet= g.profile[g.id()].speaker();
bool patch=false;
if (ui->patchcalib_CB->isChecked()) {
if ((calib.length()==(NUM_STICKS+potsnum)*12) && (trainercalib.length()==16)) {
QString Byte;
int16_t byte16;
bool ok;
for (int i=0; i<(NUM_STICKS+potsnum); i++) {
Byte=calib.mid(i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
radioData.generalSettings.calibMid[i]=byte16;
Byte=calib.mid(4+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
radioData.generalSettings.calibSpanNeg[i]=byte16;
Byte=calib.mid(8+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
radioData.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)
radioData.generalSettings.trainer.calib[i]=byte16;
}
radioData.generalSettings.currentCalib=currentCalib;
radioData.generalSettings.vBatCalib=vBatCalib;
radioData.generalSettings.PPM_Multiplier=PPM_Multiplier;
patch=true;
}
else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong radio calibration data in profile, Settings not patched"));
}
}
if (ui->patchhw_CB->isChecked()) {
if ((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6)) {
radioData.generalSettings.vBatWarn=vBatWarn;
radioData.generalSettings.stickMode=GSStickMode;
uint8_t byte8u;
int8_t byte8;
bool ok;
byte8=(int8_t)DisplaySet.mid(0,2).toInt(&ok,16);
if (ok)
radioData.generalSettings.optrexDisplay=(byte8==1 ? true : false);
byte8u=(uint8_t)DisplaySet.mid(2,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.contrast=byte8u;
byte8u=(uint8_t)DisplaySet.mid(4,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.backlightBright=byte8u;
byte8u=(uint8_t)BeeperSet.mid(0,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.beeperMode=(BeeperMode)byte8u;
byte8=(int8_t)BeeperSet.mid(2,2).toInt(&ok,16);
if (ok)
radioData.generalSettings.beeperLength=byte8;
byte8u=(uint8_t)HapticSet.mid(0,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.hapticMode=(BeeperMode)byte8u;
byte8u=(uint8_t)HapticSet.mid(2,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.hapticStrength=byte8u;
byte8=(int8_t)HapticSet.mid(4,2).toInt(&ok,16);
if (ok)
radioData.generalSettings.hapticLength=byte8;
byte8u=(uint8_t)SpeakerSet.mid(0,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.speakerMode=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(2,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.speakerPitch=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(4,2).toUInt(&ok,16);
if (ok)
radioData.generalSettings.speakerVolume=byte8u;
patch=true;
}
else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong radio setting data in profile, Settings not patched"));
}
if (patch) {
QString tempDir = QDir::tempPath();
QString fileName = tempDir + "/temp.bin";
QFile file(fileName);
uint8_t *eeprom = (uint8_t*)malloc(GetEepromInterface()->getEEpromSize());
int eeprom_size = GetEepromInterface()->save(eeprom, radioData, GetCurrentFirmware()->getVariantNumber());
if (!eeprom_size) {
QMessageBox::warning(this, tr("Error"),tr("Cannot write file %1:\n%2.").arg(fileName).arg(file.errorString()));
hexfileName->clear();
}
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(this, tr("Error"),tr("Cannot write file %1:\n%2.").arg(fileName).arg(file.errorString()));
hexfileName->clear();
}
QTextStream outputStream(&file);
long result = file.write((char*)eeprom, eeprom_size);
if (result != eeprom_size) {
QMessageBox::warning(this, tr("Error"),tr("Error writing file %1:\n%2.").arg(fileName).arg(file.errorString()));
}
hexfileName->clear();
hexfileName->append(fileName);
}
else {
hexfileName->clear();
hexfileName->append(ui->FWFileName->text());
}
}
else {
hexfileName->clear();
hexfileName->append(ui->FWFileName->text());
}
}
this->close();
}
void burnDialog::on_cancelButton_clicked()
{
hexfileName->clear();
this->close();
}
void burnDialog::on_EEpromCB_toggled(bool checked)
{
*backup = ui->EEpromCB->isChecked();
}
void burnDialog::shrink()
{
resize(0,0);
}
void burnDialog::on_EEbackupCB_clicked()
{
*backup = ui->EEbackupCB->isChecked();
}
-66
View File
@@ -1,66 +0,0 @@
#ifndef BURNDIALOG_H
#define BURNDIALOG_H
#include <QtGui>
#include <QDialog>
#include "eeprominterface.h"
#include "flashinterface.h"
#include "xmlinterface.h"
#define HEX_FILES_FILTER "HEX files (*.hex);;"
#define BIN_FILES_FILTER "BIN files (*.bin);;"
#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 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"
#define EEPE_MODEL_FILE_HEADER "EEPE MODEL FILE"
#define EEPROM_FILE_TYPE 1
#define FLASH_FILE_TYPE 2
namespace Ui
{
class burnDialog;
}
class burnDialog : public QDialog
{
Q_OBJECT
public:
explicit burnDialog(QWidget *parent = 0, int Type = 2, QString * fileName = NULL, bool * backupEE=NULL, QString docname="");
~burnDialog();
private slots:
void on_FlashLoadButton_clicked();
void on_BurnFlashButton_clicked();
void on_cancelButton_clicked();
void on_EEbackupCB_clicked();
void on_EEpromCB_toggled(bool checked);
bool checkeEprom(QString fileName);
void on_useProfileImageCB_clicked();
void on_useFwImageCB_clicked();
void on_useLibraryImageCB_clicked();
void on_useAnotherImageCB_clicked();
void checkFw(QString fileName);
void displaySplash();
void updateUI();
void shrink();
private:
Ui::burnDialog *ui;
QString * hexfileName;
bool * backup;
int hexType;
RadioData radioData;
bool burnraw;
enum ImageSource {FIRMWARE, PROFILE, LIBRARY, ANOTHER};
ImageSource imageSource;
QString imageFile;
};
#endif // BURNDIALOG_H
-379
View File
@@ -1,379 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>burnDialog</class>
<widget class="QDialog" name="burnDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>399</width>
<height>564</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Customize Splash</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="hs2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="BurnFlashButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Write to TX</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_4">
<item row="5" column="0">
<widget class="QCheckBox" name="patchcalib_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Modify calibration parameters using settings from current profile&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Patch calibration setting from profile</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="patchhw_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Modify HW parameters using settings from current profile&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Patch HW setting from profile</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="FramFWInfo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="3" column="0">
<widget class="QLabel" name="dateLabel">
<property name="text">
<string>Date &amp; Time</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="versionField">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="buildLabel">
<property name="text">
<string>Variant</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="ModField">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="versionLabel">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="DateField">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="FWFileName">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="FlashLoadButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Browse for file</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="EEpromCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Allows Companion to write to older version of the firmware</string>
</property>
<property name="text">
<string>Check Firmware compatibility</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="EEbackupCB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Backup and restore Models and Settings</string>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="profile_label">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Current Profile</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QFrame" name="SplashFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QGridLayout" name="SplashLayout" rowstretch="0,0,0,0,0,0,0">
<item row="0" column="1" rowspan="7">
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0">
<item row="0" column="0">
<widget class="QLabel" name="imageLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>214</width>
<height>66</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="useFwImageCB">
<property name="text">
<string>Use firmware start screen</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="useAnotherImageCB">
<property name="text">
<string>Use another start screen</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="useProfileImageCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Use profile start screen</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="useLibraryImageCB">
<property name="text">
<string>Use library start screen</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<tabstops>
<tabstop>BurnFlashButton</tabstop>
<tabstop>FWFileName</tabstop>
<tabstop>FlashLoadButton</tabstop>
<tabstop>versionField</tabstop>
<tabstop>ModField</tabstop>
<tabstop>useProfileImageCB</tabstop>
<tabstop>useFwImageCB</tabstop>
<tabstop>useLibraryImageCB</tabstop>
<tabstop>useAnotherImageCB</tabstop>
<tabstop>EEbackupCB</tabstop>
<tabstop>patchcalib_CB</tabstop>
<tabstop>patchhw_CB</tabstop>
<tabstop>EEpromCB</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
<connections/>
</ui>
+19
View File
@@ -0,0 +1,19 @@
# Locate lupdate binary from QT
# This module defines
# LUPDATE_EXECUTABLE, where is QT lupdate
# LUPDATE_FOUND, if false, don't try to use lupdate
FIND_PROGRAM( LUPDATE_EXECUTABLE
NAMES
lupdate lupdate-qt4
)
MESSAGE( STATUS ${LUPDATE_EXECUTABLE} )
# if the program is found then we have it
IF( LUPDATE_EXECUTABLE )
SET( LUPDATE_FOUND "YES" )
ENDIF( LUPDATE_EXECUTABLE )
MARK_AS_ADVANCED( LUPDATE_EXECUTABLE )
+52 -50
View File
@@ -1,52 +1,54 @@
# Locate Xsd from code synthesis include paths and binary
# Xsd can be found at http://codesynthesis.com/products/xsd/
# Written by Frederic Heem, frederic.heem _at_ telsey.it
# This module defines
# XSD_INCLUDE_DIR, where to find elements.hxx, etc.
# XSD_EXECUTABLE, where is the xsd compiler
# XSD_FOUND, If false, don't try to use xsd
FIND_PATH( XSD_INCLUDE_DIR xsd/cxx/parser/elements.hxx
# Locate Xsd from code synthesis include paths and binary
# Xsd can be found at http://codesynthesis.com/products/xsd/
# Written by Frederic Heem, frederic.heem _at_ telsey.it
# This module defines
# XSD_INCLUDE_DIR, where to find elements.hxx, etc.
# XSD_EXECUTABLE, where is the xsd compiler
# XSD_FOUND, If false, don't try to use xsd
FIND_PATH( XSD_INCLUDE_DIR xsd/cxx/parser/elements.hxx
"/opt/local/xsd-3.3.0-i686-macosx/libxsd"
"C:/Programs/xsd-3.3.0/libxsd"
"C:/Program Files/CodeSynthesis XSD 3.2/include"
"C:/mingw/xsd-3.3.0-i686-windows/libxsd"
$ENV{XSDDIR}/include
$ENV{CODESYNTH}/include
/usr/local/include /usr/include
)
IF( WIN32 )
SET( XSDCXX_FILENAME1 xsd-cxx.exe )
ELSE( )
SET( XSDCXX_FILENAME1 xsdcxx )
SET( XSDCXX_FILENAME2 xsd )
ENDIF( )
FIND_PROGRAM( XSDCXX_EXECUTABLE
NAMES
${XSDCXX_FILENAME1} ${XSDCXX_FILENAME2}
"C:/Programs/xsd-3.3.0/libxsd"
"C:/Program Files/CodeSynthesis XSD 3.2/include"
"C:/mingw/xsd-3.3.0-i686-windows/libxsd"
$ENV{XSDDIR}/include
$ENV{CODESYNTH}/include
/usr/local/include /usr/include
$ENV{XSDDIR}/libxsd
)
IF( WIN32 )
SET( XSDCXX_FILENAME1 xsd-cxx.exe )
ELSE( )
SET( XSDCXX_FILENAME1 xsdcxx )
SET( XSDCXX_FILENAME2 xsd )
ENDIF( )
FIND_PROGRAM( XSDCXX_EXECUTABLE
NAMES
${XSDCXX_FILENAME1} ${XSDCXX_FILENAME2}
PATHS
"/opt/local/xsd-3.3.0-i686-macosx/bin"
"C:/Programs/xsd-3.3.0/bin"
"C:/mingw/xsd-3.3.0-i686-windows/bin"
"C:/Program Files/CodeSynthesis XSD 3.2/bin"
$ENV{XSDDIR}/bin
/usr/local/bin
/usr/bin
)
MESSAGE(STATUS ${XSDCXX_EXECUTABLE})
# if the include and the program are found then we have it
IF( XSD_INCLUDE_DIR )
IF( XSDCXX_EXECUTABLE )
SET( XSD_FOUND "YES" )
ENDIF( XSDCXX_EXECUTABLE )
ENDIF( XSD_INCLUDE_DIR )
MARK_AS_ADVANCED(
XSD_INCLUDE_DIR
XSDCXX_EXECUTABLE
)
"/opt/local/xsd-3.3.0-i686-macosx/bin"
"C:/Programs/xsd-3.3.0/bin"
"C:/mingw/xsd-3.3.0-i686-windows/bin"
"C:/Program Files/CodeSynthesis XSD 3.2/bin"
$ENV{XSDDIR}/bin
/usr/local/bin
/usr/bin
$ENV{XSDDIR}/xsd
)
MESSAGE(STATUS ${XSDCXX_EXECUTABLE})
# if the include and the program are found then we have it
IF( XSD_INCLUDE_DIR )
IF( XSDCXX_EXECUTABLE )
SET( XSD_FOUND "YES" )
ENDIF( XSDCXX_EXECUTABLE )
ENDIF( XSD_INCLUDE_DIR )
MARK_AS_ADVANCED(
XSD_INCLUDE_DIR
XSDCXX_EXECUTABLE
)
+31 -9
View File
@@ -48,6 +48,10 @@
#include <QSplashScreen>
#include <QThread>
#include <iostream>
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
#include <SDL.h>
#undef main
#endif
#include "mainwindow.h"
#include "eeprominterface.h"
#include "appdata.h"
@@ -95,9 +99,23 @@ int main(int argc, char *argv[])
app.installTranslator(&qtTranslator);
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
RegisterEepromInterfaces();
registerOpenTxFirmwares();
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
uint32_t sdlFlags = 0;
#ifdef JOYSTICKS
sdlFlags |= SDL_INIT_JOYSTICK;
#endif
#ifdef SIMU_AUDIO
sdlFlags |= SDL_INIT_AUDIO;
#endif
if (SDL_Init(sdlFlags) < 0) {
fprintf(stderr, "ERROR: couldn't initialize SDL: %s\n", SDL_GetError());
}
#endif
registerEEpromInterfaces();
registerOpenTxFirmwares();
registerSimulators();
if (g.profile[g.id()].fwType().isEmpty()){
g.profile[g.id()].fwType(default_firmware_variant->getId());
@@ -105,10 +123,10 @@ int main(int argc, char *argv[])
}
QString splashScreen;
if ( g.profile[g.id()].fwType().contains("taranis")) splashScreen = ":/images/splasht.png";
else if ( g.profile[g.id()].fwType().contains("9xrpro")) splashScreen = ":/images/splashp.png";
else if ( g.profile[g.id()].fwType().contains("9xr")) splashScreen = ":/images/splashr.png";
else splashScreen = ":/images/splash.png";
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";
QPixmap pixmap = QPixmap(splashScreen);
QSplashScreen *splash = new QSplashScreen(pixmap);
@@ -130,8 +148,12 @@ int main(int argc, char *argv[])
delete splash;
delete mainWin;
UnregisterFirmwares();
UnregisterEepromInterfaces();
unregisterFirmwares();
unregisterEEpromInterfaces();
#if defined(JOYSTICKS) || defined(SIMU_AUDIO)
SDL_Quit();
#endif
return result;
}
@@ -1,11 +1,11 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Companion
Name=Companion @C9X_VERSION@
GenericName=Transmitter Companion App
Comment=The Ultimate Transmitter Companion
Icon=companion
Exec='companion'
Icon=@COMPANION_NAME@
Exec='@COMPANION_NAME@'
Terminal=false
StartupNotify=false
Categories=Application
+18 -4
View File
@@ -39,10 +39,10 @@
<file>images/9xcursdown.png</file>
<file>images/9xcursphoto.png</file>
<file>images/screenshot.png</file>
<file>images/splash.png</file>
<file>images/splashp.png</file>
<file>images/splashr.png</file>
<file>images/splasht.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/companion-title.png</file>
<file>images/maps.png</file>
<file>images/track.png</file>
@@ -100,6 +100,8 @@
<file>images/library/00018.png</file>
<file>images/library/00019.png</file>
<file>images/library/00020.png</file>
<file>images/library/00021.png</file>
<file>images/library/00022.png</file>
<file>images/library/00050.png</file>
<file>images/library/00051.png</file>
<file>images/library/00052.png</file>
@@ -198,6 +200,7 @@
<file>themes/monochrome/16/contributors.png</file>
<file>themes/monochrome/16/stop.png</file>
<file>themes/monochrome/16/write_eeprom.png</file>
<file>themes/monochrome/16/sdsync.png</file>
<file>themes/monochrome/24/paintbrush.png</file>
<file>themes/monochrome/24/open.png</file>
<file>themes/monochrome/24/edit.png</file>
@@ -241,6 +244,7 @@
<file>themes/monochrome/24/contributors.png</file>
<file>themes/monochrome/24/stop.png</file>
<file>themes/monochrome/24/write_eeprom.png</file>
<file>themes/monochrome/24/sdsync.png</file>
<file>themes/monochrome/32/paintbrush.png</file>
<file>themes/monochrome/32/open.png</file>
<file>themes/monochrome/32/edit.png</file>
@@ -284,6 +288,7 @@
<file>themes/monochrome/32/contributors.png</file>
<file>themes/monochrome/32/stop.png</file>
<file>themes/monochrome/32/write_eeprom.png</file>
<file>themes/monochrome/32/sdsync.png</file>
<file>themes/monochrome/48/paintbrush.png</file>
<file>themes/monochrome/48/open.png</file>
<file>themes/monochrome/48/edit.png</file>
@@ -327,6 +332,7 @@
<file>themes/monochrome/48/contributors.png</file>
<file>themes/monochrome/48/stop.png</file>
<file>themes/monochrome/48/write_eeprom.png</file>
<file>themes/monochrome/48/sdsync.png</file>
<file>themes/classic/16/paintbrush.png</file>
<file>themes/classic/16/open.png</file>
<file>themes/classic/16/edit.png</file>
@@ -370,6 +376,7 @@
<file>themes/classic/16/contributors.png</file>
<file>themes/classic/16/stop.png</file>
<file>themes/classic/16/write_eeprom.png</file>
<file>themes/classic/16/sdsync.png</file>
<file>themes/classic/24/paintbrush.png</file>
<file>themes/classic/24/open.png</file>
<file>themes/classic/24/edit.png</file>
@@ -413,6 +420,7 @@
<file>themes/classic/24/contributors.png</file>
<file>themes/classic/24/stop.png</file>
<file>themes/classic/24/write_eeprom.png</file>
<file>themes/classic/24/sdsync.png</file>
<file>themes/classic/32/paintbrush.png</file>
<file>themes/classic/32/open.png</file>
<file>themes/classic/32/edit.png</file>
@@ -456,6 +464,7 @@
<file>themes/classic/32/contributors.png</file>
<file>themes/classic/32/stop.png</file>
<file>themes/classic/32/write_eeprom.png</file>
<file>themes/classic/32/sdsync.png</file>
<file>themes/classic/48/paintbrush.png</file>
<file>themes/classic/48/open.png</file>
<file>themes/classic/48/edit.png</file>
@@ -499,6 +508,7 @@
<file>themes/classic/48/contributors.png</file>
<file>themes/classic/48/stop.png</file>
<file>themes/classic/48/write_eeprom.png</file>
<file>themes/classic/48/sdsync.png</file>
<file>themes/monoblue/16/paintbrush.png</file>
<file>themes/monoblue/16/open.png</file>
<file>themes/monoblue/16/edit.png</file>
@@ -886,6 +896,7 @@
<file>themes/yerico/16/contributors.png</file>
<file>themes/yerico/16/stop.png</file>
<file>themes/yerico/16/write_eeprom.png</file>
<file>themes/yerico/16/sdsync.png</file>
<file>themes/yerico/24/paintbrush.png</file>
<file>themes/yerico/24/open.png</file>
<file>themes/yerico/24/edit.png</file>
@@ -929,6 +940,7 @@
<file>themes/yerico/24/contributors.png</file>
<file>themes/yerico/24/stop.png</file>
<file>themes/yerico/24/write_eeprom.png</file>
<file>themes/yerico/24/sdsync.png</file>
<file>themes/yerico/32/paintbrush.png</file>
<file>themes/yerico/32/open.png</file>
<file>themes/yerico/32/edit.png</file>
@@ -972,6 +984,7 @@
<file>themes/yerico/32/contributors.png</file>
<file>themes/yerico/32/stop.png</file>
<file>themes/yerico/32/write_eeprom.png</file>
<file>themes/yerico/32/sdsync.png</file>
<file>themes/yerico/48/paintbrush.png</file>
<file>themes/yerico/48/open.png</file>
<file>themes/yerico/48/edit.png</file>
@@ -1015,5 +1028,6 @@
<file>themes/yerico/48/contributors.png</file>
<file>themes/yerico/48/stop.png</file>
<file>themes/yerico/48/write_eeprom.png</file>
<file>themes/yerico/48/sdsync.png</file>
</qresource>
</RCC>
File diff suppressed because it is too large Load Diff
+18 -70
View File
@@ -1,10 +1,9 @@
#ifndef COMPAREDIALOG_H
#define COMPAREDIALOG_H
#ifndef _COMPAREDIALOG_H
#define _COMPAREDIALOG_H
#include <QDialog>
#include <QtGui>
#include <QDir>
#include "eeprominterface.h"
#include <QLabel>
#include "multimodelprinter.h"
namespace Ui {
class CompareDialog;
@@ -12,83 +11,32 @@ namespace Ui {
class CompareDialog : public QDialog
{
Q_OBJECT
Q_OBJECT
public:
CompareDialog(QWidget *parent);
CompareDialog(QWidget *parent, Firmware * firmware);
~CompareDialog();
protected:
GeneralSettings * settings;
ModelData * g_model1;
ModelData * g_model2;
ModelData * modeltemp;
int model1;
int model2;
private:
void closeEvent(QCloseEvent *event);
Ui::CompareDialog *ui;
QString doTC(const QString s, const QString color, bool bold);
QString doTR(const QString s, const QString color, bool bold);
QString doTL(const QString s, const QString color, bool bold);
QString fv(const QString name, const QString value,const QString color);
template<class T> QString getColor1(T val1, T val2) {
if (val1!=val2)
return "green";
else
return "grey";
}
template<class T> QString getColor2(T val1, T val2) {
if (val1!=val2)
return "red";
else
return "grey";
}
QString getColor1(char * val1, char * val2) {
if (strcmp(val1,val2)!=0)
return "green";
else
return "grey";
}
QString getColor2(char * val1, char * val2) {
if (strcmp(val1,val2)!=0)
return "red";
else
return "grey";
}
int ModelHasExpo(ExpoData * ExpoArray, ExpoData expo, bool * expoused);
bool ChannelHasExpo(ExpoData * expoArray, uint8_t destCh);
int ModelHasMix(MixData * mixArray, MixData mix, bool * mixused);
bool ChannelHasMix(MixData * mixArray, uint8_t destCh);
MultiModelPrinter multimodelprinter;
ModelData model1;
ModelData model2;
bool model1Valid;
bool model2Valid;
Ui::CompareDialog * ui;
QTextEdit * te;
QString curvefile5;
QString curvefile9;
QDir *qd;
private slots:
protected slots:
void on_printButton_clicked();
void on_printFileButton_clicked();
protected:
protected:
void closeEvent(QCloseEvent * event);
bool handleDroppedModel(const QMimeData * mimeData, ModelData & model, QLabel * label);
void dropEvent(QDropEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void printDiff();
void printSetup();
void printPhases();
void printLimits();
void printExpos();
void printMixers();
void printCurves();
void printGvars();
void printSwitches();
void printSafetySwitches();
void printFSwitches();
void printFrSky();
};
#endif // COMPAREDIALOG_H
#endif // _COMPAREDIALOG_H
+39
View File
@@ -0,0 +1,39 @@
#ifndef _constants_h_
#define _constants_h_
enum BoardEnum {
BOARD_STOCK,
BOARD_M128,
BOARD_MEGA2560,
BOARD_GRUVIN9X,
BOARD_SKY9X,
BOARD_9XRPRO,
BOARD_AR9X,
BOARD_TARANIS,
BOARD_TARANIS_PLUS,
BOARD_TARANIS_X9E
};
#define C9X_MAX_MODELS 60
#define C9X_MAX_TIMERS 3
#define C9X_MAX_FLIGHT_MODES 9
#define C9X_MAX_MIXERS 64
#define C9X_MAX_INPUTS 32
#define C9X_MAX_EXPOS 64
#define C9X_MAX_CURVES 32
#define C9X_MAX_POINTS 17
#define C9X_MAX_GVARS 9
#define C9X_MAX_ENCODERS 2
#define C9X_NUM_CHNOUT 32 // number of real output channels
#define C9X_NUM_CSW 32 // number of custom switches
#define C9X_MAX_CUSTOM_FUNCTIONS 64 // number of functions assigned to switches
#define C9X_NUM_MODULES 2
#define NUM_STICKS 4
#define BOARD_9X_NUM_POTS 3
#define C9X_NUM_POTS 8
#define NUM_CAL_PPM 4
#define NUM_CYC 3
#define C9X_NUM_SWITCHES 32
#define C9X_NUM_KEYS 32
#endif
+99 -116
View File
@@ -1,132 +1,115 @@
#include "contributorsdialog.h"
#include "ui_contributorsdialog.h"
#include <QtGui>
#include "ui_htmldialog.h"
#include "helpers.h"
contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnurl) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::contributorsDialog)
ContributorsDialog::ContributorsDialog(QWidget * parent):
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::HtmlDialog)
{
ui->setupUi(this);
switch (contest) {
case 0:
{
this->setWindowIcon(CompanionIcon("contributors.png"));
QFile file(":/DONATIONS.txt");
QString str;
str.append("<html><head>");
str.append("<style type=\"text/css\">\n");
str.append(".mycss\n{\nfont-weight:normal;\ncolor:#000000;vertical-align: top;font-size:10px;text-align:left;font-family:arial, helvetica, sans-serif;\n}\n");
str.append(".mycssb\n{\nfont-weight:bold;\ncolor:#C00000;vertical-align: top;font-size:10px;text-align:left;font-family:arial, helvetica, sans-serif;\n}\n");
str.append(".myhead\n{\nfont-weight:bold;\ncolor:#000000;font-size:14px;text-align:left;font-family:arial, helvetica, sans-serif;\n}\n");
str.append("</style>\n</head><body class=\"mycss\"><table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
str.append("<tr><td class=\"myhead\">"+tr("People who have contributed to this project")+"</td></tr>");
str.append("</table>");
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
int columns=6;
float cwidth=100.0/columns;
while (!file.atEnd()) {
str.append("<tr>");
for (int i=0; i<columns; i++) {
str.append(QString("<td width=\"%1%\" ").arg(cwidth));
if (!file.atEnd()) {
QByteArray line = file.readLine();
if (line.contains("monthly") || line.contains("mensual")) {
str.append("class=\"mycssb\">");
} else {
str.append("class=\"mycss\">");
}
str.append(line.trimmed()+"</td>");
} else {
str.append("class=\"mycss\">&nbsp;</td>");
}
}
str.append("</tr>");
}
}
str.append("</table>");
QFile file2(":/CREDITS.txt");
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
str.append("<tr><td class=\"mycss\">&nbsp;</td></tr>");
str.append("<tr><td class=\"myhead\">"+tr("Coders")+"</td></tr>");
str.append("</table>");
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
if(file2.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
while (!file2.atEnd()) {
str.append("<tr>");
for (int i=0; i<3; i++) {
str.append("<td width=\"33.33%\" class=\"mycss\">");
if (!file2.atEnd()) {
QByteArray line = file2.readLine();
str.append(line.trimmed());
} else {
str.append("&nbsp;");
}
str.append("</td>");
}
str.append("</tr>");
}
}
str.append("<tr><td class=\"mycss\">&nbsp;</td></tr>");
str.append("<tr><td colspan=3 class=\"mycss\">" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "<br/></td></tr>");
str.append("<tr><td colspan=3 class=\"mycss\">" + tr("Thank you all !!!") + "</td></tr>");
str.append("</table>");
str.append("</body></html>");
ui->textEditor->setHtml(str);
ui->textEditor->scroll(0, 0);
setWindowTitle(tr("Contributors"));
break;
}
case 1:
{
this->setWindowIcon(CompanionIcon("changelog.png"));
QFile file(":/releasenotes.txt");
if(file.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
ui->textEditor->setHtml(file.readAll());
}
ui->textEditor->scroll(0,0);
setWindowTitle(tr("Companion Release Notes"));
break;
}
ui->setupUi(this);
case 2:
{
if (!rnurl.isEmpty()) {
this->setWindowIcon(CompanionIcon("changelog.png"));
this->setWindowTitle(tr("OpenTX Release Notes"));
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
QUrl url(rnurl);
QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);
manager->get(request);
}
else {
QTimer::singleShot(0, this, SLOT(forceClose()));
}
setWindowTitle(tr("OpenTX Contributors"));
setWindowIcon(CompanionIcon("contributors.png"));
QString str = "<html>" \
"<head>" \
" <style type=\"text/css\">" \
" .normal { font-weight:normal;color:#000000;vertical-align:top;font-size:10px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
" .bold { font-weight:bold;color:#C00000;vertical-align:top;font-size:10px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
" .title { font-weight:bold;color:#000000;font-size:14px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
" </style>" \
"</head>"
"<body class=\"normal\">";
QFile credits(":/CREDITS.txt");
if (credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
QStringList names;
while (!credits.atEnd()) {
QByteArray line = credits.readLine();
if (line.trimmed() == "")
break;
}
names.append(line.trimmed());
}
str.append(formatTable(tr("Main Developers"), names, 3));
names.clear();
while (!credits.atEnd()) {
QByteArray line = credits.readLine();
names.append(line.trimmed());
}
str.append(formatTable(tr("Other contributors"), names, 3));
}
QFile donations(":/DONATIONS.txt");
if (donations.open(QIODevice::ReadOnly | QIODevice::Text)) {
QStringList names;
while (!donations.atEnd()) {
QByteArray line = donations.readLine();
if (line.trimmed() == "")
break;
names.append(line.trimmed());
}
str.append(formatTable(tr("Companies and projects who have donated to OpenTX"), names, 3));
names.clear();
while (!donations.atEnd()) {
QByteArray line = donations.readLine();
names.append(line);
}
str.append(formatTable(tr("People who have donated to OpenTX"), names, 6));
}
str.append("<table><tr><td class=\"normal\">&nbsp;</td></tr>" \
" <tr><td class=\"normal\">" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "<br/></td></tr>" \
"</table>");
#if 0
QFile blacklist(":/BLACKLIST.txt");
if (blacklist.open(QIODevice::ReadOnly | QIODevice::Text)) {
QStringList names;
names << blacklist.readAll();
str.append(formatTable(tr("OpenTX Blacklist"), names, 1));
}
#endif
str.append("</body></html>");
ui->textEditor->setHtml(str);
ui->textEditor->scroll(0, 0);
ui->textEditor->setOpenExternalLinks(true);
}
void contributorsDialog::showEvent ( QShowEvent * )
ContributorsDialog::~ContributorsDialog()
{
ui->textEditor->scroll(0, 0);
delete ui;
}
contributorsDialog::~contributorsDialog()
QString ContributorsDialog::formatTable(const QString & title, const QStringList & names, int columns)
{
delete ui;
}
const float cwidth = 100.0 / columns;
QString str = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>" \
" <tr><td class=\"normal\">&nbsp;</td></tr>" \
" <tr><td class=\"title\">" + title + "</td></tr>" \
"</table>";
void contributorsDialog::replyFinished(QNetworkReply * reply)
{
ui->textEditor->setHtml(reply->readAll());
}
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
void contributorsDialog::forceClose()
{
accept();;
int column = 0;
foreach(QString name, names) {
if (column == 0) {
str.append("<tr>");
}
QString trclass = name.contains("monthly") ? "bold" : "normal";
str.append(QString("<td width=\"%1%\" class=\"%2\">%3</td>").arg(cwidth).arg(trclass).arg(name.trimmed().replace("monthly", tr("monthly"))));
if (++column == columns) {
str.append("</tr>");
column = 0;
}
}
if (column != 0) {
str.append("</tr>");
}
str.append("</table>");
return str;
}
+9 -17
View File
@@ -2,30 +2,22 @@
#define CONTRIBUTORSDIALOG_H
#include <QDialog>
#include "eeprominterface.h"
#include "downloaddialog.h"
namespace Ui {
class contributorsDialog;
class HtmlDialog;
}
class contributorsDialog : public QDialog
class ContributorsDialog : public QDialog
{
Q_OBJECT
public:
explicit contributorsDialog(QWidget *parent = 0, int contest = 0, QString rnurl = QString() );
~contributorsDialog();
Q_OBJECT
private:
Ui::contributorsDialog *ui;
QNetworkAccessManager *manager;
public:
explicit ContributorsDialog(QWidget * parent = 0);
~ContributorsDialog();
void showEvent ( QShowEvent * );
private slots:
void forceClose();
void replyFinished(QNetworkReply * reply);
private:
Ui::HtmlDialog * ui;
QString formatTable(const QString & title, const QStringList & names, int colums);
};
#endif // CONTRIBUTORSDIALOG_H
+42
View File
@@ -0,0 +1,42 @@
#include "converteeprom.h"
#include "eeprominterface.h"
#include "firmwareinterface.h"
#include <QFile>
bool convertEEprom(const QString &sourceEEprom, const QString &destinationEEprom, const QString &firmwareFilename)
{
Firmware *currentFirmware = GetCurrentFirmware();
FirmwareInterface firmware(firmwareFilename);
if (!firmware.isValid())
return false;
unsigned int version = firmware.getEEpromVersion();
unsigned int variant = firmware.getEEpromVariant();
QFile sourceFile(sourceEEprom);
int eeprom_size = sourceFile.size();
if (!eeprom_size)
return false;
if (!sourceFile.open(QIODevice::ReadOnly))
return false;
QByteArray eeprom(eeprom_size, 0);
long result = sourceFile.read(eeprom.data(), eeprom_size);
sourceFile.close();
QSharedPointer<RadioData> radioData = QSharedPointer<RadioData>(new RadioData());
if (!loadEEprom(*radioData, (uint8_t *)eeprom.data(), eeprom_size) || !currentFirmware->saveEEPROM((uint8_t *)eeprom.data(), *radioData, variant, version))
return false;
QFile destinationFile(destinationEEprom);
if (!destinationFile.open(QIODevice::WriteOnly))
return false;
result = destinationFile.write(eeprom.constData(), eeprom_size);
destinationFile.close();
if (result != eeprom_size)
return false;
return true;
}
+8
View File
@@ -0,0 +1,8 @@
#ifndef CONVERTHEADER_H_
#define CONVERTHEADER_H_
#include <QString>
bool convertEEprom(const QString &sourceEEprom, const QString &destinationEEprom, const QString &firmware);
#endif /* CONVERTHEADER_H_ */
+16
View File
@@ -0,0 +1,16 @@
#ifndef customdebug_h
#define customdebug_h
#include <QDebug>
// Controls the generation of debug output for EEPROM import
#if defined(DEBUG_MODEL_IMPORT)
inline QDebug eepromImportDebug() { return QDebug(QtDebugMsg); }
#else
#undef eepromImportDebug
inline QNoDebug eepromImportDebug() { return QNoDebug(); }
#endif
#endif
+12 -14
View File
@@ -1,12 +1,10 @@
#include "customizesplashdialog.h"
#include "ui_customizesplashdialog.h"
#include <QtGui>
#include "flashfirmwaredialog.h"
#include "appdata.h"
#include "helpers.h"
#include "burndialog.h"
#include "splashlibrary.h"
#include "flashinterface.h"
#include "firmwareinterface.h"
#include "splashlibrarydialog.h"
//*** Side Class ***
@@ -44,12 +42,12 @@ bool Side::displayImage( QString fileName, Source pictSource )
// Determine which picture format to use
if (pictSource == FW ){
FlashInterface flash(fileName);
if (!flash.hasSplash())
FirmwareInterface firmware(fileName);
if (!firmware.hasSplash())
return false;
else
image = flash.getSplash();
*format = (flash.getSplashWidth()==WIDTH_TARANIS ? LCDTARANIS : LCD9X);
image = firmware.getSplash();
*format = (firmware.getSplashWidth()==WIDTH_TARANIS ? LCDTARANIS : LCD9X);
}
else {
image.load(fileName);
@@ -105,12 +103,12 @@ bool Side::saveImage()
{
if (*source == FW )
{
FlashInterface flash(*saveToFileName);
if (!flash.hasSplash()) {
FirmwareInterface firmware(*saveToFileName);
if (!firmware.hasSplash()) {
return false;
}
QImage image = imageLabel->pixmap()->toImage().scaled(flash.getSplashWidth(), flash.getSplashHeight());
if (flash.setSplash(image) && (flash.saveFlash(*saveToFileName) > 0)) {
QImage image = imageLabel->pixmap()->toImage().scaled(firmware.getSplashWidth(), firmware.getSplashHeight());
if (firmware.setSplash(image) && (firmware.save(*saveToFileName) > 0)) {
g.flashDir( QFileInfo(*saveToFileName).dir().absolutePath() );
}
else {
@@ -235,7 +233,7 @@ void customizeSplashDialog::on_rightLibraryButton_clicked(){libraryButton_clicke
void customizeSplashDialog::libraryButton_clicked( Side side )
{
QString fileName;
splashLibrary *ld = new splashLibrary(this,&fileName);
SplashLibraryDialog *ld = new SplashLibraryDialog(this,&fileName);
ld->exec();
if (!fileName.isEmpty()) {
if (!side.displayImage( fileName, UNDEFINED ))
+1 -1
View File
@@ -3,7 +3,7 @@
#include <QtGui>
#include <QDialog>
#include "flashinterface.h"
#include "firmwareinterface.h"
namespace Ui
{
+58 -14
View File
@@ -17,6 +17,8 @@
#ifndef eeprom_importexport_h
#define eeprom_importexport_h
#include "customdebug.h"
#define DIM(arr) (sizeof((arr))/sizeof((arr)[0]))
class DataField {
@@ -104,10 +106,10 @@ class ProxyField: public DataField {
};
template<int N>
class UnsignedField: public DataField {
template<class container, int N>
class BaseUnsignedField: public DataField {
public:
explicit UnsignedField(unsigned int & field):
explicit BaseUnsignedField(container & field):
DataField("Unsigned"),
field(field),
min(0),
@@ -115,7 +117,7 @@ class UnsignedField: public DataField {
{
}
UnsignedField(unsigned int & field, const char *name):
BaseUnsignedField(container & field, const char *name):
DataField(name),
field(field),
min(0),
@@ -123,7 +125,7 @@ class UnsignedField: public DataField {
{
}
UnsignedField(unsigned int & field, unsigned int min, unsigned int max, const char *name="Unsigned"):
BaseUnsignedField(container & field, unsigned int min, unsigned int max, const char *name="Unsigned"):
DataField(name),
field(field),
min(min),
@@ -133,7 +135,7 @@ class UnsignedField: public DataField {
virtual void ExportBits(QBitArray & output)
{
unsigned int value = field;
container value = field;
if (value > max) value = max;
if (value < min) value = min;
@@ -151,6 +153,7 @@ class UnsignedField: public DataField {
if (input[i])
field |= (1<<i);
}
eepromImportDebug() << QString("\timported %1<%2>: 0x%3(%4)").arg(name).arg(N).arg(field, 0, 16).arg(field);
}
virtual unsigned int size()
@@ -159,12 +162,32 @@ class UnsignedField: public DataField {
}
protected:
unsigned int & field;
unsigned int min;
unsigned int max;
container & field;
container min;
container max;
private:
UnsignedField();
BaseUnsignedField();
};
template <int N>
class UnsignedField : public BaseUnsignedField<unsigned int, N>
{
public:
explicit UnsignedField(unsigned int & field):
BaseUnsignedField<unsigned int, N>(field)
{
}
UnsignedField(unsigned int & field, const char *name):
BaseUnsignedField<unsigned int, N>(field, name)
{
}
UnsignedField(unsigned int & field, unsigned int min, unsigned int max, const char *name="Unsigned"):
BaseUnsignedField<unsigned int, N>(field, min, max, name)
{
}
};
template<int N>
@@ -187,6 +210,7 @@ class BoolField: public DataField {
virtual void ImportBits(QBitArray & input)
{
field = input[0] ? true : false;
eepromImportDebug() << QString("\timported %1<%2>: 0x%3(%4)").arg(name).arg(N).arg(field, 0, 16).arg(field);
}
virtual unsigned int size()
@@ -256,6 +280,7 @@ class SignedField: public DataField {
}
field = (int)value;
eepromImportDebug() << QString("\timported %1<%2>: 0x%3(%4)").arg(name).arg(N).arg(field, 0, 16).arg(field);
}
virtual unsigned int size()
@@ -316,6 +341,7 @@ class CharField: public DataField {
}
field[i] = idx;
}
eepromImportDebug() << QString("\timported %1<%2>: '%3'").arg(name).arg(N).arg(field);
}
virtual unsigned int size()
@@ -373,6 +399,7 @@ class ZCharField: public DataField {
else
break;
}
eepromImportDebug() << QString("\timported %1<%2>: '%3'").arg(name).arg(N).arg(field);
}
virtual unsigned int size()
@@ -398,6 +425,7 @@ class StructField: public DataField {
}
inline void Append(DataField *field) {
//eepromImportDebug() << QString("StructField(%1) appending field: %2").arg(name).arg(field->getName());
fields.append(field);
}
@@ -415,6 +443,7 @@ class StructField: public DataField {
virtual void ImportBits(QBitArray & input)
{
eepromImportDebug() << QString("\timporting %1[%2]:").arg(name).arg(fields.size());
int offset = 0;
foreach(DataField *field, fields) {
unsigned int size = field->size();
@@ -469,6 +498,7 @@ class TransformedField: public DataField {
virtual void ImportBits(QBitArray & input)
{
eepromImportDebug() << QString("\timporting TransformedField %1:").arg(field.getName());
field.ImportBits(input);
afterImport();
}
@@ -505,7 +535,7 @@ class ConversionTable {
{
after = 0;
for (std::list<ConversionTuple>::iterator it=internalTable.begin(); it!=internalTable.end(); it++) {
for (std::list<ConversionTuple>::iterator it=exportTable.begin(); it!=exportTable.end(); it++) {
ConversionTuple tuple = *it;
if (before == tuple.a) {
after = tuple.b;
@@ -520,7 +550,7 @@ class ConversionTable {
{
after = 0;
for (std::list<ConversionTuple>::iterator it=internalTable.begin(); it!=internalTable.end(); it++) {
for (std::list<ConversionTuple>::iterator it=importTable.begin(); it!=importTable.end(); it++) {
ConversionTuple tuple = *it;
if (before == tuple.b) {
after = tuple.a;
@@ -547,10 +577,23 @@ class ConversionTable {
void addConversion(const int a, const int b)
{
internalTable.push_back(ConversionTuple(a, b));
ConversionTuple conversion(a, b);
importTable.push_back(conversion);
exportTable.push_back(conversion);
}
std::list<ConversionTuple> internalTable;
void addImportConversion(const int a, const int b)
{
importTable.push_back(ConversionTuple(a, b));
}
void addExportConversion(const int a, const int b)
{
exportTable.push_back(ConversionTuple(a, b));
}
std::list<ConversionTuple> importTable;
std::list<ConversionTuple> exportTable;
};
template<class T>
@@ -682,6 +725,7 @@ class ConversionField: public TransformedField {
if (scale) {
field *= scale;
}
eepromImportDebug() << QString("\timported ConversionField<%1>:").arg(internalField.getName()) << QString(" before: %1, after: %2").arg(_field).arg(field);
}
protected:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+98 -19
View File
@@ -15,30 +15,52 @@
*/
#include "stdio.h"
#include "inttypes.h"
#include "string.h"
#include "file.h"
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <assert.h>
#include <algorithm>
#include "eeprominterface.h"
#include "file.h"
RleFile::RleFile():
eeprom(NULL),
eeprom_size(0),
eeFs(NULL),
eeFsArm(NULL)
eeFsArm(NULL),
eepromFatHeader(NULL)
{
}
void RleFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board)
#define EEPROM_SIZE (4*1024*1024/8)
#define EEPROM_BLOCK_SIZE (4*1024)
#define EEPROM_MARK 0x84697771 /* thanks ;) */
#define EEPROM_ZONE_SIZE (8*1024)
#define EEPROM_BUFFER_SIZE 256
#define EEPROM_FAT_SIZE 128
#define EEPROM_MAX_ZONES (EEPROM_SIZE / EEPROM_ZONE_SIZE)
#define EEPROM_MAX_FILES (EEPROM_MAX_ZONES - 1)
#define FIRST_FILE_AVAILABLE (1+MAX_MODELS)
void RleFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board, unsigned int version)
{
this->eeprom = eeprom;
this->eeprom_size = size;
this->board = board;
this->version = version;
if (IS_SKY9X(board)) {
memset(eeprom, 0xFF, size);
if (version >= 217) {
memset(eeprom, 0, EEPROM_FAT_SIZE);
eepromFatHeader = (EepromHeader *)(eeprom + EEPROM_FAT_SIZE);
eepromFatHeader->mark = EEPROM_MARK;
eepromFatHeader->index = 1;
for (int i=0; i<EEPROM_MAX_FILES; i++) {
eepromFatHeader->files[i].exists = 0;
eepromFatHeader->files[i].zoneIndex = i+1;
}
}
}
else if (IS_TARANIS(board)) {
eeFsArm = (EeFsArm *)eeprom;
@@ -62,7 +84,7 @@ void RleFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board)
}
else {
eeFs = (EeFs *)eeprom;
eeFsVersion = (board==BOARD_GRUVIN9X || board==BOARD_M128) ? 5 : 4;
eeFsVersion = (IS_2560(board) || board==BOARD_M128) ? 5 : 4;
eeFsBlockSize = 16;
eeFsLinkSize = 1;
@@ -92,6 +114,30 @@ void RleFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board)
}
}
PACK(struct EepromFileHeader
{
uint16_t fileIndex;
uint16_t size;
});
bool RleFile::searchFat()
{
int bestFatIndex = -1;
for (int i=0; i<EEPROM_ZONE_SIZE/EEPROM_FAT_SIZE; i++) {
EepromHeader * header = (EepromHeader *)(eeprom+i*EEPROM_FAT_SIZE);
if (header->mark == EEPROM_MARK && (int)header->index >= bestFatIndex) {
bestFatIndex = i;
}
}
if (bestFatIndex >= 0) {
eepromFatHeader = (EepromHeader *)(eeprom+bestFatIndex*EEPROM_FAT_SIZE);;
return true;
}
else {
return false;
}
}
bool RleFile::EeFsOpen(uint8_t *eeprom, int size, BoardEnum board)
{
this->eeprom = eeprom;
@@ -99,6 +145,7 @@ bool RleFile::EeFsOpen(uint8_t *eeprom, int size, BoardEnum board)
this->board = board;
if (IS_SKY9X(board)) {
searchFat();
return 1;
}
else if (IS_TARANIS(board)) {
@@ -249,8 +296,20 @@ unsigned int RleFile::size(unsigned int id)
unsigned int RleFile::openRd(unsigned int i_fileId)
{
if (IS_SKY9X(board)) {
m_fileId = get_current_block_number(i_fileId * 2, &m_size);
m_pos = sizeof(t_eeprom_header);
if (eepromFatHeader) {
m_fileId = eepromFatHeader->files[i_fileId].zoneIndex;
if (eepromFatHeader->files[i_fileId].exists) {
eeprom_read_block(&m_size, m_fileId*(1<<13)+sizeof(uint16_t), sizeof(uint16_t));
}
else {
m_size = 0;
}
m_pos = sizeof(EepromFileHeader);
}
else {
m_fileId = get_current_block_number(i_fileId * 2, &m_size);
m_pos = sizeof(t_eeprom_header);
}
return 1;
}
else {
@@ -293,11 +352,19 @@ unsigned int RleFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2)
memset(buf, 0, i_len);
if (IS_SKY9X(board)) {
int len = std::min((int)i_len, (int)m_size + (int)sizeof(t_eeprom_header) - (int)m_pos);
if (len > 0) {
eeprom_read_block(buf, (m_fileId << 12) + m_pos, len);
int len;
if (eepromFatHeader) {
len = std::min((int)i_len, (int)m_size + (int)sizeof(EepromFileHeader) - (int)m_pos);
eeprom_read_block(buf, (m_fileId << 13) + m_pos, len);
m_pos += len;
}
else {
len = std::min((int)i_len, (int)m_size + (int)sizeof(t_eeprom_header) - (int)m_pos);
if (len > 0) {
eeprom_read_block(buf, (m_fileId << 12) + m_pos, len);
m_pos += len;
}
}
return len;
}
else {
@@ -511,13 +578,25 @@ unsigned int RleFile::writeRlc2(unsigned int i_fileId, unsigned int typ, const u
{
if (IS_SKY9X(board)) {
openRd(i_fileId);
eeprom_write_block(buf, (m_fileId << 12) + m_pos, i_len);
t_eeprom_header header;
header.sequence_no = 1;
header.data_size = i_len;
header.flags = 0;
header.hcsum = byte_checksum((uint8_t *) &header, 7);
eeprom_write_block(&header, (m_fileId << 12), sizeof(header));
if (eepromFatHeader) {
eepromFatHeader->files[i_fileId].exists = 1;
eeprom_write_block(buf, (m_fileId << 13) + m_pos, i_len);
{
EepromFileHeader header;
header.fileIndex = i_fileId;
header.size = i_len;
eeprom_write_block(&header, (m_fileId << 13), sizeof(header));
}
}
else {
eeprom_write_block(buf, (m_fileId << 12) + m_pos, i_len);
t_eeprom_header header;
header.sequence_no = 1;
header.data_size = i_len;
header.flags = 0;
header.hcsum = byte_checksum((uint8_t *) &header, 7);
eeprom_write_block(&header, (m_fileId << 12), sizeof(header));
}
return i_len;
}
else {
+18 -1
View File
@@ -61,6 +61,19 @@ struct t_eeprom_header
uint8_t hcsum ;
};
PACK(struct EepromHeaderFile
{
uint8_t zoneIndex:7;
uint8_t exists:1;
});
PACK(struct EepromHeader
{
uint32_t mark;
uint32_t index;
EepromHeaderFile files[63];
});
class RleFile
{
uint8_t m_fileId; //index of file in directory = filename
@@ -73,6 +86,7 @@ class RleFile
uint16_t m_size;
BoardEnum board;
unsigned int version;
uint8_t *eeprom;
unsigned int eeprom_size;
EeFs *eeFs;
@@ -85,6 +99,8 @@ class RleFile
unsigned int eeFsBlocksMax;
unsigned int eeFsLinkSize;
EepromHeader * eepromFatHeader;
void eeprom_read_block (void *pointer_ram, unsigned int pointer_eeprom, size_t size);
void eeprom_write_block(const void *pointer_ram, unsigned int pointer_eeprom, size_t size);
@@ -98,12 +114,13 @@ class RleFile
unsigned int EeFsGetFree();
void EeFsFree(unsigned int blk); // free one or more blocks
unsigned int EeFsAlloc(); // alloc one block from freelist
bool searchFat();
public:
RleFile();
void EeFsCreate(uint8_t *eeprom, int size, BoardEnum board);
void EeFsCreate(uint8_t *eeprom, int size, BoardEnum board, unsigned int version);
bool EeFsOpen(uint8_t *eeprom, int size, BoardEnum board);
+103 -70
View File
@@ -17,9 +17,10 @@
#include <QtGui>
#include "hexinterface.h"
#include "splash.h"
#include "flashinterface.h"
#include "firmwareinterface.h"
#include "helpers.h"
#define FW_MARK "FW"
#define VERS_MARK "VERS"
#define DATE_MARK "DATE"
#define TIME_MARK "TIME"
@@ -42,31 +43,40 @@ int getFileType(const QString &fullFileName)
return 0;
}
FlashInterface::FlashInterface(QString fileName):
FirmwareInterface::FirmwareInterface(const QString &filename):
flash(MAX_FSIZE, 0),
flash_size(0),
flashSize(0),
versionId(0),
splash_offset(0),
splash_size(0),
splash_width(0),
splash_height(0),
eepromVersion(0),
eepromVariant(0),
splashOffset(0),
splashSize(0),
splashWidth(0),
splashHeight(0),
isValidFlag(false)
{
if (!fileName.isEmpty()) {
QFile file(fileName);
if (!filename.isEmpty()) {
QFile file(filename);
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { // reading HEX TEXT file
QTextStream inputStream(&file);
flash_size = HexInterface(inputStream).load((uint8_t *)flash.data(), MAX_FSIZE);
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), MAX_FSIZE);
file.close();
if (flash_size == 0) {
if (flashSize == 0) {
file.open(QIODevice::ReadOnly);
flash_size = file.read((char *)flash.data(), MAX_FSIZE);
flashSize = file.read((char *)flash.data(), MAX_FSIZE);
}
}
}
if (flash_size > 0) {
if (flashSize > 0) {
flavour = seekLabel(FW_MARK);
version = seekLabel(VERS_MARK);
if (version.startsWith("opentx-")) {
// old version format
int index = version.lastIndexOf('-');
flavour = version.mid(0, index);
version = version.mid(index+1);
}
date = seekLabel(DATE_MARK);
time = seekLabel(TIME_MARK);
eepromId = seekLabel(EEPR_MARK);
@@ -82,11 +92,11 @@ FlashInterface::FlashInterface(QString fileName):
versionId = version2index(version);
SeekSplash();
isValidFlag = true;
isValidFlag = !version.isEmpty();
}
}
QString FlashInterface::seekString(const QString & string)
QString FirmwareInterface::seekString(const QString & string)
{
QString result = "";
@@ -94,7 +104,7 @@ QString FlashInterface::seekString(const QString & string)
if (start > 0) {
start += string.length();
int end = -1;
for (int i=start; i<start+20; i++) {
for (int i=start; i<start+50; i++) {
char c = flash.at(i);
if (c == '\0' || c == '\036') {
end = i;
@@ -109,7 +119,7 @@ QString FlashInterface::seekString(const QString & string)
return result;
}
QString FlashInterface::seekLabel(const QString & label)
QString FirmwareInterface::seekLabel(const QString & label)
{
QString result = seekString(label + "\037\033:");
if (!result.isEmpty())
@@ -118,12 +128,35 @@ QString FlashInterface::seekLabel(const QString & label)
return seekString(label + ":");
}
bool FlashInterface::SeekSplash(QByteArray splash)
QString FirmwareInterface::getFlavour() const
{
if (flavour == "opentx-x9dp")
return "opentx-taranis-plus";
else if (flavour == "opentx-x9d")
return "opentx-taranis";
else
return flavour;
}
bool FirmwareInterface::isHardwareCompatible(const FirmwareInterface &previousFirmware) const
{
QString newFlavour = getFlavour();
if (newFlavour.isEmpty())
return true;
QString previousFlavour = previousFirmware.getFlavour();
if (previousFlavour.isEmpty())
return true;
return (newFlavour == previousFlavour);
}
bool FirmwareInterface::SeekSplash(QByteArray splash)
{
int start = flash.indexOf(splash);
if (start>0) {
splash_offset = start;
splash_size = splash.size();
splashOffset = start;
splashSize = splash.size();
return true;
}
else {
@@ -131,7 +164,7 @@ bool FlashInterface::SeekSplash(QByteArray splash)
}
}
bool FlashInterface::SeekSplash(QByteArray sps, QByteArray spe, int size)
bool FirmwareInterface::SeekSplash(QByteArray sps, QByteArray spe, int size)
{
int start = 0;
while (start>=0) {
@@ -139,8 +172,8 @@ bool FlashInterface::SeekSplash(QByteArray sps, QByteArray spe, int size)
if (start>0) {
int end = start + sps.size() + size;
if (end == flash.indexOf(spe, end)) {
splash_offset = start + sps.size();
splash_size = end - start - sps.size();
splashOffset = start + sps.size();
splashSize = end - start - sps.size();
return true;
}
else {
@@ -157,12 +190,12 @@ bool FlashInterface::SeekSplash(QByteArray sps, QByteArray spe, int size)
#define OTX_SPE "SPE"
#define OTX_SPE_SIZE 4
void FlashInterface::SeekSplash(void)
void FirmwareInterface::SeekSplash(void)
{
splash_size = 0;
splash_offset = 0;
splash_width = SPLASH_WIDTH;
splash_height = SPLASH_HEIGHT;
splashSize = 0;
splashOffset = 0;
splashWidth = SPLASH_WIDTH;
splashHeight = SPLASH_HEIGHT;
splash_format = QImage::Format_Mono;
if (SeekSplash(QByteArray((const char *)gr9x_splash, sizeof(gr9x_splash))) || SeekSplash(QByteArray((const char *)gr9xv4_splash, sizeof(gr9xv4_splash)))) {
@@ -178,8 +211,8 @@ void FlashInterface::SeekSplash(void)
}
if (SeekSplash(QByteArray((const char *)opentxtaranis_splash, sizeof(opentxtaranis_splash)))) {
splash_width = SPLASHX9D_WIDTH;
splash_height = SPLASHX9D_HEIGHT;
splashWidth = SPLASHX9D_WIDTH;
splashHeight = SPLASHX9D_HEIGHT;
splash_format = QImage::Format_Indexed8;
return;
}
@@ -193,8 +226,8 @@ void FlashInterface::SeekSplash(void)
}
if (SeekSplash(QByteArray(OTX_SPS_TARANIS, OTX_SPS_SIZE), QByteArray(OTX_SPE, OTX_SPE_SIZE), 6784)) {
splash_width = SPLASHX9D_WIDTH;
splash_height = SPLASHX9D_HEIGHT;
splashWidth = SPLASHX9D_WIDTH;
splashHeight = SPLASHX9D_HEIGHT;
splash_format = QImage::Format_Indexed8;
return;
}
@@ -204,14 +237,14 @@ void FlashInterface::SeekSplash(void)
}
if (SeekSplash(QByteArray(ERSPLASH_MARKER, sizeof(ERSPLASH_MARKER)))) {
splash_offset += sizeof(ERSPLASH_MARKER);
splash_size = sizeof(er9x_splash);
splashOffset += sizeof(ERSPLASH_MARKER);
splashSize = sizeof(er9x_splash);
}
}
bool FlashInterface::setSplash(const QImage & newsplash)
bool FirmwareInterface::setSplash(const QImage & newsplash)
{
if (splash_offset == 0 || splash_size == 0) {
if (splashOffset == 0 || splashSize == 0) {
return false;
}
@@ -219,9 +252,9 @@ bool FlashInterface::setSplash(const QImage & newsplash)
QColor color;
QByteArray splash;
if (splash_format == QImage::Format_Indexed8) {
for (unsigned int y=0; y<splash_height; y++) {
unsigned int idx = (y/2)*splash_width;
for (unsigned int x=0; x<splash_width; x++, idx++) {
for (unsigned int y=0; y<splashHeight; y++) {
unsigned int idx = (y/2)*splashWidth;
for (unsigned int x=0; x<splashWidth; x++, idx++) {
QRgb gray = qGray(newsplash.pixel(x, y));
uint8_t z = ((255-gray)*15)/255;
if (y & 1) z <<= 4;
@@ -232,47 +265,47 @@ bool FlashInterface::setSplash(const QImage & newsplash)
else {
QColor black = QColor(0,0,0);
QImage blackNwhite = newsplash.convertToFormat(QImage::Format_MonoLSB);
for (uint y=0; y<splash_height; y++) {
for (uint x=0; x<splash_width; x++) {
for (uint y=0; y<splashHeight; y++) {
for (uint x=0; x<splashWidth; x++) {
color = QColor(blackNwhite.pixel(x,y));
b[splash_width*(y/8) + x] |= ((color==black ? 1: 0)<<(y % 8));
b[splashWidth*(y/8) + x] |= ((color==black ? 1: 0)<<(y % 8));
}
}
}
splash.clear();
splash.append(b, splash_size);
flash.replace(splash_offset, splash_size, splash);
splash.append(b, splashSize);
flash.replace(splashOffset, splashSize, splash);
return true;
}
int FlashInterface::getSplashWidth()
int FirmwareInterface::getSplashWidth()
{
return splash_width;
return splashWidth;
}
uint FlashInterface::getSplashHeight()
uint FirmwareInterface::getSplashHeight()
{
return splash_height;
return splashHeight;
}
QImage::Format FlashInterface::getSplashFormat()
QImage::Format FirmwareInterface::getSplashFormat()
{
return splash_format;
}
QImage FlashInterface::getSplash()
QImage FirmwareInterface::getSplash()
{
if (splash_offset == 0 || splash_size == 0) {
if (splashOffset == 0 || splashSize == 0) {
return QImage(); // empty image
}
if (splash_format == QImage::Format_Indexed8) {
QImage image(splash_width, splash_height, QImage::Format_RGB888);
if (splash_offset > 0) {
for (unsigned int y=0; y<splash_height; y++) {
unsigned int idx = (y/2)*splash_width;
for (unsigned int x=0; x<splash_width; x++, idx++) {
uint8_t byte = flash.at(splash_offset+idx);
QImage image(splashWidth, splashHeight, QImage::Format_RGB888);
if (splashOffset > 0) {
for (unsigned int y=0; y<splashHeight; y++) {
unsigned int idx = (y/2)*splashWidth;
for (unsigned int x=0; x<splashWidth; x++, idx++) {
uint8_t byte = flash.at(splashOffset+idx);
unsigned int z = (y & 1) ? (byte >> 4) : (byte & 0x0F);
z = 255-(z*255)/15;
QRgb rgb = qRgb(z, z, z);
@@ -283,11 +316,11 @@ QImage FlashInterface::getSplash()
return image;
}
else {
QImage image(splash_width, splash_height, QImage::Format_Mono);
if (splash_offset > 0) {
for (unsigned int y=0; y<splash_height; y++) {
for(unsigned int x=0; x<splash_width; x++) {
image.setPixel(x, y, (flash.at(splash_offset+(splash_width*(y/8)+x)) & (1<<(y % 8))) ? 0 : 1);
QImage image(splashWidth, splashHeight, QImage::Format_Mono);
if (splashOffset > 0) {
for (unsigned int y=0; y<splashHeight; y++) {
for(unsigned int x=0; x<splashWidth; x++) {
image.setPixel(x, y, (flash.at(splashOffset+(splashWidth*(y/8)+x)) & (1<<(y % 8))) ? 0 : 1);
}
}
}
@@ -295,20 +328,20 @@ QImage FlashInterface::getSplash()
}
}
bool FlashInterface::hasSplash()
bool FirmwareInterface::hasSplash()
{
return (splash_offset > 0 ? true : false);
return (splashOffset > 0 ? true : false);
}
bool FlashInterface::isValid()
bool FirmwareInterface::isValid()
{
return isValidFlag;
}
uint FlashInterface::saveFlash(QString fileName)
unsigned int FirmwareInterface::save(QString fileName)
{
uint8_t binflash[MAX_FSIZE];
memcpy(&binflash, flash.constData(), flash_size);
memcpy(&binflash, flash.constData(), flashSize);
QFile file(fileName);
int fileType = getFileType(fileName);
@@ -319,16 +352,16 @@ uint FlashInterface::saveFlash(QString fileName)
}
QTextStream outputStream(&file);
HexInterface hex=HexInterface(outputStream);
hex.save(binflash, flash_size);
hex.save(binflash, flashSize);
}
else {
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) { //reading HEX TEXT file
return -1;
}
file.write((char*)binflash, flash_size);
file.write((char*)binflash, flashSize);
}
file.close();
return flash_size;
return flashSize;
}
+18 -17
View File
@@ -12,13 +12,12 @@
*
*/
#ifndef FLASHINTERFACE_H
#define FLASHINTERFACE_H
#ifndef FIRMWAREINTERFACE_H_
#define FIRMWAREINTERFACE_H_
#include <QDialog>
#include <QtGui>
#include <inttypes.h>
#include "file.h"
#include <QString>
#include <QImage>
#include <QByteArray>
#define MAX_FSIZE (512*1024)
#define SPLASH_WIDTH (128)
@@ -40,13 +39,15 @@
int getFileType(const QString &fullFileName);
class FlashInterface
class FirmwareInterface
{
public:
FlashInterface(QString filename);
FirmwareInterface(const QString &filename);
inline QString getDate() { return date; }
inline QString getTime() { return time; }
int getSize() { return flash_size; }
int getSize() { return flashSize; }
QString getFlavour() const;
bool isHardwareCompatible(const FirmwareInterface &previousFirmware) const;
inline QString getVersion() { return version; }
unsigned int getVersionId() { return versionId; }
inline int getEEpromVersion() { return eepromVersion; }
@@ -58,12 +59,12 @@ class FlashInterface
int getSplashWidth();
uint getSplashHeight();
QImage::Format getSplashFormat();
uint saveFlash(QString fileName);
unsigned int save(QString fileName);
bool isValid();
private:
QByteArray flash;
uint flash_size;
uint flashSize;
QString seekString(const QString & string);
QString seekLabel(const QString & label);
void SeekSplash();
@@ -72,19 +73,19 @@ class FlashInterface
QString filename;
QString date;
QString time;
QString flavour;
QString version;
int versionId;
QString eepromId;
int eepromVersion;
int eepromVariant;
QByteArray splash;
uint splash_offset;
uint splash_size;
uint splash_width;
uint splash_height;
uint splashOffset;
uint splashSize;
uint splashWidth;
uint splashHeight;
QImage::Format splash_format;
bool isValidFlag;
};
#endif /* FLASHINTERFACE_H */
#endif /* FIRMWAREINTERFACE_H_ */
+16 -19
View File
@@ -70,7 +70,7 @@ Er9xGeneral::operator GeneralSettings ()
result.currModel = currModel;
result.contrast = contrast;
result.vBatWarn = vBatWarn;
result.vBatCalib = vBatCalib;
result.txVoltageCalibration = txVoltageCalibration;
result.trainer = trainer;
result.blightinv=blightinv;
result.stickScroll=stickScroll;
@@ -85,13 +85,13 @@ Er9xGeneral::operator GeneralSettings ()
switch (beeperVal) {
case 0:
result.beeperMode = e_quiet;
result.beeperMode = GeneralSettings::BEEPER_QUIET;
break;
case 1:
result.beeperMode = e_no_keys;
result.beeperMode = GeneralSettings::BEEPER_NOKEYS;
break;
default:
result.beeperMode = e_all;
result.beeperMode = GeneralSettings::BEEPER_ALL;
result.beeperLength = beeperVal - 4;
break;
}
@@ -138,8 +138,8 @@ t_Er9xLimitData::t_Er9xLimitData()
t_Er9xLimitData::operator LimitData ()
{
LimitData c9x;
c9x.min = min-100;
c9x.max = max+100;
c9x.min = 10*(min-100);
c9x.max = 10*(max+100);
c9x.revert = revert;
c9x.offset = offset;
return c9x;
@@ -358,38 +358,36 @@ t_Er9xModelData::operator ModelData ()
c9x.used = true;
getEEPROMString(c9x.name, name, sizeof(name));
c9x.timers[0].mode = getEr9xTimerMode(tmrMode);
c9x.timers[0].dir = tmrDir;
c9x.timers[0].val = tmrVal;
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncInstantTrim;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.funcSw[0].swtch = er9xToSwitch(trimSw);
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.invertELE = swashInvertELE;
c9x.swashRingData.invertAIL = swashInvertAIL;
c9x.swashRingData.invertCOL = swashInvertCOL;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100;
c9x.swashRingData.type = swashType;
c9x.swashRingData.collectiveSource = er9xToSource(swashCollectiveSource);
c9x.swashRingData.value = swashRingValue;
@@ -461,14 +459,13 @@ t_Er9xModelData::operator ModelData ()
}
for (int i=0; i<ER9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
c9x.logicalSw[i] = logicalSw[i];
// for (int i=0; i<ER9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.frsky = frsky;
c9x.frsky.usrProto=FrSkyUsrProto;
c9x.frsky.FrSkyGpsAlt=FrSkyGpsAlt;
return c9x;
}
+2 -2
View File
@@ -61,7 +61,7 @@ PACK(typedef struct t_Er9xGeneral {
uint8_t currModel; //0..15
uint8_t contrast;
uint8_t vBatWarn;
int8_t vBatCalib;
int8_t txVoltageCalibration;
int8_t lightSw;
Er9xTrainerData trainer;
uint8_t view;
@@ -241,7 +241,7 @@ PACK(typedef struct t_Er9xModelData {
int8_t trim[4];
int8_t curves5[ER9X_MAX_CURVE5][5];
int8_t curves9[ER9X_MAX_CURVE9][9];
Er9xLogicalSwitchData customSw[ER9X_NUM_CSW];
Er9xLogicalSwitchData logicalSw[ER9X_NUM_CSW];
uint8_t frSkyVoltThreshold ;
int8_t tmrModeB;
uint8_t numVoice;
+11 -11
View File
@@ -17,7 +17,7 @@
#include <iostream>
#include "er9xinterface.h"
#include "er9xeeprom.h"
#include "er9xsimulator.h"
#include "simulator/er9xsimulator.h"
#include "file.h"
#include "appdata.h"
@@ -75,12 +75,12 @@ inline void applyStickModeToModel(Er9xModelData & model, unsigned int mode)
for (int i=0; i<ER9X_MAX_MIXERS; i++)
model.mixData[i].srcRaw = applyStickMode(model.mixData[i].srcRaw, mode);
for (int i=0; i<ER9X_NUM_CSW; i++) {
switch (LogicalSwitchData(model.customSw[i].func).getFunctionFamily()) {
switch (LogicalSwitchData(model.logicalSw[i].func).getFunctionFamily()) {
case LS_FAMILY_VCOMP:
model.customSw[i].v2 = applyStickMode(model.customSw[i].v2, mode);
model.logicalSw[i].v2 = applyStickMode(model.logicalSw[i].v2, mode);
// no break
case LS_FAMILY_VOFS:
model.customSw[i].v1 = applyStickMode(model.customSw[i].v1, mode);
model.logicalSw[i].v1 = applyStickMode(model.logicalSw[i].v1, mode);
break;
default:
break;
@@ -190,23 +190,23 @@ int Er9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant,
return 0;
}
int Er9xInterface::getSize(ModelData &model)
int Er9xInterface::getSize(const ModelData &model)
{
return 0;
}
int Er9xInterface::getSize(GeneralSettings &settings)
int Er9xInterface::getSize(const GeneralSettings &settings)
{
return 0;
}
int Er9xInterface::isAvailable(Protocol prot, int port)
int Er9xInterface::isAvailable(PulsesProtocol prot, int port)
{
switch (prot) {
case PPM:
case DSM2:
case PXX_DJT:
case PPM16:
case PULSES_PPM:
case PULSES_DSM2:
case PULSES_PXX_DJT:
case PULSES_PPM16:
return 1;
default:
return 0;
+3 -3
View File
@@ -42,11 +42,11 @@ class Er9xInterface : public EEPROMInterface
virtual int save(uint8_t * eeprom, RadioData & radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(ModelData &);
virtual int getSize(const ModelData &);
virtual int getSize(GeneralSettings &settings);
virtual int getSize(const GeneralSettings &settings);
virtual int isAvailable(Protocol proto, int port=0);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
@@ -0,0 +1,15 @@
set(ER9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/er9x)
add_custom_command(
OUTPUT ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${ER9X_CHECKOUT_DIRECTORY}
COMMAND cd ${ER9X_CHECKOUT_DIRECTORY} && svn checkout http://er9x.googlecode.com/svn/trunk/src@790 .
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp ${ER9X_CHECKOUT_DIRECTORY}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
)
add_library(er9x-simulator er9xsimulator.cpp)
@@ -47,7 +47,7 @@ namespace Er9x {
uint8_t pxxFlag = 0;
int16_t g_anas[7];
#define IS_BACKLIGHT_ON() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
uint16_t anaIn(uint8_t chan)
{
@@ -73,14 +73,14 @@ void getTrims(int16_t values[4])
values[i] = g_model.trim[i];
}
#define GPIO_TRIM_LH_L pind
#define GPIO_TRIM_LV_DN pind
#define GPIO_TRIM_RV_UP pind
#define GPIO_TRIM_RH_L pind
#define GPIO_TRIM_LH_R pind
#define GPIO_TRIM_LV_UP pind
#define GPIO_TRIM_RV_DN pind
#define GPIO_TRIM_RH_R pind
#define TRIMS_GPIO_REG_LHL pind
#define TRIMS_GPIO_REG_LVD pind
#define TRIMS_GPIO_REG_RVU pind
#define TRIMS_GPIO_REG_RHL pind
#define TRIMS_GPIO_REG_LHR pind
#define TRIMS_GPIO_REG_LVU pind
#define TRIMS_GPIO_REG_RVD pind
#define TRIMS_GPIO_REG_RHR pind
#define PIN_TRIM_LH_L (1<<INP_D_TRM_LH_DWN)
#define PIN_TRIM_LV_DN (1<<INP_D_TRM_LV_DWN)
#define PIN_TRIM_RV_UP (1<<INP_D_TRM_RV_UP)
@@ -98,14 +98,14 @@ void getTrims(int16_t values[4])
void simuSetTrim(uint8_t trim, bool state)
{
switch (trim) {
TRIM_CASE(0, GPIO_TRIM_LH_L, PIN_TRIM_LH_L)
TRIM_CASE(1, GPIO_TRIM_LH_R, PIN_TRIM_LH_R)
TRIM_CASE(2, GPIO_TRIM_LV_DN, PIN_TRIM_LV_DN)
TRIM_CASE(3, GPIO_TRIM_LV_UP, PIN_TRIM_LV_UP)
TRIM_CASE(4, GPIO_TRIM_RV_DN, PIN_TRIM_RV_DN)
TRIM_CASE(5, GPIO_TRIM_RV_UP, PIN_TRIM_RV_UP)
TRIM_CASE(6, GPIO_TRIM_RH_L, PIN_TRIM_RH_L)
TRIM_CASE(7, GPIO_TRIM_RH_R, PIN_TRIM_RH_R)
TRIM_CASE(0, TRIMS_GPIO_REG_LHL, PIN_TRIM_LH_L)
TRIM_CASE(1, TRIMS_GPIO_REG_LHR, PIN_TRIM_LH_R)
TRIM_CASE(2, TRIMS_GPIO_REG_LVD, PIN_TRIM_LV_DN)
TRIM_CASE(3, TRIMS_GPIO_REG_LVU, PIN_TRIM_LV_UP)
TRIM_CASE(4, TRIMS_GPIO_REG_RVD, PIN_TRIM_RV_DN)
TRIM_CASE(5, TRIMS_GPIO_REG_RVU, PIN_TRIM_RV_UP)
TRIM_CASE(6, TRIMS_GPIO_REG_RHL, PIN_TRIM_RH_L)
TRIM_CASE(7, TRIMS_GPIO_REG_RHR, PIN_TRIM_RH_R)
}
}
@@ -151,7 +151,7 @@ void simuSetKey(uint8_t key, bool state)
}
}
#define IS_BACKLIGHT_ON() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
}
@@ -50,10 +50,12 @@ class Er9xSimulator : public SimulatorInterface {
virtual const char * getPhaseName(unsigned int phase) { return 0; }
virtual void wheelEvent(uint8_t steps) { }
virtual const char * getError();
virtual void sendTelemetry(uint8_t * data, unsigned int len) {};
virtual void setTrainerInput(unsigned int inputNumber, int16_t value) {};
protected:
Er9xInterface * er9xInterface;
@@ -82,7 +82,7 @@ Ersky9xGeneral::operator GeneralSettings ()
result.currModel = currModel;
result.contrast = contrast;
result.vBatWarn = vBatWarn;
result.vBatCalib = vBatCalib;
result.txVoltageCalibration = txVoltageCalibration;
result.backlightMode = 0;
if (lightSw == 22) {
@@ -105,13 +105,13 @@ Ersky9xGeneral::operator GeneralSettings ()
switch (beeperVal) {
case 0:
result.beeperMode = e_quiet;
result.beeperMode = GeneralSettings::BEEPER_QUIET;
break;
case 1:
result.beeperMode = e_no_keys;
result.beeperMode = GeneralSettings::BEEPER_NOKEYS;
break;
default:
result.beeperMode = e_all;
result.beeperMode = GeneralSettings::BEEPER_ALL;
result.beeperLength = beeperVal - 4;
break;
}
@@ -135,7 +135,7 @@ Ersky9xGeneral::operator GeneralSettings ()
result.switchWarningStates = switchWarningStates;
result.speakerVolume = volume;
result.backlightBright = bright ;
result.currentCalib = current_calib;
result.txCurrentCalibration = current_calib;
return result;
}
@@ -147,8 +147,8 @@ t_Ersky9xLimitData::t_Ersky9xLimitData()
t_Ersky9xLimitData::operator LimitData ()
{
LimitData c9x;
c9x.min = min-100;
c9x.max = max+100;
c9x.min = 10*(min-100);
c9x.max = 10*(max+100);
c9x.revert = revert;
c9x.offset = offset;
return c9x;
@@ -489,39 +489,37 @@ t_Ersky9xModelData_v10::operator ModelData ()
getEEPROMString(c9x.name, name, sizeof(name));
for (int i=0; i<2; i++) {
c9x.timers[i].mode = getErSky9xTimerMode(timer[i].tmrModeA);
c9x.timers[i].dir = timer[i].tmrDir;
c9x.timers[i].val = timer[i].tmrVal;
}
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncInstantTrim;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.funcSw[0].swtch = er9xToSwitch(trimSw);
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.invertELE = swashInvertELE;
c9x.swashRingData.invertAIL = swashInvertAIL;
c9x.swashRingData.invertCOL = swashInvertCOL;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100;
c9x.swashRingData.type = swashType;
c9x.swashRingData.collectiveSource = ersky9xToSource_v10(swashCollectiveSource);
c9x.swashRingData.value = swashRingValue;
@@ -589,14 +587,13 @@ t_Ersky9xModelData_v10::operator ModelData ()
}
for (int i=0; i<ERSKY9X_NUM_CSW_V10; i++)
c9x.customSw[i] = customSw[i];
c9x.logicalSw[i] = logicalSw[i];
// for (int i=0; i<ERSKY9X_NUM_CHNOUT_V10; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.frsky = frsky;
c9x.frsky.usrProto=FrSkyUsrProto;
c9x.frsky.FrSkyGpsAlt=FrSkyGpsAlt;
return c9x;
}
@@ -607,39 +604,37 @@ t_Ersky9xModelData_v11::operator ModelData ()
getEEPROMString(c9x.name, name, sizeof(name));
for (int i=0; i<2; i++) {
c9x.timers[i].mode = getErSky9xTimerMode(timer[i].tmrModeA);
c9x.timers[i].dir = timer[i].tmrDir;
c9x.timers[i].val = timer[i].tmrVal;
}
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncInstantTrim;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.funcSw[0].swtch = er9xToSwitch(trimSw);
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.invertELE = swashInvertELE;
c9x.swashRingData.invertAIL = swashInvertAIL;
c9x.swashRingData.invertCOL = swashInvertCOL;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100;
c9x.swashRingData.type = swashType;
c9x.swashRingData.collectiveSource = ersky9xToSource_v11(swashCollectiveSource);
c9x.swashRingData.value = swashRingValue;
@@ -707,25 +702,12 @@ t_Ersky9xModelData_v11::operator ModelData ()
}
for (int i=0; i<ERSKY9X_NUM_CSW_V11; i++)
c9x.customSw[i] = customSw[i];
// for (int i=0; i<ERSKY9X_NUM_CHNOUT_V11; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.logicalSw[i] = logicalSw[i];
c9x.frsky = frsky;
c9x.frsky.usrProto=FrSkyUsrProto;
c9x.frsky.FrSkyGpsAlt=FrSkyGpsAlt;
// for (int i=0; i<8; i++) {
// c9x.frskyalarms[i].frskyAlarmLimit=frskyAlarms.alarmData[i].frskyAlarmLimit;
// c9x.frskyalarms[i].frskyAlarmSound=frskyAlarms.alarmData[i].frskyAlarmSound;
// c9x.frskyalarms[i].frskyAlarmType=frskyAlarms.alarmData[i].frskyAlarmType;
// }
// for (int i=0; i<8; i++) {
// c9x.customdisplay[i]=customDisplayIndex[i];
// }
for (int i=0; i<5;i++) {
c9x.flightModeData[0].gvars[i]=gvars[i].gvar;
// c9x.gvsource[i]=gvars[i].gvsource;
}
return c9x;
}
@@ -69,7 +69,7 @@ PACK(typedef struct t_Ersky9xGeneral {
uint8_t currModel; //0..15
uint8_t contrast;
uint8_t vBatWarn;
int8_t vBatCalib;
int8_t txVoltageCalibration;
int8_t lightSw;
Ersky9xTrainerData trainer;
uint8_t view;
@@ -246,13 +246,13 @@ PACK(typedef struct t_Ersky9xFlightModeData {
uint16_t spare ; // Future expansion
}) Ersky9xFlightModeData;
PACK(typedef struct t_Ersky9xFuncSwData { // Function Switches data
PACK(typedef struct t_Ersky9xCustomFunctionData { // Function Switches data
int8_t swtch; //input
uint8_t func;
char param[6];
uint8_t delay;
uint8_t spare;
}) Ersky9xFuncSwData;
}) Ersky9xCustomFunctionData;
PACK(typedef struct t_Ersky9xFrSkyChannelData_v10 {
uint8_t ratio; // 0.0 means not used, 0.1V steps EG. 6.6 Volts = 66. 25.1V = 251, etc.
@@ -360,7 +360,7 @@ PACK(typedef struct t_Ersky9xModelData_v10 {
int8_t trim[4];
int8_t curves5[ERSKY9X_MAX_CURVE5][5];
int8_t curves9[ERSKY9X_MAX_CURVE9][9];
Ersky9xLogicalSwitchData_v10 customSw[ERSKY9X_NUM_CSW_V10];
Ersky9xLogicalSwitchData_v10 logicalSw[ERSKY9X_NUM_CSW_V10];
uint8_t frSkyVoltThreshold ;
uint8_t res3[2];
Ersky9xSafetySwData_v10 safetySw[ERSKY9X_NUM_CHNOUT_V10];
@@ -409,7 +409,7 @@ PACK(typedef struct t_Ersky9xModelData_v11 {
int8_t curves5[ERSKY9X_MAX_CURVE5][5];
int8_t curves9[ERSKY9X_MAX_CURVE9][9];
int8_t curvexy[18];
Ersky9xLogicalSwitchData_v11 customSw[ERSKY9X_NUM_CSW_V11];
Ersky9xLogicalSwitchData_v11 logicalSw[ERSKY9X_NUM_CSW_V11];
uint8_t frSkyVoltThreshold ;
uint8_t bt_telemetry;
uint8_t numVoice; // 0-16, rest are Safety switches
@@ -420,7 +420,7 @@ PACK(typedef struct t_Ersky9xModelData_v11 {
Ersky9xFrSkyAlarmData_v11 frskyAlarms ;
// Add 6 bytes for custom telemetry screen
uint8_t customDisplayIndex[6] ;
Ersky9xFuncSwData funcSw[ERSKY9X_NUM_FSW];
Ersky9xCustomFunctionData customFn[ERSKY9X_NUM_FSW];
Ersky9xFlightModeData flightModeData[6] ;
Ersky9xGvarData gvars[ERSKY9X_MAX_GVARS] ;
@@ -18,7 +18,7 @@
#include <QMessageBox>
#include "ersky9xinterface.h"
#include "ersky9xeeprom.h"
#include "ersky9xsimulator.h"
#include "simulator/ersky9xsimulator.h"
#include "file.h"
#define FILE_TYP_GENERAL 1
@@ -74,12 +74,12 @@ inline void applyStickModeToModel(Ersky9xModelData_v10 & model, unsigned int mod
for (int i=0; i<ERSKY9X_MAX_MIXERS_V10; i++)
model.mixData[i].srcRaw = applyStickMode(model.mixData[i].srcRaw, mode);
for (int i=0; i<ERSKY9X_NUM_CSW_V10; i++) {
switch (LogicalSwitchData(model.customSw[i].func).getFunctionFamily()) {
switch (LogicalSwitchData(model.logicalSw[i].func).getFunctionFamily()) {
case LS_FAMILY_VCOMP:
model.customSw[i].v2 = applyStickMode(model.customSw[i].v2, mode);
model.logicalSw[i].v2 = applyStickMode(model.logicalSw[i].v2, mode);
// no break
case LS_FAMILY_VOFS:
model.customSw[i].v1 = applyStickMode(model.customSw[i].v1, mode);
model.logicalSw[i].v1 = applyStickMode(model.logicalSw[i].v1, mode);
break;
default:
break;
@@ -106,12 +106,12 @@ inline void applyStickModeToModel(Ersky9xModelData_v11 & model, unsigned int mod
for (int i=0; i<ERSKY9X_MAX_MIXERS_V11; i++)
model.mixData[i].srcRaw = applyStickMode(model.mixData[i].srcRaw, mode);
for (int i=0; i<ERSKY9X_NUM_CSW_V11; i++) {
switch (LogicalSwitchData(model.customSw[i].func).getFunctionFamily()) {
switch (LogicalSwitchData(model.logicalSw[i].func).getFunctionFamily()) {
case LS_FAMILY_VCOMP:
model.customSw[i].v2 = applyStickMode(model.customSw[i].v2, mode);
model.logicalSw[i].v2 = applyStickMode(model.logicalSw[i].v2, mode);
// no break
case LS_FAMILY_VOFS:
model.customSw[i].v1 = applyStickMode(model.customSw[i].v1, mode);
model.logicalSw[i].v1 = applyStickMode(model.logicalSw[i].v1, mode);
break;
default:
break;
@@ -234,23 +234,23 @@ int Ersky9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varia
return 0;
}
int Ersky9xInterface::getSize(ModelData &model)
int Ersky9xInterface::getSize(const ModelData & model)
{
return 0;
}
int Ersky9xInterface::getSize(GeneralSettings &settings)
int Ersky9xInterface::getSize(const GeneralSettings & settings)
{
return 0;
}
int Ersky9xInterface::isAvailable(Protocol prot, int port)
int Ersky9xInterface::isAvailable(PulsesProtocol prot, int port)
{
switch (prot) {
case PPM:
case DSM2:
case PXX_DJT:
case PPM16:
case PULSES_PPM:
case PULSES_DSM2:
case PULSES_PXX_DJT:
case PULSES_PPM16:
return 1;
default:
return 0;
@@ -42,11 +42,11 @@ class Ersky9xInterface : public EEPROMInterface
virtual int save(uint8_t * eeprom, RadioData & radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(ModelData &);
virtual int getSize(const ModelData &);
virtual int getSize(GeneralSettings &settings);
virtual int getSize(const GeneralSettings & settings);
virtual int isAvailable(Protocol proto, int port=0);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
@@ -0,0 +1,15 @@
set(ERSKY9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/ersky9x)
add_custom_command(
OUTPUT ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${ERSKY9X_CHECKOUT_DIRECTORY}
COMMAND cd ${ERSKY9X_CHECKOUT_DIRECTORY} && svn checkout http://ersky9x.googlecode.com/svn/trunk/src@170 .
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp ${ERSKY9X_CHECKOUT_DIRECTORY}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
)
add_library(ersky9x-simulator ersky9xsimulator.cpp)
@@ -58,7 +58,7 @@ namespace Ersky9x {
#include "../ersky9x/sound.cpp"
#include "../ersky9x/diskio.cpp"
#define IS_BACKLIGHT_ON() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
#define isBacklightEnable() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
//uint8_t pxxFlag = 0;
int16_t g_anas[7];
@@ -114,18 +114,18 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
}
}
#define GPIO_BUTTON_MENU PIOB->PIO_PDSR
#define GPIO_BUTTON_EXIT PIOC->PIO_PDSR
#define GPIO_BUTTON_UP PIOC->PIO_PDSR
#define GPIO_BUTTON_DOWN PIOC->PIO_PDSR
#define GPIO_BUTTON_RIGHT PIOC->PIO_PDSR
#define GPIO_BUTTON_LEFT PIOC->PIO_PDSR
#define PIN_BUTTON_MENU 0x00000020
#define PIN_BUTTON_EXIT 0x01000000
#define PIN_BUTTON_UP 0x00000002
#define PIN_BUTTON_DOWN 0x00000020
#define PIN_BUTTON_RIGHT 0x00000010
#define PIN_BUTTON_LEFT 0x00000008
#define KEYS_GPIO_REG_MENU PIOB->PIO_PDSR
#define KEYS_GPIO_REG_EXIT PIOC->PIO_PDSR
#define KEYS_GPIO_REG_UP PIOC->PIO_PDSR
#define KEYS_GPIO_REG_DOWN PIOC->PIO_PDSR
#define KEYS_GPIO_REG_RIGHT PIOC->PIO_PDSR
#define KEYS_GPIO_REG_LEFT PIOC->PIO_PDSR
#define KEYS_GPIO_PIN_MENU 0x00000020
#define KEYS_GPIO_PIN_EXIT 0x01000000
#define KEYS_GPIO_PIN_UP 0x00000002
#define KEYS_GPIO_PIN_DOWN 0x00000020
#define KEYS_GPIO_PIN_RIGHT 0x00000010
#define KEYS_GPIO_PIN_LEFT 0x00000008
#define KEY_CASE(key, pin, mask) \
case key: \
@@ -135,23 +135,23 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
void simuSetKey(uint8_t key, bool state)
{
switch (key) {
KEY_CASE(KEY_MENU, GPIO_BUTTON_MENU, PIN_BUTTON_MENU)
KEY_CASE(KEY_EXIT, GPIO_BUTTON_EXIT, PIN_BUTTON_EXIT)
KEY_CASE(KEY_RIGHT, GPIO_BUTTON_RIGHT, PIN_BUTTON_RIGHT)
KEY_CASE(KEY_LEFT, GPIO_BUTTON_LEFT, PIN_BUTTON_LEFT)
KEY_CASE(KEY_UP, GPIO_BUTTON_UP, PIN_BUTTON_UP)
KEY_CASE(KEY_DOWN, GPIO_BUTTON_DOWN, PIN_BUTTON_DOWN)
KEY_CASE(KEY_MENU, KEYS_GPIO_REG_MENU, KEYS_GPIO_PIN_MENU)
KEY_CASE(KEY_EXIT, KEYS_GPIO_REG_EXIT, KEYS_GPIO_PIN_EXIT)
KEY_CASE(KEY_RIGHT, KEYS_GPIO_REG_RIGHT, KEYS_GPIO_PIN_RIGHT)
KEY_CASE(KEY_LEFT, KEYS_GPIO_REG_LEFT, KEYS_GPIO_PIN_LEFT)
KEY_CASE(KEY_UP, KEYS_GPIO_REG_UP, KEYS_GPIO_PIN_UP)
KEY_CASE(KEY_DOWN, KEYS_GPIO_REG_DOWN, KEYS_GPIO_PIN_DOWN)
}
}
#define GPIO_TRIM_LH_L PIOA->PIO_PDSR
#define GPIO_TRIM_LV_DN PIOA->PIO_PDSR
#define GPIO_TRIM_RV_UP PIOA->PIO_PDSR
#define GPIO_TRIM_RH_L PIOA->PIO_PDSR
#define GPIO_TRIM_LH_R PIOB->PIO_PDSR
#define GPIO_TRIM_LV_UP PIOC->PIO_PDSR
#define GPIO_TRIM_RV_DN PIOC->PIO_PDSR
#define GPIO_TRIM_RH_R PIOC->PIO_PDSR
#define TRIMS_GPIO_REG_LHL PIOA->PIO_PDSR
#define TRIMS_GPIO_REG_LVD PIOA->PIO_PDSR
#define TRIMS_GPIO_REG_RVU PIOA->PIO_PDSR
#define TRIMS_GPIO_REG_RHL PIOA->PIO_PDSR
#define TRIMS_GPIO_REG_LHR PIOB->PIO_PDSR
#define TRIMS_GPIO_REG_LVU PIOC->PIO_PDSR
#define TRIMS_GPIO_REG_RVD PIOC->PIO_PDSR
#define TRIMS_GPIO_REG_RHR PIOC->PIO_PDSR
#define PIN_TRIM_LH_L 0x00800000
#define PIN_TRIM_LV_DN 0x01000000
#define PIN_TRIM_RV_UP 0x00000002
@@ -166,14 +166,14 @@ void simuSetKey(uint8_t key, bool state)
void simuSetTrim(uint8_t trim, bool state)
{
switch (trim) {
TRIM_CASE(0, GPIO_TRIM_LH_L, PIN_TRIM_LH_L)
TRIM_CASE(1, GPIO_TRIM_LH_R, PIN_TRIM_LH_R)
TRIM_CASE(2, GPIO_TRIM_LV_DN, PIN_TRIM_LV_DN)
TRIM_CASE(3, GPIO_TRIM_LV_UP, PIN_TRIM_LV_UP)
TRIM_CASE(4, GPIO_TRIM_RV_DN, PIN_TRIM_RV_DN)
TRIM_CASE(5, GPIO_TRIM_RV_UP, PIN_TRIM_RV_UP)
TRIM_CASE(6, GPIO_TRIM_RH_L, PIN_TRIM_RH_L)
TRIM_CASE(7, GPIO_TRIM_RH_R, PIN_TRIM_RH_R)
TRIM_CASE(0, TRIMS_GPIO_REG_LHL, PIN_TRIM_LH_L)
TRIM_CASE(1, TRIMS_GPIO_REG_LHR, PIN_TRIM_LH_R)
TRIM_CASE(2, TRIMS_GPIO_REG_LVD, PIN_TRIM_LV_DN)
TRIM_CASE(3, TRIMS_GPIO_REG_LVU, PIN_TRIM_LV_UP)
TRIM_CASE(4, TRIMS_GPIO_REG_RVD, PIN_TRIM_RV_DN)
TRIM_CASE(5, TRIMS_GPIO_REG_RVU, PIN_TRIM_RV_UP)
TRIM_CASE(6, TRIMS_GPIO_REG_RHL, PIN_TRIM_RH_L)
TRIM_CASE(7, TRIMS_GPIO_REG_RHR, PIN_TRIM_RH_R)
}
}
@@ -50,10 +50,12 @@ class Ersky9xSimulator : public SimulatorInterface {
virtual const char * getPhaseName(unsigned int phase) { return 0; }
virtual void wheelEvent(uint8_t steps) { }
virtual const char * getError();
virtual void sendTelemetry(uint8_t * data, unsigned int len) {};
virtual void setTrainerInput(unsigned int inputNumber, int16_t value) {};
protected:
Ersky9xInterface * ersky9xInterface;
@@ -70,7 +70,7 @@ Gruvin9xGeneral_v103::operator GeneralSettings ()
result.currModel = currModel;
result.contrast = contrast;
result.vBatWarn = vBatWarn;
result.vBatCalib = vBatCalib;
result.txVoltageCalibration = txVoltageCalibration;
result.backlightMode = 0;
if (lightSw == 22) {
@@ -88,13 +88,13 @@ Gruvin9xGeneral_v103::operator GeneralSettings ()
switch (beeperVal) {
case 0:
result.beeperMode = e_quiet;
result.beeperMode = GeneralSettings::BEEPER_QUIET;
break;
case 1:
result.beeperMode = e_no_keys;
result.beeperMode = GeneralSettings::BEEPER_NOKEYS;
break;
default:
result.beeperMode = e_all;
result.beeperMode = GeneralSettings::BEEPER_ALL;
result.beeperLength = beeperVal - 4;
break;
}
@@ -127,7 +127,7 @@ Gruvin9xGeneral_v104::operator GeneralSettings ()
result.currModel = currModel;
result.contrast = contrast;
result.vBatWarn = vBatWarn;
result.vBatCalib = vBatCalib;
result.txVoltageCalibration = txVoltageCalibration;
result.backlightMode = 0;
if (lightSw == 22) {
@@ -142,7 +142,7 @@ Gruvin9xGeneral_v104::operator GeneralSettings ()
result.view = view;
result.disableThrottleWarning = disableThrottleWarning;
result.switchWarning = switchWarning;
result.beeperMode = (BeeperMode)beeperVal;
result.beeperMode = (GeneralSettings::BeeperMode)beeperVal;
result.disableMemoryWarning = disableMemoryWarning;
result.disableAlarmWarning = disableAlarmWarning;
result.stickMode = stickMode;
@@ -170,12 +170,12 @@ t_Gruvin9xExpoData::operator ExpoData ()
c9x.chn = chn;
c9x.swtch = gruvin9xToSwitch(swtch);
if (negPhase) {
c9x.phases= 1 << (phase -1);
c9x.flightModes= 1 << (phase -1);
} else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
} else {
c9x.phases=63;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=63;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.weight = weight;
if (expo) {
@@ -201,8 +201,8 @@ t_Gruvin9xLimitData::t_Gruvin9xLimitData()
t_Gruvin9xLimitData::operator LimitData ()
{
LimitData c9x;
c9x.min = min-100;
c9x.max = max+100;
c9x.min = 10*(min-100);
c9x.max = 10*(max+100);
c9x.revert = revert;
c9x.offset = offset;
return c9x;
@@ -322,9 +322,9 @@ Gruvin9xLogicalSwitchData::operator LogicalSwitchData ()
return c9x;
}
Gruvin9xFuncSwData::operator FuncSwData ()
Gruvin9xCustomFunctionData::operator CustomFunctionData ()
{
FuncSwData c9x;
CustomFunctionData c9x;
c9x.swtch = gruvin9xToSwitch(swtch);
c9x.func = (AssignFunc)(func + G9X_NUM_CHNOUT);
return c9x;
@@ -338,9 +338,9 @@ t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData()
t_Gruvin9xSwashRingData::operator SwashRingData ()
{
SwashRingData c9x;
c9x.invertELE = invertELE;
c9x.invertAIL = invertAIL;
c9x.invertCOL = invertCOL;
c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type;
c9x.collectiveSource = gruvin9xToSource(collectiveSource);
c9x.value = value;
@@ -378,7 +378,6 @@ t_Gruvin9xTimerData::operator TimerData ()
TimerData c9x;
c9x.mode = getEr9xTimerMode(mode);
c9x.val = val;
c9x.dir = dir;
return c9x;
}
@@ -424,30 +423,29 @@ t_Gruvin9xModelData_v102::operator ModelData ()
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = SILV_A;
c9x.moduleData[0].protocol = PULSES_SILV_A;
break;
case 4:
c9x.moduleData[0].protocol = SILV_B;
c9x.moduleData[0].protocol = PULSES_SILV_B;
break;
case 5:
c9x.moduleData[0].protocol = SILV_C;
c9x.moduleData[0].protocol = PULSES_SILV_C;
break;
case 6:
c9x.moduleData[0].protocol = CTP1009;
c9x.moduleData[0].protocol = PULSES_CTP1009;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
@@ -478,7 +476,7 @@ t_Gruvin9xModelData_v102::operator ModelData ()
}
for (int i=0; i<G9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
c9x.logicalSw[i] = logicalSw[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
@@ -495,30 +493,29 @@ t_Gruvin9xModelData_v103::operator ModelData ()
c9x.timers[1] = timer2;
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = SILV_A;
c9x.moduleData[0].protocol = PULSES_SILV_A;
break;
case 4:
c9x.moduleData[0].protocol = SILV_B;
c9x.moduleData[0].protocol = PULSES_SILV_B;
break;
case 5:
c9x.moduleData[0].protocol = SILV_C;
c9x.moduleData[0].protocol = PULSES_SILV_C;
break;
case 6:
c9x.moduleData[0].protocol = CTP1009;
c9x.moduleData[0].protocol = PULSES_CTP1009;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
@@ -549,7 +546,7 @@ t_Gruvin9xModelData_v103::operator ModelData ()
}
for (int i=0; i<G9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
c9x.logicalSw[i] = logicalSw[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
@@ -566,30 +563,29 @@ t_Gruvin9xModelData_v105::operator ModelData ()
c9x.timers[1] = timer2;
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = SILV_A;
c9x.moduleData[0].protocol = PULSES_SILV_A;
break;
case 4:
c9x.moduleData[0].protocol = SILV_B;
c9x.moduleData[0].protocol = PULSES_SILV_B;
break;
case 5:
c9x.moduleData[0].protocol = SILV_C;
c9x.moduleData[0].protocol = PULSES_SILV_C;
break;
case 6:
c9x.moduleData[0].protocol = CTP1009;
c9x.moduleData[0].protocol = PULSES_CTP1009;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
@@ -637,9 +633,9 @@ t_Gruvin9xModelData_v105::operator ModelData ()
}
for (int i=0; i<G9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<G9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
c9x.customFn[i] = customFn[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
@@ -657,30 +653,29 @@ t_Gruvin9xModelData_v106::operator ModelData ()
c9x.timers[1] = timer2;
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = SILV_A;
c9x.moduleData[0].protocol = PULSES_SILV_A;
break;
case 4:
c9x.moduleData[0].protocol = SILV_B;
c9x.moduleData[0].protocol = PULSES_SILV_B;
break;
case 5:
c9x.moduleData[0].protocol = SILV_C;
c9x.moduleData[0].protocol = PULSES_SILV_C;
break;
case 6:
c9x.moduleData[0].protocol = CTP1009;
c9x.moduleData[0].protocol = PULSES_CTP1009;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
@@ -721,9 +716,9 @@ t_Gruvin9xModelData_v106::operator ModelData ()
}
for (int i=0; i<G9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<G9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
c9x.customFn[i] = customFn[i];
// for (int i=0; i<G9X_NUM_CHNOUT; i++)
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
@@ -69,7 +69,7 @@ PACK(typedef struct t_Gruvin9xGeneral_v103 {
uint8_t currModel; //0..15
uint8_t contrast;
uint8_t vBatWarn;
int8_t vBatCalib;
int8_t txVoltageCalibration;
int8_t lightSw;
Gruvin9xTrainerData_v103 trainer;
uint8_t view; //index of subview in main scrren
@@ -106,7 +106,7 @@ PACK(typedef struct t_Gruvin9xGeneral_v104 {
uint8_t currModel; //0..15
uint8_t contrast;
uint8_t vBatWarn;
int8_t vBatCalib;
int8_t txVoltageCalibration;
int8_t lightSw;
Gruvin9xTrainerData_v104 trainer;
uint8_t view; //index of subview in main scrren
@@ -202,13 +202,13 @@ PACK(typedef struct t_Gruvin9xSafetySwData { // Safety Switches data
t_Gruvin9xSafetySwData() { memset(this, 0, sizeof(t_Gruvin9xSafetySwData)); }
}) Gruvin9xSafetySwData;
PACK(typedef struct t_Gruvin9xFuncSwData { // Function Switches data
PACK(typedef struct t_Gruvin9xCustomFunctionData { // Function Switches data
int8_t swtch; // input
uint8_t func;
operator FuncSwData();
t_Gruvin9xFuncSwData() { memset(this, 0, sizeof(t_Gruvin9xFuncSwData)); }
}) Gruvin9xFuncSwData;
operator CustomFunctionData();
t_Gruvin9xCustomFunctionData() { memset(this, 0, sizeof(t_Gruvin9xCustomFunctionData)); }
}) Gruvin9xCustomFunctionData;
PACK(typedef struct t_Gruvin9xFrSkyChannelData {
uint16_t ratio:12; // (Maximum resistor divider input volts +/- calibration. 0 means channel not used.
@@ -309,7 +309,7 @@ PACK(typedef struct t_Gruvin9xModelData_v102 {
Gruvin9xExpoData expoData[G9X_MAX_EXPOS];
int8_t curves5[G9X_MAX_CURVE5][5];
int8_t curves9[G9X_MAX_CURVE9][9];
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
Gruvin9xLogicalSwitchData logicalSw[G9X_NUM_CSW];
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
Gruvin9xSwashRingData swashR;
Gruvin9xFlightModeData_v102 flightModeData[G9X_MAX_FLIGHT_MODES];
@@ -341,7 +341,7 @@ PACK(typedef struct t_Gruvin9xModelData_v103 {
Gruvin9xExpoData expoData[G9X_MAX_EXPOS];
int8_t curves5[G9X_MAX_CURVE5][5];
int8_t curves9[G9X_MAX_CURVE9][9];
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
Gruvin9xLogicalSwitchData logicalSw[G9X_NUM_CSW];
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
Gruvin9xSwashRingData swashR;
Gruvin9xFlightModeData_v102 flightModeData[G9X_MAX_FLIGHT_MODES];
@@ -373,9 +373,9 @@ PACK(typedef struct t_Gruvin9xModelData_v105 {
Gruvin9xExpoData expoData[G9X_MAX_EXPOS];
int8_t curves5[G9X_MAX_CURVE5][5];
int8_t curves9[G9X_MAX_CURVE9][9];
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
Gruvin9xLogicalSwitchData logicalSw[G9X_NUM_CSW];
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
Gruvin9xFuncSwData funcSw[G9X_NUM_FSW];
Gruvin9xCustomFunctionData customFn[G9X_NUM_FSW];
Gruvin9xSwashRingData swashR;
Gruvin9xFlightModeData_v102 flightModeData[G9X_MAX_FLIGHT_MODES];
int16_t subtrim[NUM_STICKS];
@@ -405,9 +405,9 @@ PACK(typedef struct t_Gruvin9xModelData_v106 {
Gruvin9xExpoData expoData[G9X_MAX_EXPOS];
int8_t curves5[G9X_MAX_CURVE5][5];
int8_t curves9[G9X_MAX_CURVE9][9];
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
Gruvin9xLogicalSwitchData logicalSw[G9X_NUM_CSW];
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
Gruvin9xFuncSwData funcSw[G9X_NUM_FSW];
Gruvin9xCustomFunctionData customFn[G9X_NUM_FSW];
Gruvin9xSwashRingData swashR;
Gruvin9xFlightModeData_v106 flightModeData[G9X_MAX_FLIGHT_MODES];
Gruvin9xFrSkyData frsky;
@@ -206,25 +206,25 @@ int Gruvin9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t vari
return 0;
}
int Gruvin9xInterface::getSize(ModelData &model)
int Gruvin9xInterface::getSize(const ModelData & model)
{
return 0;
}
int Gruvin9xInterface::getSize(GeneralSettings &settings)
int Gruvin9xInterface::getSize(const GeneralSettings & settings)
{
return 0;
}
int Gruvin9xInterface::isAvailable(Protocol proto, int port)
int Gruvin9xInterface::isAvailable(PulsesProtocol proto, int port)
{
switch (proto) {
case PPM:
case SILV_A:
case SILV_B:
case SILV_C:
case CTP1009:
case DSM2:
case PULSES_PPM:
case PULSES_SILV_A:
case PULSES_SILV_B:
case PULSES_SILV_C:
case PULSES_CTP1009:
case PULSES_DSM2:
return 1;
default:
return 0;
@@ -43,11 +43,11 @@ class Gruvin9xInterface : public EEPROMInterface
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(ModelData &);
virtual int getSize(const ModelData &);
virtual int getSize(GeneralSettings &settings);
virtual int getSize(const GeneralSettings & settings);
virtual int isAvailable(Protocol proto, int port=0);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
@@ -87,14 +87,14 @@ t_Open9xGruvin9xMixData_v207::operator MixData ()
c9x.mixWarn = mixWarn;
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
}
else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
}
else {
c9x.phases=63;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=63;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.sOffset = sOffset;
}
@@ -155,14 +155,14 @@ t_Open9xGruvin9xMixData_v209::operator MixData ()
c9x.mixWarn = mixWarn;
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
}
else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
}
else {
c9x.phases=63;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=63;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.sOffset = sOffset;
}
@@ -222,7 +222,7 @@ t_Open9xGruvin9xMixData_v211::operator MixData ()
c9x.noExpo = noExpo;
c9x.mltpx = (MltpxValue)mltpx;
c9x.mixWarn = mixWarn;
c9x.phases = phases;
c9x.flightModes = phases;
c9x.sOffset = sOffset;
}
return c9x;
@@ -339,9 +339,9 @@ Open9xGruvin9xLogicalSwitchData_v209::operator LogicalSwitchData ()
return c9x;
}
t_Open9xGruvin9xFuncSwData_v203::operator FuncSwData ()
t_Open9xGruvin9xCustomFunctionData_v203::operator CustomFunctionData ()
{
FuncSwData c9x;
CustomFunctionData c9x;
c9x.swtch = open9xStockToSwitch(swtch);
if (func < 16) {
c9x.func = (AssignFunc)(func);
@@ -378,9 +378,9 @@ t_Open9xGruvin9xFuncSwData_v203::operator FuncSwData ()
return c9x;
}
t_Open9xGruvin9xFuncSwData_v210::operator FuncSwData ()
t_Open9xGruvin9xCustomFunctionData_v210::operator CustomFunctionData ()
{
FuncSwData c9x;
CustomFunctionData c9x;
c9x.swtch = open9xStockToSwitch(swtch);
c9x.param = param;
if (func < 22) {
@@ -410,9 +410,9 @@ t_Open9xGruvin9xFuncSwData_v210::operator FuncSwData ()
t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData ()
{
SwashRingData c9x;
c9x.invertELE = invertELE;
c9x.invertAIL = invertAIL;
c9x.invertCOL = invertCOL;
c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type;
c9x.collectiveSource = open9xV4207ToSource(collectiveSource);
c9x.value = value;
@@ -422,9 +422,9 @@ t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData ()
t_Open9xGruvin9xSwashRingData_v209::operator SwashRingData ()
{
SwashRingData c9x;
c9x.invertELE = invertELE;
c9x.invertAIL = invertAIL;
c9x.invertCOL = invertCOL;
c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type;
c9x.collectiveSource = open9xV4209ToSource(collectiveSource);
c9x.value = value;
@@ -436,20 +436,20 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 2:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
case 3:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -460,7 +460,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<5; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -471,44 +471,37 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
}
}
}
for (int i=0; i<O9X_MAX_MIXERS; i++)
for (int i=0; i<32; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
for (int i=0; i<16; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_MAX_EXPOS; i++)
for (int i=0; i<14; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_209_MAX_CURVE5; i++) {
for (int i=0; i<8; i++) {
c9x.curves[i].count = 5;
for (int j = 0; j < 5; j++) {
c9x.curves[i].points[j].x = -100 + 50 * i;
c9x.curves[i].points[j].y = curves5[i][j];
}
}
for (int i=0; i<O9X_209_MAX_CURVE9; i++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].count = 9;
for (int i=0; i<8; i++) {
c9x.curves[8 + i].count = 9;
for (int j = 0; j < 9; j++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].x = -100 + 25 * i;
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].y = curves9[i][j];
c9x.curves[8 + i].points[j].x = -100 + 25 * i;
c9x.curves[8 + i].points[j].y = curves9[i][j];
}
}
for (int i=0; i<O9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<12; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<16; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
c9x.frsky.screens[1].body.lines[line].source[col] = (col==0 ? (frskyLines[line] & 0x0f) : ((frskyLines[line] & 0xf0) / 16));
c9x.frsky.screens[1].body.lines[line].source[col] += (((frskyLinesXtra >> (4*line+2*col)) & 0x03) * 16);
}
}
c9x.moduleData[0].modelId = modelId;
return c9x;
}
@@ -517,23 +510,23 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -545,7 +538,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<5; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -556,30 +549,30 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
}
}
}
for (int i=0; i<O9X_MAX_MIXERS; i++)
for (int i=0; i<32; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
for (int i=0; i<16; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_MAX_EXPOS; i++)
for (int i=0; i<14; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_209_MAX_CURVE5; i++) {
for (int i=0; i<8; i++) {
c9x.curves[i].count = 5;
for (int j = 0; j < 5; j++) {
c9x.curves[i].points[j].x = -100 + 50 * i;
c9x.curves[i].points[j].y = curves5[i][j];
}
}
for (int i=0; i<O9X_209_MAX_CURVE9; i++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].count = 9;
for (int i=0; i<8; i++) {
c9x.curves[8 + i].count = 9;
for (int j = 0; j < 9; j++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].x = -100 + 25 * i;
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].y = curves9[i][j];
c9x.curves[8 + i].points[j].x = -100 + 25 * i;
c9x.curves[8 + i].points[j].y = curves9[i][j];
}
}
for (int i=0; i<O9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<12; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<16; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.frsky.varioSource = varioSource;
@@ -587,17 +580,10 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
c9x.frsky.screens[1].body.lines[line].source[col] = (col==0 ? (frskyLines[line] & 0x0f) : ((frskyLines[line] & 0xf0) / 16));
c9x.frsky.screens[1].body.lines[line].source[col] += (((frskyLinesXtra >> (4*line+2*col)) & 0x03) * 16);
}
}
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
return c9x;
}
@@ -606,23 +592,23 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -634,7 +620,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<5; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -645,30 +631,30 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
}
}
}
for (int i=0; i<O9X_MAX_MIXERS; i++)
for (int i=0; i<32; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
for (int i=0; i<16; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_MAX_EXPOS; i++)
for (int i=0; i<14; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_209_MAX_CURVE5; i++) {
for (int i=0; i<8; i++) {
c9x.curves[i].count = 5;
for (int j = 0; j < 5; j++) {
c9x.curves[i].points[j].x = -100 + 50 * i;
c9x.curves[i].points[j].y = curves5[i][j];
}
}
for (int i=0; i<O9X_209_MAX_CURVE9; i++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].count = 9;
for (int i=0; i<8; i++) {
c9x.curves[8 + i].count = 9;
for (int j = 0; j < 9; j++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].x = -100 + 25 * i;
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].y = curves9[i][j];
c9x.curves[8 + i].points[j].x = -100 + 25 * i;
c9x.curves[8 + i].points[j].y = curves9[i][j];
}
}
for (int i=0; i<O9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<12; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<16; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.frsky.varioSource = varioSource;
@@ -677,17 +663,10 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
c9x.frsky.screens[1].body.lines[line].source[col] = (col==0 ? (frskyLines[line] & 0x0f) : ((frskyLines[line] & 0xf0) / 16));
c9x.frsky.screens[1].body.lines[line].source[col] += (((frskyLinesXtra >> (4*line+2*col)) & 0x03) * 16);
}
}
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
return c9x;
}
@@ -696,23 +675,23 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -724,7 +703,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<5; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -735,13 +714,13 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
}
}
}
for (int i=0; i<O9X_MAX_MIXERS; i++)
for (int i=0; i<32; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
for (int i=0; i<16; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_MAX_EXPOS; i++)
for (int i=0; i<14; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_MAX_CURVES; i++) {
for (int i=0; i<8; i++) {
CurveInfo crvinfo = curveinfo(this, i);
c9x.curves[i].type = (crvinfo.custom ? CurveData::CURVE_TYPE_CUSTOM : CurveData::CURVE_TYPE_STANDARD);
c9x.curves[i].count = crvinfo.points;
@@ -758,17 +737,17 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.curves[i].points[j].x = -100 + (200*i) / (crvinfo.points-1);
}
}
for (int i=0; i<O9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<12; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<16; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
@@ -780,26 +759,26 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++) {
for (int i=0; i<2; i++) {
c9x.timers[i] = timers[i];
c9x.timers[i].persistent = timersXtra[i].remanent;
c9x.timers[i].val = timersXtra[i].value;
}
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -811,7 +790,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<5; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -822,13 +801,13 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
}
}
}
for (int i=0; i<O9X_MAX_MIXERS; i++)
for (int i=0; i<32; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_NUM_CHNOUT; i++)
for (int i=0; i<16; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_MAX_EXPOS; i++)
for (int i=0; i<14; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_MAX_CURVES; i++) {
for (int i=0; i<8; i++) {
CurveInfo crvinfo = curveinfo(this, i);
c9x.curves[i].type = (crvinfo.custom ? CurveData::CURVE_TYPE_CUSTOM : CurveData::CURVE_TYPE_STANDARD);
c9x.curves[i].count = crvinfo.points;
@@ -845,15 +824,15 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.curves[i].points[j].x = -100 + (200*i) / (crvinfo.points-1);
}
}
for (int i=0; i<O9X_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<12; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<16; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
c9x.moduleData[0].modelId = modelId;
return c9x;
}
@@ -132,24 +132,24 @@ PACK(typedef struct t_Open9xGruvin9xLogicalSwitchData_v209 { // Custom Switches
RawSource toSource(int8_t value);
}) Open9xGruvin9xLogicalSwitchData_v209;
PACK(typedef struct t_Open9xGruvin9xFuncSwData_v203 { // Function Switches data
PACK(typedef struct t_Open9xGruvin9xCustomFunctionData_v203 { // Function Switches data
int8_t swtch; // input
uint8_t func;
uint8_t param;
operator FuncSwData();
t_Open9xGruvin9xFuncSwData_v203() { memset(this, 0, sizeof(t_Open9xGruvin9xFuncSwData_v203)); }
}) Open9xGruvin9xFuncSwData_v203;
operator CustomFunctionData();
t_Open9xGruvin9xCustomFunctionData_v203() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomFunctionData_v203)); }
}) Open9xGruvin9xCustomFunctionData_v203;
PACK(typedef struct t_Open9xGruvin9xFuncSwData_v210 { // Function Switches data
PACK(typedef struct t_Open9xGruvin9xCustomFunctionData_v210 { // Function Switches data
int8_t swtch; // input
uint8_t func:5;
uint8_t delay:3;
uint8_t param;
operator FuncSwData();
t_Open9xGruvin9xFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xGruvin9xFuncSwData_v210)); }
}) Open9xGruvin9xFuncSwData_v210;
operator CustomFunctionData();
t_Open9xGruvin9xCustomFunctionData_v210() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomFunctionData_v210)); }
}) Open9xGruvin9xCustomFunctionData_v210;
PACK(typedef struct t_Open9xGruvin9xSwashRingData_v208 { // Swash Ring data
uint8_t invertELE:1;
@@ -177,7 +177,7 @@ PACK(typedef struct t_Open9xGruvin9xSwashRingData_v209 { // Swash Ring data
PACK(typedef struct t_Open9xGruvin9xModelData_v207 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -189,15 +189,15 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xGruvin9xMixData_v207 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xGruvin9xMixData_v207 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xGruvin9xLogicalSwitchData_v207 logicalSw[12];
Open9xCustomFunctionData_v203 customFn[16];
Open9xGruvin9xSwashRingData_v208 swashR;
Open9xGruvin9xFlightModeData_v207 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xGruvin9xFlightModeData_v207 flightModeData[5];
Open9xFrSkyData_v205 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -211,7 +211,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 {
PACK(typedef struct t_Open9xGruvin9xModelData_v208 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -223,22 +223,22 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xGruvin9xMixData_v207 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW];
Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xGruvin9xMixData_v207 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xGruvin9xLogicalSwitchData_v207 logicalSw[12];
Open9xGruvin9xCustomFunctionData_v203 customFn[16];
Open9xGruvin9xSwashRingData_v208 swashR;
Open9xGruvin9xFlightModeData_v208 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
Open9xFrSkyData_v208 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -250,7 +250,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 {
PACK(typedef struct t_Open9xGruvin9xModelData_v209 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -262,22 +262,22 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xGruvin9xMixData_v209 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xGruvin9xMixData_v209 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xGruvin9xLogicalSwitchData_v209 logicalSw[12];
Open9xGruvin9xCustomFunctionData_v203 customFn[16];
Open9xGruvin9xSwashRingData_v209 swashR;
Open9xGruvin9xFlightModeData_v208 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
Open9xFrSkyData_v208 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -290,7 +290,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 {
PACK(typedef struct t_Open9xGruvin9xModelData_v210 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -302,21 +302,21 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xGruvin9xMixData_v209 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves[O9X_MAX_CURVES];
int8_t points[O9X_NUM_POINTS];
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
Open9xGruvin9xMixData_v209 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves[8];
int8_t points[112-8];
Open9xGruvin9xLogicalSwitchData_v209 logicalSw[12];
Open9xGruvin9xCustomFunctionData_v210 customFn[16];
Open9xGruvin9xSwashRingData_v209 swashR;
Open9xGruvin9xFlightModeData_v208 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
uint8_t switchWarningStates;
@@ -328,7 +328,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 {
PACK(typedef struct t_Open9xGruvin9xModelData_v211 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -340,15 +340,15 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 {
uint8_t spare1:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xGruvin9xMixData_v211 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v211 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v211 expoData[O9X_MAX_EXPOS];
int8_t curves[O9X_MAX_CURVES];
int8_t points[O9X_NUM_POINTS];
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
Open9xGruvin9xMixData_v211 mixData[32];
Open9xLimitData_v211 limitData[16];
Open9xExpoData_v211 expoData[14];
int8_t curves[8];
int8_t points[112-8];
Open9xGruvin9xLogicalSwitchData_v209 logicalSw[12];
Open9xGruvin9xCustomFunctionData_v210 customFn[16];
Open9xGruvin9xSwashRingData_v209 swashR;
Open9xGruvin9xFlightModeData_v208 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xGruvin9xFlightModeData_v208 flightModeData[5];
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -356,7 +356,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 {
uint8_t switchWarningStates;
Open9xFrSkyData_v210 frsky;
Open9xTimerDataExtra timersXtra[O9X_MAX_TIMERS];
Open9xTimerDataExtra timersXtra[2];
operator ModelData();
t_Open9xGruvin9xModelData_v211() { memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v211)); }
@@ -138,7 +138,6 @@ t_Open9xArmTimerData_v202::operator TimerData ()
*/
c9x.val = val;
c9x.persistent = false;
c9x.dir = (val == 0);
return c9x;
}
@@ -161,12 +160,12 @@ t_Open9xArmExpoData_v208::operator ExpoData ()
}
c9x.swtch = open9xArmToSwitch(swtch);
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
} else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
} else {
c9x.phases=63;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=63;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.weight = weight;
return c9x;
@@ -191,14 +190,14 @@ t_Open9xArmExpoData_v210::operator ExpoData ()
}
c9x.swtch = open9xArmToSwitch(swtch);
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
}
else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
}
else {
c9x.phases=63;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=63;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.weight = weight;
getEEPROMZString(c9x.name, name, sizeof(name));
@@ -214,7 +213,7 @@ t_Open9xArmExpoData_v212::operator ExpoData ()
// TODO c9x.curveMode=curveMode;
// c9x.curveParam=curveParam;
c9x.swtch = open9xArmToSwitch(swtch);
c9x.phases= phases;
c9x.flightModes= phases;
c9x.weight = weight;
getEEPROMZString(c9x.name, name, sizeof(name));
return c9x;
@@ -262,17 +261,17 @@ t_Open9xArmMixData_v208::operator MixData ()
else if (srcRaw == 9) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, 0);
}
else if (srcRaw <= 9+9+O9X_ARM_NUM_CSW) {
else if (srcRaw <= 9+9+32) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, srcRaw-9);
}
else if (srcRaw <= 9+9+O9X_ARM_NUM_CSW+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-10-9-O9X_ARM_NUM_CSW);
else if (srcRaw <= 9+9+32+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-10-9-32);
}
else if (srcRaw <= 9+9+O9X_ARM_NUM_CSW+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-10-9-O9X_ARM_NUM_CSW-NUM_CYC);
else if (srcRaw <= 9+9+32+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-10-9-32-NUM_CYC);
}
else {
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-10-9-O9X_ARM_NUM_CSW-NUM_CYC-8);
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-10-9-32-NUM_CYC-8);
}
c9x.weight = weight;
c9x.swtch = open9xArmToSwitch(swtch);
@@ -293,14 +292,14 @@ t_Open9xArmMixData_v208::operator MixData ()
c9x.mixWarn = mixWarn;
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
}
else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
}
else {
c9x.phases=511;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=511;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.sOffset = sOffset;
@@ -328,17 +327,17 @@ t_Open9xArmMixData_v209::operator MixData ()
else if (srcRaw == 13) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, 0);
}
else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW) {
else if (srcRaw <= 13+9+32) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, srcRaw-13);
}
else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-14-9-O9X_ARM_NUM_CSW);
else if (srcRaw <= 13+9+32+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-14-9-32);
}
else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC);
else if (srcRaw <= 13+9+32+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-14-9-32-NUM_CYC);
}
else {
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-8);
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-32-NUM_CYC-8);
}
c9x.weight = weight;
@@ -359,14 +358,14 @@ t_Open9xArmMixData_v209::operator MixData ()
c9x.mixWarn = mixWarn;
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
}
else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
}
else {
c9x.phases=511;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=511;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.sOffset = sOffset;
@@ -394,17 +393,17 @@ t_Open9xArmMixData_v210::operator MixData ()
else if (srcRaw == 13) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, 0);
}
else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW) {
else if (srcRaw <= 13+9+32) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, srcRaw-13);
}
else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-14-9-O9X_ARM_NUM_CSW);
else if (srcRaw <= 13+9+32+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-14-9-32);
}
else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC);
else if (srcRaw <= 13+9+32+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-14-9-32-NUM_CYC);
}
else {
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-8);
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-32-NUM_CYC-8);
}
c9x.weight = weight;
@@ -425,14 +424,14 @@ t_Open9xArmMixData_v210::operator MixData ()
c9x.mixWarn = mixWarn;
if (phase<0) {
c9x.phases= 1 << (-phase -1);
c9x.flightModes= 1 << (-phase -1);
}
else if (phase==0) {
c9x.phases=0;
c9x.flightModes=0;
}
else {
c9x.phases=511;
c9x.phases &= ~(1 << (phase -1));
c9x.flightModes=511;
c9x.flightModes &= ~(1 << (phase -1));
}
c9x.sOffset = sOffset;
@@ -464,17 +463,17 @@ t_Open9xArmMixData_v212::operator MixData ()
else if (srcRaw == 14) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, 0);
}
else if (srcRaw <= 14+9+O9X_ARM_NUM_CSW) {
else if (srcRaw <= 14+9+32) {
c9x.srcRaw = RawSource(SOURCE_TYPE_SWITCH, srcRaw-14);
}
else if (srcRaw <= 14+9+O9X_ARM_NUM_CSW+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-15-9-O9X_ARM_NUM_CSW);
else if (srcRaw <= 14+9+32+NUM_CYC) {
c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-15-9-32);
}
else if (srcRaw <= 14+9+O9X_ARM_NUM_CSW+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-15-9-O9X_ARM_NUM_CSW-NUM_CYC);
else if (srcRaw <= 14+9+32+NUM_CYC+8) {
c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-15-9-32-NUM_CYC);
}
else {
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-15-9-O9X_ARM_NUM_CSW-NUM_CYC-8);
c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-15-9-32-NUM_CYC-8);
}
c9x.weight = weight;
@@ -494,7 +493,7 @@ t_Open9xArmMixData_v212::operator MixData ()
c9x.noExpo = noExpo;
c9x.mltpx = (MltpxValue)mltpx;
c9x.mixWarn = mixWarn;
c9x.phases = phases;
c9x.flightModes = phases;
c9x.sOffset = sOffset;
getEEPROMZString(c9x.name, name, sizeof(name));
}
@@ -572,12 +571,12 @@ t_Open9xArmLogicalSwitchData_v210::operator LogicalSwitchData ()
return c9x;
}
t_Open9xArmFuncSwData_v208::operator FuncSwData ()
t_Open9xArmCustomFunctionData_v208::operator CustomFunctionData ()
{
FuncSwData c9x;
CustomFunctionData c9x;
c9x.swtch = open9xArmToSwitch(swtch);
c9x.func = (AssignFunc)(func);
if (c9x.func <= FuncSafetyCh32) {
if (c9x.func <= FuncOverrideCH32) {
c9x.enabled=param & 0x01;
c9x.param = (param>>1)<<1;
}
@@ -590,9 +589,9 @@ t_Open9xArmFuncSwData_v208::operator FuncSwData ()
return c9x;
}
t_Open9xArmFuncSwData_v210::operator FuncSwData ()
t_Open9xArmCustomFunctionData_v210::operator CustomFunctionData ()
{
FuncSwData c9x;
CustomFunctionData c9x;
c9x.swtch = open9xArmToSwitch(swtch);
c9x.func = (AssignFunc)(func);
uint32_t value = *((uint32_t *)param);
@@ -614,9 +613,9 @@ t_Open9xArmFuncSwData_v210::operator FuncSwData ()
return c9x;
}
t_Open9xArmFuncSwData_v211::operator FuncSwData ()
t_Open9xArmCustomFunctionData_v211::operator CustomFunctionData ()
{
FuncSwData c9x;
CustomFunctionData c9x;
c9x.swtch = open9xArmToSwitch(swtch);
c9x.func = (AssignFunc)(func);
uint32_t value = *((uint32_t *)param);
@@ -641,9 +640,9 @@ t_Open9xArmFuncSwData_v211::operator FuncSwData ()
t_Open9xArmSwashRingData_v208::operator SwashRingData ()
{
SwashRingData c9x;
c9x.invertELE = invertELE;
c9x.invertAIL = invertAIL;
c9x.invertCOL = invertCOL;
c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type;
c9x.collectiveSource = open9xArm208ToSource(collectiveSource);
c9x.value = value;
@@ -653,9 +652,9 @@ t_Open9xArmSwashRingData_v208::operator SwashRingData ()
t_Open9xArmSwashRingData_v209::operator SwashRingData ()
{
SwashRingData c9x;
c9x.invertELE = invertELE;
c9x.invertAIL = invertAIL;
c9x.invertCOL = invertCOL;
c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type;
c9x.collectiveSource = open9xArm209ToSource(collectiveSource);
c9x.value = value;
@@ -665,9 +664,9 @@ t_Open9xArmSwashRingData_v209::operator SwashRingData ()
t_Open9xArmSwashRingData_v210::operator SwashRingData ()
{
SwashRingData c9x;
c9x.invertELE = invertELE;
c9x.invertAIL = invertAIL;
c9x.invertCOL = invertCOL;
c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type;
c9x.collectiveSource = open9xArm210ToSource(collectiveSource);
c9x.value = value;
@@ -684,21 +683,8 @@ t_Open9xArmFrSkyData_v210::operator FrSkyData ()
c9x.blades = blades+2;
c9x.currentSource=currentSource;
c9x.screens[0].type = 1;
for (int i=0; i<4; i++) {
c9x.screens[0].body.bars[i].source = bars[i].source;
c9x.screens[0].body.bars[i].barMin = bars[i].barMin;
c9x.screens[0].body.bars[i].barMax = bars[i].barMax;
}
c9x.rssiAlarms[0] = rssiAlarms[0].get(0);
c9x.rssiAlarms[1] = rssiAlarms[1].get(1);
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
int i=line*2+col;
c9x.screens[1].body.lines[line].source[col] = lines[i];
}
}
return c9x;
}
@@ -712,21 +698,8 @@ t_Open9xArmFrSkyData_v211::operator FrSkyData ()
c9x.blades = blades+2;
c9x.currentSource=currentSource;
c9x.screens[0].type = 1;
for (int i=0; i<4; i++) {
c9x.screens[0].body.bars[i].source = bars[i].source;
c9x.screens[0].body.bars[i].barMin = bars[i].barMin;
c9x.screens[0].body.bars[i].barMax = bars[i].barMax;
}
c9x.rssiAlarms[0] = rssiAlarms[0].get(0);
c9x.rssiAlarms[1] = rssiAlarms[1].get(1);
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
int i=line*2+col;
c9x.screens[1].body.lines[line].source[col] = lines[i];
}
}
c9x.varioSource = varioSource;
c9x.varioCenterMax = varioSpeedUpMin;
c9x.varioCenterMin = varioSpeedDownMin;
@@ -739,23 +712,23 @@ t_Open9xArmModelData_v208::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -767,7 +740,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<9; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -778,30 +751,30 @@ t_Open9xArmModelData_v208::operator ModelData ()
}
}
}
for (int i=0; i<O9X_ARM_MAX_MIXERS; i++)
for (int i=0; i<64; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_ARM_NUM_CHNOUT; i++)
for (int i=0; i<32; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_ARM_MAX_EXPOS; i++)
for (int i=0; i<32; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_209_MAX_CURVE5; i++) {
for (int i=0; i<8; i++) {
c9x.curves[i].count = 5;
for (int j = 0; j < 5; j++) {
c9x.curves[i].points[j].x = -100 + 50 * i;
c9x.curves[i].points[j].y = curves5[i][j];
}
}
for (int i=0; i<O9X_209_MAX_CURVE9; i++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].count = 9;
for (int i=0; i<8; i++) {
c9x.curves[8 + i].count = 9;
for (int j = 0; j < 9; j++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].x = -100 + 25 * i;
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].y = curves9[i][j];
c9x.curves[8 + i].points[j].x = -100 + 25 * i;
c9x.curves[8 + i].points[j].y = curves9[i][j];
}
}
for (int i=0; i<O9X_ARM_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_ARM_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<32; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<32; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.frsky.varioSource = varioSource;
@@ -809,14 +782,8 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
c9x.frsky.screens[1].body.lines[line].source[col] = (col==0 ? (frskyLines[line] & 0x0f) : ((frskyLines[line] & 0xf0) / 16));
c9x.frsky.screens[1].body.lines[line].source[col] += (((frskyLinesXtra >> (4*line+2*col)) & 0x03) * 16);
}
}
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
@@ -828,23 +795,23 @@ t_Open9xArmModelData_v209::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -856,7 +823,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<9; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -867,30 +834,30 @@ t_Open9xArmModelData_v209::operator ModelData ()
}
}
}
for (int i=0; i<O9X_ARM_MAX_MIXERS; i++)
for (int i=0; i<64; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_ARM_NUM_CHNOUT; i++)
for (int i=0; i<32; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_ARM_MAX_EXPOS; i++)
for (int i=0; i<32; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_209_MAX_CURVE5; i++) {
for (int i=0; i<8; i++) {
c9x.curves[i].count = 5;
for (int j = 0; j < 5; j++) {
c9x.curves[i].points[j].x = -100 + 50 * i;
c9x.curves[i].points[j].y = curves5[i][j];
}
}
for (int i=0; i<O9X_209_MAX_CURVE9; i++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].count = 9;
for (int i=0; i<8; i++) {
c9x.curves[8 + i].count = 9;
for (int j = 0; j < 9; j++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].x = -100 + 25 * i;
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].y = curves9[i][j];
c9x.curves[8 + i].points[j].x = -100 + 25 * i;
c9x.curves[8 + i].points[j].y = curves9[i][j];
}
}
for (int i=0; i<O9X_ARM_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_ARM_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<32; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<32; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.frsky.varioSource = varioSource;
@@ -899,14 +866,8 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int line=0; line<4; line++) {
for (int col=0; col<2; col++) {
c9x.frsky.screens[1].body.lines[line].source[col] = (col==0 ? (frskyLines[line] & 0x0f) : ((frskyLines[line] & 0xf0) / 16));
c9x.frsky.screens[1].body.lines[line].source[col] += (((frskyLinesXtra >> (4*line+2*col)) & 0x03) * 16);
}
}
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
@@ -918,23 +879,23 @@ t_Open9xArmModelData_v210::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -946,7 +907,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<9; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -957,30 +918,30 @@ t_Open9xArmModelData_v210::operator ModelData ()
}
}
}
for (int i=0; i<O9X_ARM_MAX_MIXERS; i++)
for (int i=0; i<64; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_ARM_NUM_CHNOUT; i++)
for (int i=0; i<32; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_ARM_MAX_EXPOS; i++)
for (int i=0; i<32; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_209_MAX_CURVE5; i++) {
for (int i=0; i<8; i++) {
c9x.curves[i].count = 5;
for (int j = 0; j < 5; j++) {
c9x.curves[i].points[j].x = -100 + 50 * i;
c9x.curves[i].points[j].y = curves5[i][j];
}
}
for (int i=0; i<O9X_209_MAX_CURVE9; i++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].count = 9;
for (int i=0; i<8; i++) {
c9x.curves[8 + i].count = 9;
for (int j = 0; j < 9; j++) {
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].x = -100 + 25 * i;
c9x.curves[O9X_209_MAX_CURVE5 + i].points[j].y = curves9[i][j];
c9x.curves[8 + i].points[j].x = -100 + 25 * i;
c9x.curves[8 + i].points[j].y = curves9[i][j];
}
}
for (int i=0; i<O9X_ARM_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_ARM_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<32; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<32; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.frsky.varioSource = varioSource;
@@ -989,8 +950,8 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
@@ -1002,23 +963,23 @@ t_Open9xArmModelData_v211::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++)
for (int i=0; i<2; i++)
c9x.timers[i] = timers[i];
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -1030,7 +991,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<9; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -1041,13 +1002,13 @@ t_Open9xArmModelData_v211::operator ModelData ()
}
}
}
for (int i=0; i<O9X_ARM_MAX_MIXERS; i++)
for (int i=0; i<64; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_ARM_NUM_CHNOUT; i++)
for (int i=0; i<32; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_ARM_MAX_EXPOS; i++)
for (int i=0; i<32; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_ARM_MAX_CURVES; i++) {
for (int i=0; i<16; i++) {
CurveInfo crvinfo = curveinfo(this, i);
c9x.curves[i].type = (crvinfo.custom ? CurveData::CURVE_TYPE_CUSTOM : CurveData::CURVE_TYPE_STANDARD);
c9x.curves[i].count = crvinfo.points;
@@ -1064,17 +1025,17 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.curves[i].points[j].x = -100 + (200*i) / (crvinfo.points-1);
}
}
for (int i=0; i<O9X_ARM_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_ARM_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<32; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<32; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
for (int i=0; i<O9X_NUM_CHNOUT; i++) {
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
c9x.limitData[i].ppmCenter = servoCenter[i];
}
@@ -1086,26 +1047,26 @@ t_Open9xArmModelData_v212::operator ModelData ()
ModelData c9x;
c9x.used = true;
getEEPROMZString(c9x.name, name, sizeof(name));
for (int i=0; i<O9X_MAX_TIMERS; i++) {
for (int i=0; i<2; i++) {
c9x.timers[i] = timers[i];
c9x.timers[i].persistent = timersXtra[i].remanent;
c9x.timers[i].val = timersXtra[i].value;
}
switch(protocol) {
case 1:
c9x.moduleData[0].protocol = PPM16;
c9x.moduleData[0].protocol = PULSES_PPM16;
break;
case 2:
c9x.moduleData[0].protocol = PPMSIM;
c9x.moduleData[0].protocol = PULSES_PPMSIM;
break;
case 3:
c9x.moduleData[0].protocol = PXX_DJT;
c9x.moduleData[0].protocol = PULSES_PXX_DJT;
break;
case 4:
c9x.moduleData[0].protocol = DSM2;
c9x.moduleData[0].protocol = PULSES_DSM2;
break;
default:
c9x.moduleData[0].protocol = PPM;
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
@@ -1117,7 +1078,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
for (int i=0; i<9; i++) {
c9x.flightModeData[i] = flightModeData[i];
for (int j=0; j<NUM_STICKS; j++) {
if (c9x.flightModeData[i].trim[j] > 500) {
@@ -1128,13 +1089,13 @@ t_Open9xArmModelData_v212::operator ModelData ()
}
}
}
for (int i=0; i<O9X_ARM_MAX_MIXERS; i++)
for (int i=0; i<64; i++)
c9x.mixData[i] = mixData[i];
for (int i=0; i<O9X_ARM_NUM_CHNOUT; i++)
for (int i=0; i<32; i++)
c9x.limitData[i] = limitData[i];
for (int i=0; i<O9X_ARM_MAX_EXPOS; i++)
for (int i=0; i<32; i++)
c9x.expoData[i] = expoData[i];
for (int i=0; i<O9X_ARM_MAX_CURVES; i++) {
for (int i=0; i<16; i++) {
CurveInfo crvinfo = curveinfo(this, i);
c9x.curves[i].type = (crvinfo.custom ? CurveData::CURVE_TYPE_CUSTOM : CurveData::CURVE_TYPE_STANDARD);
c9x.curves[i].count = crvinfo.points;
@@ -1151,15 +1112,15 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.curves[i].points[j].x = -100 + (200*i) / (crvinfo.points-1);
}
}
for (int i=0; i<O9X_ARM_NUM_CSW; i++)
c9x.customSw[i] = customSw[i];
for (int i=0; i<O9X_ARM_NUM_FSW; i++)
c9x.funcSw[i] = funcSw[i];
for (int i=0; i<32; i++)
c9x.logicalSw[i] = logicalSw[i];
for (int i=0; i<32; i++)
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.modelId = modelId;
c9x.moduleData[0].modelId = modelId;
return c9x;
}
@@ -19,17 +19,6 @@
#include "open9xStockeeprom.h"
#define O9X_ARM_MAX_FLIGHT_MODES 9
#define O9X_ARM_MAX_MIXERS 64
#define O9X_ARM_MAX_EXPOS 32
#define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16
#define O9X_ARM_NUM_CSW 32 // number of custom switches
#define O9X_ARM_NUM_FSW 32 // number of functions assigned to switches
#define O9X_ARM_MAX_CURVES 16
#define O9X_ARM_NUM_POINTS 512
#define O9X_ARM_MAX_CSFUNCOLD 13
#define O9X_ARM_MAX_CSFUNC 15
PACK(typedef struct t_Open9xArmTimerData_v202 {
int8_t mode; // timer trigger source -> off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw
uint16_t val;
@@ -219,34 +208,34 @@ PACK(typedef struct t_Open9xArmLogicalSwitchData_v210 { // Custom Switches data
t_Open9xArmLogicalSwitchData_v210() { memset(this, 0, sizeof(t_Open9xArmLogicalSwitchData_v210)); }
}) Open9xArmLogicalSwitchData_v210;
PACK(typedef struct t_Open9xArmFuncSwData_v208 { // Function Switches data
PACK(typedef struct t_Open9xArmCustomFunctionData_v208 { // Function Switches data
int8_t swtch; // input
uint8_t func;
uint8_t param;
operator FuncSwData();
t_Open9xArmFuncSwData_v208() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v208)); }
}) Open9xArmFuncSwData_v208;
operator CustomFunctionData();
t_Open9xArmCustomFunctionData_v208() { memset(this, 0, sizeof(t_Open9xArmCustomFunctionData_v208)); }
}) Open9xArmCustomFunctionData_v208;
PACK(typedef struct t_Open9xArmFuncSwData_v210 { // Function Switches data
PACK(typedef struct t_Open9xArmCustomFunctionData_v210 { // Function Switches data
int8_t swtch; // input
uint8_t func;
char param[6];
operator FuncSwData();
t_Open9xArmFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v210)); }
}) Open9xArmFuncSwData_v210;
operator CustomFunctionData();
t_Open9xArmCustomFunctionData_v210() { memset(this, 0, sizeof(t_Open9xArmCustomFunctionData_v210)); }
}) Open9xArmCustomFunctionData_v210;
PACK(typedef struct t_Open9xArmFuncSwData_v211 { // Function Switches data
PACK(typedef struct t_Open9xArmCustomFunctionData_v211 { // Function Switches data
int8_t swtch; // input
uint8_t func;
char param[6];
uint8_t delay;
uint8_t spare;
operator FuncSwData();
t_Open9xArmFuncSwData_v211() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v211)); }
}) Open9xArmFuncSwData_v211;
operator CustomFunctionData();
t_Open9xArmCustomFunctionData_v211() { memset(this, 0, sizeof(t_Open9xArmCustomFunctionData_v211)); }
}) Open9xArmCustomFunctionData_v211;
PACK(typedef struct t_Open9xArmSwashRingData_v208 { // Swash Ring data
uint8_t invertELE:1;
@@ -326,7 +315,7 @@ PACK(typedef struct t_Open9xArmFrSkyData_v211 {
PACK(typedef struct t_Open9xArmModelData_v208 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xArmTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xArmTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -338,22 +327,22 @@ PACK(typedef struct t_Open9xArmModelData_v208 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xArmMixData_v208 mixData[O9X_ARM_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_ARM_NUM_CHNOUT];
Open9xArmExpoData_v208 expoData[O9X_ARM_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xArmLogicalSwitchData_v208 customSw[O9X_ARM_NUM_CSW];
Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW];
Open9xArmMixData_v208 mixData[64];
Open9xLimitData_v201 limitData[32];
Open9xArmExpoData_v208 expoData[32];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xArmLogicalSwitchData_v208 logicalSw[32];
Open9xArmCustomFunctionData_v208 customFn[32];
Open9xArmSwashRingData_v208 swashR;
Open9xArmFlightModeData_v208 flightModeData[O9X_ARM_MAX_FLIGHT_MODES];
Open9xArmFlightModeData_v208 flightModeData[9];
Open9xFrSkyData_v208 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_ARM_NUM_CHNOUT];
int8_t servoCenter[32];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -365,7 +354,7 @@ PACK(typedef struct t_Open9xArmModelData_v208 {
PACK(typedef struct t_Open9xArmModelData_v209 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xArmTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xArmTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -377,22 +366,22 @@ PACK(typedef struct t_Open9xArmModelData_v209 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xArmMixData_v209 mixData[O9X_ARM_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_ARM_NUM_CHNOUT];
Open9xArmExpoData_v208 expoData[O9X_ARM_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xArmLogicalSwitchData_v209 customSw[O9X_ARM_NUM_CSW];
Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW];
Open9xArmMixData_v209 mixData[64];
Open9xLimitData_v201 limitData[32];
Open9xArmExpoData_v208 expoData[32];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xArmLogicalSwitchData_v209 logicalSw[32];
Open9xArmCustomFunctionData_v208 customFn[32];
Open9xArmSwashRingData_v209 swashR;
Open9xArmFlightModeData_v208 flightModeData[O9X_ARM_MAX_FLIGHT_MODES];
Open9xArmFlightModeData_v208 flightModeData[9];
Open9xFrSkyData_v208 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_ARM_NUM_CHNOUT];
int8_t servoCenter[32];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -405,7 +394,7 @@ PACK(typedef struct t_Open9xArmModelData_v209 {
PACK(typedef struct t_Open9xArmModelData_v210 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xArmTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xArmTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -417,20 +406,20 @@ PACK(typedef struct t_Open9xArmModelData_v210 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xArmMixData_v210 mixData[O9X_ARM_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_ARM_NUM_CHNOUT];
Open9xArmExpoData_v210 expoData[O9X_ARM_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
Open9xArmFuncSwData_v210 funcSw[O9X_ARM_NUM_FSW];
Open9xArmMixData_v210 mixData[64];
Open9xLimitData_v201 limitData[32];
Open9xArmExpoData_v210 expoData[32];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xArmLogicalSwitchData_v210 logicalSw[32];
Open9xArmCustomFunctionData_v210 customFn[32];
Open9xArmSwashRingData_v209 swashR;
Open9xArmFlightModeData_v208 flightModeData[O9X_ARM_MAX_FLIGHT_MODES];
Open9xArmFlightModeData_v208 flightModeData[9];
Open9xArmFrSkyData_v210 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
int8_t servoCenter[O9X_ARM_NUM_CHNOUT];
int8_t servoCenter[32];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -444,7 +433,7 @@ PACK(typedef struct t_Open9xArmModelData_v210 {
PACK(typedef struct t_Open9xArmModelData_v211 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xArmTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xArmTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -456,21 +445,21 @@ PACK(typedef struct t_Open9xArmModelData_v211 {
uint8_t spare2:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xArmMixData_v210 mixData[O9X_ARM_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_ARM_NUM_CHNOUT];
Open9xArmExpoData_v210 expoData[O9X_ARM_MAX_EXPOS];
int16_t curves[O9X_ARM_MAX_CURVES];
int8_t points[O9X_ARM_NUM_POINTS];
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW];
Open9xArmMixData_v210 mixData[64];
Open9xLimitData_v201 limitData[32];
Open9xArmExpoData_v210 expoData[32];
int16_t curves[16];
int8_t points[512];
Open9xArmLogicalSwitchData_v210 logicalSw[32];
Open9xArmCustomFunctionData_v211 customFn[32];
Open9xArmSwashRingData_v209 swashR;
Open9xArmFlightModeData_v208 flightModeData[O9X_ARM_MAX_FLIGHT_MODES];
Open9xArmFlightModeData_v208 flightModeData[9];
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
int8_t servoCenter[O9X_ARM_NUM_CHNOUT];
int8_t servoCenter[32];
uint8_t switchWarningStates;
@@ -482,7 +471,7 @@ PACK(typedef struct t_Open9xArmModelData_v211 {
PACK(typedef struct t_Open9xArmModelData_v212 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xArmTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xArmTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -494,15 +483,15 @@ PACK(typedef struct t_Open9xArmModelData_v212 {
uint8_t spare1:1;
int8_t ppmDelay;
uint16_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xArmMixData_v212 mixData[O9X_ARM_MAX_MIXERS];
Open9xLimitData_v211 limitData[O9X_ARM_NUM_CHNOUT];
Open9xArmExpoData_v212 expoData[O9X_ARM_MAX_EXPOS];
int16_t curves[O9X_ARM_MAX_CURVES];
int8_t points[O9X_ARM_NUM_POINTS];
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW];
Open9xArmMixData_v212 mixData[64];
Open9xLimitData_v211 limitData[32];
Open9xArmExpoData_v212 expoData[32];
int16_t curves[16];
int8_t points[512];
Open9xArmLogicalSwitchData_v210 logicalSw[32];
Open9xArmCustomFunctionData_v211 customFn[32];
Open9xArmSwashRingData_v210 swashR;
Open9xArmFlightModeData_v212 flightModeData[O9X_ARM_MAX_FLIGHT_MODES];
Open9xArmFlightModeData_v212 flightModeData[9];
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -510,7 +499,7 @@ PACK(typedef struct t_Open9xArmModelData_v212 {
uint8_t switchWarningStates;
Open9xArmFrSkyData_v211 frsky;
Open9xTimerDataExtra timersXtra[O9X_MAX_TIMERS];
Open9xTimerDataExtra timersXtra[2];
operator ModelData();
t_Open9xArmModelData_v212() { memset(this, 0, sizeof(t_Open9xArmModelData_v212)); }
File diff suppressed because it is too large Load Diff
@@ -247,32 +247,32 @@ PACK(typedef struct t_Open9xSafetySwData { // Safety Switches data
t_Open9xSafetySwData() { memset(this, 0, sizeof(t_Open9xSafetySwData)); }
}) Open9xSafetySwData;
PACK(typedef struct t_Open9xFuncSwData_v201 { // Function Switches data
PACK(typedef struct t_Open9xCustomFunctionData_v201 { // Function Switches data
int8_t swtch; // input
uint8_t func;
operator FuncSwData();
t_Open9xFuncSwData_v201() { memset(this, 0, sizeof(t_Open9xFuncSwData_v201)); }
}) Open9xFuncSwData_v201;
operator CustomFunctionData();
t_Open9xCustomFunctionData_v201() { memset(this, 0, sizeof(t_Open9xCustomFunctionData_v201)); }
}) Open9xCustomFunctionData_v201;
PACK(typedef struct t_Open9xFuncSwData_v203 { // Function Switches data
PACK(typedef struct t_Open9xCustomFunctionData_v203 { // Function Switches data
int8_t swtch; // input
uint8_t func;
uint8_t param;
operator FuncSwData();
t_Open9xFuncSwData_v203() { memset(this, 0, sizeof(t_Open9xFuncSwData_v203)); }
}) Open9xFuncSwData_v203;
operator CustomFunctionData();
t_Open9xCustomFunctionData_v203() { memset(this, 0, sizeof(t_Open9xCustomFunctionData_v203)); }
}) Open9xCustomFunctionData_v203;
PACK(typedef struct t_Open9xFuncSwData_v210 { // Function Switches data
PACK(typedef struct t_Open9xCustomFunctionData_v210 { // Function Switches data
int8_t swtch; // input
uint8_t func:5;
uint8_t delay:3;
uint8_t param;
operator FuncSwData();
t_Open9xFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xFuncSwData_v210)); }
}) Open9xFuncSwData_v210;
operator CustomFunctionData();
t_Open9xCustomFunctionData_v210() { memset(this, 0, sizeof(t_Open9xCustomFunctionData_v210)); }
}) Open9xCustomFunctionData_v210;
PACK(typedef struct t_Open9xFrSkyChannelData_v201 {
uint8_t ratio; // 0.0 means not used, 0.1V steps EG. 6.6 Volts = 66. 25.1V = 251, etc.
@@ -481,20 +481,6 @@ PACK(typedef struct t_Open9xTimerDataExtra {
t_Open9xTimerDataExtra() { memset(this, 0, sizeof(t_Open9xTimerDataExtra)); }
}) Open9xTimerDataExtra;
#define O9X_MAX_TIMERS 2
#define O9X_MAX_FLIGHT_MODES 5
#define O9X_MAX_MIXERS 32
#define O9X_MAX_EXPOS 14
#define O9X_NUM_CHNOUT 16 // number of real output channels CH1-CH16
#define O9X_NUM_CSW 12 // number of custom switches
#define O9X_NUM_FSW 16 // number of functions assigned to switches
#define O9X_MAX_CURVES 8
#define O9X_NUM_POINTS (112-O9X_MAX_CURVES)
#define O9X_MAX_GVARS 5
#define O9X_209_MAX_CURVE5 8
#define O9X_209_MAX_CURVE9 8
PACK(typedef struct t_Open9xModelData_v201 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v201 timer1;
@@ -511,16 +497,16 @@ PACK(typedef struct t_Open9xModelData_v201 {
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xTimerData_v201 timer2;
Open9xMixData_v201 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
Open9xSafetySwData safetySw[O9X_NUM_CHNOUT];
Open9xFuncSwData_v201 funcSw[12];
Open9xMixData_v201 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v208 logicalSw[12];
Open9xSafetySwData safetySw[16];
Open9xCustomFunctionData_v201 customFn[12];
Open9xSwashRingData_v208 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v201 frsky;
operator ModelData();
@@ -542,16 +528,16 @@ PACK(typedef struct t_Open9xModelData_v202 {
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xTimerData_v202 timer2;
Open9xMixData_v201 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
Open9xSafetySwData safetySw[O9X_NUM_CHNOUT];
Open9xFuncSwData_v201 funcSw[12];
Open9xMixData_v201 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v208 logicalSw[12];
Open9xSafetySwData safetySw[16];
Open9xCustomFunctionData_v201 customFn[12];
Open9xSwashRingData_v208 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v202 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -576,15 +562,15 @@ PACK(typedef struct t_Open9xModelData_v203 {
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xTimerData_v202 timer2;
Open9xMixData_v203 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xMixData_v203 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v208 logicalSw[12];
Open9xCustomFunctionData_v203 customFn[16];
Open9xSwashRingData_v208 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v202 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -609,15 +595,15 @@ PACK(typedef struct t_Open9xModelData_v204 {
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xTimerData_v202 timer2;
Open9xMixData_v203 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xMixData_v203 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v208 logicalSw[12];
Open9xCustomFunctionData_v203 customFn[16];
Open9xSwashRingData_v208 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v204 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -630,7 +616,7 @@ PACK(typedef struct t_Open9xModelData_v204 {
PACK(typedef struct t_Open9xModelData_v205 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -642,22 +628,22 @@ PACK(typedef struct t_Open9xModelData_v205 {
uint8_t spare2:1;
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xMixData_v205 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xMixData_v205 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v208 logicalSw[12];
Open9xCustomFunctionData_v203 customFn[16];
Open9xSwashRingData_v208 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v205 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
operator ModelData();
t_Open9xModelData_v205() { memset(this, 0, sizeof(t_Open9xModelData_v205)); }
@@ -665,7 +651,7 @@ PACK(typedef struct t_Open9xModelData_v205 {
PACK(typedef struct t_Open9xModelData_v208 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -677,22 +663,22 @@ PACK(typedef struct t_Open9xModelData_v208 {
uint8_t spare2:1;
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xMixData_v205 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xMixData_v205 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v208 logicalSw[12];
Open9xCustomFunctionData_v203 customFn[16];
Open9xSwashRingData_v208 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v208 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -704,7 +690,7 @@ PACK(typedef struct t_Open9xModelData_v208 {
PACK(typedef struct t_Open9xModelData_v209 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -716,22 +702,22 @@ PACK(typedef struct t_Open9xModelData_v209 {
uint8_t spare2:1;
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xMixData_v209 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves5[O9X_209_MAX_CURVE5][5];
int8_t curves9[O9X_209_MAX_CURVE9][9];
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
Open9xMixData_v209 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves5[8][5];
int8_t curves9[8][9];
Open9xLogicalSwitchData_v209 logicalSw[12];
Open9xCustomFunctionData_v203 customFn[16];
Open9xSwashRingData_v209 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
Open9xFrSkyData_v208 frsky;
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
uint8_t frskyLines[4];
uint16_t frskyLinesXtra;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
uint8_t varioSource:3;
uint8_t varioSpeedUpMin:5; // if increment in 0.2m/s = 3.0m/s max
@@ -744,7 +730,7 @@ PACK(typedef struct t_Open9xModelData_v209 {
PACK(typedef struct t_Open9xModelData_v210 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -756,21 +742,21 @@ PACK(typedef struct t_Open9xModelData_v210 {
uint8_t spare2:1;
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xMixData_v209 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v201 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v201 expoData[O9X_MAX_EXPOS];
int8_t curves[O9X_MAX_CURVES];
int8_t points[O9X_NUM_POINTS];
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
Open9xMixData_v209 mixData[32];
Open9xLimitData_v201 limitData[16];
Open9xExpoData_v201 expoData[14];
int8_t curves[8];
int8_t points[112-8];
Open9xLogicalSwitchData_v209 logicalSw[12];
Open9xCustomFunctionData_v210 customFn[16];
Open9xSwashRingData_v209 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
uint8_t modelId;
int8_t servoCenter[O9X_NUM_CHNOUT];
int8_t servoCenter[16];
uint8_t switchWarningStates;
@@ -782,7 +768,7 @@ PACK(typedef struct t_Open9xModelData_v210 {
PACK(typedef struct t_Open9xModelData_v211 {
char name[10]; // 10 must be first for eeLoadModelName
Open9xTimerData_v202 timers[O9X_MAX_TIMERS];
Open9xTimerData_v202 timers[2];
uint8_t protocol:3;
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
@@ -794,15 +780,15 @@ PACK(typedef struct t_Open9xModelData_v211 {
uint8_t spare1:1;
int8_t ppmDelay;
uint8_t beepANACenter; // 1<<0->A1.. 1<<6->A7
Open9xMixData_v211 mixData[O9X_MAX_MIXERS];
Open9xLimitData_v211 limitData[O9X_NUM_CHNOUT];
Open9xExpoData_v211 expoData[O9X_MAX_EXPOS];
int8_t curves[O9X_MAX_CURVES];
int8_t points[O9X_NUM_POINTS];
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
Open9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
Open9xMixData_v211 mixData[32];
Open9xLimitData_v211 limitData[16];
Open9xExpoData_v211 expoData[14];
int8_t curves[8];
int8_t points[112-8];
Open9xLogicalSwitchData_v209 logicalSw[12];
Open9xCustomFunctionData_v210 customFn[16];
Open9xSwashRingData_v209 swashR;
Open9xFlightModeData_v201 flightModeData[O9X_MAX_FLIGHT_MODES];
Open9xFlightModeData_v201 flightModeData[5];
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
uint8_t thrTraceSrc;
@@ -1,223 +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 "opentxGruvin9xsimulator.h"
#include "opentxinterface.h"
#include "opentxeeprom.h"
#define SIMU
#define SIMU_EXCEPTIONS
#define PCBGRUVIN9X
#define CPUM2560
#define ROTARY_ENCODERS 2
#define HELI
#define TEMPLATES
#define SPLASH
#define FLIGHT_MODES
#define FRSKY
#define FRSKY_HUB
#define WS_HOW_HIGH
#define VARIO
#define PPM_UNIT_PERCENT_PREC1
#define BUZZER
#define AUDIO
#define HAPTIC
#define AUTOSWITCH
#define GRAPHICS
#define CURVES
#define XCURVES
#define GVARS
#define BOLD_FONT
#define VOICE
#define PPM_CENTER_ADJUSTABLE
#define PPM_LIMITS_SYMETRICAL
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define SAFETY_CHANNEL_FUNCTION
#define EEPROM_VARIANT 3
#undef min
#undef max
#include <exception>
namespace Open9xGruvin9x {
#include "radio/src/targets/gruvin9x/board_gruvin9x.cpp"
#include "radio/src/targets/common_avr/telemetry_driver.cpp"
#include "radio/src/eeprom_common.cpp"
#include "radio/src/eeprom_rlc.cpp"
#include "radio/src/opentx.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/curves.cpp"
#include "radio/src/mixer.cpp"
#include "radio/src/pulses/pulses_avr.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"
#include "radio/src/vario.cpp"
#include "radio/src/gui/menus.cpp"
#include "radio/src/gui/menu_model.cpp"
#include "radio/src/gui/menu_general.cpp"
#include "radio/src/gui/view_main.cpp"
#include "radio/src/gui/view_statistics.cpp"
#include "radio/src/gui/view_telemetry.cpp"
#include "radio/src/lcd_common.cpp"
#include "radio/src/lcd_default.cpp"
#include "radio/src/keys.cpp"
#include "radio/src/targets/simu/simpgmspace.cpp"
#include "radio/src/templates.cpp"
#include "radio/src/translations.cpp"
#include "radio/src/fonts.cpp"
#include "radio/src/audio_avr.cpp"
#include "radio/src/buzzer.cpp"
#include "radio/src/targets/gruvin9x/somo14d.cpp"
#include "radio/src/telemetry/frsky.cpp"
#include "radio/src/telemetry/frsky_d.cpp"
#include "radio/src/translations/tts_en.cpp"
#include "radio/src/haptic.cpp"
int16_t g_anas[NUM_STICKS+BOARD_9X_NUM_POTS];
uint16_t anaIn(uint8_t chan)
{
if (chan == 7)
return 150;
else
return g_anas[chan];
}
bool hasExtendedTrims()
{
return g_model.extendedTrims;
}
uint8_t getStickMode()
{
return limit<uint8_t>(0, g_eeGeneral.stickMode, 3);
}
}
using namespace Open9xGruvin9x;
Open9xGruvin9xSimulator::Open9xGruvin9xSimulator()
{
}
bool Open9xGruvin9xSimulator::timer10ms()
{
#define TIMER10MS_IMPORT
#include "simulatorimport.h"
}
uint8_t * Open9xGruvin9xSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool Open9xGruvin9xSimulator::lcdChanged(bool & lightEnable)
{
#define LCDCHANGED_IMPORT
#include "simulatorimport.h"
}
void Open9xGruvin9xSimulator::start(QByteArray & eeprom, bool tests)
{
g_rotenc[0] = 0;
g_rotenc[1] = 0;
memcpy(Open9xGruvin9x::eeprom, eeprom.data(), std::min<int>(sizeof(Open9xGruvin9x::eeprom), eeprom.size()));
StartEepromThread(NULL);
StartMainThread(tests);
}
void Open9xGruvin9xSimulator::start(const char * filename, bool tests)
{
g_rotenc[0] = 0;
g_rotenc[1] = 0;
StartEepromThread(filename);
StartMainThread(tests);
}
void Open9xGruvin9xSimulator::stop()
{
StopMainThread();
StopEepromThread();
}
void Open9xGruvin9xSimulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT
#define g_chans512 channelOutputs
#include "simulatorimport.h"
outputs.beep = g_beepCnt;
g_beepCnt = 0;
}
void Open9xGruvin9xSimulator::setValues(TxInputs &inputs)
{
#define SETVALUES_IMPORT
#include "simulatorimport.h"
}
void Open9xGruvin9xSimulator::setTrim(unsigned int idx, int value)
{
idx = Open9xGruvin9x::modn12x3[4*getStickMode() + idx];
uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
setTrimValue(phase, idx, value);
}
void Open9xGruvin9xSimulator::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 = Open9xGruvin9x::modn12x3[4*getStickMode() + i];
int16_t tmp = trims.values[i];
trims.values[i] = trims.values[idx];
trims.values[idx] = tmp;
}
}
void Open9xGruvin9xSimulator::wheelEvent(uint8_t steps)
{
g_rotenc[0] += steps;
}
unsigned int Open9xGruvin9xSimulator::getPhase()
{
return getFlightMode();
}
const char * Open9xGruvin9xSimulator::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 * Open9xGruvin9xSimulator::getError()
{
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
@@ -1,61 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef open9xGruvin9x_simulator_h
#define open9xGruvin9x_simulator_h
#include "simulatorinterface.h"
class RadioData;
class OpenTxEepromInterface;
class Open9xGruvin9xSimulator : public SimulatorInterface {
public:
Open9xGruvin9xSimulator();
virtual void start(QByteArray & eeprom, bool tests=true);
virtual void start(const char * filename, bool tests=true);
virtual void stop();
virtual bool timer10ms();
virtual uint8_t * getLcd();
virtual bool lcdChanged(bool & lightEnable);
virtual void setValues(TxInputs &inputs);
virtual void getValues(TxOutputs &outputs);
virtual void setTrim(unsigned int idx, int value);
virtual void getTrims(Trims & trims);
virtual unsigned int getPhase();
virtual const char * getPhaseName(unsigned int phase);
virtual void wheelEvent(uint8_t steps);
virtual const char * getError();
};
#endif
@@ -1,216 +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 "opentxM128simulator.h"
#include "opentxinterface.h"
#include "opentxeeprom.h"
#define SIMU
#define SIMU_EXCEPTIONS
#define PCBSTD
#define CPUM128
#define HELI
#define TEMPLATES
#define SPLASH
#define FLIGHT_MODES
#define FRSKY
#define FRSKY_HUB
#define WS_HOW_HIGH
#define VARIO
#define PPM_UNIT_PERCENT_PREC1
#define AUDIO
#define HAPTIC
#define AUTOSWITCH
#define GRAPHICS
#define CURVES
#define XCURVES
#define GVARS
#define BOLD_FONT
#define VOICE
#define PPM_CENTER_ADJUSTABLE
#define PPM_LIMITS_SYMETRICAL
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define DSM2
#define DSM2_PPM
#define SAFETY_CHANNEL_FUNCTION
#define EEPROM_VARIANT SIMU_M128_VARIANTS
#define GAUGES
#undef min
#undef max
#include <exception>
namespace OpenTxM128 {
#include "radio/src/targets/stock/board_stock.cpp"
#include "radio/src/targets/common_avr/telemetry_driver.cpp"
#include "radio/src/eeprom_common.cpp"
#include "radio/src/eeprom_rlc.cpp"
#include "radio/src/opentx.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/curves.cpp"
#include "radio/src/mixer.cpp"
#include "radio/src/pulses/pulses_avr.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"
#include "radio/src/vario.cpp"
#include "radio/src/gui/menus.cpp"
#include "radio/src/gui/menu_model.cpp"
#include "radio/src/gui/menu_general.cpp"
#include "radio/src/gui/view_main.cpp"
#include "radio/src/gui/view_statistics.cpp"
#include "radio/src/gui/view_telemetry.cpp"
#include "radio/src/lcd_common.cpp"
#include "radio/src/lcd_default.cpp"
#include "radio/src/keys.cpp"
#include "radio/src/targets/simu/simpgmspace.cpp"
#include "radio/src/templates.cpp"
#include "radio/src/translations.cpp"
#include "radio/src/fonts.cpp"
#include "radio/src/audio_avr.cpp"
#include "radio/src/targets/stock/voice.cpp"
#include "radio/src/telemetry/frsky.cpp"
#include "radio/src/telemetry/frsky_d.cpp"
#include "radio/src/translations/tts_en.cpp"
#include "radio/src/haptic.cpp"
int16_t g_anas[NUM_STICKS+BOARD_9X_NUM_POTS];
uint16_t anaIn(uint8_t chan)
{
if (chan == 7)
return 150;
else
return g_anas[chan];
}
bool hasExtendedTrims()
{
return g_model.extendedTrims;
}
uint8_t getStickMode()
{
return limit<uint8_t>(0, g_eeGeneral.stickMode, 3);
}
}
using namespace OpenTxM128;
OpenTxM128Simulator::OpenTxM128Simulator()
{
}
bool OpenTxM128Simulator::timer10ms()
{
#define TIMER10MS_IMPORT
#include "simulatorimport.h"
}
uint8_t * OpenTxM128Simulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool OpenTxM128Simulator::lcdChanged(bool & lightEnable)
{
#define LCDCHANGED_IMPORT
#include "simulatorimport.h"
}
void OpenTxM128Simulator::start(QByteArray & eeprom, bool tests)
{
memcpy(OpenTxM128::eeprom, eeprom.data(), std::min<int>(sizeof(OpenTxM128::eeprom), eeprom.size()));
StartEepromThread(NULL);
StartMainThread(tests);
}
void OpenTxM128Simulator::start(const char * filename, bool tests)
{
StartEepromThread(filename);
StartMainThread(tests);
}
void OpenTxM128Simulator::stop()
{
StopMainThread();
StopEepromThread();
}
void OpenTxM128Simulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT
#define g_chans512 channelOutputs
#include "simulatorimport.h"
}
void OpenTxM128Simulator::setValues(TxInputs &inputs)
{
#define SETVALUES_IMPORT
#include "simulatorimport.h"
}
void OpenTxM128Simulator::setTrim(unsigned int idx, int value)
{
idx = OpenTxM128::modn12x3[4*getStickMode() + idx];
uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
setTrimValue(phase, idx, value);
}
void OpenTxM128Simulator::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 = OpenTxM128::modn12x3[4*getStickMode() + i];
int16_t tmp = trims.values[i];
trims.values[i] = trims.values[idx];
trims.values[idx] = tmp;
}
}
void OpenTxM128Simulator::wheelEvent(uint8_t steps)
{
}
unsigned int OpenTxM128Simulator::getPhase()
{
return getFlightMode();
}
const char * OpenTxM128Simulator::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 * OpenTxM128Simulator::getError()
{
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
@@ -1,61 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef OpenTxM128_simulator_h
#define OpenTxM128_simulator_h
#include "simulatorinterface.h"
class RadioData;
class OpenTxEepromInterface;
class OpenTxM128Simulator : public SimulatorInterface {
public:
OpenTxM128Simulator();
virtual void start(QByteArray & eeprom, bool tests=true);
virtual void start(const char * filename, bool tests=true);
virtual void stop();
virtual bool timer10ms();
virtual uint8_t * getLcd();
virtual bool lcdChanged(bool & lightEnable);
virtual void setValues(TxInputs &inputs);
virtual void getValues(TxOutputs &outputs);
virtual void setTrim(unsigned int idx, int value);
virtual void getTrims(Trims & trims);
virtual unsigned int getPhase();
virtual const char * getPhaseName(unsigned int phase);
virtual void wheelEvent(uint8_t steps);
virtual const char * getError();
};
#endif
@@ -1,221 +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 "opentxM64simulator.h"
#include "opentxinterface.h"
#include "opentxeeprom.h"
#define HELI
#define SIMU
#define SIMU_EXCEPTIONS
#define PCBSTD
#define CPUM64
#define SPLASH
#define FLIGHT_MODES
#define PPM_UNIT_PERCENT_PREC1
#define HELI
#define TEMPLATES
#define FRSKY
#define FRSKY_HUB
#define WS_HOW_HIGH
#define PXX
#define DSM2
#define DSM2_PPM
#define VARIO
#define HAPTIC
#define AUTOSWITCH
#define GRAPHICS
#define CURVES
#define XCURVES
#define GVARS
#define BOLD_FONT
#define VOICE
#define PPM_CENTER_ADJUSTABLE
#define PPM_LIMITS_SYMETRICAL
#define BUZZER
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define SAFETY_CHANNEL_FUNCTION
#define FAS_OFFSET
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS
#define GAUGES
#define NUM_POTS 3
#undef min
#undef max
#include <exception>
namespace OpenTxM64 {
#include "radio/src/targets/stock/board_stock.cpp"
#include "radio/src/targets/common_avr/telemetry_driver.cpp"
#include "radio/src/eeprom_common.cpp"
#include "radio/src/eeprom_rlc.cpp"
#include "radio/src/opentx.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/curves.cpp"
#include "radio/src/mixer.cpp"
#include "radio/src/pulses/pulses_avr.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"
#include "radio/src/vario.cpp"
#include "radio/src/gui/menus.cpp"
#include "radio/src/gui/menu_model.cpp"
#include "radio/src/gui/menu_general.cpp"
#include "radio/src/gui/view_main.cpp"
#include "radio/src/gui/view_statistics.cpp"
#include "radio/src/gui/view_telemetry.cpp"
#include "radio/src/lcd_common.cpp"
#include "radio/src/lcd_default.cpp"
#include "radio/src/keys.cpp"
#include "radio/src/targets/simu/simpgmspace.cpp"
#include "radio/src/telemetry/frsky.cpp"
#include "radio/src/telemetry/frsky_d.cpp"
#include "radio/src/templates.cpp"
#include "radio/src/translations.cpp"
#include "radio/src/fonts.cpp"
#include "radio/src/targets/stock/voice.cpp"
#include "radio/src/buzzer.cpp"
#include "radio/src/translations/tts_en.cpp"
#include "radio/src/haptic.cpp"
int16_t g_anas[NUM_STICKS+BOARD_9X_NUM_POTS];
uint16_t anaIn(uint8_t chan)
{
if (chan == 7)
return 1500;
else
return g_anas[chan];
}
bool hasExtendedTrims()
{
return g_model.extendedTrims;
}
uint8_t getStickMode()
{
return limit<uint8_t>(0, g_eeGeneral.stickMode, 3);
}
}
using namespace OpenTxM64;
OpenTxM64Simulator::OpenTxM64Simulator()
{
#define INIT_IMPORT
#include "simulatorimport.h"
}
bool OpenTxM64Simulator::timer10ms()
{
#define TIMER10MS_IMPORT
#include "simulatorimport.h"
}
uint8_t * OpenTxM64Simulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool OpenTxM64Simulator::lcdChanged(bool & lightEnable)
{
#define LCDCHANGED_IMPORT
#include "simulatorimport.h"
}
void OpenTxM64Simulator::start(QByteArray & eeprom, bool tests)
{
memcpy(&OpenTxM64::eeprom[0], eeprom.data(), 2048);
StartEepromThread(NULL);
StartMainThread(tests);
}
void OpenTxM64Simulator::start(const char * filename, bool tests)
{
StartEepromThread(filename);
StartMainThread(tests);
}
void OpenTxM64Simulator::stop()
{
StopMainThread();
StopEepromThread();
}
void OpenTxM64Simulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT
#define g_chans512 channelOutputs
#include "simulatorimport.h"
outputs.beep = g_beepCnt;
g_beepCnt = 0;
}
void OpenTxM64Simulator::setValues(TxInputs &inputs)
{
#define SETVALUES_IMPORT
#include "simulatorimport.h"
}
void OpenTxM64Simulator::setTrim(unsigned int idx, int value)
{
idx = OpenTxM64::modn12x3[4*getStickMode() + idx];
uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
setTrimValue(phase, idx, value);
}
void OpenTxM64Simulator::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 = OpenTxM64::modn12x3[4*getStickMode() + i];
int16_t tmp = trims.values[i];
trims.values[i] = trims.values[idx];
trims.values[idx] = tmp;
}
}
unsigned int OpenTxM64Simulator::getPhase()
{
return getFlightMode();
}
const char * OpenTxM64Simulator::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 * OpenTxM64Simulator::getError()
{
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
@@ -1,60 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef open9x_simulator_h
#define open9x_simulator_h
#include "simulatorinterface.h"
class OpenTxEepromInterface;
class OpenTxM64Simulator : public SimulatorInterface {
public:
OpenTxM64Simulator();
virtual void start(QByteArray & eeprom, bool tests=true);
virtual void start(const char * filename, bool tests=true);
virtual void stop();
virtual bool timer10ms();
virtual uint8_t * getLcd();
virtual bool lcdChanged(bool & lightEnable);
virtual void setValues(TxInputs &inputs);
virtual void getValues(TxOutputs &outputs);
virtual void setTrim(unsigned int idx, int value);
virtual void getTrims(Trims & trims);
virtual unsigned int getPhase();
virtual const char * getPhaseName(unsigned int phase);
virtual void wheelEvent(uint8_t steps) { }
virtual const char * getError();
};
#endif
@@ -1,260 +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 "opentxSky9xsimulator.h"
#include "opentxinterface.h"
#include "appdata.h"
#define SIMU
#define SIMU_EXCEPTIONS
#define PCBSKY9X
#define CPUARM
#define REVB
#define ROTARY_ENCODERS 1
#define HELI
#define TEMPLATES
#define SPLASH
#define FLIGHT_MODES
#define FRSKY
#define FRSKY_HUB
#define WS_HOW_HIGH
#define VARIO
#define PPM_UNIT_PERCENT_PREC1
#define BUZZER
#define AUDIO
#define VOICE
#define HAPTIC
// #define PXX
#define DSM2
#define DSM2_PPM
#define DBLKEYS
#define AUTOSWITCH
#define GRAPHICS
#define SDCARD
#define CURVES
#define XCURVES
#define GVARS
#define BOLD_FONT
#define PPM_CENTER_ADJUSTABLE
#define PPM_LIMITS_SYMETRICAL
#define GAUGES
#define GPS
#define FAI_CHOICE
#define FRSKY_STICKS
#define SAFETY_CHANNEL_FUNCTION
#define NUM_POTS 3
#define EEPROM_VARIANT 3
#undef min
#undef max
#include <exception>
namespace Open9xSky9x {
#include "radio/src/targets/sky9x/board_sky9x.cpp"
#include "radio/src/pulses/ppm_arm.cpp"
#include "radio/src/pulses/pxx_arm.cpp"
#include "radio/src/pulses/dsm2_arm.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/eeprom_common.cpp"
#include "radio/src/eeprom_raw.cpp"
#include "radio/src/eeprom_conversions.cpp"
#include "radio/src/opentx.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/mixer.cpp"
#include "radio/src/curves.cpp"
#include "radio/src/targets/sky9x/pulses_driver.cpp"
#include "radio/src/pulses/pulses_arm.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"
#include "radio/src/vario.cpp"
#include "radio/src/gui/menus.cpp"
#include "radio/src/gui/menu_model.cpp"
#include "radio/src/gui/menu_general.cpp"
#include "radio/src/gui/view_main.cpp"
#include "radio/src/gui/view_statistics.cpp"
#include "radio/src/gui/view_telemetry.cpp"
#include "radio/src/gui/view_about.cpp"
#include "radio/src/gui/view_text.cpp"
#include "radio/src/lcd_common.cpp"
#include "radio/src/lcd_default.cpp"
#include "radio/src/logs.cpp"
#include "radio/src/targets/sky9x/keys_driver.cpp"
#include "radio/src/keys.cpp"
#include "radio/src/targets/simu/simpgmspace.cpp"
#include "radio/src/templates.cpp"
#include "radio/src/translations.cpp"
#include "radio/src/fonts.cpp"
#include "radio/src/telemetry/frsky.cpp"
#include "radio/src/telemetry/frsky_sport.cpp"
#include "radio/src/telemetry/frsky_d.cpp"
#include "radio/src/targets/sky9x/audio_driver.cpp"
#include "radio/src/audio_arm.cpp"
#include "radio/src/buzzer.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/second_serial_driver.cpp"
#include "radio/src/haptic.cpp"
#include "radio/src/translations/tts_cz.cpp"
#include "radio/src/translations/tts_de.cpp"
#include "radio/src/translations/tts_en.cpp"
#include "radio/src/translations/tts_es.cpp"
#include "radio/src/translations/tts_se.cpp"
#include "radio/src/translations/tts_it.cpp"
#include "radio/src/translations/tts_fr.cpp"
#include "radio/src/translations/tts_pt.cpp"
#include "radio/src/translations/tts_sk.cpp"
#include "radio/src/translations/tts_pl.cpp"
#include "radio/src/translations/tts_hu.cpp"
int16_t g_anas[NUM_STICKS+BOARD_9X_NUM_POTS];
uint16_t anaIn(uint8_t chan)
{
if (chan == 7)
return 1500;
else
return g_anas[chan];
}
bool hasExtendedTrims()
{
return g_model.extendedTrims;
}
uint8_t getStickMode()
{
return limit<uint8_t>(0, g_eeGeneral.stickMode, 3);
}
}
using namespace Open9xSky9x;
Open9xSky9xSimulator::Open9xSky9xSimulator()
{
QString path=g.profile[g.id()].sdPath()+"/";
int i=0;
for (i=0; i< std::min(path.length(),1022); i++) {
simuSdDirectory[i]=path.at(i).toAscii();
}
simuSdDirectory[i]=0;
}
bool Open9xSky9xSimulator::timer10ms()
{
#define TIMER10MS_IMPORT
#include "simulatorimport.h"
}
uint8_t * Open9xSky9xSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool Open9xSky9xSimulator::lcdChanged(bool & lightEnable)
{
#define LCDCHANGED_IMPORT
#include "simulatorimport.h"
}
void Open9xSky9xSimulator::start(QByteArray & eeprom, bool tests)
{
g_rotenc[0] = 0;
memcpy(Open9xSky9x::eeprom, eeprom.data(), std::min<int>(sizeof(Open9xSky9x::eeprom), eeprom.size()));
StartEepromThread(NULL);
StartMainThread(tests);
}
void Open9xSky9xSimulator::start(const char * filename, bool tests)
{
g_rotenc[0] = 0;
StartEepromThread(filename);
StartMainThread(tests);
}
void Open9xSky9xSimulator::stop()
{
StopMainThread();
StopEepromThread();
}
void Open9xSky9xSimulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT
#define g_chans512 channelOutputs
#include "simulatorimport.h"
outputs.beep = g_beepCnt;
g_beepCnt = 0;
}
void Open9xSky9xSimulator::setValues(TxInputs &inputs)
{
#define SETVALUES_IMPORT
#include "simulatorimport.h"
}
void Open9xSky9xSimulator::setTrim(unsigned int idx, int value)
{
idx = Open9xSky9x::modn12x3[4*getStickMode() + idx];
uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
setTrimValue(phase, idx, value);
}
void Open9xSky9xSimulator::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 = Open9xSky9x::modn12x3[4*getStickMode() + i];
int16_t tmp = trims.values[i];
trims.values[i] = trims.values[idx];
trims.values[idx] = tmp;
}
}
void Open9xSky9xSimulator::wheelEvent(uint8_t steps)
{
g_rotenc[0] += steps*4;
}
unsigned int Open9xSky9xSimulator::getPhase()
{
return getFlightMode();
}
const char * Open9xSky9xSimulator::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 * Open9xSky9xSimulator::getError()
{
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
@@ -1,61 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef open9xSky9x_simulator_h
#define open9xSky9x_simulator_h
#include "simulatorinterface.h"
class RadioData;
class OpenTxEepromInterface;
class Open9xSky9xSimulator : public SimulatorInterface {
public:
Open9xSky9xSimulator();
virtual void start(QByteArray & eeprom, bool tests=true);
virtual void start(const char * filename, bool tests=true);
virtual void stop();
virtual bool timer10ms();
virtual uint8_t * getLcd();
virtual bool lcdChanged(bool & lightEnable);
virtual void setValues(TxInputs &inputs);
virtual void getValues(TxOutputs &outputs);
virtual void setTrim(unsigned int idx, int value);
virtual void getTrims(Trims & trims);
virtual unsigned int getPhase();
virtual const char * getPhaseName(unsigned int phase);
virtual void wheelEvent(uint8_t steps);
virtual const char * getError();
};
#endif
@@ -1,297 +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 "opentxTaranisSimulator.h"
#include "opentxinterface.h"
#include "appdata.h"
#define SIMU
#define SIMU_EXCEPTIONS
#define PCBTARANIS
#define CPUARM
#define HELI
#define SPLASH
#define FLIGHT_MODES
#define FRSKY
#define FRSKY_HUB
#define FRSKY_SPORT
#define GPS
#define VARIO
#define GAUGES
#define PPM_UNIT_PERCENT_PREC1
#define AUDIO
#define VOICE
#define PXX
#define DSM2
#define DSM2_PPM
#define DBLKEYS
#define AUTOSWITCH
#define GRAPHICS
#define SDCARD
#define RTCLOCK
#define CURVES
#define XCURVES
#define GVARS
#define BOLD_FONT
#define PPM_CENTER_ADJUSTABLE
#define PPM_LIMITS_SYMETRICAL
#define FAI_CHOICE
#define LUA
#define LUA_MODEL_SCRIPTS
#define EEPROM_VARIANT 3
#define HAPTIC
#define REVPLUS
#define SAFETY_CHANNEL_FUNCTION
#define NUM_POTS 5
#undef min
#undef max
#include <exception>
namespace Open9xX9D {
int taranisSimulatorBoard = 0;
inline int geteepromsize() {
return 32*1024;
}
#define EESIZE geteepromsize()
#include "radio/src/targets/taranis/board_taranis.cpp"
#include "radio/src/pulses/ppm_arm.cpp"
#include "radio/src/pulses/pxx_arm.cpp"
#include "radio/src/pulses/dsm2_arm.cpp"
#include "radio/src/eeprom_common.cpp"
#include "radio/src/eeprom_conversions.cpp"
#include "radio/src/eeprom_rlc.cpp"
#include "radio/src/opentx.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/curves.cpp"
#include "radio/src/mixer.cpp"
#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/uart3_driver.cpp"
#include "radio/src/pulses/pulses_arm.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"
#include "radio/src/vario.cpp"
#include "radio/src/gui/menus.cpp"
#include "radio/src/gui/menu_model.cpp"
#include "radio/src/gui/menu_general.cpp"
#include "radio/src/gui/view_main.cpp"
#include "radio/src/gui/view_statistics.cpp"
#include "radio/src/gui/view_channels.cpp"
#include "radio/src/gui/view_telemetry.cpp"
#include "radio/src/gui/view_text.cpp"
#include "radio/src/gui/view_about.cpp"
#include "radio/src/lcd_common.cpp"
#include "radio/src/lcd_taranis.cpp"
#include "radio/src/logs.cpp"
#include "radio/src/rtc.cpp"
#include "radio/src/targets/taranis/keys_driver.cpp"
#include "radio/src/keys.cpp"
#include "radio/src/bmp.cpp"
#include "radio/src/haptic.cpp"
#include "radio/src/targets/taranis/haptic_driver.cpp"
// TODO Because FatFS in not C++ there cannot be namespaces there and the functions are defined several times!
#undef SDCARD
#include "radio/src/targets/simu/simpgmspace.cpp"
#define SDCARD
#include "radio/src/translations.cpp"
#include "radio/src/fonts.cpp"
#include "radio/src/telemetry/frsky.cpp"
#include "radio/src/telemetry/frsky_sport.cpp"
#include "radio/src/telemetry/frsky_d.cpp"
#include "radio/src/targets/taranis/audio_driver.cpp"
#include "radio/src/targets/taranis/telemetry_driver.cpp"
#include "radio/src/audio_arm.cpp"
#include "radio/src/translations/tts_cz.cpp"
#include "radio/src/translations/tts_de.cpp"
#include "radio/src/translations/tts_en.cpp"
#include "radio/src/translations/tts_es.cpp"
#include "radio/src/translations/tts_se.cpp"
#include "radio/src/translations/tts_it.cpp"
#include "radio/src/translations/tts_fr.cpp"
#include "radio/src/translations/tts_pt.cpp"
#include "radio/src/translations/tts_sk.cpp"
#include "radio/src/translations/tts_pl.cpp"
#include "radio/src/translations/tts_hu.cpp"
#include "radio/src/lua.cpp"
#include "radio/src/lua/src/lapi.c"
#include "radio/src/lua/src/lcode.c"
#include "radio/src/lua/src/lctype.c"
#include "radio/src/lua/src/ldebug.c"
#include "radio/src/lua/src/ldo.c"
#include "radio/src/lua/src/ldump.c"
#include "radio/src/lua/src/lfunc.c"
#include "radio/src/lua/src/lgc.c"
#include "radio/src/lua/src/llex.c"
#include "radio/src/lua/src/lmem.c"
#include "radio/src/lua/src/lobject.c"
#include "radio/src/lua/src/lopcodes.c"
#include "radio/src/lua/src/lparser.c"
#include "radio/src/lua/src/lstate.c"
#include "radio/src/lua/src/lstring.c"
#include "radio/src/lua/src/ltable.c"
#include "radio/src/lua/src/ltm.c"
#include "radio/src/lua/src/lundump.c"
#include "radio/src/lua/src/lvm.c"
#include "radio/src/lua/src/lzio.c"
#include "radio/src/lua/src/lbaselib.c"
#include "radio/src/lua/src/linit.c"
#include "radio/src/lua/src/lmathlib.c"
#include "radio/src/lua/src/loadlib.c"
#include "radio/src/lua/src/lauxlib.c"
#include "radio/src/lua/src/ltablib.c"
#include "radio/src/lua/src/lcorolib.c"
int16_t g_anas[NUM_STICKS+5];
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);
}
void resetTrims()
{
GPIOE->IDR |= PIN_TRIM_LH_L | PIN_TRIM_LH_R | PIN_TRIM_LV_DN | PIN_TRIM_LV_UP;
GPIOC->IDR |= PIN_TRIM_RV_DN | PIN_TRIM_RV_UP | PIN_TRIM_RH_L | PIN_TRIM_RH_R;
}
}
using namespace Open9xX9D;
OpentxTaranisSimulator::OpentxTaranisSimulator()
{
taranisSimulatorBoard = GetEepromInterface()->getBoard();
QString path=g.profile[g.id()].sdPath()+"/";
int i=0;
for (i=0; i< std::min(path.length(),1022); i++) {
simuSdDirectory[i]=path.at(i).toAscii();
}
simuSdDirectory[i]=0;
}
bool OpentxTaranisSimulator::timer10ms()
{
#define TIMER10MS_IMPORT
#include "simulatorimport.h"
}
uint8_t * OpentxTaranisSimulator::getLcd()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
bool OpentxTaranisSimulator::lcdChanged(bool & lightEnable)
{
#define LCDCHANGED_IMPORT
#include "simulatorimport.h"
}
void OpentxTaranisSimulator::start(QByteArray & eeprom, bool tests)
{
memcpy(Open9xX9D::eeprom, eeprom.data(), std::min<int>(sizeof(Open9xX9D::eeprom), eeprom.size()));
StartEepromThread(NULL);
StartMainThread(tests);
}
void OpentxTaranisSimulator::start(const char * filename, bool tests)
{
StartEepromThread(filename);
StartMainThread(tests);
}
void OpentxTaranisSimulator::stop()
{
StopMainThread();
StopEepromThread();
}
void OpentxTaranisSimulator::getValues(TxOutputs &outputs)
{
#define GETVALUES_IMPORT
#define g_chans512 channelOutputs
#include "simulatorimport.h"
}
void OpentxTaranisSimulator::setValues(TxInputs &inputs)
{
#define SETVALUES_IMPORT
#include "simulatorimport.h"
}
void OpentxTaranisSimulator::setTrim(unsigned int idx, int value)
{
idx = Open9xX9D::modn12x3[4*getStickMode() + idx];
uint8_t phase = getTrimFlightPhase(getFlightMode(), idx);
setTrimValue(phase, idx, value);
}
void OpentxTaranisSimulator::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 = Open9xX9D::modn12x3[4*getStickMode() + i];
int16_t tmp = trims.values[i];
trims.values[i] = trims.values[idx];
trims.values[idx] = tmp;
}
}
void OpentxTaranisSimulator::wheelEvent(uint8_t steps)
{
// g_rotenc[0] += steps*4;
}
unsigned int OpentxTaranisSimulator::getPhase()
{
return getFlightMode();
}
const char * OpentxTaranisSimulator::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 * OpentxTaranisSimulator::getError()
{
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
@@ -1,61 +0,0 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef opentx_taranis_simulator_h
#define opentx_taranis_simulator_h
#include "simulatorinterface.h"
class RadioData;
class OpenTxEepromInterface;
class OpentxTaranisSimulator : public SimulatorInterface {
public:
OpentxTaranisSimulator();
virtual void start(QByteArray & eeprom, bool tests=true);
virtual void start(const char * filename, bool tests=true);
virtual void stop();
virtual bool timer10ms();
virtual uint8_t * getLcd();
virtual bool lcdChanged(bool & lightEnable);
virtual void setValues(TxInputs &inputs);
virtual void getValues(TxOutputs &outputs);
virtual void setTrim(unsigned int idx, int value);
virtual void getTrims(Trims & trims);
virtual unsigned int getPhase();
virtual const char * getPhaseName(unsigned int phase);
virtual void wheelEvent(uint8_t steps);
virtual const char * getError();
};
#endif
File diff suppressed because it is too large Load Diff
+23 -49
View File
@@ -22,34 +22,15 @@
#include "eepromimportexport.h"
#include <qbytearray.h>
#define GVARS_VARIANT 0x0001
#define FRSKY_VARIANT 0x0002
#define POS3_VARIANT 0x0004
#define MAVLINK_VARIANT 0x0008
#define M128_VARIANT 0x8000
#define GVARS_VARIANT 0x0001
#define FRSKY_VARIANT 0x0002
#define POS3_VARIANT 0x0004
#define MAVLINK_VARIANT 0x0008
#define M128_VARIANT 0x8000
#define TARANIS_X9E_VARIANT 0x8000
#define SIMU_STOCK_VARIANTS (GVARS_VARIANT|FRSKY_VARIANT)
#define SIMU_M128_VARIANTS (M128_VARIANT|SIMU_STOCK_VARIANTS)
#define O9X_MAX_TIMERS 2
#define O9X_MAX_FLIGHT_MODES 5
#define O9X_MAX_MIXERS 32
#define O9X_MAX_EXPOS 14
#define O9X_NUM_CHNOUT 16 // number of real output channels CH1-CH16
#define O9X_NUM_CSW 12 // number of custom switches
#define O9X_NUM_FSW 16 // number of functions assigned to switches
#define O9X_MAX_CURVES 8
#define O9X_NUM_POINTS (112-O9X_MAX_CURVES)
#define O9X_ARM_MAX_FLIGHT_MODES 9
#define O9X_ARM_MAX_MIXERS 64
#define O9X_ARM_MAX_EXPOS 32
#define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16
#define O9X_ARM_NUM_CSW 32 // number of custom switches
#define O9X_ARM_NUM_FSW 32 // number of functions assigned to switches
#define O9X_ARM_NUM_POINTS 512
#define O9X_ARM_MAX_CSFUNCOLD 13
#define O9X_ARM_MAX_CSFUNC 15
#define SIMU_STOCK_VARIANTS (GVARS_VARIANT|FRSKY_VARIANT)
#define SIMU_M128_VARIANTS (M128_VARIANT|SIMU_STOCK_VARIANTS)
class OpenTxGeneralData: public TransformedField {
public:
@@ -65,7 +46,7 @@ class OpenTxGeneralData: public TransformedField {
unsigned int version;
int inputsCount;
unsigned int chkSum;
unsigned int potsType[4];
// unsigned int potsType[4];
};
class ProtocolsConversionTable: public ConversionTable
@@ -75,40 +56,34 @@ class ProtocolsConversionTable: public ConversionTable
{
int val = 0;
if (IS_ARM(board)) {
addConversion(OFF, val++);
addConversion(PULSES_OFF, val++);
}
addConversion(PPM, val++);
addConversion(PULSES_PPM, val++);
if (!IS_ARM(board)) {
addConversion(PPM16, val++);
addConversion(PPMSIM, val++);
addConversion(PULSES_PPM16, val++);
addConversion(PULSES_PPMSIM, val++);
}
if (IS_ARM(board)) {
addConversion(PXX_XJT_X16, val);
addConversion(PXX_XJT_D8, val);
addConversion(PXX_XJT_LR12, val++);
addConversion(PULSES_PXX_XJT_X16, val);
addConversion(PULSES_PXX_XJT_D8, val);
addConversion(PULSES_PXX_XJT_LR12, val++);
}
else {
addConversion(PXX_DJT, val++);
addConversion(PULSES_PXX_DJT, val++);
}
if (IS_ARM(board)) {
addConversion(LP45, val);
addConversion(DSM2, val);
addConversion(DSMX, val++);
addConversion(PULSES_LP45, val);
addConversion(PULSES_DSM2, val);
addConversion(PULSES_DSMX, val++);
}
else {
addConversion(LP45, val++);
addConversion(DSM2, val++);
addConversion(DSMX, val++);
addConversion(PULSES_LP45, val++);
addConversion(PULSES_DSM2, val++);
addConversion(PULSES_DSMX, val++);
}
}
};
class ThrottleSourceConversionTable: public ConversionTable {
public:
ThrottleSourceConversionTable(BoardEnum board, unsigned int version);
};
class ChannelsConversionTable: public ConversionTable
{
public:
@@ -140,7 +115,6 @@ class OpenTxModelData: public TransformedField {
char name[256];
int subprotocols[C9X_NUM_MODULES+1/*trainer*/];
ProtocolsConversionTable protocolsConversionTable;
ThrottleSourceConversionTable throttleSourceConversionTable;
ChannelsConversionTable channelsConversionTable;
};
File diff suppressed because it is too large Load Diff
@@ -13,13 +13,12 @@
* GNU General Public License for more details.
*
*/
#ifndef open9x_interface_h
#define open9x_interface_h
#ifndef opentx_interface_h
#define opentx_interface_h
#include "eeprominterface.h"
#define OPENTX_FIRMWARE_DOWNLOADS "http://downloads-20.open-tx.org/firmware"
class RleFile;
class OpenTxEepromInterface : public EEPROMInterface
@@ -42,11 +41,11 @@ class OpenTxEepromInterface : public EEPROMInterface
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(ModelData &);
virtual int getSize(const ModelData &);
virtual int getSize(GeneralSettings &);
virtual int getSize(const GeneralSettings &);
virtual int isAvailable(Protocol proto, int port=0);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
@@ -77,40 +76,42 @@ class OpenTxEepromInterface : public EEPROMInterface
};
class OpenTxFirmware: public FirmwareInterface {
class OpenTxFirmware: public Firmware {
public:
OpenTxFirmware(const QString & id, OpenTxFirmware * parent):
FirmwareInterface(parent, id, parent->getName(), parent->getBoard(), parent->eepromInterface)
Firmware(parent, id, parent->getName(), parent->getBoard(), parent->eepromInterface)
{
}
OpenTxFirmware(const QString & id, const QString & name, const BoardEnum board):
FirmwareInterface(id, name, board, new OpenTxEepromInterface(board))
Firmware(id, name, board, new OpenTxEepromInterface(board))
{
addLanguage("en");
addLanguage("cz");
addLanguage("de");
addLanguage("es");
addLanguage("fr");
addLanguage("it");
addLanguage("de");
addLanguage("se");
addLanguage("cz");
addLanguage("es");
addLanguage("nl");
addLanguage("pl");
addLanguage("pt");
addLanguage("se");
addTTSLanguage("en");
addTTSLanguage("fr");
addTTSLanguage("it");
addTTSLanguage("de");
addTTSLanguage("se");
addTTSLanguage("cz");
addTTSLanguage("sk");
addTTSLanguage("de");
addTTSLanguage("es");
addTTSLanguage("fr");
addTTSLanguage("hu");
addTTSLanguage("it");
addTTSLanguage("nl");
addTTSLanguage("pl");
addTTSLanguage("pt");
addTTSLanguage("es");
addTTSLanguage("hu");
addTTSLanguage("se");
addTTSLanguage("sk");
}
virtual FirmwareInterface * getFirmwareVariant(const QString & id);
virtual Firmware * getFirmwareVariant(const QString & id);
virtual QString getStampUrl();
@@ -121,9 +122,11 @@ class OpenTxFirmware: public FirmwareInterface {
virtual int getCapability(const Capability);
virtual bool isTelemetrySourceAvailable(int source);
virtual SimulatorInterface * getSimulator();
protected:
QString getFirmwareBaseUrl();
};
void registerOpenTxFirmwares();
@@ -0,0 +1,203 @@
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
add_custom_target(about_lbm_9x
make lbm PCB=9X
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(about_lbm_taranis
make lbm PCB=TARANIS
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(commondeps
make stamp_header tra
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${RADIO_SRC_DIRECTORY}/stamp-opentx.h)
add_custom_target(lua_exports
make PCB=TARANIS lua_exports.inc
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
set(OPENTX_SRC_FILES
opentxsimulator.cpp
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/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_dependencies(opentx-9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9xr${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9x128${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9xr128${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-gruvin9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-mega2560${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-sky9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-9xrpro${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-ar9x${SUFFIX}-simulator about_lbm_9x commondeps)
add_dependencies(opentx-taranis${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
add_dependencies(opentx-taranisplus${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator about_lbm_taranis commondeps lua_exports)
set(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
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(TARGETS ${OPENTX_LIBRARIES} LIBRARY DESTINATION ${SIMULATOR_LIB_PATH})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# 9X with ATmega64
target_include_directories(opentx-9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9x${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM64 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega64
target_include_directories(opentx-9xr${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9xr${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM64 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xr${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9X with ATmega128
target_include_directories(opentx-9x128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9x128${SUFFIX}-simulator PRIVATE PCBSTD PCB9X CPUM128 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9x128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR with ATmega128
target_include_directories(opentx-9xr128${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/stock)
target_compile_definitions(opentx-9xr128${SUFFIX}-simulator PRIVATE PCBSTD PCB9XR CPUM128 EEPROM_RLC ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xr128${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Gruvin9x
target_include_directories(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/gruvin9x)
target_compile_definitions(opentx-gruvin9x${SUFFIX}-simulator PRIVATE PCBGRUVIN9X CPUM2560 EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-gruvin9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Mega2560
target_include_directories(opentx-mega2560${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/mega2560)
target_compile_definitions(opentx-mega2560${SUFFIX}-simulator PRIVATE PCBMEGA2560 CPUM2560 EEPROM_RLC SDCARD ROTARY_ENCODERS=2 ${COMMON_DEFINITIONS})
target_link_libraries(opentx-mega2560${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Sky9x
target_include_directories(opentx-sky9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x)
target_compile_definitions(opentx-sky9x${SUFFIX}-simulator PRIVATE PCBSKY9X CPUARM VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-sky9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# 9XR-PRO
target_include_directories(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x)
target_compile_definitions(opentx-9xrpro${SUFFIX}-simulator PRIVATE PCBSKY9X REVX CPUARM VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-9xrpro${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# AR9X
target_include_directories(opentx-ar9x${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/sky9x)
target_compile_definitions(opentx-ar9x${SUFFIX}-simulator PRIVATE PCBSKY9X AR9X CPUARM VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-ar9x${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis standard
target_include_directories(opentx-taranis${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
target_compile_definitions(opentx-taranis${SUFFIX}-simulator PRIVATE PCBTARANIS CPUARM CPUSTM32 EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranis${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis Plus
target_include_directories(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
target_compile_definitions(opentx-taranisplus${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS CPUARM CPUSTM32 EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranisplus${SUFFIX}-simulator PRIVATE ${COMMON_LIBRARIES})
# Taranis X9E
target_include_directories(opentx-taranisx9e${SUFFIX}-simulator PRIVATE ${RADIO_SRC_DIRECTORY}/targets/taranis)
target_compile_definitions(opentx-taranisx9e${SUFFIX}-simulator PRIVATE PCBTARANIS REVPLUS REV9E CPUARM CPUSTM32 STM32F40_41xxx EEPROM_RLC VOICE SDCARD ${COMMON_DEFINITIONS})
target_link_libraries(opentx-taranisx9e${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)
@@ -0,0 +1,535 @@
/*
* 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(PCBTARANIS)
#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"
#else
#include "radio/src/main_avr.cpp"
#include "radio/src/audio_avr.cpp"
#include "radio/src/pulses/pulses_avr.cpp"
#endif
#include "radio/src/eeprom_common.cpp"
#if defined(EEPROM_RLC)
#include "radio/src/eeprom_rlc.cpp"
#else
#include "radio/src/eeprom_raw.cpp"
#endif
#if defined(PCBTARANIS) || defined(PCBSKY9X)
#include "radio/src/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(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(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/stock/board_stock.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"
#include "radio/src/telemetry/frsky_d.cpp"
#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_api.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"
#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()
{
#define GETLCD_IMPORT
#include "simulatorimport.h"
}
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(REV9E)
if (steps == 255)
x9de_rotenc -= 2;
else
x9de_rotenc += 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
}
void OpenTxSimulator::setTrainerInput(unsigned int inputNumber, ::int16_t value)
{
#define SETTRAINER_IMPORT
#include "simulatorimport.h"
}
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(PCBTARANIS)
return BOARD_TARANIS;
#else
return BOARD_STOCK;
#endif
}
};
}
extern "C" DLLEXPORT SimulatorFactory *registerSimu()
{
return new NAMESPACE::OpenTxSimulatorFactory();
}
@@ -0,0 +1,132 @@
/*
* Author - Bertrand Songis <bsongis@gmail.com>
*
* Based on th9x -> http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef opentx_taranis_simulator_h
#define opentx_taranis_simulator_h
#include "simulatorinterface.h"
#if defined(PCBTARANIS) && defined(REV9E)
#define FLAVOUR "taranisx9e"
#define NAMESPACE TaranisX9E
#define EEPROM_VARIANT 0x8000
#elif defined(PCBTARANIS) && defined(REVPLUS)
#define FLAVOUR "taranisplus"
#define NAMESPACE TaranisPlus
#define EEPROM_VARIANT 0
#elif defined(PCBTARANIS)
#define FLAVOUR "taranis"
#define NAMESPACE Taranis
#define EEPROM_VARIANT 0
#elif defined(PCBSKY9X) && defined(REVX)
#define FLAVOUR "9xrpro"
#define NAMESPACE Sky9xPro
#define EEPROM_VARIANT 0
#elif defined(PCBSKY9X) && defined(AR9X)
#define FLAVOUR "ar9x"
#define NAMESPACE Ar9x
#define EEPROM_VARIANT 0
#elif defined(PCBSKY9X)
#define FLAVOUR "sky9x"
#define NAMESPACE Sky9X
#define EEPROM_VARIANT 0
#elif defined(PCBGRUVIN9X)
#define FLAVOUR "gruvin9x"
#define NAMESPACE Gruvin9X
#define EEPROM_VARIANT 0
#elif defined(PCBMEGA2560)
#define FLAVOUR "mega2560"
#define NAMESPACE Mega2560
#define EEPROM_VARIANT 0
#elif defined(PCB9XR) && defined(CPUM128)
#define FLAVOUR "9xr128"
#define NAMESPACE M128XR
#define EEPROM_VARIANT 0x8003
#elif defined(PCB9X) && defined(CPUM128)
#define FLAVOUR "9x128"
#define NAMESPACE M128
#define EEPROM_VARIANT 0x8003
#elif defined(PCB9XR) && defined(CPUM64)
#define FLAVOUR "9xr"
#define NAMESPACE M64XR
#define EEPROM_VARIANT 0x0003
#elif defined(PCB9X) && defined(CPUM64)
#define FLAVOUR "9x"
#define NAMESPACE M64
#define EEPROM_VARIANT 0x0003
#else
#error "Unknown board"
#endif
#if defined __GNUC__
#define DLLEXPORT
#else
#define DLLEXPORT __declspec(dllexport)
#endif
namespace NAMESPACE {
class DLLEXPORT OpenTxSimulator : public SimulatorInterface {
private:
int volumeGain;
public:
OpenTxSimulator();
virtual void setSdPath(const QString &sdPath);
virtual void setVolumeGain(int value);
virtual void start(QByteArray & eeprom, bool tests=true);
virtual void start(const char * filename, bool tests=true);
virtual void stop();
virtual bool timer10ms();
virtual uint8_t * getLcd();
virtual bool lcdChanged(bool & lightEnable);
virtual void setValues(TxInputs &inputs);
virtual void getValues(TxOutputs &outputs);
virtual void setTrim(unsigned int idx, int value);
virtual void getTrims(Trims & trims);
virtual unsigned int getPhase();
virtual const char * getPhaseName(unsigned int phase);
virtual void wheelEvent(int steps);
virtual const char * getError();
virtual void sendTelemetry(uint8_t * data, unsigned int len);
virtual void setTrainerInput(unsigned int inputNumber, int16_t value);
virtual void installTraceHook(void (*callback)(const char *));
};
}
#endif
@@ -0,0 +1,15 @@
set(TH9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/th9x)
add_custom_command(
OUTPUT ${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp
COMMAND ${CMAKE_COMMAND} -E make_directory ${TH9X_CHECKOUT_DIRECTORY}
COMMAND cd ${TH9X_CHECKOUT_DIRECTORY} && svn checkout http://th9x.googlecode.com/svn/trunk/src@285 .
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp ${TH9X_CHECKOUT_DIRECTORY}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
)
add_library(th9x-simulator th9xsimulator.cpp)
@@ -78,14 +78,14 @@ void eeprom_RESV_mismatch(void)
assert(!"Should never been called. Only needed by VC++ (debug mode)");
}
#define GPIO_TRIM_LH_L pind
#define GPIO_TRIM_LV_DN pind
#define GPIO_TRIM_RV_UP pind
#define GPIO_TRIM_RH_L pind
#define GPIO_TRIM_LH_R pind
#define GPIO_TRIM_LV_UP pind
#define GPIO_TRIM_RV_DN pind
#define GPIO_TRIM_RH_R pind
#define TRIMS_GPIO_REG_LHL pind
#define TRIMS_GPIO_REG_LVD pind
#define TRIMS_GPIO_REG_RVU pind
#define TRIMS_GPIO_REG_RHL pind
#define TRIMS_GPIO_REG_LHR pind
#define TRIMS_GPIO_REG_LVU pind
#define TRIMS_GPIO_REG_RVD pind
#define TRIMS_GPIO_REG_RHR pind
#define PIN_TRIM_LH_L (1<<INP_D_TRM_LH_DWN)
#define PIN_TRIM_LV_DN (1<<INP_D_TRM_LV_DWN)
#define PIN_TRIM_RV_UP (1<<INP_D_TRM_RV_UP)
@@ -103,14 +103,14 @@ void eeprom_RESV_mismatch(void)
void simuSetTrim(uint8_t trim, bool state)
{
switch (trim) {
TRIM_CASE(0, GPIO_TRIM_LH_L, PIN_TRIM_LH_L)
TRIM_CASE(1, GPIO_TRIM_LH_R, PIN_TRIM_LH_R)
TRIM_CASE(2, GPIO_TRIM_LV_DN, PIN_TRIM_LV_DN)
TRIM_CASE(3, GPIO_TRIM_LV_UP, PIN_TRIM_LV_UP)
TRIM_CASE(4, GPIO_TRIM_RV_DN, PIN_TRIM_RV_DN)
TRIM_CASE(5, GPIO_TRIM_RV_UP, PIN_TRIM_RV_UP)
TRIM_CASE(6, GPIO_TRIM_RH_L, PIN_TRIM_RH_L)
TRIM_CASE(7, GPIO_TRIM_RH_R, PIN_TRIM_RH_R)
TRIM_CASE(0, TRIMS_GPIO_REG_LHL, PIN_TRIM_LH_L)
TRIM_CASE(1, TRIMS_GPIO_REG_LHR, PIN_TRIM_LH_R)
TRIM_CASE(2, TRIMS_GPIO_REG_LVD, PIN_TRIM_LV_DN)
TRIM_CASE(3, TRIMS_GPIO_REG_LVU, PIN_TRIM_LV_UP)
TRIM_CASE(4, TRIMS_GPIO_REG_RVD, PIN_TRIM_RV_DN)
TRIM_CASE(5, TRIMS_GPIO_REG_RVU, PIN_TRIM_RV_UP)
TRIM_CASE(6, TRIMS_GPIO_REG_RHL, PIN_TRIM_RH_L)
TRIM_CASE(7, TRIMS_GPIO_REG_RHR, PIN_TRIM_RH_R)
}
}
@@ -156,7 +156,7 @@ void simuSetKey(uint8_t key, bool state)
}
}
#define IS_BACKLIGHT_ON() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
}
@@ -48,8 +48,6 @@ class Th9xSimulator : public SimulatorInterface {
virtual unsigned int getPhase() { return 0; }
virtual void wheelEvent(uint8_t steps) { }
virtual const char * getError();
protected:
+9 -10
View File
@@ -62,7 +62,7 @@ Th9xGeneral::operator GeneralSettings ()
result.currModel = currModel;
result.contrast = contrast;
result.vBatWarn = vBatWarn;
result.vBatCalib = vBatCalib;
result.txVoltageCalibration = txVoltageCalibration;
// result.lightSw = th9xToSwitch(lightSw);
result.trainer = trainer;
result.view = view;
@@ -71,16 +71,16 @@ Th9xGeneral::operator GeneralSettings ()
result.disableMemoryWarning = disableMemoryWarning;
switch (beeperVal) {
case 0:
result.beeperMode = e_quiet;
result.beeperMode = GeneralSettings::BEEPER_QUIET;
break;
case 1:
result.beeperMode = e_no_keys;
result.beeperMode = GeneralSettings::BEEPER_NOKEYS;
break;
case 2:
result.beeperMode = e_all;
result.beeperMode = GeneralSettings::BEEPER_ALL;
break;
case 3:
result.beeperMode = e_all;
result.beeperMode = GeneralSettings::BEEPER_ALL;
result.beeperLength = 2;
}
result.stickMode = stickMode;
@@ -124,8 +124,8 @@ t_Th9xLimitData::t_Th9xLimitData()
t_Th9xLimitData::operator LimitData ()
{
LimitData c9x;
c9x.min = min-100;
c9x.max = max+100;
c9x.min = 10*(min-100);
c9x.max = 10*(max+100);
c9x.revert = revert;
c9x.offset = offset;
return c9x;
@@ -272,12 +272,11 @@ t_Th9xModelData::operator ModelData ()
/*c9x.protocol = (Protocol)protocol;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncTrims2Offsets;
c9x.customFn[0].func = FuncTrims2Offsets;
if (trimSw) {
c9x.funcSw[0].swtch = trimSw;
c9x.customFn[0].swtch = trimSw;
}
c9x.beepANACenter = beepANACenter;
c9x.pulsePol = pulsePol;
+1 -1
View File
@@ -64,7 +64,7 @@ PACK(typedef struct t_Th9xGeneral {
uint8_t currModel; //0..15
uint8_t contrast;
uint8_t vBatWarn;
int8_t vBatCalib;
int8_t txVoltageCalibration;
int8_t lightSw;
Th9xTrainerData trainer;
uint8_t adcFilt:2;
@@ -17,7 +17,7 @@
#include <iostream>
#include "th9xinterface.h"
#include "th9xeeprom.h"
#include "th9xsimulator.h"
#include "simulator/th9xsimulator.h"
#include "file.h"
#include "appdata.h"
@@ -130,24 +130,24 @@ int Th9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant,
return 0;
}
int Th9xInterface::getSize(ModelData &model)
int Th9xInterface::getSize(const ModelData & model)
{
return 0;
}
int Th9xInterface::getSize(GeneralSettings &settings)
int Th9xInterface::getSize(const GeneralSettings & settings)
{
return 0;
}
int Th9xInterface::isAvailable(Protocol proto, int port)
int Th9xInterface::isAvailable(PulsesProtocol proto, int port)
{
switch (proto) {
case PPM:
case SILV_A:
case SILV_B:
case SILV_C:
case CTP1009:
case PULSES_PPM:
case PULSES_SILV_A:
case PULSES_SILV_B:
case PULSES_SILV_C:
case PULSES_CTP1009:
return 1;
default:
return 0;
+3 -3
View File
@@ -42,11 +42,11 @@ class Th9xInterface : public EEPROMInterface
virtual int save(uint8_t *eeprom, RadioData &radioData, uint32_t variant=0, uint8_t version=0);
virtual int getSize(ModelData &);
virtual int getSize(const ModelData &);
virtual int getSize(GeneralSettings &);
virtual int getSize(const GeneralSettings &);
virtual int isAvailable(Protocol proto, int port=0);
virtual int isAvailable(PulsesProtocol proto, int port=0);
protected:
+358
View File
@@ -0,0 +1,358 @@
#include "flasheepromdialog.h"
#include "ui_flasheepromdialog.h"
#include "eeprominterface.h"
#include "helpers.h"
#include "firmwareinterface.h"
#include "hexinterface.h"
#include "appdata.h"
#include "progressdialog.h"
#include "radiointerface.h"
#include "converteeprom.h"
#include "splashlibrarydialog.h"
FlashEEpromDialog::FlashEEpromDialog(QWidget *parent, const QString &filename):
QDialog(parent),
ui(new Ui::FlashEEpromDialog),
eepromFilename(filename),
radioData(new RadioData())
{
ui->setupUi(this);
ui->profileLabel->setText(tr("Current profile: %1").arg(g.profile[g.id()].name()));
if (!filename.isEmpty()) {
ui->eepromFilename->hide();
ui->eepromLoad->hide();
}
QString backupPath = g.profile[g.id()].pBackupDir();
if (backupPath.isEmpty()) {
backupPath=g.backupDir();
ui->backupBeforeWrite->setChecked(g.enableBackup() || g.profile[g.id()].penableBackup());
}
if (backupPath.isEmpty() || !QDir(backupPath).exists()) {
ui->backupBeforeWrite->setEnabled(false);
}
updateUI();
}
FlashEEpromDialog::~FlashEEpromDialog()
{
delete ui;
}
void FlashEEpromDialog::updateUI()
{
// ui->burnButton->setEnabled(true);
ui->eepromFilename->setText(eepromFilename);
if (getEEpromVersion(eepromFilename) >= 0) {
ui->profileLabel->show();
ui->patchCalibration->show();
ui->patchHardwareSettings->show();
QString name = g.profile[g.id()].name();
QString calib = g.profile[g.id()].stickPotCalib();
QString trainercalib = g.profile[g.id()].trainerCalib();
QString DisplaySet = g.profile[g.id()].display();
QString BeeperSet = g.profile[g.id()].beeper();
QString HapticSet = g.profile[g.id()].haptic();
QString SpeakerSet = g.profile[g.id()].speaker();
if (!name.isEmpty()) {
ui->profileLabel->show();
ui->patchCalibration->show();
ui->patchHardwareSettings->show();
// TODO I hardcode the number of pots here, should be dependant on the board?
if (!((calib.length()==(NUM_STICKS+3)*12) && (trainercalib.length()==16))) {
ui->patchCalibration->setDisabled(true);
}
if (!((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6))) {
ui->patchHardwareSettings->setDisabled(true);
}
}
else {
ui->profileLabel->hide();
}
ui->burnButton->setEnabled(true);
}
else {
ui->profileLabel->hide();
ui->patchCalibration->hide();
ui->patchHardwareSettings->hide();
}
QTimer::singleShot(0, this, SLOT(shrink()));
}
void FlashEEpromDialog::on_eepromLoad_clicked()
{
QString filename = QFileDialog::getOpenFileName(this, tr("Choose Radio Backup file"), g.eepromDir(), tr(EXTERNAL_EEPROM_FILES_FILTER));
if (!filename.isEmpty()) {
eepromFilename = filename;
updateUI();
}
}
int FlashEEpromDialog::getEEpromVersion(const QString &filename)
{
int result = -1;
int eeprom_size = 0;
if (filename.isEmpty()) {
return -1;
}
QFile file(filename);
if (!file.exists()) {
QMessageBox::warning(this, tr("Error"), tr("Unable to find file %1!").arg(filename));
return -1;
}
QByteArray eeprom(EESIZE_MAX, 0);
int fileType = getFileType(filename);
#if 0
if (fileType==FILE_TYPE_XML) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(filename).arg(file.errorString()));
return -1;
}
QTextStream inputStream(&file);
XmlInterface(inputStream).load(testData);
}
else
#endif
if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::warning(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(filename).arg(file.errorString()));
return -1;
}
QDomDocument doc(ER9X_EEPROM_FILE_TYPE);
bool xmlOK = doc.setContent(&file);
if (xmlOK) {
RadioData * radioData = new RadioData();
if (!loadEEpromXml(*radioData, doc)) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings File %1").arg(filename));
}
else {
result = radioData->generalSettings.version;
}
delete radioData;
return result;
}
file.reset();
QTextStream inputStream(&file);
if (fileType==FILE_TYPE_EEPE) { // read EEPE file header
QString hline = inputStream.readLine();
if (hline!=EEPE_EEPROM_FILE_HEADER) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings File %1").arg(filename));
return -1;
}
}
eeprom_size = HexInterface(inputStream).load((uint8_t *)eeprom.data(), EESIZE_MAX);
}
else if (fileType==FILE_TYPE_BIN) { //read binary
eeprom_size = file.size();
if (!file.open(QFile::ReadOnly)) { //reading binary file - TODO HEX support
QMessageBox::warning(this, tr("Error"), tr("Error opening file %1:\n%2.").arg(filename).arg(file.errorString()));
return -1;
}
int len = file.read(eeprom.data(), eeprom_size);
if (len != eeprom_size) {
QMessageBox::warning(this, tr("Error"), tr("Error reading file %1:\n%2.").arg(filename).arg(file.errorString()));
return -1;
}
}
RadioData * radioData = new RadioData();
if (eeprom_size == 0 || !loadEEprom(*radioData, (const uint8_t *)eeprom.data(), eeprom_size)) {
QMessageBox::warning(this, tr("Error"), tr("Invalid Models and Settings file %1").arg(filename));
}
else {
result = radioData->generalSettings.version;
}
delete radioData;
return result;
}
bool FlashEEpromDialog::patchCalibration()
{
QString calib = g.profile[g.id()].stickPotCalib();
QString trainercalib = g.profile[g.id()].trainerCalib();
int potsnum=GetCurrentFirmware()->getCapability(Pots);
int8_t txVoltageCalibration=(int8_t) g.profile[g.id()].txVoltageCalibration();
int8_t txCurrentCalibration=(int8_t) g.profile[g.id()].txCurrentCalibration();
int8_t PPM_Multiplier=(int8_t) g.profile[g.id()].ppmMultiplier();
if ((calib.length()==(NUM_STICKS+potsnum)*12) && (trainercalib.length()==16)) {
QString Byte;
int16_t byte16;
bool ok;
for (int i=0; i<(NUM_STICKS+potsnum); i++) {
Byte=calib.mid(i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
radioData->generalSettings.calibMid[i]=byte16;
Byte=calib.mid(4+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
radioData->generalSettings.calibSpanNeg[i]=byte16;
Byte=calib.mid(8+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok)
radioData->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) {
radioData->generalSettings.trainer.calib[i] = byte16;
}
}
radioData->generalSettings.txCurrentCalibration = txCurrentCalibration;
radioData->generalSettings.txVoltageCalibration = txVoltageCalibration;
radioData->generalSettings.PPM_Multiplier = PPM_Multiplier;
return true;
}
else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong radio calibration data in profile, Settings not patched"));
return false;
}
}
bool FlashEEpromDialog::patchHardwareSettings()
{
QString DisplaySet = g.profile[g.id()].display();
QString BeeperSet = g.profile[g.id()].beeper();
QString HapticSet = g.profile[g.id()].haptic();
QString SpeakerSet = g.profile[g.id()].speaker();
uint8_t GSStickMode=(uint8_t) g.profile[g.id()].gsStickMode();
uint8_t vBatWarn=(uint8_t) g.profile[g.id()].vBatWarn();
if ((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6)) {
radioData->generalSettings.vBatWarn = vBatWarn;
radioData->generalSettings.stickMode = GSStickMode;
uint8_t byte8u;
int8_t byte8;
bool ok;
byte8=(int8_t)DisplaySet.mid(0,2).toInt(&ok,16);
if (ok) radioData->generalSettings.optrexDisplay=(byte8==1 ? true : false);
byte8u=(uint8_t)DisplaySet.mid(2,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.contrast=byte8u;
byte8u=(uint8_t)DisplaySet.mid(4,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.backlightBright=byte8u;
byte8u=(uint8_t)BeeperSet.mid(0,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.beeperMode=(GeneralSettings::BeeperMode)byte8u;
byte8=(int8_t)BeeperSet.mid(2,2).toInt(&ok,16);
if (ok) radioData->generalSettings.beeperLength=byte8;
byte8u=(uint8_t)HapticSet.mid(0,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8u;
byte8u=(uint8_t)HapticSet.mid(2,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.hapticStrength=byte8u;
byte8=(int8_t)HapticSet.mid(4,2).toInt(&ok,16);
if (ok) radioData->generalSettings.hapticLength=byte8;
byte8u=(uint8_t)SpeakerSet.mid(0,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.speakerMode=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(2,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.speakerPitch=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(4,2).toUInt(&ok,16);
if (ok) radioData->generalSettings.speakerVolume=byte8u;
return true;
}
else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong radio setting data in profile, Settings not patched"));
return false;
}
}
void FlashEEpromDialog::on_burnButton_clicked()
{
// patch the eeprom if needed
bool patch = false;
if (ui->patchCalibration->isChecked()) {
patch |= patchCalibration();
}
if (ui->patchHardwareSettings->isChecked()) {
patch |= patchHardwareSettings();
}
QString filename = eepromFilename;
if (patch) {
QString filename = generateProcessUniqueTempFileName("temp.bin");
QFile file(filename);
uint8_t *eeprom = (uint8_t*)malloc(GetEepromInterface()->getEEpromSize());
int eeprom_size = GetEepromInterface()->save(eeprom, *radioData, GetCurrentFirmware()->getVariantNumber());
if (!eeprom_size) {
QMessageBox::warning(this, tr("Error"), tr("Cannot write file %1:\n%2.").arg(filename).arg(file.errorString()));
return;
}
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::warning(this, tr("Error"), tr("Cannot write file %1:\n%2.").arg(filename).arg(file.errorString()));
return;
}
QTextStream outputStream(&file);
long result = file.write((char*)eeprom, eeprom_size);
if (result != eeprom_size) {
QMessageBox::warning(this, tr("Error"), tr("Error writing file %1:\n%2.").arg(filename).arg(file.errorString()));
return;
}
}
close();
ProgressDialog progressDialog(this, tr("Write Models and Settings to Radio"), CompanionIcon("write_eeprom.png"));
// backup previous EEPROM if requested
QString backupFilename;
QString backupPath;
if (ui->backupBeforeWrite->isChecked()) {
backupPath = g.profile[g.id()].pBackupDir();
if (backupPath.isEmpty()) {
backupPath=g.backupDir();
}
backupFilename = backupPath + "/backup-" + QDateTime().currentDateTime().toString("yyyy-MM-dd-HHmmss") + ".bin";
}
else if (ui->checkFirmwareCompatibility->isChecked()) {
backupFilename = generateProcessUniqueTempFileName("eeprom.bin");
}
if (!backupFilename.isEmpty()) {
if (!readEeprom(backupFilename, progressDialog.progress())) {
return;
}
}
// check EEPROM compatibility if requested
if (ui->checkFirmwareCompatibility->isChecked()) {
int eepromVersion = getEEpromVersion(filename);
QString firmwareFilename = generateProcessUniqueTempFileName("flash.bin");
if (!readFirmware(firmwareFilename, progressDialog.progress()))
return;
QString compatEEprom = generateProcessUniqueTempFileName("compat.bin");
if (convertEEprom(filename, compatEEprom, firmwareFilename)) {
int compatVersion = getEEpromVersion(compatEEprom);
if ((compatVersion / 100) != (eepromVersion / 100)) {
QMessageBox::warning(this, tr("Warning"), tr("The radio firmware belongs to another product family, check file and preferences!"));
return;
}
else if (compatVersion < eepromVersion) {
QMessageBox::warning(this, tr("Warning"), tr("The radio firmware is outdated, please upgrade!"));
return;
}
filename = compatEEprom;
}
else if (QMessageBox::question(this, "Error", tr("Cannot check Models and Settings compatibility! Continue anyway?"), QMessageBox::Yes|QMessageBox::No) == QMessageBox::No) {
return;
}
qunlink(firmwareFilename);
}
// and write...
writeEeprom(filename, progressDialog.progress());
progressDialog.exec();
}
void FlashEEpromDialog::on_cancelButton_clicked()
{
close();
}
void FlashEEpromDialog::shrink()
{
resize(0, 0);
}
+46
View File
@@ -0,0 +1,46 @@
#ifndef FLASHEEPROMDIALOG_H_
#define FLASHEEPROMDIALOG_H_
#include <QDialog>
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
#define HEX_FILES_FILTER "HEX files (*.hex);;"
#define BIN_FILES_FILTER "BIN files (*.bin);;"
#define EXTERNAL_EEPROM_FILES_FILTER "EEPROM files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
namespace Ui
{
class FlashEEpromDialog;
}
class RadioData;
class FlashEEpromDialog : public QDialog
{
Q_OBJECT
public:
explicit FlashEEpromDialog(QWidget *parent, const QString &fileName="");
~FlashEEpromDialog();
private slots:
void on_eepromLoad_clicked();
void on_burnButton_clicked();
void on_cancelButton_clicked();
void shrink();
protected:
void updateUI();
bool isValidEEprom(const QString &filename);
int getEEpromVersion(const QString &filename);
bool patchCalibration();
bool patchHardwareSettings();
private:
Ui::FlashEEpromDialog *ui;
QString eepromFilename;
RadioData *radioData;
};
#endif // FLASHEEPROMDIALOG_H_
+198
View File
@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FlashEEpromDialog</class>
<widget class="QDialog" name="FlashEEpromDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>399</width>
<height>201</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Write Models and Settings to Radio</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/themes/classic/16/write_eeprom.png</normaloff>:/themes/classic/16/write_eeprom.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="filanameLayout">
<item>
<widget class="QLineEdit" name="eepromFilename">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="eepromLoad">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Load...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="profileLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Current Profile</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkFirmwareCompatibility">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Allows Companion to write to older version of the firmware</string>
</property>
<property name="text">
<string>Check Firmware compatibility</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="backupBeforeWrite">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Allows Companion to write to older version of the firmware</string>
</property>
<property name="text">
<string>Backup before Write</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="patchCalibration">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Modify calibration parameters using settings from current profile&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Patch calibration setting from profile</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="patchHardwareSettings">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Modify HW parameters using settings from current profile&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Patch HW settings from profile</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="buttonsLayout">
<item>
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="burnButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Write to TX</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>burnButton</tabstop>
<tabstop>eepromFilename</tabstop>
<tabstop>eepromLoad</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
<connections/>
</ui>
+319
View File
@@ -0,0 +1,319 @@
#include "flashfirmwaredialog.h"
#include "ui_flashfirmwaredialog.h"
#include "appdata.h"
#include "converteeprom.h"
#include "eeprominterface.h"
#include "firmwareinterface.h"
#include "process_flash.h"
#include "helpers.h"
#include "hexinterface.h"
#include "progressdialog.h"
#include "radiointerface.h"
#include "progresswidget.h"
#include "splashlibrarydialog.h"
#if defined WIN32 || !defined __GNUC__
#include <windows.h>
#define sleep(x) Sleep(x*1000)
#else
#include <unistd.h>
#endif
FlashFirmwareDialog::FlashFirmwareDialog(QWidget *parent):
QDialog(parent),
ui(new Ui::FlashFirmwareDialog),
fwName(g.profile[g.id()].fwName())
{
ui->setupUi(this);
if (!g.profile[g.id()].splashFile().isEmpty()){
imageSource = PROFILE;
imageFile = g.profile[g.id()].splashFile();
ui->useProfileSplash->setChecked(true);
}
else {
imageSource = FIRMWARE;
imageFile = "";
ui->useProfileSplash->setDisabled(true);
}
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
// No backup on Taranis ... could be done if in massstorage
ui->backupEEprom->hide();
ui->backupEEprom->setCheckState(Qt::Unchecked);
}
else {
ui->backupEEprom->setCheckState(g.backupOnFlash() ? Qt::Checked : Qt::Unchecked);
}
QString backupPath = g.profile[g.id()].pBackupDir();
if (backupPath.isEmpty()) {
backupPath=g.backupDir();
}
if (backupPath.isEmpty() || !QDir(backupPath).exists()) {
ui->backupEEprom->setEnabled(false);
}
ui->checkHardwareCompatibility->setChecked(g.checkHardwareCompatibility());
updateUI();
resize(0, 0); // TODO needed?
}
FlashFirmwareDialog::~FlashFirmwareDialog()
{
delete ui;
}
void FlashFirmwareDialog::updateUI()
{
ui->firmwareFilename->setText(fwName);
ui->burnButton->setEnabled(QFile(fwName).exists());
FirmwareInterface firmware(fwName);
if (firmware.isValid()) {
ui->firmwareInfoFrame->show();
ui->date->setText(firmware.getDate() + " " + firmware.getTime());
ui->version->setText(firmware.getVersion());
ui->variant->setText(firmware.getEEpromId());
ui->date->setEnabled(true);
ui->version->setEnabled(true);
ui->variant->setEnabled(true);
if (firmware.hasSplash()) {
ui->splashFrame->show();
ui->splash->setFixedSize(firmware.getSplashWidth(), firmware.getSplashHeight());
}
else {
ui->splashFrame->hide();
}
}
else {
imageSource = FIRMWARE;
ui->firmwareInfoFrame->hide();
ui->splashFrame->hide();
}
QImage image;
switch(imageSource) {
case FIRMWARE:
ui->useFirmwareSplash->setChecked(true);
image = firmware.getSplash();
break;
case PROFILE:
ui->useProfileSplash->setChecked(true);
image.load(g.profile[g.id()].splashFile());
break;
case LIBRARY:
ui->useLibrarySplash->setChecked(true);
image.load(imageFile);
break;
case EXTERNAL:
ui->useExternalSplash->setChecked(true);
image.load(imageFile);
break;
}
if (!image.isNull()) {
ui->splash->setPixmap(makePixMap(image, g.profile[g.id()].fwType()));
}
}
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()) {
QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fwName));
}
updateUI();
}
}
void FlashFirmwareDialog::on_useFirmwareSplash_clicked()
{
FirmwareInterface firmware(fwName);
if (!firmware.isValid()) {
QMessageBox::warning(this, tr("Error"), tr( "The firmware file is not valid." ));
}
else if (!firmware.hasSplash()) {
QMessageBox::warning(this, tr("Error"), tr( "There is no start screen image in the firmware file." ));
}
else {
imageSource = FIRMWARE;
}
updateUI();
}
void FlashFirmwareDialog::on_useProfileSplash_clicked()
{
QString fileName = g.profile[g.id()].splashFile();
if (!fileName.isEmpty()) {
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Profile image %1 is invalid.").arg(fileName));
}
else {
imageSource = PROFILE;
}
}
updateUI();
}
void FlashFirmwareDialog::on_useExternalSplash_clicked()
{
QString supportedImageFormats;
for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) {
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
}
QString fileName = QFileDialog::getOpenFileName(this, tr("Open image file to use as radio start screen"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats));
if (!fileName.isEmpty()){
g.imagesDir( QFileInfo(fileName).dir().absolutePath() );
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Image could not be loaded from %1").arg(fileName));
}
else{
imageSource = EXTERNAL;
imageFile = fileName;
}
}
updateUI();
}
void FlashFirmwareDialog::on_useLibrarySplash_clicked()
{
QString fileName;
SplashLibraryDialog *ld = new SplashLibraryDialog(this, &fileName);
ld->exec();
if (!fileName.isEmpty()) {
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("The library image could not be loaded"));
}
else {
imageSource = LIBRARY;
imageFile = fileName;
}
}
updateUI();
}
void FlashFirmwareDialog::on_burnButton_clicked()
{
g.flashDir(QFileInfo(fwName).dir().absolutePath());
g.profile[g.id()].fwName(fwName);
g.checkHardwareCompatibility(ui->checkHardwareCompatibility->isChecked());
g.backupOnFlash(ui->backupEEprom->isChecked());
qDebug() << "FlashFirmwareDialog: flashing" << fwName;
if (imageSource != FIRMWARE) {
// load the splash image
const QPixmap * pixmap = ui->splash->pixmap();
QImage image;
if (pixmap) {
image = pixmap->toImage().scaled(ui->splash->width(), ui->splash->height());
}
if (image.isNull()) {
QMessageBox::critical(this, tr("Warning"), tr("Splash image not found"));
return;
}
// write the customized firmware
QString tempFile;
if (getFileType(fwName) == FILE_TYPE_HEX)
tempFile = generateProcessUniqueTempFileName("flash.hex");
else
tempFile = generateProcessUniqueTempFileName("flash.bin");
qDebug() << "FlashFirmwareDialog: patching" << fwName << "with custom splash screen and saving to" << tempFile;
FirmwareInterface firmware(fwName);
firmware.setSplash(image);
if (firmware.save(tempFile) <= 0) {
QMessageBox::critical(this, tr("Warning"), tr("Cannot save customized firmware"));
return;
}
startFlash(tempFile);
}
else {
startFlash(fwName);
}
}
void FlashFirmwareDialog::on_cancelButton_clicked()
{
close();
}
void FlashFirmwareDialog::shrink()
{
resize(0, 0);
}
void FlashFirmwareDialog::startFlash(const QString &filename)
{
bool backup = g.backupOnFlash();
close();
ProgressDialog progressDialog(this, tr("Write Firmware to Radio"), CompanionIcon("write_flash.png"));
// check hardware compatibility if requested
if (g.checkHardwareCompatibility()) {
QString tempFirmware = generateProcessUniqueTempFileName("flash-check.bin");
if (!readFirmware(tempFirmware, progressDialog.progress())) {
QMessageBox::warning(this, tr("Firmware check failed"), tr("Could not check firmware from radio"));
return;
}
FirmwareInterface previousFirmware(tempFirmware);
qunlink(tempFirmware);
FirmwareInterface newFirmware(filename);
qDebug() << "startFlash: checking firmware compatibility between " << tempFirmware << "and" << filename;
if (!newFirmware.isHardwareCompatible(previousFirmware)) {
QMessageBox::warning(this, tr("Firmware check failed"), tr("New firmware is not compatible with the one currently installed!"));
if (isTempFileName(filename)) {
qDebug() << "startFlash: removing temporary file" << filename;
qunlink(filename);
}
return;
}
}
// backup if requested
bool result = true;
QString backupFilename;
QString backupPath;
if (backup) {
backupPath = g.profile[g.id()].pBackupDir();
if (backupPath.isEmpty()) {
backupPath=g.backupDir();
}
backupFilename = backupPath + "/backup-" + QDateTime().currentDateTime().toString("yyyy-MM-dd-HHmmss") + ".bin";
result = readEeprom(backupFilename, progressDialog.progress());
sleep(2);
}
// flash
result = (result && writeFirmware(filename, progressDialog.progress()));
// restore if backup requested
if (backup && result) {
sleep(2);
QString restoreFilename = generateProcessUniqueTempFileName("restore.bin");
if (!convertEEprom(backupFilename, restoreFilename, filename)) {
QMessageBox::warning(this, tr("Conversion failed"), tr("Cannot convert Models and Settings for use with this firmware, original data will be used"));
restoreFilename = backupFilename;
}
if (!writeEeprom(restoreFilename, progressDialog.progress())) {
QMessageBox::warning(this, tr("Restore failed"), tr("Could not restore Models and Settings to Radio. The models and settings data file can be found at: %1").arg(backupFilename));
}
}
progressDialog.progress()->setInfo(tr("Flashing done"));
progressDialog.exec();
if (isTempFileName(filename)) {
qDebug() << "startFlash: removing temporary file" << filename;
qunlink(filename);
}
}
+56
View File
@@ -0,0 +1,56 @@
#ifndef FLASH_FIRMWARE_DIALOG_H
#define FLASH_FIRMWARE_DIALOG_H
#include <QtGui>
#include <QDialog>
#include "eeprominterface.h"
#include "firmwareinterface.h"
#include "xmlinterface.h"
#define HEX_FILES_FILTER "HEX files (*.hex);;"
#define BIN_FILES_FILTER "BIN files (*.bin);;"
#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 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"
#define EEPE_MODEL_FILE_HEADER "EEPE MODEL FILE"
namespace Ui
{
class FlashFirmwareDialog;
}
class FlashFirmwareDialog : public QDialog
{
Q_OBJECT
public:
FlashFirmwareDialog(QWidget *parent = 0);
~FlashFirmwareDialog();
private slots:
void on_firmwareLoad_clicked();
void on_burnButton_clicked();
void on_cancelButton_clicked();
void on_useProfileSplash_clicked();
void on_useFirmwareSplash_clicked();
void on_useLibrarySplash_clicked();
void on_useExternalSplash_clicked();
void shrink();
protected:
void updateUI();
void startFlash(const QString &filename);
private:
Ui::FlashFirmwareDialog *ui;
QString fwName;
RadioData radioData;
enum ImageSource {FIRMWARE, PROFILE, LIBRARY, EXTERNAL};
ImageSource imageSource;
QString imageFile;
};
#endif // FLASH_FIRMWARE_DIALOG_H
+321
View File
@@ -0,0 +1,321 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FlashFirmwareDialog</class>
<widget class="QDialog" name="FlashFirmwareDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>421</width>
<height>375</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Flash Firmware</string>
</property>
<property name="windowIcon">
<iconset resource="companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout2">
<item>
<widget class="QLineEdit" name="firmwareFilename">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="firmwareLoad">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Load...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="firmwareInfoFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="3" column="0">
<widget class="QLabel" name="dateLabel">
<property name="text">
<string>Date &amp; Time</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="version">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="buildLabel">
<property name="text">
<string>Variant</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="variant">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="versionLabel">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="date">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="splashFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="useProfileSplash">
<property name="text">
<string>Use profile start screen</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="useFirmwareSplash">
<property name="text">
<string>Use firmware start screen</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="useLibrarySplash">
<property name="text">
<string>Use library start screen</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="useExternalSplash">
<property name="text">
<string>Use another start screen</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="splash">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>214</width>
<height>66</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkHardwareCompatibility">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Allows Companion to write to older version of the firmware</string>
</property>
<property name="text">
<string>Check Hardware compatibility</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="backupEEprom">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Backup and restore Models and Settings</string>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="spacer2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout1">
<item>
<spacer name="spacer1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="burnButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Write to TX</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>burnButton</tabstop>
<tabstop>firmwareFilename</tabstop>
<tabstop>firmwareLoad</tabstop>
<tabstop>version</tabstop>
<tabstop>variant</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
<connections/>
</ui>
+18 -17
View File
@@ -1,35 +1,36 @@
#include "fusesdialog.h"
#include "ui_fusesdialog.h"
#include "burnconfigdialog.h"
#include "helpers.h"
#include "progressdialog.h"
#include "radiointerface.h"
fusesDialog::fusesDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::fusesDialog)
FusesDialog::FusesDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::FusesDialog)
{
ui->setupUi(this);
this->setWindowIcon(CompanionIcon("fuses.png"));
ui->setupUi(this);
setWindowIcon(CompanionIcon("fuses.png"));
}
fusesDialog::~fusesDialog()
FusesDialog::~FusesDialog()
{
delete ui;
delete ui;
}
void fusesDialog::on_resetFuses_EEprotect_clicked()
void FusesDialog::on_resetFuses_EEprotect_clicked()
{
burnConfigDialog *bcd = new burnConfigDialog(this);
bcd->restFuses(true);
ProgressDialog progressDialog(this, tr("Reset Radio Fuses"), CompanionIcon("fuses.png"), true);
return resetAvrdudeFuses(true, progressDialog.progress());
}
void fusesDialog::on_resetFuses_EEdelete_clicked()
void FusesDialog::on_resetFuses_EEdelete_clicked()
{
burnConfigDialog *bcd = new burnConfigDialog(this);
bcd->restFuses(false);
ProgressDialog progressDialog(this, tr("Reset Radio Fuses"), CompanionIcon("fuses.png"), true);
return resetAvrdudeFuses(false, progressDialog.progress());
}
void fusesDialog::on_readFuses_clicked()
void FusesDialog::on_readFuses_clicked()
{
burnConfigDialog *bcd = new burnConfigDialog(this);
bcd->readFuses();
ProgressDialog progressDialog(this, tr("Read Fuses from Radio"), CompanionIcon("fuses.png"), true);
return readAvrdudeFuses(progressDialog.progress());
}
+15 -14
View File
@@ -1,27 +1,28 @@
#ifndef FUSESDIALOG_H
#define FUSESDIALOG_H
#ifndef FUSESDIALOG_H_
#define FUSESDIALOG_H_
#include <QDialog>
namespace Ui {
class fusesDialog;
class FusesDialog;
}
class fusesDialog : public QDialog
class FusesDialog : public QDialog
{
Q_OBJECT
Q_OBJECT
public:
explicit fusesDialog(QWidget *parent = 0);
~fusesDialog();
private:
Ui::fusesDialog *ui;
explicit FusesDialog(QWidget *parent = 0);
~FusesDialog();
private slots:
void on_readFuses_clicked();
void on_resetFuses_EEdelete_clicked();
void on_resetFuses_EEprotect_clicked();
void on_readFuses_clicked();
void on_resetFuses_EEdelete_clicked();
void on_resetFuses_EEprotect_clicked();
private:
Ui::FusesDialog *ui;
};
#endif // FUSESDIALOG_H
#endif // FUSESDIALOG_H_
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>fusesDialog</class>
<widget class="QDialog" name="fusesDialog">
<class>FusesDialog</class>
<widget class="QDialog" name="FusesDialog">
<property name="geometry">
<rect>
<x>0</x>
+1 -1
View File
@@ -52,7 +52,7 @@ void FirmwarePreferencesDialog::on_fw_dnld_clicked()
void FirmwarePreferencesDialog::on_voice_dnld_clicked()
{
QString url = "http://voices-20.open-tx.org/";
QString url = "http://voices-21.open-tx.org/";
QString fwType = g.profile[g.id()].fwType();
QStringList list = fwType.split("-");
QString firmware = QString("%1-%2").arg(list[0]).arg(list[1]);
+5 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>416</width>
<height>153</height>
<height>154</height>
</rect>
</property>
<property name="sizePolicy">
@@ -177,6 +177,10 @@ May be different from firmware language</string>
</layout>
</widget>
<tabstops>
<tabstop>checkFWUpdates</tabstop>
<tabstop>fw_dnld</tabstop>
<tabstop>voiceCombo</tabstop>
<tabstop>voice_dnld</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>

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