Compare commits

...

238 Commits

Author SHA1 Message Date
mhotar 2a0b34146f Czech translations (Companion) 2015-01-11 22:16:13 +01:00
Bertrand Songis b13598d788 Merge pull request #1993 from opentx/MicheleVilla/C9X_IT_Translation
Italian translation in progress
2015-01-11 16:40:46 +01:00
MicheleVilla 4a59b9032b Italian translation in progress 2015-01-11 16:38:16 +01:00
Bertrand Songis 47a7b9f08b Update DONATIONS.txt 2015-01-11 13:00:31 +01:00
MicheleVilla 22a2b6f325 Italian translation in progress 2015-01-11 09:44:10 +01:00
Andre Bernet 84fe66bc82 Companion french translations 2015-01-10 20:00:41 +04:00
bsongis 89db641a9c Fixes #1992 2015-01-10 11:10:01 +01:00
Bertrand Songis 81001f9e24 Update releasenotes.txt
Missing tags
2015-01-10 08:55:10 +01:00
Bertrand Songis a731fb4a29 Update releasenotes.txt 2015-01-09 21:50:09 +01:00
bsongis d0e2caba46 #1942 - Test inverted as requested by the majority ;) 2015-01-09 21:45:32 +01:00
Damjan Adamic 10e71abe4d Release notes updated 2015-01-09 20:54:34 +01:00
Damjan Adamic 10b1836a31 Fixes #1987: gtests for lcd_line() 2015-01-09 19:25:43 +01:00
Bertrand Songis 2860d842dd Merge pull request #1989 from opentx/projectkk2glider/issue_1987
Projectkk2glider/issue 1987
2015-01-09 18:59:28 +01:00
Damjan Adamic a18a79bcba Fixes #1987: missing bitmap for gtests 2015-01-09 18:38:16 +01:00
Damjan Adamic 6d46d52bfd Fixes #1987: bmpLoad() last column not loaded for some bitmap widths, gtests added 2015-01-09 18:33:17 +01:00
bsongis 729f68f33f #1732 - First code review. Nothing obvious found except a buffer
overflow
2015-01-09 17:12:41 +01:00
bsongis 59966a1e40 Fixes #1775 - Review and tests needed 2015-01-09 15:49:59 +01:00
bsongis caf0c42cac Fixes #1942 - Review needed, thanks! If it works it could be used in
some other places.
2015-01-09 15:12:37 +01:00
Damjan Adamic dc295c8cb4 Fixes #1981: Edge function INSTANT bug for V1>2s 2015-01-09 14:26:39 +01:00
Damjan Adamic 641187c3af Re #1987: first pixel not drawn by Lua lcd.drawLine() 2015-01-09 13:56:44 +01:00
bsongis 026b0f141e Fixes #1876 - Popup displayed when flavour from previous firmware exists
and is not compatible with the current flavour. Fortunately FrSky always
inserted a flavour in their radios, so it works. Tested on my Taranis+ I
would appreciate someone else tests on a standard Taranis, thanks!
2015-01-09 12:22:48 +01:00
Bertrand Songis d28c1417c7 Update DONATIONS.txt 2015-01-09 08:50:32 +01:00
Damjan Adamic f37092efd0 Bootloader now uses NANO setting from the main Makefile 2015-01-08 08:26:36 +01:00
Bertrand Songis d95518c91e Merge pull request #1984 from kh90909/pwm-bl-fix
Tested fix for PWM_BACKLIGHT on ATmega2561 MCUs
2015-01-08 07:44:18 +01:00
Ken ed4465d78f 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 00:52:21 -05:00
Bertrand Songis b7de352e83 Merge pull request #1978 from davxlw/davxlw_lcd_putsCenter
Little lcd_putsCenter correction
2015-01-07 07:07:07 +01:00
davxlw 42aa3ca4ba Little lcd_putsCenter correction, still doesn't take the different characters
sizes into account...
2015-01-06 17:06:51 +01:00
Bertrand Songis f4afe50c32 Merge pull request #1974 from adriano65/Correction01_#1895
Issue #1935 - added Mavlink 115200 Baud speed - to test
2015-01-06 07:33:33 +01:00
adriano65 8726fe1329 Issue #1935 - added Mavlink 115200 Baud speed - to test 2015-01-06 01:18:35 +01:00
mhotar 2fc2c58338 Merge branch 'master' of https://github.com/opentx/opentx 2015-01-05 23:04:23 +01:00
mhotar f44a744a09 Czech translations 2015-01-05 23:02:51 +01:00
Bertrand Songis b0b29b57fe Update DONATIONS.txt 2015-01-05 22:51:37 +01:00
Bertrand Songis 9f70a5baaf Merge pull request #1971 from adriano65/Correction01_#1895
Correction to "compilation error on 9XR with MAVLINK extension"
2015-01-05 06:42:34 +01:00
adriano65 38c8b95fd7 Correction to "compilation error on 9XR with MAVLINK extension" 2015-01-05 00:17:36 +01:00
bsongis bc0969181e Quick fix for #1970 - I don't have any 2561 for testing, I let you test
and fix if needed!
2015-01-04 23:39:29 +01:00
Damjan Adamic 16bdd1ae93 Re #1489, #1270, Re #1466: Allow only one instance of new dialogs, enable telemetryInterrupt10ms() call 2015-01-04 20:20:30 +01:00
bsongis 15eb56908c Fixes #1961 2015-01-04 17:14:35 +01:00
bsongis e74ab6f15b Fixes #1793 - cp won't work on some Linux distributions 2015-01-04 15:42:23 +01:00
Bertrand Songis 7bf73ac365 Update DONATIONS.txt 2015-01-04 10:00:29 +01:00
Damjan Adamic a5d14f631f Re #457: AUDIO_FILENAME_MAXLEN to small 2015-01-03 12:52:26 +01:00
Damjan Adamic 5947054e3b Release notes updated 2015-01-03 11:09:15 +01:00
Damjan Adamic 8255a84571 Re #1489: windows build didn't like the redefiniton of callback function 2015-01-03 07:04:14 +01:00
Bertrand Songis 91fdbd17c0 Update DONATIONS.txt 2015-01-02 23:07:39 +01:00
Bertrand Songis c3ece1f12f Merge pull request #1967 from opentx/projectkk2glider/companion_simulator_extensions
Projectkk2glider/companion simulator extensions
2015-01-02 20:01:12 +01:00
Damjan Adamic beb93fdf5f Re #1466, #1489, #1270: added missing delete on close 2015-01-02 19:29:00 +01:00
Damjan Adamic 5d60f776ad Re #1270: trainer for Sky9x 2015-01-02 19:29:00 +01:00
Damjan Adamic 07f238b974 Re #1489: TRACE() output intercepted and shown in Companion (shortcut F6) 2015-01-02 19:29:00 +01:00
Damjan Adamic c916bb38d0 Re #1270: simple Trainer Simulator (shortcut F5)
Re #1466: small fixes to Telemetry simulator
2015-01-02 19:28:59 +01:00
Damjan Adamic a1ceb4a4f3 Re #1466: Telemetry simulator opening moved to class SimulatorDialog 2015-01-02 19:09:51 +01:00
Damjan Adamic 263d2cf201 Re #1466: Very simple telemetry (or receiver) simulation for Taranis. Simulates RSSI, SWR, A1 and A2. Uses F4 key as a open shortcut. 2015-01-02 19:09:51 +01:00
bsongis 482d7e0335 Bug introduced in commit c8eba005d3 2015-01-02 12:20:57 +01:00
bsongis 4f323d980f VC++ Compilation error for #1965 2015-01-02 08:13:55 +01:00
Bertrand Songis eb7b662ff2 Update DONATIONS.txt 2015-01-02 08:08:50 +01:00
bsongis 689dacf577 Fixes #1965 2015-01-01 21:24:25 +01:00
bsongis 8762e46dbb Fixes #1960 2015-01-01 20:16:00 +01:00
bsongis c8eba005d3 Fixes #1940 - Also adds a "stops" feature in checkIncDec that could be
useful in a next future
2015-01-01 19:52:41 +01:00
bsongis 34a1b2eeca Warnings removed 2015-01-01 19:47:36 +01:00
bsongis 2ae475a9e8 #1876 - Companion now recognizes the radio type from the binary file 2015-01-01 13:17:22 +01:00
bsongis 5413619846 #1876 - Radio identifier added inside the firmware - it will help
Companion to recognize the radio type and avoid to flash a wrong
firmware.
2015-01-01 11:31:57 +01:00
Damjan Adamic 9bc7ed52d4 Re #1963: fixes the case of power switch fast OFF->ON sequence. 2015-01-01 09:29:15 +01:00
Damjan Adamic 1de327e386 Fixes #1964 and possibly #1963: TIM13 was used by bootloader and delays.c, lcdInitFinish() was missing from lcdSetRefVolt(), simplified LCD init interface for Taranis, delaysInit() was missing from Bootloader (ported 7b19afa96f from next branch) 2014-12-31 19:34:15 +01:00
Bertrand Songis 039d084228 Update DONATIONS.txt 2014-12-31 11:19:44 +01:00
Bertrand Songis b7aab8b64f Merge pull request #1957 from opentx/projectkk2glider/botloader_nano_lib
Projectkk2glider/botloader nano lib
2014-12-29 20:33:19 +01:00
Damjan Adamic cffd5aa2bc Default changed to link with nano lib (NANO=YES), reduces opentx size from 340040 to 323056 bytes 2014-12-27 12:49:20 +01:00
Damjan Adamic 01d9445a49 Using nano lib reduces bootloader size for Taranis from 31880 to 31004 bytes. 2014-12-27 12:38:10 +01:00
Bertrand Songis 9c2f9b8b78 Update DONATIONS.txt 2014-12-23 07:32:59 +01:00
Bertrand Songis 4ab58cb559 Update DONATIONS.txt 2014-12-22 21:08:55 +01:00
Damjan Adamic 1804bcd133 Fixes #1927: THt persistent timer running after model load (with Throttle at -100%) 2014-12-21 20:25:18 +01:00
Bertrand Songis 4b8d9a5549 Merge pull request #1948 from opentx/projectkk2glider/issue1937_ppm_polarity
Re #1937: reverse polarity on external CPPM output (Taranis all)
2014-12-21 00:11:53 +01:00
Bertrand Songis 7426bfafc0 Merge pull request #1947 from opentx/projectkk2glider/issue1800_center_beep_for_noexisting_pot
Fixes #1800: suppress center beep for non-existing pots
2014-12-21 00:11:20 +01:00
Damjan Adamic c9e66c9502 Re #1937: reverse polarity on external CPPM output (Taranis all) 2014-12-20 20:42:33 +01:00
Bertrand Songis bb57632121 Update DONATIONS.txt 2014-12-20 20:18:40 +01:00
Damjan Adamic aa739f394c Fixes #1800: suppress center beep for non-existing pots 2014-12-20 19:41:46 +01:00
Damjan Adamic 2ecbd8e6a9 Turn on back-light in LCD_BL_Config() for REVPLUS (normal Taranis already did this) 2014-12-20 18:58:46 +01:00
Bertrand Songis edabaed304 Update DONATIONS.txt 2014-12-20 09:34:58 +01:00
bsongis 75fd4378fe LCD bugfix on EEPROM alerts. No more Splash if splash disabled 2014-12-18 19:03:52 +01:00
bsongis bf60fd2631 Fixes #1918 2014-12-16 21:55:01 +01:00
Bertrand Songis 8e06e4b8a3 Merge pull request #1936 from opentx/projectkk2glider/issue1919_gvars_invert_take_two
Fixes #1919: Shortcuts keys for inverting values don't work correctly wi...
2014-12-15 23:50:28 +01:00
Bertrand Songis 62f3f71bb3 Update DONATIONS.txt 2014-12-15 23:17:26 +01:00
Damjan Adamic 64227a2cb6 Re #1919: disabled DBLKEYS for !ARM 2014-12-15 21:41:46 +01:00
Bertrand Songis d911220697 Merge pull request #1933 from opentx/projectkk2glider/issue1909_tab_order_2
Projectkk2glider/issue1909 tab order 2
2014-12-15 18:39:05 +01:00
Damjan Adamic 001f53efe3 Fixes #1919: Shortcuts keys for inverting values don't work correctly with GVs 2014-12-15 15:54:46 +01:00
Damjan Adamic 1161647908 Re #1909: tabs fixed for Model Edit -> Setup tab 2014-12-14 16:01:10 +01:00
Damjan Adamic b54afa04e6 Re #1909: tabs fixed for Radio Profile firmware options 2014-12-14 15:30:31 +01:00
Damjan Adamic bfeda24dcd Re #1835: fix for negative trim index 2014-12-14 14:15:56 +01:00
Damjan Adamic ef6b36526d Fixed #1835: Issue with heli swash plate mixing (notrim) 2014-12-14 12:42:05 +01:00
Damjan Adamic 67990ea9a3 Fixes #1869: Google Earth additional fields exported as strings, support for variable number of columns 2014-12-14 10:00:31 +01:00
Bertrand Songis 446da70fb1 Merge pull request #1929 from opentx/projectkk2glider/issue1926_smlsize_fixes
Re #1926: SMLSIZE last line drawn, gtests expanded with LCD character ov...
2014-12-13 22:01:58 +01:00
Damjan Adamic 9e3c90dcd9 Re #1926: SMLSIZE last line drawn, gtests expanded with LCD character overlapped test 2014-12-13 21:24:22 +01:00
Damjan Adamic ef3bf78085 Re #1926: Fixed SMLSIZE gtests 2014-12-13 20:44:47 +01:00
Bertrand Songis 3118970cf4 Merge pull request #1928 from opentx/projectkk2glider/issue1926_display_glitches
Fixes #1926: Little display glitches
2014-12-13 20:21:39 +01:00
Damjan Adamic b9d951919e Fixes #1926: Little display glitches 2014-12-13 20:19:35 +01:00
bsongis 28d95f9844 Target addframeworks fixed as discussed in #1482 - untested 2014-12-12 23:11:06 +01:00
bsongis ed583e704f Fixes #1923 2014-12-12 18:14:32 +01:00
Bertrand Songis aba2e31ce2 Update DONATIONS.txt 2014-12-12 17:53:59 +01:00
Bertrand Songis be27447196 Fixes #1921 2014-12-12 07:19:11 +01:00
Bertrand Songis 2cc47a9146 Merge pull request #1920 from opentx/projectkk2glider/issue1909_tab_order
Fixes #1909: tab order in Companion dialogs
2014-12-11 22:18:53 +01:00
Damjan Adamic a86ec3bcb0 Fixes #1909: tab order in Companion dialogs 2014-12-11 19:31:29 +01:00
bsongis 1c45019403 Fixes #1915 2014-12-11 18:50:38 +01:00
Bertrand Songis 8f10e8e212 Update DONATIONS.txt 2014-12-10 19:03:40 +01:00
bsongis 704f1c95cc Fixes #1908 2014-12-09 21:37:11 +01:00
bsongis f50d94bded 2.0.14 preparation 2014-12-09 20:31:38 +01:00
bsongis 7a7371d651 MAVLINK adaptation for Sky9x and 9XRPRO - Closes #1895 2014-12-09 19:39:00 +01:00
Bertrand Songis be071767c7 Merge pull request #1877 from opentx/projectkk2glider/issue1875_lcd_low_temp
Fixes #1875 and #1849: implemented LCD initialization for low temperatures
2014-12-09 19:02:31 +01:00
bsongis 7f31bde6d0 Fixes #1903 2014-12-08 22:56:52 +01:00
bsongis 108109b579 Fixes #1905 2014-12-08 19:44:58 +01:00
Bertrand Songis ceff3262f9 Update DONATIONS.txt 2014-12-08 19:30:12 +01:00
Damjan Adamic bc31b7d3dd Re #1875 and #1849: the delay for Taranis Plus reduced to 300ms 2014-12-03 20:36:22 +01:00
Bertrand Songis bd8371892d Update DONATIONS.txt 2014-12-02 07:08:23 +01:00
Bertrand Songis 5cfcc27fb4 Update DONATIONS.txt 2014-11-27 18:25:57 +01:00
Damjan Adamic 8f07439943 Fixes #1875 and #1849: implemented LCD initialization for low temperatures. Initialization skipped in case of watchdog reset or boot-loader exit. 2014-11-26 21:04:00 +01:00
Damjan Adamic c052ff26c7 Fixes #1874: Wrong clock configuration for CoOS on Taranis 2014-11-26 17:33:01 +01:00
Bertrand Songis 5dd3af7d3c Update DONATIONS.txt 2014-11-26 07:53:42 +01:00
bsongis 5b9f0dd6a9 Nighly builds were broken (previous syntax was chosen for VC++
compilation!). Anyhow we shouldn't need this trick any more.
2014-11-25 07:11:21 +01:00
Bertrand Songis 7e2b78f2b5 Update DONATIONS.txt 2014-11-24 07:58:01 +01:00
Damjan Adamic b9e2635ec1 Corrected optimization level for sky9x DAC_IRQHandler() (was left in -O2 after that function) 2014-11-23 20:26:44 +01:00
Bertrand Songis caede92d09 Update DONATIONS.txt 2014-11-23 09:41:07 +01:00
bsongis e62651ac14 Fixes #1861 2014-11-22 19:07:39 +01:00
bsongis 643d45e4c0 Fixes #1867 2014-11-22 14:34:32 +01:00
Bertrand Songis a2e930d6a3 Update DONATIONS.txt 2014-11-22 07:14:41 +01:00
Damjan Adamic 9342be9e48 Debian package maintainer changed to Bertrand Songis <bsongis-nosp@m-gmail.com> 2014-11-21 22:06:39 +01:00
Damjan Adamic 125923d7d6 45-taranis.rules renamed to 45-companion-taranis.rules to solve the clash with the same file name from Companion9x debian package 2014-11-21 22:02:33 +01:00
Bertrand Songis fbdb328c6a Update DONATIONS.txt 2014-11-21 20:15:42 +01:00
Bertrand Songis 6c17e1efc8 Update DONATIONS.txt 2014-11-21 18:07:32 +01:00
Bertrand Songis 6273fb7e7c Update DONATIONS.txt 2014-11-21 07:59:12 +01:00
Bertrand Songis f6cc9067d8 Update DONATIONS.txt 2014-11-21 07:09:49 +01:00
Bertrand Songis 8ce5d38093 Update DONATIONS.txt 2014-11-21 00:16:05 +01:00
Bertrand Songis 9397c470da Update DONATIONS.txt 2014-11-20 23:54:16 +01:00
Bertrand Songis c8b3ea7f36 Update DONATIONS.txt 2014-11-20 23:10:48 +01:00
Bertrand Songis 3a55f85ef1 Update DONATIONS.txt 2014-11-20 22:11:00 +01:00
Bertrand Songis f5889dc912 Update DONATIONS.txt 2014-11-20 21:55:55 +01:00
Bertrand Songis f12b8a50ec Update DONATIONS.txt 2014-11-20 21:36:53 +01:00
Bertrand Songis b561967d3e Update DONATIONS.txt 2014-11-20 20:32:07 +01:00
bsongis b359aa12ba Fixes #1834
Fixes #1848
2014-11-19 22:35:35 +01:00
bsongis 5f81444ccb Release notes updated 2014-11-19 21:59:18 +01:00
bsongis e8aba51edb Fixes #1852 2014-11-19 20:27:57 +01:00
bsongis 6393f10ae4 Fixes #1851 2014-11-19 19:47:38 +01:00
bsongis 8a16b63b31 Mutex lock check added as suggested by projectkk2glider 2014-11-19 19:40:45 +01:00
bsongis a5d334b11d No more -O2 on all platforms 2014-11-19 07:12:13 +01:00
bsongis b51060f8f8 unexpectedShutdown sentinel removed 2014-11-18 23:29:27 +01:00
Bertrand Songis 0db8fc5ab2 Update DONATIONS.txt 2014-11-18 23:08:37 +01:00
bsongis 1c696c28fd ioMutex removed 2014-11-18 07:52:15 +01:00
bsongis f29d2074c1 openocd config file added 2014-11-18 00:30:01 +01:00
bsongis c12bc7326c Those ; are a little bit dangerous 2014-11-18 00:30:01 +01:00
Damjan Adamic 6365292bfe Updated release notes 2014-11-17 21:05:43 +01:00
bsongis d74bdef2ea Release notes updated (please update if I missed anything) 2014-11-17 19:06:50 +01:00
Bertrand Songis 884698c7f7 Update DONATIONS.txt 2014-11-17 07:37:25 +01:00
Damjan Adamic 1454764987 Enabled more complier warnings and removed one for Taranis. Other targets still have some warnings. 2014-11-15 11:43:52 +01:00
Bertrand Songis fb35ff098d Merge pull request #1843 from opentx/projectkk2glider/bmpload_fixes
Fixed bmpLoad():
2014-11-15 10:09:58 +01:00
bsongis 681064b11c Cosmetics 2014-11-15 10:09:33 +01:00
bsongis 87ebf0b90a Fixes #1834 - I will confirm with the JTAG that it is a compiler bug
later
2014-11-15 08:36:26 +01:00
Bertrand Songis 1f63108753 Update DONATIONS.txt 2014-11-14 19:57:52 +01:00
Damjan Adamic 649fffa439 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-12 19:45:00 +01:00
Bertrand Songis e3d08e9bab Update DONATIONS.txt 2014-11-12 07:08:06 +01:00
Bertrand Songis b4cc92b3f0 Update DONATIONS.txt 2014-11-11 20:35:17 +01:00
Bertrand Songis 9691d9f648 Update DONATIONS.txt 2014-11-11 09:04:08 +01:00
Damjan Adamic f02b9699d5 Re #1834 - fixed Companion simulator compilation for lastest FatFS 0.10c 2014-11-10 20:30:55 +01:00
bsongis b78556275b #1834 - Switch to lastest FatFS 0.10c 2014-11-10 18:53:37 +01:00
bsongis 1effa17204 #1834 ... In case we have negative indexes here ... 2014-11-09 22:53:24 +01:00
Damjan Adamic ff69164400 One more try for Windows Companion compile problem (lua_exports) 2014-11-09 21:08:18 +01:00
Damjan Adamic 86e8687d32 Possible solution for Windows Companion compile problem (lua_exports) 2014-11-09 20:44:09 +01:00
Damjan Adamic 85755312e4 Fixes #1839: Companion simulator Lua crash on Mac 2014-11-09 10:32:43 +01:00
Bertrand Songis f826d77f18 Merge pull request #1832 from opentx/projectkk2glider/issue_1783_for_master
Projectkk2glider/issue 1783 for master
2014-11-08 11:23:24 +01:00
bsongis 9dc4756789 In MixerDialog GVar checkbox for Curves was visible even when GVARS
disabled
2014-11-08 11:22:46 +01:00
Bertrand Songis afd04e0c44 Update DONATIONS.txt 2014-11-08 10:53:27 +01:00
Damjan Adamic d718ca03db This enables build of Companion on OS X
Remove the check for arm-gcc version when doing Companion build
2014-11-08 10:15:23 +01:00
Bertrand Songis ca4028cc7e Update DONATIONS.txt 2014-11-07 18:25:59 +01:00
Bertrand Songis 9c0b13eb6b Merge pull request #1827 from opentx/projectkk2glider/issue_1811_for_master
Fixes #1811: Companion 2.0.12 Gvar import error (for limits)
2014-11-03 23:56:42 +01:00
Damjan Adamic 5a10d85ee0 Re #1783: NOT curves removed from inputs (for non ARM platforms) 2014-11-03 22:15:05 +01:00
Damjan Adamic 2d80327ffd Re #1783: NOT curves exported incorrectly (for non ARM platforms) 2014-11-03 22:01:58 +01:00
Damjan Adamic 2a5ff5244f Re #1783: Companion shows too many curve types in input/mixer for 9x 2014-11-03 21:14:52 +01:00
Damjan Adamic 2ce1ec16fb Fixes #1811: Companion 2.0.12 Gvar import error (for limits) 2014-11-03 19:55:07 +01:00
Bertrand Songis 607a93b604 Update DONATIONS.txt 2014-11-03 18:36:57 +01:00
Bertrand Songis 75b7a0517b Merge pull request #1822 from opentx/projectkk2glider/issue_1731_for_master
Fixes #1731: Joystick calibration crash after channel assignment
2014-11-02 19:43:08 +01:00
Damjan Adamic cf54d28f35 Fixes #1731: Joystick calibration crash after channel assignment
also additional fixes to stick postion mapping
2014-11-02 18:58:06 +01:00
Bertrand Songis ffe8ee5a29 Update DONATIONS.txt 2014-11-02 18:06:42 +01:00
Bertrand Songis 552e3d468a Update DONATIONS.txt 2014-11-02 16:28:31 +01:00
Damjan Adamic 949369d6a8 Fixes #1815: Stick icons missing next to trim key states on switch diag page 2014-11-02 13:32:39 +01:00
Damjan Adamic 3b2cf5d738 Fixes #1737: virtual inputs not selectable in SF Volume and heli Collective Source 2014-11-02 12:52:45 +01:00
bsongis 5468bacad7 2.0.13 preparation 2014-11-02 11:07:47 +01:00
Bertrand Songis b8fea4d652 Merge pull request #1820 from opentx/projectkk2glider/issue_1818_for_master
Fixes #1818: added Lua model.resetTimer() function
2014-11-02 10:00:12 +01:00
Damjan Adamic 734480cc56 Fixes #1818: added Lua model.resetTimer() function 2014-11-02 09:26:36 +01:00
Bertrand Songis 30e0d441e4 Update DONATIONS.txt 2014-10-29 19:00:05 +01:00
bsongis 784238252a Simplification with a new #define. Also one test was inverted. 2014-10-28 18:07:46 +01:00
Andre Bernet 403a62478a Disable SWR if XJT version is 0xFF
Typo
2014-10-28 12:38:54 +04:00
bsongis c73ab26bc4 SWR readded to Taranis+ (when the hardware supports it) 2014-10-28 00:23:54 +01:00
bsongis c0783948e6 #1805 fixed 2014-10-26 15:57:00 +01:00
Damjan Adamic dc3ca96a2f Display message in case of Lua telemetry screen script error 2014-10-26 10:40:21 +01:00
Damjan Adamic 5664b4a141 Missing screenshots for previous commit 2014-10-25 20:04:16 +02:00
Damjan Adamic 7e18f53cbe Fixed buffer overflow in lcd_hlineStip() 2014-10-25 20:00:56 +02:00
Damjan Adamic 611e26d0bf Fixed buffer overflow in bmp_load() 2014-10-25 19:30:52 +02:00
bsongis ae7a36deeb A2- set to A2 if A2 > A2+ 2014-10-22 20:27:23 +02:00
bsongis 7c37277364 Little display problem for negative curves on 9X 2014-10-21 07:18:08 +02:00
bsongis 2230fbaa94 SWR added in the firmware as an option (SWR=YES) 2014-10-19 22:54:38 +02:00
bsongis 97bb1a4b4d Cosmetics 2014-10-19 22:54:38 +02:00
bsongis 82d385bcef SWR added for latest Taranis+ production 2014-10-19 22:54:38 +02:00
Bertrand Songis 34f9367e25 Update DONATIONS.txt 2014-10-19 18:46:19 +02:00
Bertrand Songis 205e510468 Update DONATIONS.txt 2014-10-19 09:55:22 +02:00
Andre Bernet 414a482ce4 Fix receiver number range (Fix #1790) 2014-10-17 22:44:57 +04:00
Damjan Adamic b24d071493 Bug in numbering of Lua multiple fields (only in generated documentation file, all numbers were too small by 1) 2014-10-16 18:26:42 +02:00
Bertrand Songis a50e2472e9 Update DONATIONS.txt 2014-10-15 21:33:41 +02:00
bsongis 29c95fd2a3 Cosmetics 2014-10-14 22:23:24 +02:00
Damjan Adamic c9875525a4 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
2014-10-14 22:14:36 +02:00
bsongis 6df7575ad8 Fixes #1785 2014-10-12 19:42:07 +02:00
bsongis 86c8d4a878 It was possible to have the Limits contextual menu displayed in
READ_ONLY mode
2014-10-11 21:47:12 +02:00
Bertrand Songis 6abc26c36a Update DONATIONS.txt 2014-10-10 19:25:08 +02:00
Bertrand Songis 966398426a Update DONATIONS.txt 2014-10-10 07:04:34 +02:00
mhotar d43a48f088 No special character in CZ names of Inputs.
Conflicts:
	radio/src/translations.cpp
	radio/src/translations.h
	radio/src/translations/cz.h.txt
2014-10-07 07:10:40 +02:00
mhotar 56b4698655 cz tts.py updated 2014-10-07 07:06:28 +02:00
Bertrand Songis 57f0c1b6f6 Update DONATIONS.txt 2014-10-06 21:14:51 +02:00
bsongis b89e16e627 Sky9x Coprocessor bug fix 2014-10-06 00:03:19 +02:00
bsongis 9e4e990d33 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-06 00:02:40 +02:00
bsongis a7c893607a Companion bug in model import fixed (after changing radio in the same
session)
2014-10-05 19:32:02 +02:00
Damjan Adamic e477183026 Fixes #1755 (on master branch): LUA get/setTimer(): inconsistent timer struct 2014-10-05 14:52:13 +02:00
bsongis a4698287f8 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:36:42 +02:00
Damjan Adamic b035a8df64 Fixes #1657 (ported from next to master):
* corrected varioLimitCenterMin range
* removed varioLimitMinOff checkbox (it is not used anymore in any radio)
2014-10-01 19:38:56 +02:00
Damjan Adamic 223be49c5d Fixes #1696: fixed incorrect display of "<" and ">" characters (ported from next to master branch) 2014-10-01 19:30:13 +02:00
Bertrand Songis ac8312de36 Update DONATIONS.txt 2014-10-01 07:10:41 +02:00
Bertrand Songis 46a9151bcf Update DONATIONS.txt 2014-09-30 07:11:33 +02:00
Bertrand Songis 0e9536fea9 Update DONATIONS.txt 2014-09-28 22:01:22 +02:00
Bertrand Songis 64d86c4c74 Update DONATIONS.txt 2014-09-26 23:40:52 +02:00
Bertrand Songis 151a09149d Update DONATIONS.txt 2014-09-26 07:19:57 +02:00
Bertrand Songis fd53eba65f Update DONATIONS.txt 2014-09-25 10:36:31 +02:00
Bertrand Songis 393f599ecf Update DONATIONS.txt 2014-09-24 19:56:36 +02:00
bsongis 1fbb4effed Tests failure 2014-09-24 15:22:20 +02:00
Bertrand Songis fe95488a83 Update DONATIONS.txt 2014-09-24 14:52:04 +02:00
bsongis c9b9de2c99 Fixes #1630 - Thanks to projectkk2glider for his pull request #1738 - I
only added a google test
2014-09-24 10:04:18 +02:00
bsongis 3adc4c20a6 Automatic google tests fix 2014-09-24 09:24:02 +02:00
Bertrand Songis 227a886122 Update DONATIONS.txt 2014-09-24 07:24:38 +02:00
Bertrand Songis de625fde01 Update DONATIONS.txt 2014-09-23 08:27:32 +02:00
Bertrand Songis daad477250 Update DONATIONS.txt 2014-09-22 17:40:37 +02:00
Bertrand Songis 334a718a8a Update DONATIONS.txt 2014-09-22 10:33:37 +02:00
Bertrand Songis 5baaec1868 Update DONATIONS.txt 2014-09-20 19:01:31 +02:00
Bertrand Songis c2ad82eb35 Update DONATIONS.txt 2014-09-19 15:19:15 +02:00
Bertrand Songis c61c417f13 Update DONATIONS.txt 2014-09-19 12:58:46 +02:00
bsongis 98f156301a Fixes #1727 2014-09-18 08:35:12 +02:00
Bertrand Songis ef6fe0006e Update DONATIONS.txt 2014-09-17 23:35:57 +02:00
Bertrand Songis 23358c254c Update DONATIONS.txt 2014-09-17 15:53:33 +02:00
198 changed files with 8680 additions and 5108 deletions
+71
View File
@@ -602,3 +602,74 @@ Ronald Donker
Fredie Singh
Patrizio Simoncini (monthly)
Harald Gabler
Michael Brown
Julien Gérard
Alexandre d'Alton
Peter Mergaerts
Jan Houwers
Gordon Stahl
Christian Grandjean
Roger Bergevin
NorthSide
Sigmund Martinsen
Lionel Lafraise
Gisli Ofeigsson
The Gruvin9x Project
Manuel McLure
Fernando Rimoldi
Hiltenkamp Stephan
Sandeep Kishore Jain
Sebastien Charpentier
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
Mike Perkins
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
+35
View File
@@ -1,3 +1,38 @@
<h2>Version 2.0.14 / todo</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 FRIMWARE.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>
+7 -8
View File
@@ -2,7 +2,7 @@ PROJECT( companion )
SET( C9X_VERSION_MAJOR "2" )
SET( C9X_VERSION_MINOR "0" )
SET( C9X_VERSION_REVISION "12" )
SET( C9X_VERSION_REVISION "14" )
SET( C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION} )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
@@ -89,7 +89,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${RADIO_SRC_DIRECTORY}/lua_exports.inc
COMMAND make lua_exports.cpp
COMMAND make PCB=TARANIS lua_exports.cpp
DEPENDS ${RADIO_SRC_DIRECTORY}/myeeprom.h
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
@@ -364,7 +364,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
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( FILES ../targets/linux/45-companion-taranis.rules DESTINATION /etc/udev/rules.d/ )
# Linux specific code
SET(OperatingSystem "Linux")
ELSE (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -411,14 +411,13 @@ IF( APPLE )
COMMAND mkdir -p companion.app/Contents/Resources
COMMAND mkdir -p companion.app/Contents/translations
COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files
#COMMAND rsync ${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 -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../targets/mac/qt_menu.nib companion.app/Contents/Resources/
COMMAND rsync -r /Library/Frameworks/SDL.framework companion.app/Contents/Frameworks/
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
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} )
ADD_CUSTOM_TARGET( makedmg
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app -dmg -no-plugins
@@ -453,7 +452,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})
+3
View File
@@ -499,6 +499,7 @@ QString AppData::snapshotDir() { return _snapshotDir; }
QString AppData::updatesDir() { return _updatesDir; }
bool AppData::enableBackup() { return _enableBackup; }
bool AppData::checkHardwareCompatibility() { return _checkHardwareCompatibility; }
bool AppData::backupOnFlash() { return _backupOnFlash; }
bool AppData::jsSupport() { return _jsSupport; }
bool AppData::maximized() { return _maximized; }
@@ -550,6 +551,7 @@ void AppData::updatesDir (const QString x) { store(x, _updatesDir,
void AppData::enableBackup (const bool x) { store(x, _enableBackup, "backupEnable" );}
void AppData::backupOnFlash (const bool x) { store(x, _backupOnFlash, "backupOnFlash" );}
void AppData::checkHardwareCompatibility(const bool x) { store(x, _checkHardwareCompatibility, "checkHardwareCompatibility");}
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" );}
@@ -675,6 +677,7 @@ AppData::AppData()
getset( _updatesDir, "lastUpdatesDir" ,"" );
getset( _enableBackup, "backupEnable" ,false );
getset( _checkHardwareCompatibility, "checkHardwareCompatibility", true );
getset( _backupOnFlash, "backupOnFlash" ,true );
getset( _jsSupport, "js_support" ,false );
getset( _maximized, "maximized" ,false );
+3
View File
@@ -226,6 +226,7 @@ class AppData: protected CompStoreObj
bool _enableBackup;
bool _backupOnFlash;
bool _checkHardwareCompatibility;
bool _maximized;
bool _jsSupport;
bool _showSplash;
@@ -278,6 +279,7 @@ class AppData: protected CompStoreObj
bool enableBackup();
bool backupOnFlash();
bool checkHardwareCompatibility();
bool jsSupport();
bool maximized();
bool showSplash();
@@ -329,6 +331,7 @@ class AppData: protected CompStoreObj
void enableBackup (const bool);
void backupOnFlash (const bool);
void checkHardwareCompatibility (const bool);
void maximized (const bool);
void jsSupport (const bool);
void showSplash (const bool);
+8 -2
View File
@@ -263,8 +263,9 @@ void AppPreferencesDialog::on_joystickChkB_clicked() {
}
}
void AppPreferencesDialog::on_joystickcalButton_clicked() {
joystickDialog * jd=new joystickDialog(this, ui->joystickCB->currentIndex());
void AppPreferencesDialog::on_joystickcalButton_clicked()
{
JoystickDialog *jd = new JoystickDialog(this, ui->joystickCB->currentIndex());
jd->exec();
}
#endif
@@ -434,6 +435,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 +443,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 +457,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
if (opt.name == QString("voice")) {
voice = cb;
}
prevFocus = cb;
}
}
}
+17 -6
View File
@@ -1049,10 +1049,26 @@ Mode 4:
</layout>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>profileNameLE</tabstop>
<tabstop>removeProfileButton</tabstop>
<tabstop>downloadVerCB</tabstop>
<tabstop>langCombo</tabstop>
<tabstop>voiceCombo</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>SplashSelect</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>sdPath</tabstop>
<tabstop>sdPathButton</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
<tabstop>ge_lineedit</tabstop>
<tabstop>ge_pathButton</tabstop>
<tabstop>historySize</tabstop>
<tabstop>showSplash</tabstop>
<tabstop>modelWizard_CB</tabstop>
<tabstop>startupCheck_fw</tabstop>
<tabstop>startupCheck_companion9x</tabstop>
<tabstop>backupPath</tabstop>
@@ -1061,7 +1077,6 @@ Mode 4:
<tabstop>splashincludeCB</tabstop>
<tabstop>libraryPath</tabstop>
<tabstop>libraryPathButton</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
@@ -1070,11 +1085,7 @@ Mode 4:
<tabstop>joystickCB</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickcalButton</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
+1 -1
View File
@@ -138,7 +138,7 @@ void avrOutputDialog::doCopy()
if (source.open(QIODevice::ReadOnly)) {
QFile dest(destFile);
if (dest.open(QIODevice::WriteOnly)) {
if (dest.open(QIODevice::ReadWrite)) {
addText(tr("Writing file: "));
for (int i=0; i<blocks; i++) {
int read = source.read(buf, BLKSIZE);
+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>
+3
View File
@@ -42,6 +42,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEbackupCB->hide();
}
ui->checkFirmwareCB->setChecked(g.checkHardwareCompatibility());
}
else {
ui->FlashLoadButton->setText(tr("Browse for file"));
@@ -49,6 +50,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
ui->patchcalib_CB->hide();
ui->patchhw_CB->hide();
ui->EEpromCB->hide();
ui->checkFirmwareCB->hide();
ui->BurnFlashButton->setDisabled(true);
ui->FWFileName->clear();
ui->DateField->clear();
@@ -408,6 +410,7 @@ void burnDialog::on_useLibraryImageCB_clicked()
void burnDialog::on_BurnFlashButton_clicked()
{
if (hexType==FLASH_FILE_TYPE) {
g.checkHardwareCompatibility(ui->checkFirmwareCB->isChecked());
QString fileName=ui->FWFileName->text();
if (!fileName.isEmpty()) {
g.flashDir( QFileInfo(fileName).dir().absolutePath() );
+28 -11
View File
@@ -30,7 +30,7 @@
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="2" column="0">
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="hs2">
@@ -76,6 +76,19 @@
</item>
</layout>
</item>
<item row="2" 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>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_4">
<item row="5" column="0">
@@ -342,26 +355,29 @@
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QCheckBox" name="checkFirmwareCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
<property name="toolTip">
<string>Allows Companion to write to older version of the firmware</string>
</property>
</spacer>
<property name="text">
<string>Check Firmware compatibility</string>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>BurnFlashButton</tabstop>
<tabstop>FWFileName</tabstop>
<tabstop>FlashLoadButton</tabstop>
<tabstop>versionField</tabstop>
<tabstop>ModField</tabstop>
<tabstop>DateField</tabstop>
<tabstop>useProfileImageCB</tabstop>
<tabstop>useFwImageCB</tabstop>
<tabstop>useLibraryImageCB</tabstop>
@@ -371,6 +387,7 @@
<tabstop>patchhw_CB</tabstop>
<tabstop>EEpromCB</tabstop>
<tabstop>cancelButton</tabstop>
<tabstop>BurnFlashButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
+3 -7
View File
@@ -797,7 +797,7 @@ void CompareDialog::printMixers()
if (md->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString());
if (md->carryTrim) str += " " + tr("noTrim");
if (md->sOffset) str += " "+ tr("Offset") + QString(" (%1%)").arg(getGVarString(md->sOffset));
if (md->curve.value) str += " " + md->curve.toString().replace("<", "&lt;").replace(">", "&gt;");
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale);
if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale);
if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn);
@@ -875,7 +875,7 @@ void CompareDialog::printMixers()
if (md->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString());
if (md->carryTrim) str += " " + tr("noTrim");
if (md->sOffset) str += " "+ tr("Offset") + QString(" (%1%)").arg(getGVarString(md->sOffset));
if (md->curve.value) str += " " + md->curve.toString().replace("<", "&lt;").replace(">", "&gt;");
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale);
if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale);
if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn);
@@ -1021,11 +1021,7 @@ void CompareDialog::printSwitches()
str.append("<tr>");
color=getColor1(sw1,sw2);
str.append(QString("<td width=\"45%\"><font color=%1>").arg(color)+sw1+"</font></td>");
if (i<9) {
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("LS")+QString("%1</b></td>").arg(i+1));
} else {
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("LS")+('A'+(i-9))+"</b></td>");
}
str.append("<td align=\"center\" width=\"10%\"><b>"+tr("L%1").arg(i+1)+QString("</b></td>"));
color=getColor2(sw1,sw2);
str.append(QString("<td width=\"45%\"><font color=%1>").arg(color)+sw2+"</font></td>");
str.append("</tr>");
+3 -1
View File
@@ -753,8 +753,10 @@ QString FuncSwData::funcToString()
return QObject::tr("Play Both");
else if (func == FuncPlayValue)
return QObject::tr("Play Value");
else if (func == FuncPlayScript)
return QObject::tr("Play Script");
else if (func == FuncLogs)
return QObject::tr("Start Logs");
return QObject::tr("SD Logs");
else if (func == FuncVolume)
return QObject::tr("Volume");
else if (func == FuncBacklight)
+3
View File
@@ -744,6 +744,7 @@ enum AssignFunc {
FuncPlayPrompt,
FuncPlayBoth,
FuncPlayValue,
FuncPlayScript,
FuncLogs,
FuncVolume,
FuncBacklight,
@@ -1158,6 +1159,8 @@ enum Capability {
MultiposPotsPositions,
SimulatorVariant,
MavlinkTelemetry,
HasInputDiff,
HasMixerExpo,
};
class SimulatorInterface;
@@ -54,6 +54,10 @@ class Er9xSimulator : public SimulatorInterface {
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;
@@ -54,6 +54,10 @@ class Ersky9xSimulator : public SimulatorInterface {
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;
@@ -49,6 +49,7 @@
#define FAI_CHOICE
#define FRSKY_STICKS
#define OVERRIDE_CHANNEL_FUNCTION
#define FLAVOUR "gruvin9x"
#define EEPROM_VARIANT 3
@@ -56,6 +56,11 @@ class Open9xGruvin9xSimulator : public SimulatorInterface {
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
@@ -49,6 +49,7 @@
#define DSM2
#define DSM2_PPM
#define OVERRIDE_CHANNEL_FUNCTION
#define FLAVOUR "9x128"
#define EEPROM_VARIANT SIMU_M128_VARIANTS
#define GAUGES
@@ -56,6 +56,11 @@ class OpenTxM128Simulator : public SimulatorInterface {
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
@@ -52,10 +52,9 @@
#define FRSKY_STICKS
#define OVERRIDE_CHANNEL_FUNCTION
#define FAS_OFFSET
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS
#define GAUGES
#define FLAVOUR "9x"
#define NUM_POTS 3
#undef min
@@ -55,6 +55,11 @@ class OpenTxM64Simulator : public SimulatorInterface {
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
@@ -55,9 +55,9 @@
#define FAI_CHOICE
#define FRSKY_STICKS
#define OVERRIDE_CHANNEL_FUNCTION
#define NUM_POTS 3
#define EEPROM_VARIANT 3
#define FLAVOUR "sky9x"
#undef min
#undef max
@@ -76,6 +76,7 @@ namespace Open9xSky9x {
#include "radio/src/eeprom_raw.cpp"
#include "radio/src/eeprom_conversions.cpp"
#include "radio/src/opentx.cpp"
// #include "radio/src/debug.cpp" // only included once in Taranis simulator because functions are exported as C and don't support namespaces
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/mixer.cpp"
@@ -258,3 +259,13 @@ const char * Open9xSky9xSimulator::getError()
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
void Open9xSky9xSimulator::setTrainerInput(unsigned int inputNumber, int16_t value)
{
#define SETTRAINER_IMPORT
#include "simulatorimport.h"
}
void Open9xSky9xSimulator::installTraceHook(void (*callback)(const char *)) {
::traceCallback = callback;
}
@@ -56,6 +56,11 @@ class Open9xSky9xSimulator : public SimulatorInterface {
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
@@ -55,8 +55,8 @@
#define HAPTIC
#define REVPLUS
#define OVERRIDE_CHANNEL_FUNCTION
#define NUM_POTS 5
#define FLAVOUR "taranis-plus"
#undef min
#undef max
@@ -79,6 +79,7 @@ inline int geteepromsize() {
#include "radio/src/eeprom_conversions.cpp"
#include "radio/src/eeprom_rlc.cpp"
#include "radio/src/opentx.cpp"
#include "radio/src/debug.cpp"
#include "radio/src/strhelpers.cpp"
#include "radio/src/switches.cpp"
#include "radio/src/curves.cpp"
@@ -297,3 +298,18 @@ const char * OpentxTaranisSimulator::getError()
#define GETERROR_IMPORT
#include "simulatorimport.h"
}
void OpentxTaranisSimulator::sendTelemetry(uint8_t * data, unsigned int len)
{
frskySportProcessPacket(data);
}
void OpentxTaranisSimulator::setTrainerInput(unsigned int inputNumber, int16_t value)
{
#define SETTRAINER_IMPORT
#include "simulatorimport.h"
}
void OpentxTaranisSimulator::installTraceHook(void (*callback)(const char *)) {
::traceCallback = callback;
}
@@ -56,6 +56,11 @@ class OpentxTaranisSimulator : public SimulatorInterface {
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
+42 -18
View File
@@ -202,8 +202,8 @@ class SourcesConversionTable: public ConversionTable {
if (IS_TARANIS(board) && version >= 216) {
for (int i=0; i<32; i++)
addConversion(RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i), val++);
for (int i=0; i<GetCurrentFirmware()->getCapability(LuaScripts); i++) {
for (int j=0; j<GetCurrentFirmware()->getCapability(LuaOutputsPerScript); j++) {
for (int i=0; i<7; i++) {
for (int j=0; j<6; j++) {
addConversion(RawSource(SOURCE_TYPE_LUA_OUTPUT, i*16+j), val++);
}
}
@@ -991,7 +991,12 @@ class MixField: public TransformedField {
_destCh = mix.destCh - 1;
if (mix.curve.type == CurveReference::CURVE_REF_CUSTOM) {
_curveMode = true;
_curveParam = 6 + mix.curve.value;
if (mix.curve.value > 0) {
_curveParam = 6 + mix.curve.value;
}
else {
_curveParam = mix.curve.value;
}
}
else if (mix.curve.type == CurveReference::CURVE_REF_FUNC) {
_curveMode = true;
@@ -1220,23 +1225,39 @@ class LimitField: public StructField {
template <int shift>
static int exportLimitValue(int value)
{
if (value > 10000)
return 4095 + value - 10000;
else if (value < -10000)
return -4096 + value + 10000;
else
return value + shift;
const int GV1 = 4096;
if (value > 10000) {
return -GV1 + value - 10001;
}
if (value < -10000) {
return GV1 + value + 10000;
}
return value + shift;
}
template <int shift>
static int importLimitValue(int value)
{
if (value > 4095)
return 10000 + value - 4095;
else if (value < -4096)
return -10000 + value + 4096;
else
return value - shift;
/* GVARS mapping on radio:
GV1 = -4096
GV9 = -4088
-GV1 = 4095
-GV9 = 4087
*/
const int GV1 = 4096;
if (value >= GV1) {
return 10001 + value - GV1;
}
if (value >= GV1-9) {
return -10000 + value - GV1;
}
if (value < -GV1) {
return -10000 + value + GV1 + 1;
}
if (value < -GV1+9) {
return 10000 + value + GV1 + 1;
}
return value - shift;
}
LimitField(LimitData & limit, BoardEnum board, unsigned int version):
@@ -1746,7 +1767,10 @@ class CustomFunctionsConversionTable: public ConversionTable {
addConversion(FuncPlayValue, val++);
if (IS_ARM(board)) {
addConversion(FuncReserve, val++);
addConversion(FuncReserve, val++);
if (IS_TARANIS(board))
addConversion(FuncPlayScript, val++);
else
addConversion(FuncReserve, val++);
addConversion(FuncReserve, val++);
addConversion(FuncBackgroundMusic, val++);
addConversion(FuncBackgroundMusicPause, val++);
@@ -1887,7 +1911,7 @@ class ArmCustomFunctionField: public TransformedField {
*((uint8_t *)(_param+3)) = fn.func - FuncSetTimer1;
}
}
else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) {
else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic || fn.func == FuncPlayScript) {
memcpy(_param, fn.paramarm, sizeof(_param));
}
else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) {
@@ -1962,7 +1986,7 @@ class ArmCustomFunctionField: public TransformedField {
fn.func = AssignFunc(fn.func + index);
fn.param = value;
}
else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) {
else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic || fn.func == FuncPlayScript) {
memcpy(fn.paramarm, _param, sizeof(fn.paramarm));
}
else if (fn.func == FuncVolume) {
@@ -732,6 +732,9 @@ int OpenTxFirmware::getCapability(const Capability capability)
return 0;
case MavlinkTelemetry:
return id.contains("mavlink") ? 1 : 0;
case HasInputDiff:
case HasMixerExpo:
return (IS_ARM(board) ? true : false);
default:
return 0;
}
+29 -1
View File
@@ -67,6 +67,11 @@ FlashInterface::FlashInterface(QString fileName):
if (flash_size > 0) {
version = seekLabel(VERS_MARK);
if (version.startsWith("opentx-")) {
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);
@@ -94,7 +99,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;
@@ -305,6 +310,29 @@ bool FlashInterface::isValid()
return isValidFlag;
}
QString FlashInterface::getFlavour()
{
if (flavour == "opentx-x9dp")
return "opentx-taranis-plus";
else if (flavour == "opentx-x9d")
return "opentx-taranis";
else
return flavour;
}
bool FlashInterface::isHardwareCompatible(FlashInterface &previousFirmware)
{
QString newFlavour = getFlavour();
if (newFlavour.isEmpty())
return true;
QString previousFlavour = previousFirmware.getFlavour();
if (previousFlavour.isEmpty())
return true;
return (newFlavour == previousFlavour);
}
uint FlashInterface::saveFlash(QString fileName)
{
uint8_t binflash[MAX_FSIZE];
+3
View File
@@ -47,6 +47,7 @@ class FlashInterface
inline QString getDate() { return date; }
inline QString getTime() { return time; }
int getSize() { return flash_size; }
QString getFlavour();
inline QString getVersion() { return version; }
unsigned int getVersionId() { return versionId; }
inline int getEEpromVersion() { return eepromVersion; }
@@ -60,6 +61,7 @@ class FlashInterface
QImage::Format getSplashFormat();
uint saveFlash(QString fileName);
bool isValid();
bool isHardwareCompatible(FlashInterface &previousFirmware);
private:
QByteArray flash;
@@ -72,6 +74,7 @@ class FlashInterface
QString filename;
QString date;
QString time;
QString flavour;
QString version;
int versionId;
QString eepromId;
+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>
+76 -4
View File
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>804</width>
<width>879</width>
<height>912</height>
</rect>
</property>
@@ -1996,9 +1996,9 @@ Mode 4:
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;LCD Screen Contrast&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Values can be 20-45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Play Delay&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Values can be 0ms-300ms&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="suffix">
<string> ms</string>
@@ -3348,6 +3348,58 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>beeperCB</tabstop>
<tabstop>beeperlenCB</tabstop>
<tabstop>hapticmodeCB</tabstop>
<tabstop>hapticLengthCB</tabstop>
<tabstop>hapticStrength</tabstop>
<tabstop>battwarningDSB</tabstop>
<tabstop>contrastSB</tabstop>
<tabstop>displayTypeCB</tabstop>
<tabstop>inactimerSB</tabstop>
<tabstop>splashScreenChkB</tabstop>
<tabstop>splashScreenDuration</tabstop>
<tabstop>alarmwarnChkB</tabstop>
<tabstop>memwarnChkB</tabstop>
<tabstop>mavbaud_CB</tabstop>
<tabstop>chkSA</tabstop>
<tabstop>chkSB</tabstop>
<tabstop>chkSC</tabstop>
<tabstop>chkSD</tabstop>
<tabstop>chkSE</tabstop>
<tabstop>chkSF</tabstop>
<tabstop>chkSG</tabstop>
<tabstop>chkSH</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>stickReverse1</tabstop>
<tabstop>stickReverse2</tabstop>
<tabstop>stickReverse3</tabstop>
<tabstop>stickReverse4</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>faimode_CB</tabstop>
<tabstop>switchesDelay</tabstop>
<tabstop>soundModeCB</tabstop>
<tabstop>speakerPitchSB</tabstop>
<tabstop>volume_SB</tabstop>
<tabstop>beepVolume_SL</tabstop>
<tabstop>wavVolume_SL</tabstop>
<tabstop>varioVolume_SL</tabstop>
<tabstop>bgVolume_SL</tabstop>
<tabstop>varioP0_SB</tabstop>
<tabstop>varioPMax_SB</tabstop>
<tabstop>varioR0_SB</tabstop>
<tabstop>backlightswCB</tabstop>
<tabstop>backlightautoSB</tabstop>
<tabstop>blAlarm_ChkB</tabstop>
<tabstop>BLBright_SB</tabstop>
<tabstop>backlightColor_SL</tabstop>
<tabstop>re_CB</tabstop>
<tabstop>countrycode_CB</tabstop>
<tabstop>units_CB</tabstop>
<tabstop>gpsFormatCB</tabstop>
<tabstop>timezoneSB</tabstop>
<tabstop>voiceLang_CB</tabstop>
<tabstop>trnMode_1</tabstop>
<tabstop>trnChn_1</tabstop>
<tabstop>trnWeight_1</tabstop>
@@ -3372,12 +3424,32 @@ p, li { white-space: pre-wrap; }
<tabstop>ana4Neg</tabstop>
<tabstop>ana4Mid</tabstop>
<tabstop>ana4Pos</tabstop>
<tabstop>pot1Type</tabstop>
<tabstop>pot2Type</tabstop>
<tabstop>pot3Type</tabstop>
<tabstop>serialPortMode</tabstop>
<tabstop>battCalibDSB</tabstop>
<tabstop>CurrentCalib_SB</tabstop>
<tabstop>PPM1</tabstop>
<tabstop>PPM2</tabstop>
<tabstop>PPM3</tabstop>
<tabstop>PPM4</tabstop>
<tabstop>PPM_MultiplierDSB</tabstop>
<tabstop>ana5Neg</tabstop>
<tabstop>ana5Mid</tabstop>
<tabstop>ana5Pos</tabstop>
<tabstop>ana6Neg</tabstop>
<tabstop>ana6Mid</tabstop>
<tabstop>ana6Pos</tabstop>
<tabstop>ana7Neg</tabstop>
<tabstop>ana7Mid</tabstop>
<tabstop>ana7Pos</tabstop>
<tabstop>ana8Neg</tabstop>
<tabstop>ana8Mid</tabstop>
<tabstop>ana8Pos</tabstop>
<tabstop>profile_CB</tabstop>
<tabstop>calretrieve_PB</tabstop>
<tabstop>calstore_PB</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
+44 -13
View File
@@ -234,10 +234,10 @@ CurveGroup::CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox
lock(false),
lastType(-1)
{
curveTypeCB->addItem(tr("Diff"));
curveTypeCB->addItem(tr("Expo"));
curveTypeCB->addItem(tr("Func"));
curveTypeCB->addItem(tr("Curve"));
if (!(flags & HIDE_DIFF)) curveTypeCB->addItem(tr("Diff"), 0);
if (!(flags & HIDE_EXPO)) curveTypeCB->addItem(tr("Expo"), 1);
curveTypeCB->addItem(tr("Func"), 2);
curveTypeCB->addItem(tr("Curve"), 3);
curveValueCB->setMaxVisibleItems(10);
@@ -253,10 +253,12 @@ void CurveGroup::update()
{
lock = true;
curveTypeCB->setCurrentIndex(curve.type);
int found = curveTypeCB->findData(curve.type);
if (found < 0) found = 0;
curveTypeCB->setCurrentIndex(found);
if (curve.type == CurveReference::CURVE_REF_DIFF || curve.type == CurveReference::CURVE_REF_EXPO) {
curveGVarCB->show();
curveGVarCB->setVisible(GetCurrentFirmware()->getCapability(Gvars));
if (curve.value > 100 || curve.value < -100) {
curveGVarCB->setChecked(true);
if (lastType != CurveReference::CURVE_REF_DIFF && lastType != CurveReference::CURVE_REF_EXPO) {
@@ -296,11 +298,13 @@ void CurveGroup::update()
if (lastType != curve.type) {
lastType = curve.type;
curveValueCB->clear();
for (int i=-numcurves; i<=numcurves; i++) {
curveValueCB->addItem(CurveReference(CurveReference::CURVE_REF_CUSTOM, i).toString());
for (int i= ((flags & HIDE_NEGATIVE_CURVES) ? 0 : -numcurves); i<=numcurves; i++) {
curveValueCB->addItem(CurveReference(CurveReference::CURVE_REF_CUSTOM, i).toString(), i);
if (i == curve.value) {
curveValueCB->setCurrentIndex(curveValueCB->count() - 1);
}
}
}
curveValueCB->setCurrentIndex(curve.value+numcurves);
break;
}
default:
@@ -328,7 +332,8 @@ void CurveGroup::gvarCBChanged(int state)
void CurveGroup::typeChanged(int value)
{
if (!lock) {
switch (value) {
int type = curveTypeCB->itemData(curveTypeCB->currentIndex()).toInt();
switch (type) {
case 0:
curve = CurveReference(CurveReference::CURVE_REF_DIFF, 0);
break;
@@ -350,7 +355,7 @@ void CurveGroup::typeChanged(int value)
void CurveGroup::valuesChanged()
{
if (!lock) {
switch (curveTypeCB->currentIndex()) {
switch (curveTypeCB->itemData(curveTypeCB->currentIndex()).toInt()) {
case 0:
case 1:
{
@@ -359,14 +364,14 @@ void CurveGroup::valuesChanged()
value = curveValueCB->itemData(curveValueCB->currentIndex()).toInt();
else
value = curveValueSB->value();
curve = CurveReference(curveTypeCB->currentIndex() == 0 ? CurveReference::CURVE_REF_DIFF : CurveReference::CURVE_REF_EXPO, value);
curve = CurveReference(curveTypeCB->itemData(curveTypeCB->currentIndex()).toInt() == 0 ? CurveReference::CURVE_REF_DIFF : CurveReference::CURVE_REF_EXPO, value);
break;
}
case 2:
curve = CurveReference(CurveReference::CURVE_REF_FUNC, curveValueCB->currentIndex());
break;
case 3:
curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, curveValueCB->currentIndex() - GetCurrentFirmware()->getCapability(NumCurves));
curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, curveValueCB->itemData(curveValueCB->currentIndex()).toInt());
break;
}
@@ -1032,3 +1037,29 @@ QString generateProcessUniqueTempFileName(const QString & fileName)
sanitizedFileName.remove('/');
return QDir::tempPath() + QString("/%1-").arg(QCoreApplication::applicationPid()) + sanitizedFileName;
}
QString getSoundsPath(const GeneralSettings &generalSettings)
{
QString path = g.profile[g.id()].sdPath() + "/SOUNDS/";
QString lang = generalSettings.ttsLanguage;
if (lang.isEmpty())
lang = "en";
path.append(lang);
return path;
}
QSet<QString> getFilesSet(const QString &path, const QStringList &filter, int maxLen)
{
QSet<QString> result;
QDir dir(path);
if (dir.exists()) {
foreach (QString filename, dir.entryList(filter, QDir::Files)) {
QFileInfo file(filename);
QString name = file.completeBaseName();
if (name.length() <= maxLen) {
result.insert(name);
}
}
}
return result;
}
+7
View File
@@ -59,6 +59,10 @@ class GVarGroup: public QObject {
bool lock;
};
#define HIDE_DIFF 0x01
#define HIDE_EXPO 0x02
#define HIDE_NEGATIVE_CURVES 0x04
class CurveGroup : public QObject {
Q_OBJECT
@@ -151,4 +155,7 @@ int qunlink(const QString & fileName);
QString generateProcessUniqueTempFileName(const QString & fileName);
QString getSoundsPath(const GeneralSettings &generalSettings);
QSet<QString> getFilesSet(const QString &path, const QStringList &filter, int maxLen);
#endif // HELPERS_H
+20 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>685</width>
<height>418</height>
<height>432</height>
</rect>
</property>
<property name="sizePolicy">
@@ -441,6 +441,25 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>backLightColor</tabstop>
<tabstop>joystickCB</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickcalButton</tabstop>
<tabstop>simuSW</tabstop>
<tabstop>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
<tabstop>libraryPath</tabstop>
<tabstop>libraryPathButton</tabstop>
<tabstop>splashincludeCB</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>SplashSelect</tabstop>
<tabstop>splashLibraryButton</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>InvertPixels</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
+19 -37
View File
@@ -184,46 +184,33 @@ void logsDialog::on_mapsButton_clicked() {
int latcol=0, longcol=0, altcol=0, speedcol=0;
int itemSelected=0.;
bool rangeSelected=false;
enum fieldtype {
T_F,
I_F,
F_F,
G_F
};
ui->FieldsTW->setDisabled(true);
ui->logTable->setDisabled(true);
QString fields[]={"SWR","RSSI","A1","A2","GPS Date"\
,"GPS Time","Long","Lat","Course","GPS Speed","GPS Alt","Baro Alt"\
,"Vertical Speed","Temp1","Temp2","RPM","Fuel","Cell volts","Cell 1"\
,"Cell 2","Cell 3","Cell 4","Cell 5","Cell 6","Current","Consumption"\
,"Vfas","AccelX","AccelY","AccelZ","Rud","Ele","Thr","Ail"\
,"S1","S2","LS","RS","SA","SB","SC","SD","SE","SF","SG","SH"};
int fieldstype[]={I_F,I_F,F_F,F_F,T_F\
,T_F,G_F,G_F,F_F,G_F,G_F,F_F\
,F_F,F_F,F_F,I_F,I_F,F_F,F_F\
,F_F,F_F,F_F,F_F,F_F,F_F,F_F\
,F_F,F_F,F_F,F_F,I_F,I_F,I_F,I_F\
,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F};
QString gePath=g.gePath();
if (gePath.isEmpty() || !QFile(gePath).exists()) {
ui->FieldsTW->setDisabled(false);
ui->logTable->setDisabled(false);
return;
}
QSet<int> nondataCols;
for (int i=1; i<csvlog.at(0).count(); i++) {
//Long,Lat,Course,GPS Speed,GPS Alt
if (csvlog.at(0).at(i).contains("Long")) {
longcol=i;
nondataCols << i;
}
if (csvlog.at(0).at(i).contains("Lat")) {
latcol=i;
nondataCols << i;
}
if (csvlog.at(0).at(i).contains("GPS Alt")) {
altcol=i;
nondataCols << i;
}
if (csvlog.at(0).at(i).contains("GPS Speed")) {
speedcol=i;
nondataCols << i;
}
}
if (longcol==0 || latcol==0 || altcol==0) {
@@ -270,23 +257,15 @@ void logsDialog::on_mapsButton_clicked() {
outputStream << "\t\t<Style id=\"lineStyle\">\n\t\t\t<LineStyle>\n\t\t\t\t<color>991081f4</color>\n\t\t\t\t<width>6</width>\n\t\t\t</LineStyle>\n\t\t</Style>\n";
outputStream << "\t\t<Schema id=\"schema\">\n";
outputStream << "\t\t\t<gx:SimpleArrayField name=\"GPSSpeed\" type=\"float\">\n\t\t\t\t<displayName>GPS Speed</displayName>\n\t\t\t</gx:SimpleArrayField>\n";
// declare additional fields
for (int i=0; i<csvlog.at(0).count()-2; i++) {
if (ui->FieldsTW->item(0,i)->isSelected() && fieldstype[i]!=G_F ) {
outputStream << "\t\t\t<gx:SimpleArrayField name=\""<< fields[i].replace(" ","_") <<"\" ";
switch (fieldstype[i]) {
case T_F:
outputStream << "type=\"string\"";
break;
case I_F:
outputStream << "type=\"int\"";
break;
case F_F:
outputStream << "type=\"float\"";
break;
default:
break;
}
outputStream << ">\n\t\t\t\t<displayName>" << fields[i] << "</displayName>\n\t\t\t</gx:SimpleArrayField>\n";
if (ui->FieldsTW->item(0,i)->isSelected() && !nondataCols.contains(i+2)) {
QString origName = csvlog.at(0).at(i+2);
QString safeName = origName;
safeName.replace(" ","_");
outputStream << "\t\t\t<gx:SimpleArrayField name=\""<< safeName <<"\" ";
outputStream << "type=\"string\""; // additional fields have fixed type: string
outputStream << ">\n\t\t\t\t<displayName>" << origName << "</displayName>\n\t\t\t</gx:SimpleArrayField>\n";
}
}
outputStream << "\t\t</Schema>\n";
@@ -335,9 +314,12 @@ void logsDialog::on_mapsButton_clicked() {
}
}
outputStream << "\t\t\t\t\t\t\t</gx:SimpleArrayData>\n";
// add values for additional fields
for (int i=0; i<csvlog.at(0).count()-2; i++) {
if (ui->FieldsTW->item(0,i)->isSelected() && fieldstype[i]!= G_F ) {
outputStream << "\t\t\t\t\t\t\t<gx:SimpleArrayData name=\""<< fields[i].replace(" ","_") <<"\">\n";
if (ui->FieldsTW->item(0,i)->isSelected() && !nondataCols.contains(i+2)) {
QString safeName = csvlog.at(0).at(i+2);;
safeName.replace(" ","_");
outputStream << "\t\t\t\t\t\t\t<gx:SimpleArrayData name=\""<< safeName <<"\">\n";
for (int j=1; j<n; j++) {
if ((ui->logTable->item(j-1,1)->isSelected() &&rangeSelected) || !rangeSelected) {
outputStream << "\t\t\t\t\t\t\t\t<gx:value>"<< csvlog.at(j).at(i+2) <<"</gx:value>\n";
+11
View File
@@ -287,6 +287,17 @@
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>FileName_LE</tabstop>
<tabstop>fileOpen_BT</tabstop>
<tabstop>FieldsTW</tabstop>
<tabstop>ZoomX_ChkB</tabstop>
<tabstop>ZoomY_ChkB</tabstop>
<tabstop>Reset_PB</tabstop>
<tabstop>sessions_CB</tabstop>
<tabstop>logTable</tabstop>
<tabstop>mapsButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
+14 -2
View File
@@ -977,7 +977,7 @@ bool MainWindow::readFirmwareFromRadio(const QString filename)
file.remove();
}
g.flashDir(QFileInfo(filename).dir().absolutePath());
// g.flashDir(QFileInfo(filename).dir().absolutePath());
if (IS_ARM(GetCurrentFirmware()->getBoard())) {
QString path = FindMassstoragePath("FIRMWARE.BIN");
@@ -1171,7 +1171,6 @@ void MainWindow::writeBackup()
}
int oldrev = getEpromVersion(fileName);
QString tempFlash = generateProcessUniqueTempFileName("flash.bin");
if (!readFirmwareFromRadio(tempFlash))
return;
@@ -1304,6 +1303,19 @@ void MainWindow::writeFlash(QString fileToFlash)
if (IS_TARANIS(GetEepromInterface()->getBoard()))
backup=false;
if (!fileName.isEmpty()) {
if (g.checkHardwareCompatibility()) {
QString tempFlash = generateProcessUniqueTempFileName("flash.bin");
if (!readFirmwareFromRadio(tempFlash)) {
QMessageBox::warning(this, tr("Firmware check failed"), tr("Could not check firmware from radio"));
return;
}
FlashInterface previousFlash(tempFlash);
FlashInterface newFlash(fileName);
if (!newFlash.isHardwareCompatible(previousFlash)) {
QMessageBox::warning(this, tr("Firmware check failed"), tr("New firmware is not compatible with the one currently installed!"));
return;
}
}
g.backupOnFlash(backup);
if (backup) {
QString backupFile = generateProcessUniqueTempFileName("backup.bin");
+14
View File
@@ -339,6 +339,20 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>curvePreview</tabstop>
<tabstop>curvePoints</tabstop>
<tabstop>curveCustom</tabstop>
<tabstop>curveSmooth</tabstop>
<tabstop>curveName</tabstop>
<tabstop>curveType</tabstop>
<tabstop>curveCoeff</tabstop>
<tabstop>yMin</tabstop>
<tabstop>yMid</tabstop>
<tabstop>yMax</tabstop>
<tabstop>curveSide</tabstop>
<tabstop>curveApply</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+45 -31
View File
@@ -69,36 +69,29 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
int num_fsw = firmware->getCapability(CustomFunctions);
if (!firmware->getCapability(VoicesAsNumbers)) {
tracksSet = getFilesSet(getSoundsPath(generalSettings), QStringList() << "*.wav" << "*.WAV", firmware->getCapability(VoicesMaxLength));
for (int i=0; i<num_fsw; i++) {
if (model.funcSw[i].func==FuncPlayPrompt || model.funcSw[i].func==FuncBackgroundMusic) {
QString temp = model.funcSw[i].paramarm;
if (!temp.isEmpty()) {
if (!paramarmList.contains(temp)) {
paramarmList.append(temp);
}
tracksSet.insert(temp);
}
}
}
qDebug() << tracksSet;
}
QString path = g.profile[g.id()].sdPath();
path.append("/SOUNDS/");
QString lang = generalSettings.ttsLanguage;
if (lang.isEmpty())
lang="en";
path.append(lang);
QDir qd(path);
int vml= firmware->getCapability(VoicesMaxLength);
if (qd.exists()) {
QStringList filters;
filters << "*.wav" << "*.WAV";
foreach ( QString file, qd.entryList(filters, QDir::Files) ) {
QFileInfo fi(file);
QString temp=fi.completeBaseName();
if (!paramarmList.contains(temp) && temp.length()<=vml) {
paramarmList.append(temp);
if (IS_TARANIS(firmware->getBoard())) {
scriptsSet = getFilesSet(g.profile[g.id()].sdPath() + "/SCRIPTS", QStringList() << "*.lua", firmware->getCapability(VoicesMaxLength));
for (int i=0; i<num_fsw; i++) {
if (model.funcSw[i].func==FuncPlayScript) {
QString temp = model.funcSw[i].paramarm;
if (!temp.isEmpty()) {
scriptsSet.insert(temp);
}
}
}
qDebug() << scriptsSet;
}
CompanionIcon playIcon("play.png");
@@ -124,7 +117,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
// The function
fswtchFunc[i] = new QComboBox(this);
fswtchFunc[i]->setProperty("index", i);
connect(fswtchFunc[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited()));
connect(fswtchFunc[i], SIGNAL(currentIndexChanged(int)), this, SLOT(functionEdited()));
gridLayout->addWidget(fswtchFunc[i], i+1, 2);
QHBoxLayout *paramLayout = new QHBoxLayout();
@@ -292,10 +285,20 @@ void CustomFunctionsPanel::customFunctionEdited()
{
if (!lock) {
lock = true;
int index = sender()->property("index").toInt();
refreshCustomFunction(index, true);
emit modified();
lock = false;
}
}
void CustomFunctionsPanel::functionEdited()
{
if (!lock) {
lock = true;
int index = sender()->property("index").toInt();
fswtchParamArmT[index]->setCurrentIndex(0);
refreshCustomFunction(index, true);
emit modified();
lock = false;
}
@@ -438,11 +441,9 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
}
}
}
else {
populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, paramarmList);
if (fswtchParamArmT[i]->currentText() != "----") {
widgetsMask |= CUSTOM_FUNCTION_PLAY;
}
populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, tracksSet);
if (fswtchParamArmT[i]->currentText() != "----") {
widgetsMask |= CUSTOM_FUNCTION_PLAY;
}
}
}
@@ -458,6 +459,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
}
}
}
populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, tracksSet);
}
else if (index==FuncPlaySound) {
if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex();
@@ -470,6 +472,19 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM;
}
}
else if (index==FuncPlayScript) {
widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM;
if (modified) {
memset(model.funcSw[i].paramarm, 0, sizeof(model.funcSw[i].paramarm));
int vml = 8/*TODO*/;
if (fswtchParamArmT[i]->currentText() != "----") {
for (int j=0; j<std::min(fswtchParamArmT[i]->currentText().length(), vml); j++) {
model.funcSw[i].paramarm[j] = fswtchParamArmT[i]->currentText().toAscii().at(j);
}
}
}
populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, scriptsSet);
}
else if (index==FuncBacklight && IS_TARANIS_PLUS(GetEepromInterface()->getBoard())) {
if (modified) model.funcSw[i].param = (uint8_t)fswtchBLcolor[i]->value();
fswtchBLcolor[i]->setValue(model.funcSw[i].param);
@@ -511,7 +526,6 @@ void CustomFunctionsPanel::update()
populateFuncCB(fswtchFunc[i], model.funcSw[i].func);
populateGVmodeCB(fswtchGVmode[i], model.funcSw[i].adjustMode);
populateFuncParamCB(fswtchParamT[i], model, model.funcSw[i].func, model.funcSw[i].param, model.funcSw[i].adjustMode);
populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, paramarmList);
}
refreshCustomFunction(i);
}
@@ -532,7 +546,6 @@ void CustomFunctionsPanel::fswPaste()
populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func);
populateGVmodeCB(fswtchGVmode[selectedFunction], model.funcSw[selectedFunction].adjustMode);
populateFuncParamCB(fswtchParamT[selectedFunction], model, model.funcSw[selectedFunction].func, model.funcSw[selectedFunction].param, model.funcSw[selectedFunction].adjustMode);
populateFuncParamArmTCB(fswtchParamArmT[selectedFunction], model.funcSw[selectedFunction].paramarm, paramarmList);
refreshCustomFunction(selectedFunction);
lock = false;
emit modified();
@@ -593,6 +606,7 @@ void CustomFunctionsPanel::populateFuncCB(QComboBox *b, unsigned int value)
b->addItem(FuncSwData(AssignFunc(i)).funcToString());
if (((i>=FuncOverrideCH1 && i<=FuncOverrideCH32) && !firmware->getCapability(SafetyChannelCustomFunction)) ||
((i==FuncVolume || i==FuncBackgroundMusic || i==FuncBackgroundMusicPause) && !firmware->getCapability(HasVolume)) ||
((i==FuncPlayScript && !IS_TARANIS(firmware->getBoard()))) ||
((i==FuncPlayHaptic) && !firmware->getCapability(Haptic)) ||
((i==FuncPlayBoth) && !firmware->getCapability(HasBeeper)) ||
((i==FuncLogs) && !firmware->getCapability(HasSDLogs)) ||
@@ -617,14 +631,14 @@ void CustomFunctionsPanel::populateGVmodeCB(QComboBox *b, unsigned int value)
b->setCurrentIndex(value);
}
void CustomFunctionsPanel::populateFuncParamArmTCB(QComboBox *b, char * value, QStringList & paramsList)
void CustomFunctionsPanel::populateFuncParamArmTCB(QComboBox *b, char * value, const QSet<QString> &paramsList)
{
b->clear();
b->addItem("----");
bool added = false;
QString currentvalue(value);
foreach ( QString entry, paramsList ) {
foreach (QString entry, paramsList) {
b->addItem(entry);
if (entry==currentvalue) {
b->setCurrentIndex(b->count()-1);
@@ -670,7 +684,7 @@ void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, const ModelData & m
b->setCurrentIndex(value);
}
else if (function==FuncVolume) {
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS);
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_TRIMS);
}
else if (function==FuncPlayValue) {
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT);
+4 -2
View File
@@ -43,6 +43,7 @@ class CustomFunctionsPanel : public ModelPanel
private slots:
void customFunctionEdited();
void functionEdited();
void fsw_customContextMenuRequested(QPoint pos);
void refreshCustomFunction(int index, bool modified=false);
void onChildModified();
@@ -59,10 +60,11 @@ class CustomFunctionsPanel : public ModelPanel
void populateFuncCB(QComboBox *b, unsigned int value);
void populateGVmodeCB(QComboBox *b, unsigned int value);
void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode=0);
void populateFuncParamArmTCB(QComboBox *b, char * value, QStringList & paramsList);
void populateFuncParamArmTCB(QComboBox *b, char * value, const QSet<QString> & paramsList);
bool initialized;
QStringList paramarmList;
QSet<QString> tracksSet;
QSet<QString> scriptsSet;
int phononCurrent;
QComboBox * fswtchSwtch[C9X_MAX_CUSTOM_FUNCTIONS];
QComboBox * fswtchFunc[C9X_MAX_CUSTOM_FUNCTIONS];
+1 -1
View File
@@ -31,7 +31,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
ui->offsetCB->hide();
}
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve);
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve, firmware->getCapability(HasInputDiff) ? 0 : (HIDE_DIFF | HIDE_NEGATIVE_CURVES));
populateSwitchCB(ui->switchesCB, ed->swtch, generalSettings, MixesContext);
+5 -2
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>414</height>
<width>389</width>
<height>488</height>
</rect>
</property>
<property name="sizePolicy">
@@ -481,6 +481,9 @@ If blank then the input is considered to be &quot;ON&quot; all the time.</string
<tabstop>weightGV</tabstop>
<tabstop>weightSB</tabstop>
<tabstop>weightCB</tabstop>
<tabstop>offsetGV</tabstop>
<tabstop>offsetSB</tabstop>
<tabstop>offsetCB</tabstop>
<tabstop>curveTypeCB</tabstop>
<tabstop>curveGVarCB</tabstop>
<tabstop>curveValueCB</tabstop>
+18
View File
@@ -457,6 +457,24 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>name</tabstop>
<tabstop>fadeIn</tabstop>
<tabstop>swtch</tabstop>
<tabstop>fadeOut</tabstop>
<tabstop>trim2Use</tabstop>
<tabstop>trim2Value</tabstop>
<tabstop>trim1Use</tabstop>
<tabstop>trim1Value</tabstop>
<tabstop>trim3Use</tabstop>
<tabstop>trim3Value</tabstop>
<tabstop>trim4Use</tabstop>
<tabstop>trim4Value</tabstop>
<tabstop>trim2Slider</tabstop>
<tabstop>trim3Slider</tabstop>
<tabstop>trim1Slider</tabstop>
<tabstop>trim4Slider</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+1 -1
View File
@@ -28,7 +28,7 @@ void HeliPanel::update()
lock = true;
ui->swashTypeCB->setCurrentIndex(model.swashRingData.type);
populateSourceCB(ui->swashCollectiveCB, model.swashRingData.collectiveSource, model, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS);
populateSourceCB(ui->swashCollectiveCB, model.swashRingData.collectiveSource, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->swashRingValSB->setValue(model.swashRingData.value);
ui->swashInvertELE->setChecked(model.swashRingData.invertELE);
ui->swashInvertAIL->setChecked(model.swashRingData.invertAIL);
+1 -1
View File
@@ -174,7 +174,7 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
}
}
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
if (md->curve.value) str += " " + md->curve.toString();
QString phasesStr = getPhasesStr(md->phases, model);
if (!phasesStr.isEmpty()) str += " " + phasesStr;
+2 -3
View File
@@ -213,7 +213,6 @@ void LogicalSwitchesPanel::edited()
model.customSw[i].val1 = 0;
model.customSw[i].val2 = 0;
}
model.customSw[i].andsw = 0;
setSwitchWidgetVisibility(i);
}
@@ -249,7 +248,7 @@ void LogicalSwitchesPanel::edited()
else {
model.customSw[i].val3 = TimToVal(cswitchOffset2[i]->value()) - model.customSw[i].val2;
}
updateTimerParam(cswitchOffset2[i], model.customSw[i].val2+model.customSw[i].val3, cswitchOffset[i]->value()-0.1);
updateTimerParam(cswitchOffset2[i], model.customSw[i].val2+model.customSw[i].val3, ValToTim(TimToVal(cswitchOffset[i]->value())-1));
if (model.customSw[i].val3 == 0) {
cswitchOffset2[i]->setSuffix("(release)");
}
@@ -335,7 +334,7 @@ void LogicalSwitchesPanel::setSwitchWidgetVisibility(int i)
mask &= ~DELAY_ENABLED;
populateSwitchCB(cswitchSource1[i], RawSwitch(model.customSw[i].val1), generalSettings, LogicalSwitchesContext);
updateTimerParam(cswitchOffset[i], model.customSw[i].val2, 0.0);
updateTimerParam(cswitchOffset2[i], model.customSw[i].val2+model.customSw[i].val3, cswitchOffset[i]->value()-0.1);
updateTimerParam(cswitchOffset2[i], model.customSw[i].val2+model.customSw[i].val3, ValToTim(TimToVal(cswitchOffset[i]->value())-1));
cswitchOffset2[i]->setSpecialValueText(tr("(instant)"));
if (model.customSw[i].val3 == 0) {
cswitchOffset2[i]->setSuffix(tr("(release)"));
+1 -1
View File
@@ -26,7 +26,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, 100, -limit, limit);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, 0, -limit, limit);
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, md->curve);
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, md->curve, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
ui->MixDR_CB->setChecked(md->noExpo==0);
+39 -6
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>364</width>
<height>434</height>
<width>412</width>
<height>541</height>
</rect>
</property>
<property name="sizePolicy">
@@ -67,7 +67,7 @@
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -96,7 +96,7 @@ p, li { white-space: pre-wrap; }
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -125,7 +125,7 @@ p, li { white-space: pre-wrap; }
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -148,7 +148,7 @@ p, li { white-space: pre-wrap; }
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -611,6 +611,39 @@ If blank then the mix is considered to be &quot;ON&quot; all the time.</string>
</item>
</layout>
</widget>
<tabstops>
<tabstop>mixerName</tabstop>
<tabstop>sourceCB</tabstop>
<tabstop>weightGV</tabstop>
<tabstop>weightCB</tabstop>
<tabstop>weightSB</tabstop>
<tabstop>offsetGV</tabstop>
<tabstop>offsetCB</tabstop>
<tabstop>offsetSB</tabstop>
<tabstop>curveTypeCB</tabstop>
<tabstop>curveGVarCB</tabstop>
<tabstop>curveValueCB</tabstop>
<tabstop>curveValueSB</tabstop>
<tabstop>trimCB</tabstop>
<tabstop>MixDR_CB</tabstop>
<tabstop>cb_FP0</tabstop>
<tabstop>cb_FP1</tabstop>
<tabstop>cb_FP2</tabstop>
<tabstop>cb_FP3</tabstop>
<tabstop>cb_FP4</tabstop>
<tabstop>cb_FP5</tabstop>
<tabstop>cb_FP6</tabstop>
<tabstop>cb_FP7</tabstop>
<tabstop>cb_FP8</tabstop>
<tabstop>switchesCB</tabstop>
<tabstop>warningCB</tabstop>
<tabstop>mltpxCB</tabstop>
<tabstop>delayUpSB</tabstop>
<tabstop>slowUpSB</tabstop>
<tabstop>delayDownSB</tabstop>
<tabstop>slowDownSB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="../companion.qrc"/>
</resources>
+18
View File
@@ -122,6 +122,15 @@ qreal Node::getX()
return 0;
}
void Node::setX(qreal newX)
{
if(scene())
{
QRectF rect = scene()->sceneRect();
QGraphicsObject::setX(rect.left() + (newX+1) * rect.width()/2);
}
}
qreal Node::getY()
{
if(scene())
@@ -132,6 +141,15 @@ qreal Node::getY()
return 0;
}
void Node::setY(qreal newY)
{
if(scene())
{
QRectF rect = scene()->sceneRect();
QGraphicsObject::setY(rect.top() + (newY+1) * rect.height()/2);
}
}
QList<Edge *> Node::edges() const
{
return edgeList;
+2
View File
@@ -72,6 +72,8 @@ class Node : public QGraphicsObject
int getBallSize() {return ballSize;}
qreal getX();
qreal getY();
void setX(qreal newX);
void setY(qreal newX);
void setCenteringX(bool val) {centerX = val;}
void setCenteringY(bool val) {centerY = val;}
+42 -18
View File
@@ -5,7 +5,7 @@
#include "helpers.h"
#include "appdata.h"
TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware):
TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware, QWidget *prevFocus):
ModelPanel(parent, model, generalSettings, firmware),
timer(timer),
ui(new Ui::Timer)
@@ -35,6 +35,11 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
ui->persistent->addItem(tr("Persistent (manual reset)"), 2);
disableMouseScrolling();
QWidget::setTabOrder(prevFocus, ui->value);
QWidget::setTabOrder(ui->value, ui->mode);
QWidget::setTabOrder(ui->mode, ui->countdownBeep);
QWidget::setTabOrder(ui->countdownBeep, ui->minuteBeep);
QWidget::setTabOrder(ui->minuteBeep, ui->persistent);
lock = false;
}
@@ -67,6 +72,11 @@ void TimerPanel::update()
ui->minuteBeep->setChecked(timer.minuteBeep);
}
QWidget * TimerPanel::getLastFocus()
{
return ui->persistent;
}
void TimerPanel::on_value_editingFinished()
{
timer.val = ui->value->time().minute()*60 + ui->value->time().second();
@@ -179,6 +189,7 @@ void ModulePanel::update()
{
unsigned int mask = 0;
Protocol protocol = (Protocol)module.protocol;
unsigned int max_rx_num = 63;
if (moduleIdx >= 0) {
mask |= MASK_PROTOCOL;
@@ -195,6 +206,7 @@ void ModulePanel::update()
case DSMX:
mask |= MASK_CHANNELS_RANGE | MASK_RX_NUMBER;
module.channelsCount = 6;
max_rx_num = 20;
break;
case PPM:
mask |= MASK_PPM_FIELDS | MASK_CHANNELS_RANGE| MASK_CHANNELS_COUNT;
@@ -212,6 +224,7 @@ void ModulePanel::update()
ui->protocol->setVisible(mask & MASK_PROTOCOL);
ui->label_rxNumber->setVisible(mask & MASK_RX_NUMBER);
ui->rxNumber->setVisible(mask & MASK_RX_NUMBER);
ui->rxNumber->setMaximum(max_rx_num);
ui->rxNumber->setValue(model.modelId);
ui->label_channelsStart->setVisible(mask & MASK_CHANNELS_RANGE);
ui->channelsStart->setVisible(mask & MASK_CHANNELS_RANGE);
@@ -344,23 +357,6 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->name->setMaxLength(IS_TARANIS(firmware->getBoard()) ? 12 : 10);
for (int i=0; i<C9X_MAX_TIMERS; i++) {
timers[i] = new TimerPanel(this, model, model.timers[i], generalSettings, firmware);
ui->gridLayout->addWidget(timers[i], 1+i, 1);
connect(timers[i], SIGNAL(modified()), this, SLOT(onChildModified()));
}
for (int i=0; i<firmware->getCapability(NumModules); i++) {
modules[i] = new ModulePanel(this, model, model.moduleData[i], generalSettings, firmware, i);
ui->modulesLayout->addWidget(modules[i]);
connect(modules[i], SIGNAL(modified()), this, SLOT(onChildModified()));
}
if (firmware->getCapability(ModelTrainerEnable)) {
modules[C9X_NUM_MODULES] = new ModulePanel(this, model, model.moduleData[C9X_NUM_MODULES], generalSettings, firmware, -1);
ui->modulesLayout->addWidget(modules[C9X_NUM_MODULES]);
}
if (firmware->getCapability(ModelImage)) {
QStringList items;
items.append("");
@@ -407,12 +403,21 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->modelImage_label->hide();
ui->imagePreview->hide();
}
QWidget *prevFocus = ui->image;
for (int i=0; i<C9X_MAX_TIMERS; i++) {
timers[i] = new TimerPanel(this, model, model.timers[i], generalSettings, firmware, prevFocus);
ui->gridLayout->addWidget(timers[i], 1+i, 1);
connect(timers[i], SIGNAL(modified()), this, SLOT(onChildModified()));
prevFocus = timers[i]->getLastFocus();
}
if (!firmware->getCapability(HasDisplayText)) {
ui->displayText->hide();
}
// Beep Center checkboxes
prevFocus = ui->displayText;
int analogs = 4 + firmware->getCapability(Pots);
for (int i=0; i<analogs+firmware->getCapability(RotaryEncoders); i++) {
QCheckBox * checkbox = new QCheckBox(this);
@@ -424,6 +429,8 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
if (!IS_TARANIS_PLUS(firmware->getBoard()) && i==6) {
checkbox->hide();
}
QWidget::setTabOrder(prevFocus, checkbox);
prevFocus = checkbox;
}
// Startup switches warnings
@@ -460,10 +467,14 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
connect(cb, SIGNAL(toggled(bool)), this, SLOT(startupSwitchToggled(bool)));
startupSwitchesSliders << slider;
startupSwitchesCheckboxes << cb;
QWidget::setTabOrder(prevFocus, slider);
QWidget::setTabOrder(slider, cb);
prevFocus = cb;
}
ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, firmware->getCapability(Switches));
// Pot warnings
prevFocus = ui->potWarningMode;
if (IS_TARANIS(firmware->getBoard())) {
for (int i=0; i<firmware->getCapability(Pots); i++) {
QCheckBox * cb = new QCheckBox(this);
@@ -475,6 +486,8 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
if (!IS_TARANIS_PLUS(firmware->getBoard()) && i==2) {
cb->hide();
}
QWidget::setTabOrder(prevFocus, cb);
prevFocus = cb;
}
}
else {
@@ -482,6 +495,17 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->potWarningMode->hide();
}
for (int i=0; i<firmware->getCapability(NumModules); i++) {
modules[i] = new ModulePanel(this, model, model.moduleData[i], generalSettings, firmware, i);
ui->modulesLayout->addWidget(modules[i]);
connect(modules[i], SIGNAL(modified()), this, SLOT(onChildModified()));
}
if (firmware->getCapability(ModelTrainerEnable)) {
modules[C9X_NUM_MODULES] = new ModulePanel(this, model, model.moduleData[C9X_NUM_MODULES], generalSettings, firmware, -1);
ui->modulesLayout->addWidget(modules[C9X_NUM_MODULES]);
}
disableMouseScrolling();
lock = false;
+2 -1
View File
@@ -20,10 +20,11 @@ class TimerPanel : public ModelPanel
Q_OBJECT
public:
TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware);
TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware, QWidget *prevFocus);
virtual ~TimerPanel();
virtual void update();
QWidget * getLastFocus();
private slots:
void on_mode_currentIndexChanged(int index);
+13
View File
@@ -532,6 +532,19 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
</item>
</layout>
</widget>
<tabstops>
<tabstop>name</tabstop>
<tabstop>image</tabstop>
<tabstop>throttleSource</tabstop>
<tabstop>throttleTrim</tabstop>
<tabstop>throttleWarning</tabstop>
<tabstop>throttleReverse</tabstop>
<tabstop>trimIncrement</tabstop>
<tabstop>extendedLimits</tabstop>
<tabstop>extendedTrims</tabstop>
<tabstop>displayText</tabstop>
<tabstop>potWarningMode</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+14 -3
View File
@@ -507,16 +507,16 @@
<string/>
</property>
<property name="minimum">
<number>1</number>
<number>0</number>
</property>
<property name="maximum">
<number>125</number>
<number>63</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>1</number>
<number>0</number>
</property>
</widget>
</item>
@@ -541,6 +541,17 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>trainerMode</tabstop>
<tabstop>protocol</tabstop>
<tabstop>channelsStart</tabstop>
<tabstop>channelsCount</tabstop>
<tabstop>ppmFrameLength</tabstop>
<tabstop>ppmPolarity</tabstop>
<tabstop>ppmDelay</tabstop>
<tabstop>failsafeMode</tabstop>
<tabstop>rxNumber</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+28 -50
View File
@@ -488,19 +488,6 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
model.frsky.usrProto = 1;
}
if (IS_ARM(firmware->getBoard())) {
ui->telemetryProtocol->addItem(tr("FrSky S.PORT"), 0);
ui->telemetryProtocol->addItem(tr("FrSky D"), 1);
if (IS_9XRPRO(firmware->getBoard())) {
ui->telemetryProtocol->addItem(tr("FrSky D (cable)"), 2);
}
ui->telemetryProtocol->setCurrentIndex(model.telemetryProtocol);
}
else {
ui->telemetryProtocolLabel->hide();
ui->telemetryProtocol->hide();
}
analogs[0] = new TelemetryAnalog(this, model.frsky.channels[0], model, generalSettings, firmware);
ui->A1Layout->addWidget(analogs[0]);
connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified()));
@@ -563,6 +550,19 @@ void TelemetryPanel::setup()
lock = true;
if (IS_ARM(firmware->getBoard())) {
ui->telemetryProtocol->addItem(tr("FrSky S.PORT"), 0);
ui->telemetryProtocol->addItem(tr("FrSky D"), 1);
if (IS_9XRPRO(firmware->getBoard())) {
ui->telemetryProtocol->addItem(tr("FrSky D (cable)"), 2);
}
ui->telemetryProtocol->setCurrentIndex(model.telemetryProtocol);
}
else {
ui->telemetryProtocolLabel->hide();
ui->telemetryProtocol->hide();
}
ui->rssiAlarm1SB->setValue(model.frsky.rssiAlarms[0].value);
ui->rssiAlarm2SB->setValue(model.frsky.rssiAlarms[1].value);
if (!IS_TARANIS(firmware->getBoard())) {
@@ -593,7 +593,6 @@ void TelemetryPanel::setup()
int varioCap = firmware->getCapability(HasVario);
if (!varioCap) {
ui->varioLimitMax_DSB->hide();
ui->varioLimitMinOff_ChkB->hide();
ui->varioLimitMin_DSB->hide();
ui->varioLimitCenterMin_DSB->hide();
ui->varioLimitCenterMax_DSB->hide();
@@ -607,7 +606,6 @@ void TelemetryPanel::setup()
}
else {
if (!firmware->getCapability(HasVarioSink)) {
ui->varioLimitMinOff_ChkB->hide();
ui->varioLimitMin_DSB->hide();
ui->varioLimitCenterMin_DSB->hide();
ui->VarioLabel_1->hide();
@@ -616,15 +614,7 @@ void TelemetryPanel::setup()
ui->varioLimitMin_DSB->setValue(model.frsky.varioMin-10);
ui->varioLimitMax_DSB->setValue(model.frsky.varioMax+10);
ui->varioLimitCenterMax_DSB->setValue((model.frsky.varioCenterMax/10.0)+0.5);
if (model.frsky.varioCenterMin==-16) {
ui->varioLimitMinOff_ChkB->setChecked(true);
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setDisabled(true);
}
else {
ui->varioLimitMinOff_ChkB->setChecked(false);
ui->varioLimitCenterMin_DSB->setValue((model.frsky.varioCenterMin/10.0)-0.5);
}
ui->varioLimitCenterMin_DSB->setValue((model.frsky.varioCenterMin/10.0)-0.5);
}
ui->altimetryGB->setVisible(firmware->getCapability(HasAltitudeSel) || firmware->getCapability(HasVario)),
@@ -719,8 +709,10 @@ void TelemetryPanel::populateCurrentSource()
void TelemetryPanel::on_telemetryProtocol_currentIndexChanged(int index)
{
model.telemetryProtocol = index;
emit modified();
if (!lock) {
model.telemetryProtocol = index;
emit modified();
}
}
void TelemetryPanel::onAnalogModified()
@@ -730,16 +722,20 @@ void TelemetryPanel::onAnalogModified()
void TelemetryPanel::on_bladesCount_editingFinished()
{
model.frsky.blades = ui->bladesCount->value();
emit modified();
if (!lock) {
model.frsky.blades = ui->bladesCount->value();
emit modified();
}
}
void TelemetryPanel::on_frskyProtoCB_currentIndexChanged(int index)
{
model.frsky.usrProto = index;
for (int i=0; i<firmware->getCapability(TelemetryCustomScreens); i++)
telemetryCustomScreens[i]->update();
emit modified();
if (!lock) {
model.frsky.usrProto = index;
for (int i=0; i<firmware->getCapability(TelemetryCustomScreens); i++)
telemetryCustomScreens[i]->update();
emit modified();
}
}
void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index)
@@ -801,24 +797,6 @@ void TelemetryPanel::on_varioLimitCenterMin_DSB_editingFinished()
}
}
void TelemetryPanel::on_varioLimitMinOff_ChkB_toggled(bool checked)
{
if (!lock) {
model.frsky.varioCenterMin = -16;
if (!checked) {
lock=true;
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setEnabled(true);
lock=false;
}
else {
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setDisabled(true);
}
emit modified();
}
}
void TelemetryPanel::on_varioLimitCenterMax_DSB_editingFinished()
{
if (!lock) {
-1
View File
@@ -97,7 +97,6 @@ class TelemetryPanel : public ModelPanel
void on_varioLimitMin_DSB_editingFinished();
void on_varioLimitMax_DSB_editingFinished();
void on_varioLimitCenterMin_DSB_editingFinished();
void on_varioLimitMinOff_ChkB_toggled(bool checked);
void on_varioLimitCenterMax_DSB_editingFinished();
void on_fasOffset_DSB_editingFinished();
void on_mahCount_SB_editingFinished();
+25 -16
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>850</width>
<height>457</height>
<height>521</height>
</rect>
</property>
<property name="windowTitle">
@@ -281,10 +281,10 @@
<number>1</number>
</property>
<property name="minimum">
<double>-2.000000000000000</double>
<double>-2.100000000000000</double>
</property>
<property name="maximum">
<double>0.000000000000000</double>
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
@@ -363,19 +363,6 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="varioLimitMinOff_ChkB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Off</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="VarioLabel_2">
<property name="sizePolicy">
@@ -1018,6 +1005,28 @@
<header>qautocombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>telemetryProtocol</tabstop>
<tabstop>rssiAlarm1CB</tabstop>
<tabstop>rssiAlarm1SB</tabstop>
<tabstop>rssiAlarm2CB</tabstop>
<tabstop>rssiAlarm2SB</tabstop>
<tabstop>varioSourceCB</tabstop>
<tabstop>varioLimitMin_DSB</tabstop>
<tabstop>varioLimitCenterMin_DSB</tabstop>
<tabstop>varioLimitCenterMax_DSB</tabstop>
<tabstop>varioLimitMax_DSB</tabstop>
<tabstop>AltitudeGPS_ChkB</tabstop>
<tabstop>AltitudeToolbar_ChkB</tabstop>
<tabstop>frskyProtoCB</tabstop>
<tabstop>fasOffset_DSB</tabstop>
<tabstop>mahCount_SB</tabstop>
<tabstop>mahCount_ChkB</tabstop>
<tabstop>frskyVoltCB</tabstop>
<tabstop>frskyCurrentCB</tabstop>
<tabstop>bladesCount</tabstop>
<tabstop>customScreens</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+12 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>276</width>
<height>118</height>
<height>138</height>
</rect>
</property>
<property name="windowTitle">
@@ -325,6 +325,17 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>UnitCB</tabstop>
<tabstop>RatioSB</tabstop>
<tabstop>CalibSB</tabstop>
<tabstop>alarm1LevelCB</tabstop>
<tabstop>alarm1GreaterCB</tabstop>
<tabstop>alarm1ValueSB</tabstop>
<tabstop>alarm2LevelCB</tabstop>
<tabstop>alarm2GreaterCB</tabstop>
<tabstop>alarm2ValueSB</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+77 -8
View File
@@ -1625,22 +1625,91 @@ May be different from firmware language</string>
</layout>
</widget>
<tabstops>
<tabstop>InvertPixels</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>showSplash</tabstop>
<tabstop>startupCheck_companion9x</tabstop>
<tabstop>startupCheck_fw</tabstop>
<tabstop>historySize</tabstop>
<tabstop>wizardEnable_ChkB</tabstop>
<tabstop>backupPath</tabstop>
<tabstop>backupPathButton</tabstop>
<tabstop>backupEnable</tabstop>
<tabstop>ge_lineedit</tabstop>
<tabstop>ge_pathButton</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>splashLibraryButton</tabstop>
<tabstop>SplashSelect</tabstop>
<tabstop>splashincludeCB</tabstop>
<tabstop>libraryPath</tabstop>
<tabstop>libraryPathButton</tabstop>
<tabstop>downloadVerCB</tabstop>
<tabstop>fw_dnld</tabstop>
<tabstop>optionCheckBox_1</tabstop>
<tabstop>optionCheckBox_2</tabstop>
<tabstop>checkFWUpdates</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>InvertPixels</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>backLightColor</tabstop>
<tabstop>simuSW</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickCB</tabstop>
<tabstop>joystickcalButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
<tabstop>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>downloadVerCB</tabstop>
<tabstop>langCombo</tabstop>
<tabstop>fw_dnld</tabstop>
<tabstop>sdPath</tabstop>
<tabstop>sdPathButton</tabstop>
<tabstop>voiceCombo</tabstop>
<tabstop>voice_dnld</tabstop>
<tabstop>optionCheckBox_1</tabstop>
<tabstop>optionCheckBox_2</tabstop>
<tabstop>optionCheckBox_3</tabstop>
<tabstop>optionCheckBox_4</tabstop>
<tabstop>optionCheckBox_5</tabstop>
<tabstop>optionCheckBox_6</tabstop>
<tabstop>optionCheckBox_7</tabstop>
<tabstop>optionCheckBox_8</tabstop>
<tabstop>optionCheckBox_9</tabstop>
<tabstop>optionCheckBox_10</tabstop>
<tabstop>optionCheckBox_11</tabstop>
<tabstop>optionCheckBox_12</tabstop>
<tabstop>optionCheckBox_13</tabstop>
<tabstop>optionCheckBox_14</tabstop>
<tabstop>optionCheckBox_15</tabstop>
<tabstop>optionCheckBox_16</tabstop>
<tabstop>optionCheckBox_17</tabstop>
<tabstop>optionCheckBox_18</tabstop>
<tabstop>optionCheckBox_19</tabstop>
<tabstop>optionCheckBox_20</tabstop>
<tabstop>optionCheckBox_21</tabstop>
<tabstop>optionCheckBox_22</tabstop>
<tabstop>optionCheckBox_23</tabstop>
<tabstop>optionCheckBox_24</tabstop>
<tabstop>optionCheckBox_25</tabstop>
<tabstop>optionCheckBox_26</tabstop>
<tabstop>optionCheckBox_27</tabstop>
<tabstop>optionCheckBox_28</tabstop>
<tabstop>optionCheckBox_29</tabstop>
<tabstop>optionCheckBox_30</tabstop>
<tabstop>optionCheckBox_31</tabstop>
<tabstop>optionCheckBox_32</tabstop>
<tabstop>optionCheckBox_33</tabstop>
<tabstop>optionCheckBox_34</tabstop>
<tabstop>optionCheckBox_35</tabstop>
<tabstop>optionCheckBox_36</tabstop>
<tabstop>optionCheckBox_37</tabstop>
<tabstop>optionCheckBox_38</tabstop>
<tabstop>optionCheckBox_39</tabstop>
<tabstop>optionCheckBox_40</tabstop>
<tabstop>optionCheckBox_41</tabstop>
<tabstop>optionCheckBox_42</tabstop>
<tabstop>checkFWUpdates</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>ProfSlot_SB</tabstop>
<tabstop>ProfName_LE</tabstop>
<tabstop>ProfSave_PB</tabstop>
<tabstop>import_PB</tabstop>
<tabstop>export_PB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
+1 -1
View File
@@ -37,7 +37,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;No Radio was found!&lt;/p&gt;&lt;p&gt;Make sure that you hold the lower trim buttons towards the center while you turn it on.&lt;/p&gt;&lt;p&gt;Then connect the USB wire.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;No Radio was found!&lt;/p&gt;&lt;p&gt;Make sure that you hold the lower trim buttons towards the center while you turn it on.&lt;/p&gt;&lt;p&gt;Then connect the USB wire.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'arial,sans-serif'; font-size:13px; font-style:italic; color:#222222; background-color:#ffffff;&quot;&gt;Note: if you have a Taranis that has not had the firmware upgraded to 2.0 then this version of Companion will not work.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
+9
View File
@@ -1,10 +1,16 @@
set(simulation_SRCS
simulatordialog.cpp
telemetrysimu.cpp
trainersimu.cpp
debugoutput.cpp
)
set(simulation_UIS
simulatordialog-9x.ui
simulatordialog-taranis.ui
telemetrysimu.ui
trainersimu.ui
debugoutput.ui
)
set(simulation_HDRS
@@ -14,6 +20,9 @@ set(simulation_HDRS
xcursorwidget.h
xmenuwidget.h
myslider.h
telemetrysimu.h
trainersimu.h
debugoutput.h
)
if(SDL_FOUND)
+43
View File
@@ -0,0 +1,43 @@
#include <QtGui>
#include <stdint.h>
#include "debugoutput.h"
#include "ui_debugoutput.h"
DebugOutput::DebugOutput(QWidget * parent):
QDialog(parent),
ui(new Ui::DebugOutput)
{
ui->setupUi(this);
#ifdef __APPLE__
QFont newFont("Courier", 13);
ui->Output->setFont(newFont);
ui->Output->setAttribute(Qt::WA_MacNormalSize);
#endif
#if defined WIN32 || !defined __GNUC__
QFont newFont("Courier", 9);
ui->Output->setFont(newFont);
#endif
}
DebugOutput::~DebugOutput()
{
delete ui;
}
void DebugOutput::traceCallback(const QString & text)
{
// ui->Output->appendPlainText(text);
QTextCursor cursor(ui->Output->textCursor());
// is the scrollbar at the end?
bool atEnd = (ui->Output->verticalScrollBar()->value() == ui->Output->verticalScrollBar()->maximum());
cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor, 1);
cursor.insertText(text);
if (atEnd) {
ui->Output->verticalScrollBar()->triggerAction(QAbstractSlider::SliderToMaximum);
}
}
+32
View File
@@ -0,0 +1,32 @@
#ifndef debugoutput_h
#define debugoutput_h
#include <QDialog>
#include "simulatorinterface.h"
namespace Ui {
class DebugOutput;
}
class DebugOutput : public QDialog
{
Q_OBJECT
public:
explicit DebugOutput(QWidget * parent);
virtual ~DebugOutput();
void traceCallback(const QString & text);
protected:
private:
Ui::DebugOutput * ui;
private slots:
};
#endif
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DebugOutput</class>
<widget class="QDialog" name="DebugOutput">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>711</width>
<height>470</height>
</rect>
</property>
<property name="windowTitle">
<string>Debug Output</string>
</property>
<property name="windowIcon">
<iconset resource="../companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPlainTextEdit" name="Output">
<property name="font">
<font>
<family>Courier New</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../companion.qrc"/>
</resources>
<connections/>
</ui>
+21 -13
View File
@@ -62,8 +62,7 @@ void Joystick::processEvents()
SDL_JoystickUpdate();
int i;
for (i = 0; i < numAxes; i++) {
for (int i = 0; i < numAxes; i++) {
Sint16 moved = SDL_JoystickGetAxis(joystick, i);
if ( abs(moved) >= deadzones[i] ) {
if ( (moved != axes[i]) ) {
@@ -72,46 +71,55 @@ void Joystick::processEvents()
emit axisValueChanged(i, moved);
axes[i] = moved;
axisRepeatTimers[i].restart();
} else if (autoRepeat && moved != 0) {
}
else if (autoRepeat && moved != 0) {
if ( axisRepeatTimers[i].elapsed() >= autoRepeatDelay ) {
emit axisValueChanged(i, moved);
axes[i] = moved;
}
} else
}
else
axisRepeatTimers[i].restart();
} else
}
else {
emit axisValueChanged(i, 0);
}
}
for (i = 0; i < numButtons; i++) {
for (int i = 0; i < numButtons; i++) {
Uint8 changed = SDL_JoystickGetButton(joystick, i);
if ( (changed != buttons[i]) ) {
emit buttonValueChanged(i, (bool) changed);
buttons[i] = changed;
buttonRepeatTimers[i].restart();
} else if (autoRepeat && changed != 0) {
}
else if (autoRepeat && changed != 0) {
if ( buttonRepeatTimers[i].elapsed() >= autoRepeatDelay ) {
emit buttonValueChanged(i, (bool) changed);
buttons[i] = changed;
}
} else
}
else {
buttonRepeatTimers[i].restart();
}
}
for (i = 0; i < numHats; i++) {
for (int i = 0; i < numHats; i++) {
Uint8 changed = SDL_JoystickGetHat(joystick, i);
if ( (changed != hats[i]) ) {
emit hatValueChanged(i, changed);
hats[i] = changed;
hatRepeatTimers[i].restart();
} else if (autoRepeat && changed != 0) {
}
else if (autoRepeat && changed != 0) {
if ( hatRepeatTimers[i].elapsed() >= autoRepeatDelay ) {
emit hatValueChanged(i, changed);
hats[i] = changed;
}
} else
}
else {
hatRepeatTimers[i].restart();
}
}
for (i = 0; i < numTrackballs; i++) {
for (int i = 0; i < numTrackballs; i++) {
int dx, dy;
SDL_JoystickGetBall(joystick, i, &dx, &dy);
if ( dx != 0 || dy != 0 )
+37 -40
View File
@@ -3,21 +3,16 @@
#include "appdata.h"
#include <QtGui>
joystickDialog::joystickDialog(QWidget *parent, int stick) :
JoystickDialog::JoystickDialog(QWidget *parent, int stick) :
QDialog(parent),
ui(new Ui::joystickDialog) {
ui(new Ui::JoystickDialog)
{
ui->setupUi(this);
int jscaltmp[8][3] = {
{32767, 0, -32767},
{32767, 0, -32767},
{32767, 0, -32767},
{32767, 0, -32767},
{32767, 0, -32767},
{32767, 0, -32767},
{32767, 0, -32767},
{32767, 0, -32767}
};
memcpy(jscal, jscaltmp, sizeof (jscal));
for (int i=0; i<8; ++i) {
jscal[i][0] = 32767;
jscal[i][1] = 0;
jscal[i][2] = -32767;
}
ui->okButton->setDisabled(true);
ui->howtoLabel->setText(tr("Move sticks and pots in every direction making full movement\nPress next when finished"));
step = 0;
@@ -32,23 +27,24 @@ ui(new Ui::joystickDialog) {
connect(joystick, SIGNAL(axisValueChanged(int, int)), this, SLOT(onjoystickAxisValueChanged(int, int)));
}
joystickDialog::~joystickDialog() {
JoystickDialog::~JoystickDialog()
{
delete ui;
}
void joystickDialog::joystickOpen(int stick) {
void JoystickDialog::joystickOpen(int stick)
{
if (stick == -1) {
this->close();
return;
}
joystick = new Joystick(this, 1, false, 0);
int numAxes=std::min(joystick->numAxes,8);
int numAxes = std::min(joystick->numAxes, 8);
if (joystick) {
joystick->open(stick);
for (int j=0; j<numAxes; j++) {
joystick->sensitivities[j] = 0;
joystick->deadzones[j]=20;
joystick->sensitivities[j] = 0;
joystick->deadzones[j] = 20;
}
}
else {
@@ -57,27 +53,25 @@ void joystickDialog::joystickOpen(int stick) {
}
}
void joystickDialog::onjoystickAxisValueChanged(int axis, int value) {
void JoystickDialog::onjoystickAxisValueChanged(int axis, int value)
{
if (value > jscal[axis][2]) {
jscal[axis][2] = value;
}
if (value < jscal[axis][0]) {
jscal[axis][0] = value;
}
QSlider * sl[]= {ui->Ch_1, ui->Ch_2, ui->Ch_3, ui->Ch_4, ui->Ch_5, ui->Ch_6, ui->Ch_7, ui->Ch_8};
QCheckBox * ib[]={ui->ChInv_1, ui->ChInv_2, ui->ChInv_3, ui->ChInv_4, ui->ChInv_5, ui->ChInv_6, ui->ChInv_7, ui->ChInv_8};
if (ib[axis]->isChecked()) {
sl[axis]->setInvertedAppearance(true);
} else {
sl[axis]->setInvertedAppearance(false);
}
QSlider * sl[] = {ui->Ch_1, ui->Ch_2, ui->Ch_3, ui->Ch_4, ui->Ch_5, ui->Ch_6, ui->Ch_7, ui->Ch_8};
QCheckBox * ib[] = {ui->ChInv_1, ui->ChInv_2, ui->ChInv_3, ui->ChInv_4, ui->ChInv_5, ui->ChInv_6, ui->ChInv_7, ui->ChInv_8};
sl[axis]->setInvertedAppearance(ib[axis]->isChecked());
sl[axis]->setMinimum(jscal[axis][0]);
sl[axis]->setMaximum(jscal[axis][2]);
sl[axis]->setValue(value);
}
void joystickDialog::on_nextButton_clicked() {
int numAxes=std::min(joystick->numAxes,8);
void JoystickDialog::on_nextButton_clicked()
{
int numAxes = std::min(joystick->numAxes,8);
switch (step) {
case 0:
ui->howtoLabel->setText(tr("Place sticks and pots in middle position.\nPress next when done"));
@@ -85,11 +79,11 @@ void joystickDialog::on_nextButton_clicked() {
break;
case 1:
for (int i=0; i<numAxes; i++) {
jscal[i][1]=0;
for (int j=0; j<100;j++) {
jscal[i][1]+=joystick->getAxisValue(i);
jscal[i][1] = 0;
for (int j=0; j<100; j++) {
jscal[i][1] += joystick->getAxisValue(i);
}
jscal[i][1]/=100;
jscal[i][1] /= 100;
}
ui->howtoLabel->setText(tr("Map joystick channels to controls using comboboxes.\nPress next when done"));
step++;
@@ -110,20 +104,22 @@ void joystickDialog::on_nextButton_clicked() {
}
}
void joystickDialog::on_cancelButton_clicked() {
void JoystickDialog::on_cancelButton_clicked()
{
joystick->close();
this->close();
}
void joystickDialog::on_okButton_clicked() {
int sticks[8]={0,0,0,0,0,0,0,0};
void JoystickDialog::on_okButton_clicked()
{
int sticks[8] = {0,0,0,0,0,0,0,0};
foreach(QComboBox *cb, findChildren<QComboBox *>(QRegExp("jsmapCB_[0-9]+"))) {
sticks[cb->currentIndex()]++;
}
bool duplicated=false;
for (int i=1; i<8;i++) {
if (sticks[i]>1) {
duplicated=true;
duplicated = true;
}
}
if (duplicated) {
@@ -131,14 +127,15 @@ void joystickDialog::on_okButton_clicked() {
return;
}
joystick->close();
for (int i=0; i<8;i++) {
for (int i=0; i<8; i++) {
g.joystick[i].remove();
}
QCheckBox * ib[]={ui->ChInv_1, ui->ChInv_2, ui->ChInv_3, ui->ChInv_4, ui->ChInv_5, ui->ChInv_6, ui->ChInv_7, ui->ChInv_8};
foreach(QComboBox *cb, findChildren<QComboBox *>(QRegExp("jsmapCB_[0-9]+"))) {
int axe=cb->objectName().mid(cb->objectName().lastIndexOf("_")+1).toInt()-1;
int stick=cb->currentIndex();
if (stick > 0) {
int stick=cb->currentIndex() - 1;
qDebug() << "joystick mapping " << cb->objectName() <<"axe:" << axe << "stick:" << stick;
if (stick >= 0) {
g.joystick[stick].stick_axe( axe );
g.joystick[stick].stick_max( jscal[axe][2] );
g.joystick[stick].stick_med( jscal[axe][1] );
+5 -5
View File
@@ -5,23 +5,23 @@
#include <QDialog>
namespace Ui {
class joystickDialog;
class JoystickDialog;
}
class joystickDialog : public QDialog
class JoystickDialog : public QDialog
{
Q_OBJECT
public:
explicit joystickDialog(QWidget *parent = 0, int stick=-1);
~joystickDialog();
explicit JoystickDialog(QWidget *parent = 0, int stick=-1);
~JoystickDialog();
Joystick *joystick;
public slots:
void onjoystickAxisValueChanged(int axis, int value);
private:
Ui::joystickDialog *ui;
Ui::JoystickDialog *ui;
void joystickOpen(int stick);
int jscal[8][3];
int step;
+33 -4
View File
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>joystickDialog</class>
<widget class="QDialog" name="joystickDialog">
<class>JoystickDialog</class>
<widget class="QDialog" name="JoystickDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>418</width>
<height>301</height>
<width>505</width>
<height>398</height>
</rect>
</property>
<property name="sizePolicy">
@@ -908,6 +908,35 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>Ch_1</tabstop>
<tabstop>ChInv_1</tabstop>
<tabstop>jsmapCB_1</tabstop>
<tabstop>Ch_2</tabstop>
<tabstop>ChInv_2</tabstop>
<tabstop>jsmapCB_2</tabstop>
<tabstop>Ch_3</tabstop>
<tabstop>ChInv_3</tabstop>
<tabstop>jsmapCB_3</tabstop>
<tabstop>Ch_4</tabstop>
<tabstop>ChInv_4</tabstop>
<tabstop>jsmapCB_4</tabstop>
<tabstop>Ch_5</tabstop>
<tabstop>ChInv_5</tabstop>
<tabstop>jsmapCB_5</tabstop>
<tabstop>Ch_6</tabstop>
<tabstop>ChInv_6</tabstop>
<tabstop>jsmapCB_6</tabstop>
<tabstop>Ch_7</tabstop>
<tabstop>ChInv_7</tabstop>
<tabstop>jsmapCB_7</tabstop>
<tabstop>Ch_8</tabstop>
<tabstop>ChInv_8</tabstop>
<tabstop>jsmapCB_8</tabstop>
<tabstop>cancelButton</tabstop>
<tabstop>nextButton</tabstop>
<tabstop>okButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
@@ -1694,6 +1694,43 @@ QPushButton:checked {
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>switchF</tabstop>
<tabstop>dialP_3</tabstop>
<tabstop>switchE</tabstop>
<tabstop>switchA</tabstop>
<tabstop>switchB</tabstop>
<tabstop>dialP_1</tabstop>
<tabstop>dialP_2</tabstop>
<tabstop>switchC</tabstop>
<tabstop>switchD</tabstop>
<tabstop>switchG</tabstop>
<tabstop>dialP_4</tabstop>
<tabstop>switchH</tabstop>
<tabstop>holdLeftY</tabstop>
<tabstop>FixLeftY</tabstop>
<tabstop>FixLeftX</tabstop>
<tabstop>holdLeftX</tabstop>
<tabstop>leftStick</tabstop>
<tabstop>trimHL_L</tabstop>
<tabstop>trimHLeft</tabstop>
<tabstop>trimHL_R</tabstop>
<tabstop>trimVL_D</tabstop>
<tabstop>trimVLeft</tabstop>
<tabstop>trimVL_U</tabstop>
<tabstop>trimVR_U</tabstop>
<tabstop>trimVRight</tabstop>
<tabstop>trimVR_D</tabstop>
<tabstop>trimHR_L</tabstop>
<tabstop>trimHRight</tabstop>
<tabstop>trimHR_R</tabstop>
<tabstop>rightStick</tabstop>
<tabstop>holdRightY</tabstop>
<tabstop>FixRightY</tabstop>
<tabstop>FixRightX</tabstop>
<tabstop>holdRightX</tabstop>
</tabstops>
<resources>
<include location="../companion.qrc"/>
</resources>
+117 -28
View File
@@ -9,6 +9,42 @@
#define RESX 1024
int SimulatorDialog::screenshotIdx = 0;
SimulatorDialog * traceCallbackInstance = 0;
void traceCb(const char * text) {
// divert C callback into simulator instance
if (traceCallbackInstance) {
traceCallbackInstance->traceCallback(text);
}
}
void SimulatorDialog::traceCallback(const char * text)
{
// this function is called from other threads
traceMutex.lock();
// limit the size of list
if (traceList.size() < 1000) {
traceList.append(QString(text));
}
traceMutex.unlock();
}
void SimulatorDialog::updateDebugOutput()
{
traceMutex.lock();
while (!traceList.isEmpty()) {
QString text = traceList.takeFirst();
traceBuffer.append(text);
// limit the size of traceBuffer
if (traceBuffer.size() > 10*1024) {
traceBuffer.remove(0, 1*1024);
}
if (DebugOut) {
DebugOut->traceCallback(QString(text));
}
}
traceMutex.unlock();
}
SimulatorDialog::SimulatorDialog(QWidget * parent, unsigned int flags):
QDialog(parent),
@@ -19,10 +55,19 @@ SimulatorDialog::SimulatorDialog(QWidget * parent, unsigned int flags):
simulator(NULL),
lastPhase(-1),
beepVal(0),
TelemetrySimu(0),
TrainerSimu(0),
DebugOut(0),
buttonPressed(0),
trimPressed (TRIM_NONE),
middleButtonPressed(false)
{
//shorcut for telemetry simulator
// new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_T), this, SLOT(openTelemetrySimulator()));
new QShortcut(QKeySequence(Qt::Key_F4), this, SLOT(openTelemetrySimulator()));
new QShortcut(QKeySequence(Qt::Key_F5), this, SLOT(openTrainerSimulator()));
new QShortcut(QKeySequence(Qt::Key_F6), this, SLOT(openDebugOutput()));
traceCallbackInstance = this;
}
uint32_t SimulatorDialog9X::switchstatus = 0;
@@ -37,6 +82,9 @@ SimulatorDialog9X::SimulatorDialog9X(QWidget * parent, unsigned int flags):
initUi<Ui::SimulatorDialog9X>(ui);
// install simulator TRACE hook
simulator->installTraceHook(traceCb);
backLight = g.backLight();
if (backLight > 4) backLight = 0;
switch (backLight) {
@@ -109,6 +157,10 @@ SimulatorDialogTaranis::SimulatorDialogTaranis(QWidget * parent, unsigned int fl
lcdDepth = 4;
initUi<Ui::SimulatorDialogTaranis>(ui);
// install simulator TRACE hook
simulator->installTraceHook(traceCb);
dialP_4 = ui->dialP_4;
ui->lcd->setBackgroundColor(47, 123, 227);
@@ -154,6 +206,7 @@ SimulatorDialogTaranis::~SimulatorDialogTaranis()
SimulatorDialog::~SimulatorDialog()
{
traceCallbackInstance = 0;
delete timer;
delete simulator;
}
@@ -215,6 +268,49 @@ void SimulatorDialog::onTrimReleased()
trimPressed = TRIM_NONE;
}
void SimulatorDialog::openTelemetrySimulator()
{
// allow only one instance
if (TelemetrySimu == 0) {
TelemetrySimu = new TelemetrySimulator(this, simulator);
TelemetrySimu->show();
}
else if (!TelemetrySimu->isVisible()) {
TelemetrySimu->show();
}
}
void SimulatorDialog::openTrainerSimulator()
{
// allow only one instance
if (TrainerSimu == 0) {
TrainerSimu = new TrainerSimulator(this, simulator);
TrainerSimu->show();
}
else if (!TrainerSimu->isVisible()) {
TrainerSimu->show();
}
}
void SimulatorDialog::openDebugOutput()
{
// allow only one instance, but install signal handler to catch dialog destruction just in case
if (DebugOut == 0) {
DebugOut = new DebugOutput(this);
QObject::connect(DebugOut, SIGNAL(destroyed()), this, SLOT(onDebugOutputClose()));
DebugOut->traceCallback(traceBuffer);
DebugOut->show();
}
else if (!DebugOut->isVisible()) {
DebugOut->show();
}
}
void SimulatorDialog::onDebugOutputClose()
{
DebugOut = 0;
}
void SimulatorDialog::keyPressEvent (QKeyEvent *event)
{
switch (event->key()) {
@@ -298,7 +394,7 @@ void SimulatorDialog::initUi(T * ui)
for (int j=0; j<8; j++){
int axe = g.joystick[j].stick_axe();
if (axe>=0 && axe<8) {
jsmap[axe]=j;
jsmap[axe]=j+1;
jscal[axe][0] = g.joystick[j].stick_min();
jscal[axe][1] = g.joystick[j].stick_med();
jscal[axe][2] = g.joystick[j].stick_max();
@@ -559,6 +655,8 @@ void SimulatorDialog::onTimerEvent()
QApplication::beep();
}
}
updateDebugOutput();
}
void SimulatorDialog::centerSticks()
@@ -971,8 +1069,8 @@ void SimulatorDialog::on_FixRightY_clicked(bool checked)
void SimulatorDialog::onjoystickAxisValueChanged(int axis, int value)
{
int stick;
if (axis>=0 && axis<=8) {
stick=jsmap[axis];
if (axis>=0 && axis<8) {
stick = jsmap[axis];
int stickval;
if (value>jscal[axis][1]) {
if ((jscal[axis][2]-jscal[axis][1])==0)
@@ -987,37 +1085,28 @@ void SimulatorDialog::onjoystickAxisValueChanged(int axis, int value)
if (jscal[axis][3]==1) {
stickval*=-1;
}
if (stick==1 || stick==2) {
float currX=nodeRight->getX();
float currY=nodeRight->getY();
if (stick==1 ) {
nodeRight->setPos(currX*100-10,-stickval*100/1024-10);
}
if (stick==2) {
nodeRight->setPos(stickval*100/1024-10,currY*100-10);
}
}
else if (stick==3 || stick==4) {
float currX=nodeLeft->getX();
float currY=nodeLeft->getY();
if (stick==3) {
nodeLeft->setPos(currX*100-10,-stickval*100/1024-10);
}
if (stick==4) {
nodeLeft->setPos(stickval*100/1024-10,currY*100-10);
}
}
if (stick==5) {
if (stick==1 ) {
nodeRight->setY(-stickval/1024.0);
}
else if (stick==2) {
nodeRight->setX(stickval/1024.0);
}
else if (stick==3) {
nodeLeft->setY(-stickval/1024.0);
}
else if (stick==4) {
nodeLeft->setX(stickval/1024.0);
}
else if (stick==5) {
dialP_1->setValue(stickval);
}
if (stick==6) {
else if (stick==6) {
dialP_2->setValue(stickval);
}
if (stick==7) {
else if (stick==7) {
dialP_3->setValue(stickval);
}
if (stick==8 && dialP_4) {
else if (stick==8 && dialP_4) {
dialP_4->setValue(stickval);
}
}
@@ -4,6 +4,9 @@
#include <QDialog>
#include "modeledit/node.h"
#include "eeprominterface.h"
#include "telemetrysimu.h"
#include "trainersimu.h"
#include "debugoutput.h"
#ifdef JOYSTICKS
#include "joystick.h"
@@ -38,6 +41,7 @@ class SimulatorDialog : public QDialog
void start(const char * filename);
void start(QByteArray & eeprom);
virtual void traceCallback(const char * text);
protected:
template <class T> void initUi(T * ui);
@@ -95,6 +99,14 @@ class SimulatorDialog : public QDialog
int lcdWidth;
int lcdDepth;
TelemetrySimulator * TelemetrySimu;
TrainerSimulator * TrainerSimu;
DebugOutput * DebugOut;
QString traceBuffer;
QMutex traceMutex;
QList<QString> traceList;
void updateDebugOutput();
protected:
virtual void closeEvent(QCloseEvent *);
@@ -125,6 +137,10 @@ class SimulatorDialog : public QDialog
void onTimerEvent();
void onTrimPressed();
void onTrimReleased();
void openTelemetrySimulator();
void openTrainerSimulator();
void openDebugOutput();
void onDebugOutputClose();
#ifdef JOYSTICKS
void onjoystickAxisValueChanged(int axis, int value);
@@ -97,4 +97,9 @@ return lcd_buf;
return main_thread_error;
#endif
#ifdef SETTRAINER_IMPORT
#undef SETTRAINER_IMPORT
ppmInValid = 100;
g_ppmIns[inputNumber] = LIMIT<int16_t>(-512, value, 512);
#endif
@@ -80,6 +80,11 @@ class SimulatorInterface {
virtual const char * getError() = 0;
virtual void sendTelemetry(uint8_t * data, unsigned int len) = 0;
virtual void setTrainerInput(unsigned int inputNumber, int16_t value) = 0;
virtual void installTraceHook(void (*callback)(const char *)) = 0;
};
#endif
@@ -0,0 +1,91 @@
#include <stdint.h>
#include "telemetrysimu.h"
#include "ui_telemetrysimu.h"
#include "radio/src/telemetry/frsky.h"
TelemetrySimulator::TelemetrySimulator(QWidget * parent, SimulatorInterface * simulator):
QDialog(parent),
ui(new Ui::TelemetrySimulator),
simulator(simulator)
{
ui->setupUi(this);
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent()));
timer->start(100);
}
TelemetrySimulator::~TelemetrySimulator()
{
timer->stop();
delete ui;
}
void TelemetrySimulator::onTimerEvent()
{
if (ui->Simulate->isChecked()) {
generateTelemetryFrame();
}
}
void TelemetrySimulator::closeEvent(QCloseEvent *event)
{
ui->Simulate->setChecked(false);
event->accept();
}
void setSportPacketCrc(uint8_t * packet)
{
short crc = 0;
for (int i=1; i<FRSKY_SPORT_PACKET_SIZE-1; i++) {
crc += packet[i]; //0-1FF
crc += crc >> 8; //0-100
crc &= 0x00ff;
crc += crc >> 8; //0-0FF
crc &= 0x00ff;
}
packet[FRSKY_SPORT_PACKET_SIZE-1] = 0xFF - (crc & 0x00ff);
//TRACE("crc set: %x", packet[FRSKY_SPORT_PACKET_SIZE-1]);
}
void generateSportPacket(uint8_t * packet, uint8_t dataId, uint8_t prim, uint16_t appId, uint32_t data)
{
packet[0] = dataId;
packet[1] = prim;
*((uint16_t *)(packet+2)) = appId;
*((int32_t *)(packet+4)) = data;
setSportPacketCrc(packet);
}
void TelemetrySimulator::generateTelemetryFrame()
{
static int item = 0;
uint8_t buffer[FRSKY_SPORT_PACKET_SIZE];
switch(item++) {
case 0:
generateSportPacket(buffer, 1, DATA_FRAME, RSSI_ID, LIMIT<uint32_t>(0, ui->Rssi->text().toInt(), 0xFF));
break;
case 1:
generateSportPacket(buffer, 1, DATA_FRAME, XJT_VERSION_ID, 11);
break;
case 2:
generateSportPacket(buffer, 1, DATA_FRAME, SWR_ID, LIMIT<uint32_t>(0, ui->Swr->text().toInt(), 0xFF));
break;
case 3:
generateSportPacket(buffer, 1, DATA_FRAME, ADC1_ID, LIMIT<uint32_t>(0, ui->A1->text().toInt(), 0xFF));
break;
case 4:
generateSportPacket(buffer, 1, DATA_FRAME, ADC2_ID, LIMIT<uint32_t>(0, ui->A2->text().toInt(), 0xFF));
break;
default:
item = 0;
return;
}
simulator->sendTelemetry(buffer, 9);
}
+40
View File
@@ -0,0 +1,40 @@
#ifndef telemetrysimu_h
#define telemetrysimu_h
#include <QCloseEvent>
#include <QDialog>
#include <QTimer>
#include "simulatorinterface.h"
namespace Ui {
class TelemetrySimulator;
}
class TelemetrySimulator : public QDialog
{
Q_OBJECT
public:
explicit TelemetrySimulator(QWidget * parent, SimulatorInterface * simulator);
virtual ~TelemetrySimulator();
protected:
virtual void closeEvent(QCloseEvent *event);
private:
Ui::TelemetrySimulator * ui;
QTimer * timer;
SimulatorInterface *simulator;
void generateTelemetryFrame();
private slots:
void onTimerEvent();
};
#endif
+72
View File
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TelemetrySimulator</class>
<widget class="QDialog" name="TelemetrySimulator">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>184</width>
<height>165</height>
</rect>
</property>
<property name="windowTitle">
<string>Telemetry Simulator</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="3">
<widget class="QLineEdit" name="Swr"/>
</item>
<item row="4" column="3">
<widget class="QLineEdit" name="A1"/>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>RSSI</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="Rssi"/>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string>A1</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>SWR</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QCheckBox" name="Simulate">
<property name="text">
<string>simulate</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>A2</string>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QLineEdit" name="A2"/>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
+124
View File
@@ -0,0 +1,124 @@
#include <stdint.h>
#include "trainersimu.h"
#include "ui_trainersimu.h"
#include "helpers.h"
#define GBALL_SIZE 20
#define RESX 512
TrainerSimulator::TrainerSimulator(QWidget * parent, SimulatorInterface * simulator):
QDialog(parent),
ui(new Ui::TrainerSimulator),
simulator(simulator)
{
ui->setupUi(this);
leftStick = ui->leftStick;
rightStick = ui->rightStick;
setupSticks();
// resize(0, 0); // to force min height, min width
setFixedSize(width(), height());
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent()));
}
TrainerSimulator::~TrainerSimulator()
{
timer->stop();
delete ui;
}
void TrainerSimulator::showEvent(QShowEvent *event)
{
timer->start(10);
event->accept();
}
void TrainerSimulator::closeEvent(QCloseEvent *event)
{
timer->stop();
event->accept();
}
void TrainerSimulator::centerSticks()
{
if (leftStick->scene())
nodeLeft->stepToCenter();
if (rightStick->scene())
nodeRight->stepToCenter();
}
void TrainerSimulator::setupSticks()
{
QGraphicsScene *leftScene = new QGraphicsScene(leftStick);
leftScene->setItemIndexMethod(QGraphicsScene::NoIndex);
leftStick->setScene(leftScene);
// leftStick->scene()->addLine(0,10,20,30);
QGraphicsScene *rightScene = new QGraphicsScene(rightStick);
rightScene->setItemIndexMethod(QGraphicsScene::NoIndex);
rightStick->setScene(rightScene);
// rightStick->scene()->addLine(0,10,20,30);
nodeLeft = new Node();
nodeLeft->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2);
nodeLeft->setBallSize(GBALL_SIZE);
leftScene->addItem(nodeLeft);
nodeRight = new Node();
nodeRight->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2);
nodeRight->setBallSize(GBALL_SIZE);
rightScene->addItem(nodeRight);
}
void TrainerSimulator::resizeEvent(QResizeEvent *event)
{
if (leftStick->scene()) {
QRect qr = leftStick->contentsRect();
qreal w = (qreal)qr.width() - GBALL_SIZE;
qreal h = (qreal)qr.height() - GBALL_SIZE;
qreal cx = (qreal)qr.width()/2;
qreal cy = (qreal)qr.height()/2;
leftStick->scene()->setSceneRect(-cx,-cy,w,h);
QPointF p = nodeLeft->pos();
p.setX(qMin(cx, qMax(p.x(), -cx)));
p.setY(qMin(cy, qMax(p.y(), -cy)));
nodeLeft->setPos(p);
}
if (rightStick->scene()) {
QRect qr = rightStick->contentsRect();
qreal w = (qreal)qr.width() - GBALL_SIZE;
qreal h = (qreal)qr.height() - GBALL_SIZE;
qreal cx = (qreal)qr.width()/2;
qreal cy = (qreal)qr.height()/2;
rightStick->scene()->setSceneRect(-cx,-cy,w,h);
QPointF p = nodeRight->pos();
p.setX(qMin(cx, qMax(p.x(), -cx)));
p.setY(qMin(cy, qMax(p.y(), -cy)));
nodeRight->setPos(p);
}
QDialog::resizeEvent(event);
}
void TrainerSimulator::onTimerEvent()
{
centerSticks();
setTrainerInputs();
}
void TrainerSimulator::setTrainerInputs()
{
simulator->setTrainerInput(0, int( 512* nodeLeft->getX())); // LEFT HORZ
simulator->setTrainerInput(1, int(-512* nodeLeft->getY())); // LEFT VERT
simulator->setTrainerInput(2, int(-512*nodeRight->getY())); // RGHT VERT
simulator->setTrainerInput(3, int( 512*nodeRight->getX())); // RGHT HORZ
}
+50
View File
@@ -0,0 +1,50 @@
#ifndef trainersimu_h
#define trainersimu_h
#include <QShowEvent>
#include <QCloseEvent>
#include <QDialog>
#include <QTimer>
#include "modeledit/node.h"
#include "simulatorinterface.h"
namespace Ui {
class TrainerSimulator;
}
class TrainerSimulator : public QDialog
{
Q_OBJECT
public:
explicit TrainerSimulator(QWidget * parent, SimulatorInterface * simulator);
virtual ~TrainerSimulator();
protected:
virtual void showEvent(QShowEvent *event);
virtual void closeEvent(QCloseEvent *event);
private:
Ui::TrainerSimulator * ui;
QTimer * timer;
SimulatorInterface *simulator;
QGraphicsView * leftStick, * rightStick;
Node *nodeLeft;
Node *nodeRight;
void centerSticks();
void setupSticks();
void resizeEvent(QResizeEvent *event = 0);
void setTrainerInputs();
private slots:
void onTimerEvent();
};
#endif
+95
View File
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TrainerSimulator</class>
<widget class="QDialog" name="TrainerSimulator">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>566</width>
<height>268</height>
</rect>
</property>
<property name="windowTitle">
<string>Trainer simulator</string>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>563</width>
<height>267</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>5</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>17</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QGraphicsView" name="rightStick">
<property name="minimumSize">
<size>
<width>245</width>
<height>245</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QGraphicsView" name="leftStick">
<property name="minimumSize">
<size>
<width>245</width>
<height>245</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1777,7 +1777,7 @@ Das kann auch unterschiedlich zur Firmwaresprache sein</translation>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -5156,7 +5156,7 @@ If blank then the mix is considered to be &quot;ON&quot; all the time.</source>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+4 -4
View File
@@ -1852,7 +1852,7 @@ Jos tyhjä tulon katsotaan olevan &quot;ON&quot; kokoajan.</translation>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -1863,7 +1863,7 @@ p, li { white-space: pre-wrap; }
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -5574,7 +5574,7 @@ Haluatko tallentaa muutokset ?</translation>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -5585,7 +5585,7 @@ p, li { white-space: pre-wrap; }
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4633,7 +4633,7 @@ This determines how mixer values are added.
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4493,7 +4493,7 @@ Do you want to save your changes?</source>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+1 -1
View File
@@ -4506,7 +4506,7 @@ Ustala w jaki sposób miksery są łączone.
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+1 -1
View File
@@ -4653,7 +4653,7 @@ This determines how mixer values are added.
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+2 -2
View File
@@ -1665,7 +1665,7 @@ May be different from firmware language</source>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -4691,7 +4691,7 @@ This determines how mixer values are added.
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+2 -2
View File
@@ -1682,7 +1682,7 @@ Behöver inte vara samma som menyspråket</translation>
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
@@ -5080,7 +5080,7 @@ Anger hur mixervärden påverkar kanalen.
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;MS Shell Dlg 2&apos;; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay and slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+76 -1
View File
@@ -1,3 +1,78 @@
<h2>Version 2.0.14 / todo</h2>
[Taranis]
<ul>
<li>Fixed blank LCD screen at very low temperatures</li>
<li>Shortened radio reboot time in case of watchdog reset</li>
<li>Fixed timer problem in bootloader, which prevented radio from powering off after being connected to USB</li>
<li>Fixed issue with heli swash plate mixing when using <i>notrim</i></li>
<li>Various fixes for double-keys</li>
<li>Added switch auto detection in Timer source</li>
<li>Totally removed splash screen display if duration is set to ---</li>
<li>Back-light turned on sooner at startup (Taranis +)</li>
<li>Fixed reverse polarity on external CPPM output</li>
<li>Suppressed center beep for non-existing pots</li>
<li>Fixed THt persistent timer running after model load (with Throttle at -100%)</li>
<li>Fixed buffer overflow for automatic flight mode change audio announcements (if very long model and flight mode names were used)</li>
<li>Limited stick throws to 100% when using trainer in add mode</li>
<li>Fixed Lua lcd.drawLine(), first pixel was not drawn</li>
<li>Fixed missing last column for some bitmap sizes</li>
<li>Minor display corrections</li>
</ul>
[9XR-PRO]
<ul>
<li>MAVLINK adaptation</li>
</ul>
[9XR]
<ul>
<li>Added 115200 bps speed to MAVLINK</li>
</ul>
[9X2561]
<ul>
<li>PWM backlight fixed</li>
</ul>
[All]
<ul>
<li>Various texts and translations corrections</li>
<li>Various small bug-fixes</li>
</ul>
<h2>Version 2.0.13 / 2014-11-20</h2>
[Taranis]
<ul>
<li>Compilation with -Os instead of -O2 because of a strange bug on LS1 (AND condition changed by itself on SD error)</li>
<li>Lua getTimer and setTimer parameters fixed (persistent and minuteBeep)</li>
<li>Lua resetTimer function added</li>
<li>SWR shown on newer Taranis+</li>
<li>BOLD, CONDENSED, FIXED constants exported to Lua</li>
<li>Disable mixer line that uses a Lua source if the Lua script is not running</li>
<li>Additional parameters for Lua model.getMix/insertMix</li>
<li>Fixed occasional SD card error</li>
<li>Fixed bitmap loading</li>
</ul>
[9XR-PRO]
<ul>
<li>Coprocessor interface bugfix</li>
</ul>
[Stock]
<ul>
<li>Fixed never ending haptic repeat</li>
<li>Fixed curves display</li>
</ul>
[All]
<ul>
<li>Stick icons missing next to trim key states on switch diag page</li>
</ul>
<h2>Version 2.0.12 / 2014-09-16</h2>
[Taranis]
<ul>
@@ -377,4 +452,4 @@
<li>New menu in Main Views / Telemetry Views</li>
<li>Vario sounds improved!</li>
<li>SD Folders renamed. "9XSOUNDS" becomes "SOUNDS", don't forget to update your SD card!</li>
</ul>
</ul>
+1 -1
View File
@@ -43,7 +43,7 @@ Idle task stack size(word).
System frequency (Hz).
*/
#if defined(PCBTARANIS)
#define CFG_CPU_FREQ (60000000)
#define CFG_CPU_FREQ (120000000)
#else
#define CFG_CPU_FREQ (36000000) // TODO check if really correct for sky9x?
#endif
+1 -1
View File
@@ -20,7 +20,7 @@
#include <CoOS.h>
#define OsSchedLock() OSSchedLock++; /*!< Lock schedule */
#define OsSchedLock() { OSSchedLock++; asm volatile ("" : : : "memory"); } /*!< Lock schedule */
extern void OsSchedUnlock(void);
#endif
+28 -3
View File
@@ -1,4 +1,4 @@
FatFs Module Source Files R0.09b (C)ChaN, 2013
FatFs Module Source Files R0.10c (C)ChaN, 2014
FILES
@@ -24,7 +24,7 @@ AGREEMENTS
small embedded systems. This is a free software and is opened for education,
research and commercial developments under license policy of following trems.
Copyright (C) 2012, ChaN, all right reserved.
Copyright (C) 2014, ChaN, all right reserved.
* The FatFs module is a free software and there is NO WARRANTY.
* No restriction on use. You can use, modify and redistribute it for
@@ -134,5 +134,30 @@ REVISION HISTORY
Changed f_open() and f_opendir() reject null object pointer to avoid crash.
Changed option name _FS_SHARE to _FS_LOCK.
Jan 23,'13 R0.09b Added f_getlabel() and f_setlabel(). (_USE_LABEL == 1)
Jan 23,'13 R0.09b Added f_getlabel() and f_setlabel(). (_USE_LABEL)
Oct 02,'13 R0.10 Added selection of character encoding on the file. (_STRF_ENCODE)
Added f_closedir().
Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO)
Added forced mount feature with changes of f_mount().
Improved behavior of volume auto detection.
Improved write throughput of f_puts() and f_printf().
Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write().
Fixed f_write() can be truncated when the file size is close to 4GB.
Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect error code.
Jan 15,'14 R0.10a Added arbitrary strings as drive number in the path name. (_STR_VOLUME_ID)
Added a configuration option of minimum sector size. (_MIN_SS)
2nd argument of f_rename() can have a drive number and it will be ignored.
Fixed f_mount() with forced mount fails when drive number is >= 1.
Fixed f_close() invalidates the file object without volume lock.
Fixed f_closedir() returns but the volume lock is left acquired.
Fixed creation of an entry with LFN fails on too many SFN collisions.
Mar 19,'14 R0.10b Fixed a hard error in the disk I/O layer can collapse the directory entry.
Fixed LFN entry is not deleted on delete/rename an object with lossy converted SFN.
Nov 09,'14 R0.10c Added a configuration option for the platforms without RTC. (_FS_NORTC)
Fixed volume label created by Mac OS X cannot be retrieved with f_getlabel().
Fixed a potential problem of FAT access that can appear on disk error.
Fixed null pointer dereference on attempting to delete the root direcotry.
+12 -20
View File
@@ -1,5 +1,5 @@
/*-----------------------------------------------------------------------
/ Low level disk interface modlue include file (C)ChaN, 2013
/*-----------------------------------------------------------------------/
/ Low level disk interface modlue include file (C)ChaN, 2014 /
/-----------------------------------------------------------------------*/
#ifndef _DISKIO_DEFINED
@@ -34,12 +34,13 @@ typedef enum {
DSTATUS disk_initialize (BYTE pdrv);
DSTATUS disk_status (BYTE pdrv);
DRESULT disk_read (BYTE pdrv, BYTE*buff, DWORD sector, BYTE count);
DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, BYTE count);
DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count);
DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count);
DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
/* Disk Status Bits (DSTATUS) */
#define STA_NOINIT 0x01 /* Drive not initialized */
#define STA_NODISK 0x02 /* No medium in the drive */
#define STA_PROTECT 0x04 /* Write protected */
@@ -47,14 +48,14 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
/* Command code for disk_ioctrl fucntion */
/* Generic command (used by FatFs) */
#define CTRL_SYNC 0 /* Flush disk cache (for write functions) */
#define GET_SECTOR_COUNT 1 /* Get media size (for only f_mkfs()) */
#define GET_SECTOR_SIZE 2 /* Get sector size (for multiple sector size (_MAX_SS >= 1024)) */
#define GET_BLOCK_SIZE 3 /* Get erase block size (for only f_mkfs()) */
#define CTRL_ERASE_SECTOR 4 /* Force erased a block of sectors (for only _USE_ERASE) */
/* Generic command (Used by FatFs) */
#define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */
#define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */
#define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */
#define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */
#define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */
/* Generic command (not used by FatFs) */
/* Generic command (Not used by FatFs) */
#define CTRL_POWER 5 /* Get/Set power status */
#define CTRL_LOCK 6 /* Lock/Unlock media removal */
#define CTRL_EJECT 7 /* Eject media */
@@ -72,15 +73,6 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
#define ATA_GET_MODEL 21 /* Get model name */
#define ATA_GET_SN 22 /* Get serial number */
/* MMC card type flags (MMC_GET_TYPE) */
#define CT_MMC 0x01 /* MMC ver 3 */
#define CT_SD1 0x02 /* SD ver 1 */
#define CT_SD2 0x04 /* SD ver 2 */
#define CT_SDC (CT_SD1|CT_SD2) /* SD */
#define CT_BLOCK 0x08 /* Block addressing */
#ifdef __cplusplus
}
#endif
+1235 -955
View File
File diff suppressed because it is too large Load Diff
+44 -43
View File
@@ -1,11 +1,11 @@
/*---------------------------------------------------------------------------/
/ FatFs - FAT file system module include file R0.09b (C)ChaN, 2013
/ FatFs - FAT file system module include file R0.10c (C)ChaN, 2014
/----------------------------------------------------------------------------/
/ FatFs module is a generic FAT file system module for small embedded systems.
/ This is a free software that opened for education, research and commercial
/ developments under license policy of following terms.
/
/ Copyright (C) 2013, ChaN, all right reserved.
/ Copyright (C) 2014, ChaN, all right reserved.
/
/ * The FatFs module is a free software and there is NO WARRANTY.
/ * No restriction on use. You can use, modify and redistribute it for
@@ -15,7 +15,7 @@
/----------------------------------------------------------------------------*/
#ifndef _FATFS
#define _FATFS 82786 /* Revision ID */
#define _FATFS 80376 /* Revision ID */
#ifdef __cplusplus
extern "C" {
@@ -23,7 +23,6 @@ extern "C" {
#include "integer.h" /* Basic integer types */
#include "ffconf.h" /* FatFs configuration options */
#if _FATFS != _FFCONF
#error Wrong configuration file (ffconf.h).
#endif
@@ -43,7 +42,7 @@ extern PARTITION VolToPart[]; /* Volume - Partition resolution table */
#else /* Single partition configuration */
#define LD2PD(vol) (BYTE)(vol) /* Each logical drive is bound to the same physical drive number */
#define LD2PT(vol) 0 /* Always mounts the 1st partition or in SFD */
#define LD2PT(vol) 0 /* Find first valid partition or in SFD */
#endif
@@ -53,7 +52,7 @@ extern PARTITION VolToPart[]; /* Volume - Partition resolution table */
#if _LFN_UNICODE /* Unicode string */
#if !_USE_LFN
#error _LFN_UNICODE must be 0 in non-LFN cfg.
#error _LFN_UNICODE must be 0 at non-LFN cfg.
#endif
#ifndef _INC_TCHAR
typedef WCHAR TCHAR;
@@ -78,12 +77,12 @@ typedef struct {
BYTE fs_type; /* FAT sub-type (0:Not mounted) */
BYTE drv; /* Physical drive number */
BYTE csize; /* Sectors per cluster (1,2,4...128) */
BYTE n_fats; /* Number of FAT copies (1,2) */
BYTE wflag; /* win[] dirty flag (1:must be written back) */
BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */
BYTE n_fats; /* Number of FAT copies (1 or 2) */
BYTE wflag; /* win[] flag (b0:dirty) */
BYTE fsi_flag; /* FSINFO flags (b7:disabled, b0:dirty) */
WORD id; /* File system mount ID */
WORD n_rootdir; /* Number of root directory entries (FAT12/16) */
#if _MAX_SS != 512
#if _MAX_SS != _MIN_SS
WORD ssize; /* Bytes per sector (512, 1024, 2048 or 4096) */
#endif
#if _FS_REENTRANT
@@ -92,19 +91,18 @@ typedef struct {
#if !_FS_READONLY
DWORD last_clust; /* Last allocated cluster */
DWORD free_clust; /* Number of free clusters */
DWORD fsi_sector; /* fsinfo sector (FAT32) */
#endif
#if _FS_RPATH
DWORD cdir; /* Current directory start cluster (0:root) */
#endif
DWORD n_fatent; /* Number of FAT entries (= number of clusters + 2) */
DWORD n_fatent; /* Number of FAT entries, = number of clusters + 2 */
DWORD fsize; /* Sectors per FAT */
DWORD volbase; /* Volume start sector */
DWORD fatbase; /* FAT start sector */
DWORD dirbase; /* Root directory start sector (FAT32:Cluster#) */
DWORD database; /* Data start sector */
DWORD winsect; /* Current sector appearing in the win[] */
BYTE win[_MAX_SS]; /* Disk access window for Directory, FAT (and Data on tiny cfg) */
BYTE win[_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */
} FATFS;
@@ -114,25 +112,25 @@ typedef struct {
typedef struct {
FATFS* fs; /* Pointer to the related file system object (**do not change order**) */
WORD id; /* Owner file system mount ID (**do not change order**) */
BYTE flag; /* File status flags */
BYTE pad1;
DWORD fptr; /* File read/write pointer (0ed on file open) */
BYTE flag; /* Status flags */
BYTE err; /* Abort flag (error code) */
DWORD fptr; /* File read/write pointer (Zeroed on file open) */
DWORD fsize; /* File size */
DWORD sclust; /* File data start cluster (0:no data cluster, always 0 when fsize is 0) */
DWORD clust; /* Current cluster of fpter */
DWORD dsect; /* Current data sector of fpter */
DWORD sclust; /* File start cluster (0:no cluster chain, always 0 when fsize is 0) */
DWORD clust; /* Current cluster of fpter (not valid when fprt is 0) */
DWORD dsect; /* Sector number appearing in buf[] (0:invalid) */
#if !_FS_READONLY
DWORD dir_sect; /* Sector containing the directory entry */
BYTE* dir_ptr; /* Pointer to the directory entry in the window */
DWORD dir_sect; /* Sector number containing the directory entry */
BYTE* dir_ptr; /* Pointer to the directory entry in the win[] */
#endif
#if _USE_FASTSEEK
DWORD* cltbl; /* Pointer to the cluster link map table (null on file open) */
DWORD* cltbl; /* Pointer to the cluster link map table (Nulled on file open) */
#endif
#if _FS_LOCK
UINT lockid; /* File lock ID (index of file semaphore table Files[]) */
UINT lockid; /* File lock ID origin from 1 (index of file semaphore table Files[]) */
#endif
#if !_FS_TINY
BYTE buf[_MAX_SS]; /* File data read/write buffer */
BYTE buf[_MAX_SS]; /* File private data read/write window */
#endif
} FIL;
@@ -149,6 +147,9 @@ typedef struct {
DWORD sect; /* Current sector */
BYTE* dir; /* Pointer to the current SFN entry in the win[] */
BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
#if _FS_LOCK
UINT lockid; /* File lock ID (index of file semaphore table Files[]) */
#endif
#if _USE_LFN
WCHAR* lfn; /* Pointer to the LFN working buffer */
WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */
@@ -203,38 +204,39 @@ typedef enum {
/*--------------------------------------------------------------*/
/* FatFs module application interface */
FRESULT f_mount (BYTE vol, FATFS* fs); /* Mount/Unmount a logical drive */
FRESULT f_open (FIL* fp, const TCHAR* path, BYTE mode); /* Open or create a file */
FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br); /* Read data from a file */
FRESULT f_lseek (FIL* fp, DWORD ofs); /* Move file pointer of a file object */
FRESULT f_close (FIL* fp); /* Close an open file object */
FRESULT f_opendir (DIR* dj, const TCHAR* path); /* Open an existing directory */
FRESULT f_readdir (DIR* dj, FILINFO* fno); /* Read a directory item */
FRESULT f_stat (const TCHAR* path, FILINFO* fno); /* Get file status */
FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br); /* Read data from a file */
FRESULT f_write (FIL* fp, const void* buff, UINT btw, UINT* bw); /* Write data to a file */
FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs); /* Get number of free clusters on the drive */
FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT), UINT btf, UINT* bf); /* Forward data to the stream */
FRESULT f_lseek (FIL* fp, DWORD ofs); /* Move file pointer of a file object */
FRESULT f_truncate (FIL* fp); /* Truncate file */
FRESULT f_sync (FIL* fp); /* Flush cached data of a writing file */
FRESULT f_opendir (DIR* dp, const TCHAR* path); /* Open a directory */
FRESULT f_closedir (DIR* dp); /* Close an open directory */
FRESULT f_readdir (DIR* dp, FILINFO* fno); /* Read a directory item */
FRESULT f_mkdir (const TCHAR* path); /* Create a sub directory */
FRESULT f_unlink (const TCHAR* path); /* Delete an existing file or directory */
FRESULT f_mkdir (const TCHAR* path); /* Create a new directory */
FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new); /* Rename/Move a file or directory */
FRESULT f_stat (const TCHAR* path, FILINFO* fno); /* Get file status */
FRESULT f_chmod (const TCHAR* path, BYTE value, BYTE mask); /* Change attribute of the file/dir */
FRESULT f_utime (const TCHAR* path, const FILINFO* fno); /* Change times-tamp of the file/dir */
FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new); /* Rename/Move a file or directory */
FRESULT f_chdrive (BYTE drv); /* Change current drive */
FRESULT f_chdir (const TCHAR* path); /* Change current directory */
FRESULT f_chdrive (const TCHAR* path); /* Change current drive */
FRESULT f_getcwd (TCHAR* buff, UINT len); /* Get current directory */
FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* sn); /* Get volume label */
FRESULT f_setlabel (const TCHAR* label); /* Set volume label */
FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT), UINT btf, UINT* bf); /* Forward data to the stream */
FRESULT f_mkfs (BYTE vol, BYTE sfd, UINT au); /* Create a file system on the drive */
FRESULT f_fdisk (BYTE pdrv, const DWORD szt[], void* work); /* Divide a physical drive into some partitions */
FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs); /* Get number of free clusters on the drive */
FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* vsn); /* Get volume label */
FRESULT f_setlabel (const TCHAR* label); /* Set volume label */
FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt); /* Mount/Unmount a logical drive */
FRESULT f_mkfs (const TCHAR* path, BYTE sfd, UINT au); /* Create a file system on the volume */
FRESULT f_fdisk (BYTE pdrv, const DWORD szt[], void* work); /* Divide a physical drive into some partitions */
int f_putc (TCHAR c, FIL* fp); /* Put a character to the file */
int f_puts (const TCHAR* str, FIL* cp); /* Put a string to the file */
int f_printf (FIL* fp, const TCHAR* str, ...); /* Put a formatted string to the file */
TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the file */
#define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0)
#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
#define f_eof(fp) ((int)((fp)->fptr == (fp)->fsize))
#define f_error(fp) ((fp)->err)
#define f_tell(fp) ((fp)->fptr)
#define f_size(fp) ((fp)->fsize)
@@ -249,7 +251,7 @@ TCHAR* f_gets (TCHAR* buff, int len, FIL* fp); /* Get a string from the fil
/* Additional user defined functions */
/* RTC function */
#if !_FS_READONLY
#if !_FS_READONLY && !_FS_NORTC
DWORD get_fattime (void);
#endif
@@ -282,7 +284,6 @@ int ff_del_syncobj (_SYNC_t sobj); /* Delete a sync object */
#define FA_READ 0x01
#define FA_OPEN_EXISTING 0x00
#define FA__ERROR 0x80
#if !_FS_READONLY
#define FA_WRITE 0x02
+182 -101
View File
@@ -1,13 +1,8 @@
/*---------------------------------------------------------------------------/
/ FatFs - FAT file system module configuration file R0.09b (C)ChaN, 2013
/----------------------------------------------------------------------------/
/
/ CAUTION! Do not forget to make clean the project after any changes to
/ the configuration options.
/
/----------------------------------------------------------------------------*/
#ifndef _FFCONF
#define _FFCONF 82786 /* Revision ID */
/ FatFs - FAT file system module configuration file R0.10c (C)ChaN, 2014
/---------------------------------------------------------------------------*/
#define _FFCONF 80376 /* Revision ID */
#if defined(CPUARM) && !defined(SIMU)
#ifdef __cplusplus
@@ -21,69 +16,82 @@ extern "C" {
/*---------------------------------------------------------------------------/
/ Functions and Buffer Configurations
/----------------------------------------------------------------------------*/
/---------------------------------------------------------------------------*/
#define _FS_TINY 0
/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
/ At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS
/ bytes. Instead of private sector buffer eliminated from the file object,
/ common sector buffer in the file system object (FATFS) is used for the file
/ data transfer. */
#define _FS_TINY 0 /* 0:Normal or 1:Tiny */
/* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
/ object instead of the sector buffer in the individual file object for file
/ data transfer. This reduces memory consumption 512 bytes each file object. */
#if defined(BOOT)
#define _FS_READONLY 1 /* 0:Read/Write or 1:Read only */
#define _FS_READONLY 1 /* 0:Read/Write or 1:Read only */
#else
#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
#define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
#endif
/* Setting _FS_READONLY to 1 defines read only configuration. This removes
/ writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
/ f_truncate and useless f_getfree. */
/* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
/ Read-only configuration removes basic writing API functions, f_write(),
/ f_sync(), f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(),
/ f_getfree() and optional writing functions as well. */
#if defined(BOOT)
#define _FS_MINIMIZE 1 /* 0 to 3 */
#define _FS_MINIMIZE 1 /* 0 to 3 */
#else
#define _FS_MINIMIZE 0 /* 0 to 3 */
#define _FS_MINIMIZE 0 /* 0 to 3 */
#endif
/* The _FS_MINIMIZE option defines minimization level to remove some functions.
/* This option defines minimization level to remove some API functions.
/
/ 0: Full function.
/ 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
/ are removed.
/ 2: f_opendir and f_readdir are removed in addition to 1.
/ 3: f_lseek is removed in addition to 2. */
/ 0: All basic functions are enabled.
/ 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(),
/ f_truncate() and f_rename() function are removed.
/ 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.
/ 3: f_lseek() function is removed in addition to 2. */
#if defined(BOOT)
#define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */
#define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */
#else
#define _USE_STRFUNC 1 /* 0:Disable or 1-2:Enable */
#define _USE_STRFUNC 1 /* 0:Disable or 1-2:Enable */
#endif
/* To enable string functions, set _USE_STRFUNC to 1 or 2. */
/* This option switches string functions, f_gets(), f_putc(), f_puts() and
/ f_printf().
/
/ 0: Disable string functions.
/ 1: Enable without LF-CRLF conversion.
/ 2: Enable with LF-CRLF conversion. */
#define _USE_MKFS 1 /* 0:Disable or 1:Enable */
/* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
#define _USE_MKFS 1
/* This option switches f_mkfs() function. (0:Disable or 1:Enable)
/ To enable it, also _FS_READONLY need to be set to 0. */
#define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */
/* To enable fast seek feature, set _USE_FASTSEEK to 1. */
#define _USE_FASTSEEK 0
/* This option switches fast seek feature. (0:Disable or 1:Enable) */
#define _USE_LABEL 0 /* 0:Disable or 1:Enable */
/* To enable volume label functions, set _USE_LAVEL to 1 */
#define _USE_LABEL 0
/* This option switches volume label functions, f_getlabel() and f_setlabel().
/ (0:Disable or 1:Enable) */
#define _USE_FORWARD 0 /* 0:Disable or 1:Enable */
/* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
#define _USE_FORWARD 0
/* This option switches f_forward() function. (0:Disable or 1:Enable) */
/* To enable it, also _FS_TINY need to be set to 1. */
/*---------------------------------------------------------------------------/
/ Locale and Namespace Configurations
/----------------------------------------------------------------------------*/
/---------------------------------------------------------------------------*/
#define _CODE_PAGE 1252
/* The _CODE_PAGE specifies the OEM code page to be used on the target system.
/* This option specifies the OEM code page to be used on the target system.
/ Incorrect setting of the code page can cause a file open failure.
/
/ 932 - Japanese Shift-JIS (DBCS, OEM, Windows)
/ 932 - Japanese Shift_JIS (DBCS, OEM, Windows)
/ 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
/ 949 - Korean (DBCS, OEM, Windows)
/ 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
@@ -108,8 +116,8 @@ extern "C" {
/ 857 - Turkish (OEM)
/ 862 - Hebrew (OEM)
/ 874 - Thai (OEM, Windows)
/ 1 - ASCII only (Valid for non LFN cfg.)
*/
/ 1 - ASCII (No extended character. Valid for only non-LFN configuration.) */
#if defined(CPUARM)
#define _USE_LFN 2 /* 0 to 3 */
@@ -118,83 +126,130 @@ extern "C" {
#define _USE_LFN 1 /* 0 to 3 */
#define _MAX_LFN 32 /* Maximum LFN length to handle (12 to 255) */
#endif
/* The _USE_LFN option switches the LFN support.
/* The _USE_LFN option switches the LFN feature.
/
/ 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect.
/ 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
/ 0: Disable LFN feature. _MAX_LFN has no effect.
/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
/ 2: Enable LFN with dynamic working buffer on the STACK.
/ 3: Enable LFN with dynamic working buffer on the HEAP.
/
/ The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN,
/ Unicode handling functions ff_convert() and ff_wtoupper() must be added
/ to the project. When enable to use heap, memory control functions
/ ff_memalloc() and ff_memfree() must be added to the project. */
/ When enable the LFN feature, Unicode handling functions (option/unicode.c) must
/ be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes.
/ When use stack for the working buffer, take care on stack overflow. When use heap
/ memory for the working buffer, memory management functions, ff_memalloc() and
/ ff_memfree(), must be added to the project. */
#define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
/* To switch the character code set on FatFs API to Unicode,
/ enable LFN feature and set _LFN_UNICODE to 1. */
#define _LFN_UNICODE 0
/* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode)
/ To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE
/ to 1. This option also affects behavior of string I/O functions. */
#define _FS_RPATH 2 /* 0 to 2 */
/* The _FS_RPATH option configures relative path feature.
#define _STRF_ENCODE 3
/* When _LFN_UNICODE is 1, this option selects the character encoding on the file to
/ be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf().
/
/ 0: ANSI/OEM
/ 1: UTF-16LE
/ 2: UTF-16BE
/ 3: UTF-8
/
/ When _LFN_UNICODE is 0, this option has no effect. */
#define _FS_RPATH 2
/* This option configures relative path feature.
/
/ 0: Disable relative path feature and remove related functions.
/ 1: Enable relative path. f_chdrive() and f_chdir() are available.
/ 2: f_getcwd() is available in addition to 1.
/ 1: Enable relative path feature. f_chdir() and f_chdrive() are available.
/ 2: f_getcwd() function is available in addition to 1.
/
/ Note that output of the f_readdir fnction is affected by this option. */
/ Note that directory items read via f_readdir() are affected by this option. */
/*---------------------------------------------------------------------------/
/ Physical Drive Configurations
/----------------------------------------------------------------------------*/
/ Drive/Volume Configurations
/---------------------------------------------------------------------------*/
#define _VOLUMES 1
/* Number of volumes (logical drives) to be used. */
#define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
/* Maximum sector size to be handled.
/ Always set 512 for memory card and hard disk but a larger value may be
/ required for on-board flash memory, floppy disk and optical disk.
/ When _MAX_SS is larger than 512, it configures FatFs to variable sector size
/ and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */
#define _STR_VOLUME_ID 0
#define _VOLUME_STRS "RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3"
/* _STR_VOLUME_ID option switches string volume ID feature.
/ When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive
/ number in the path name. _VOLUME_STRS defines the drive ID strings for each
/ logical drives. Number of items must be equal to _VOLUMES. Valid characters for
/ the drive ID strings are: A-Z and 0-9. */
#define _MULTI_PARTITION 0 /* 0:Single partition, 1:Enable multiple partition */
/* When set to 0, each volume is bound to the same physical drive number and
/ it can mount only first primaly partition. When it is set to 1, each volume
/ is tied to the partitions listed in VolToPart[]. */
#define _MULTI_PARTITION 0
/* This option switches multi-partition feature. By default (0), each logical drive
/ number is bound to the same physical drive number and only an FAT volume found on
/ the physical drive will be mounted. When multi-partition feature is enabled (1),
/ each logical drive number is bound to arbitrary physical drive and partition
/ listed in the VolToPart[]. Also f_fdisk() funciton will be enabled. */
#define _USE_ERASE 0 /* 0:Disable or 1:Enable */
/* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
/ should be added to the disk_ioctl functio. */
#define _MIN_SS 512
#define _MAX_SS 512
/* These options configure the range of sector size to be supported. (512, 1024,
/ 2048 or 4096) Always set both 512 for most systems, all type of memory cards and
/ harddisk. But a larger value may be required for on-board flash memory and some
/ type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured
/ to variable sector size and GET_SECTOR_SIZE command must be implemented to the
/ disk_ioctl() function. */
#define _USE_TRIM 0
/* This option switches ATA-TRIM feature. (0:Disable or 1:Enable)
/ To enable Trim feature, also CTRL_TRIM command should be implemented to the
/ disk_ioctl() function. */
#define _FS_NOFSINFO 0
/* If you need to know correct free space on the FAT32 volume, set bit 0 of this
/ option, and f_getfree() function at first time after volume mount will force
/ a full FAT scan. Bit 1 controls the use of last allocated cluster number.
/
/ bit0=0: Use free cluster count in the FSINFO if available.
/ bit0=1: Do not trust free cluster count in the FSINFO.
/ bit1=0: Use last allocated cluster number in the FSINFO if available.
/ bit1=1: Do not trust last allocated cluster number in the FSINFO.
*/
/*---------------------------------------------------------------------------/
/ System Configurations
/----------------------------------------------------------------------------*/
/---------------------------------------------------------------------------*/
#define _WORD_ACCESS 0 /* 0 or 1 */
/* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
/ option defines which access method is used to the word data on the FAT volume.
#define _FS_NORTC 0
#define _NORTC_MON 11
#define _NORTC_MDAY 9
#define _NORTC_YEAR 2014
/* The _FS_NORTC option switches timestamp feature. If the system does not have
/ an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable
/ the timestamp feature. All objects modified by FatFs will have a fixed timestamp
/ defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR.
/ When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need
/ to be added to the project to read current time form RTC. _NORTC_MON,
/ _NORTC_MDAY and _NORTC_YEAR have no effect.
/ These options have no effect at read-only configuration (_FS_READONLY == 1). */
#define _FS_LOCK 0
/* The _FS_LOCK option switches file lock feature to control duplicated file open
/ and illegal operation to open objects. This option must be 0 when _FS_READONLY
/ is 1.
/
/ 0: Byte-by-byte access.
/ 1: Word access. Do not choose this unless following condition is met.
/
/ When the byte order on the memory is big-endian or address miss-aligned word
/ access results incorrect behavior, the _WORD_ACCESS must be set to 0.
/ If it is not the case, the value can also be set to 1 to improve the
/ performance and code size.
*/
/* A header file that defines sync object types on the O/S, such as
/ windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
/ 0: Disable file lock feature. To avoid volume corruption, application program
/ should avoid illegal open, remove and rename to the open objects.
/ >0: Enable file lock feature. The value defines how many files/sub-directories
/ can be opened simultaneously under file lock control. Note that the file
/ lock feature is independent of re-entrancy. */
#if defined(CPUARM) && !defined(BOOT)
#define _FS_REENTRANT 1 /* 0:Disable or 1:Enable */
@@ -203,19 +258,45 @@ extern "C" {
#define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
#endif
#define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
#define _FS_TIMEOUT 1000
/* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module.
/* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs
/ module itself. Note that regardless of this option, file access to different
/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
/ and f_fdisk() function, are always not re-entrant. Only file/directory access
/ to the same volume is under control of this feature.
/
/ 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
/ 1: Enable reentrancy. Also user provided synchronization handlers,
/ ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
/ function must be added to the project. */
/ 0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect.
/ 1: Enable re-entrancy. Also user provided synchronization handlers,
/ ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
/ function, must be added to the project. Samples are available in
/ option/syscall.c.
/
/ The _FS_TIMEOUT defines timeout period in unit of time tick.
/ The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*,
/ SemaphoreHandle_t and etc.. */
#define _FS_LOCK 0 /* 0:Disable or >=1:Enable */
/* To enable file lock control feature, set _FS_LOCK to 1 or greater.
The value defines how many files can be opened simultaneously. */
#define _WORD_ACCESS 0
/* The _WORD_ACCESS option is an only platform dependent option. It defines
/ which access method is used to the word data on the FAT volume.
/
/ 0: Byte-by-byte access. Always compatible with all platforms.
/ 1: Word access. Do not choose this unless under both the following conditions.
/
/ * Address misaligned memory access is always allowed to ALL instructions.
/ * Byte order on the memory is little-endian.
/
/ If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size.
/ Following table shows allowable settings of some processor types.
/
/ ARM7TDMI 0 ColdFire 0 V850E 0
/ Cortex-M3 0 Z80 0/1 V850ES 0/1
/ Cortex-M0 0 x86 0/1 TLCS-870 0/1
/ AVR 0/1 RX600(LE) 0/1 TLCS-900 0/1
/ AVR32 0 RL78 0 R32C 0
/ PIC18 0/1 SH-2 0 M16C 0/1
/ PIC24 0 H8S 0 MSP430 0
/ PIC32 0 H8/300H 0 8051 0/1
*/
#endif /* _FFCONFIG */

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