Compare commits

..

804 Commits

Author SHA1 Message Date
janek f54870f051 Revert sync at 1000Hz, it is too CPU taxing: #474 2025-05-04 12:09:31 +02:00
janek 329650ad77 cleanup, naming 2025-04-19 18:35:24 +02:00
janek b6a7584509 cleanup 2025-04-19 10:40:02 +02:00
janek 96c3350bbb i2c can have lower GPIO speed 2025-04-13 18:36:41 +02:00
janek 790e049572 Larger USB serial debug output buffer for DEBUG builds 2025-04-10 21:55:57 +02:00
janek 94ab2711d6 Reduce TELEMETRY_OUTPUT_BUFFER_SIZE until needed 2025-04-10 21:51:24 +02:00
janek 43034b5005 Fix and simplify version condition 2025-04-10 21:50:03 +02:00
janek 17aca630ed fixed ext module power circuit image @marco-garcia 2025-04-07 14:40:35 +02:00
janek d22d831a99 move CRS clock init 2025-04-05 17:57:31 +02:00
janek 6cff24d37a updated ext module power circuit image by @marco-garcia 2025-03-27 10:12:43 +01:00
janek 4b8935b039 repo cleanup 2025-03-16 08:38:35 +01:00
Janek e8b26e0613 Update README.md, added license badge 2025-03-16 08:31:54 +01:00
Janek 78501ead38 Update README.md, add gitpod badge 2025-03-16 08:27:57 +01:00
Wilhelm d019ce803b Add gitpod/docker configuration to repo (#469)
* added gitpod/docker
2025-03-16 08:23:58 +01:00
janek 713e06bf6c cleanup, proper name 2025-03-14 22:43:58 +01:00
janek 318141863a Treat 2POS switches as 2 pos (backport) 2025-03-14 21:18:09 +01:00
janek eba65dc5d9 some definitions fixes 2025-03-14 21:15:27 +01:00
janek cee82b9e8b Added ext module power circuit image by @marco-garcia 2025-03-13 18:56:43 +01:00
janek 4a236a2903 version bump 2025-03-09 09:26:12 +01:00
Janek de5ff97919 Update README.md
Increased number of models from 16 to 20.
2025-02-20 22:42:44 +01:00
Janek 187d886648 Increased max models to 20, (#466)
Increased max models to 20,
removed free size counter,
removed legacy eeprom type check
2025-02-20 22:42:00 +01:00
Janek 51ea45dfac Save RAM: Allocate eeFs only for MAX_MODELS (#462)
* allocate eeFs only for MAX_MODELS,
* keep old EEProm alignment
2025-02-18 18:46:51 +01:00
Janek e7edba29f3 Update README.md 2025-02-17 20:40:20 +01:00
janek 31cc42e46a cleanup 2025-02-13 11:37:38 +01:00
janek 713f689996 cleanup 2025-02-02 11:26:31 +01:00
janek 0a893a91c7 added Copy/Paste support to SF and LS. 2025-02-02 10:16:07 +01:00
Janek 51291f0bf1 Fixed issue where returning from popup was blocking UP/DOWN navigation, (#460)
* fixed issue where returning from popup was blocking UP/DOWN navigation,
* added shortcut to go directly to edit mode for empty LS,
* removed POT navigation code,
* more cleanup
2025-02-02 10:11:17 +01:00
janek 95b69c2a0e updated hardware infographics image 2025-01-25 16:12:52 +01:00
janek 41b0e6c17c updated hardware infographics image 2025-01-24 10:45:43 +01:00
janek 0d2f54c2d6 move battery range settings to Radio Hardware tab (EdgeTX/edgetx#5803) 2025-01-23 21:03:36 +01:00
Janek f48d357492 Update channel monitor to reduce size (#454)
* Update channel monitor to reduce size
2025-01-23 17:31:38 +01:00
janek 367700ab81 Removed PPM_UNIT from remaining places 2025-01-23 12:15:46 +01:00
janek 4706422da2 Removed PPM_UNIT from remaining places 2025-01-23 12:12:28 +01:00
Janek 235cf4f7ad Convert PPM_UNIT build option to runtime radio setting (edgetx/edgetx#3993) (#457)
* Convert PPM_UNIT build option to runtime radio setting (edgetx/edgetx#3993)
* DRY to save some space
2025-01-23 11:56:25 +01:00
janek d51977eb68 simplify dfplayer volume setup 2025-01-22 15:16:41 +01:00
janek c9534df0ba Adjust radio setup to match EdgeTX options alignment,
added new gui function overloads
2025-01-22 15:16:41 +01:00
janek b7040cebbe enable 3.75M and 5.25M baudrates 2025-01-22 14:24:04 +01:00
janek f0fcd8ef09 Change "Save all" to "Save settings",
cleanup
2025-01-21 19:47:12 +01:00
janek 8baf62a3f7 version bump to 2.0.0 2025-01-20 22:17:19 +01:00
janek 4a9e891b25 ELRS: increase buffer to support more complex/dual-band devices 2025-01-20 22:15:52 +01:00
janek a919688895 updated trainer PPM timer disabling capture interrupt flag order to match PPM out,
removed comment
2025-01-20 12:37:15 +01:00
janek 5466309bff disable not used condition 2025-01-20 12:37:15 +01:00
janek cf0921b49f merge pulses_arm.h and pulses.h 2025-01-20 12:37:15 +01:00
janek fd7039dd11 cleanup EXTMODULE_TIMER_IRQHandler 2025-01-20 12:37:15 +01:00
janek 3ad862b97c enable PPM timer for in/out mode and disable accordingly, 2025-01-20 12:37:15 +01:00
janek 0ec4be28ef enable PPM timer for in/out mode and disable accordingly, 2025-01-20 12:37:15 +01:00
janek e99e8b4d13 fixed issue with calling afhds2a SPI before setup (blank screen issue),
fixed watchdog issue where isModuleSynchronous was defined wrong,
remove DisablePPMOut,
2025-01-20 12:37:15 +01:00
janek 8e9dd6066e update afhds2a, internal and external module logic,
removed old functions,
removed ahfds2aEnabled flag,
removed pulses_driver.cpp
2025-01-20 12:37:15 +01:00
janek 32418dbe8f remove disable_afhds2a in favor of direct intmoduleStop use 2025-01-20 12:37:15 +01:00
janek b98022f066 Initial pulses refactor commit 2025-01-20 12:37:15 +01:00
janek b7f07b8ba2 Popups fix 2025-01-15 18:34:26 +01:00
janek 77a032effa Merge remote-tracking branch 'origin/master' 2025-01-14 19:26:54 +01:00
Janek efa63ec80d Fix for ELRS 4 arming mode (#453)
* remove not used fixUpModel
* DE arming translation fix
* Fix for ELRS4 arming mode.
Closes #451
2025-01-14 13:55:00 +01:00
janek d02ddfd2c1 DE translation fix 2025-01-03 14:44:15 +01:00
janek 8ffacf0437 remove not used fixUpModel 2025-01-03 14:44:05 +01:00
janek 7bff6c5c10 Simplify ELRS version check 2024-12-28 10:41:42 +01:00
janek 524532e84b elrs update for parameter definitions over 255 bytes 2024-12-24 00:18:56 +01:00
Janek 09d4500482 Popups followup (#450)
* Popups refactoring follow up
2024-12-23 19:47:23 +01:00
janek 0a597df51b buzzer allow higher freq, cleanup 2024-12-23 19:44:53 +01:00
janek 34954190b6 elrs fix for text selection over 255 characters 2024-12-23 19:41:48 +01:00
janek 15b50b0de3 Enable USB_SERIAL for all translations 2024-12-19 18:31:43 +01:00
Janek 3a633cec7f Popups refactor (#449)
* Popups refactor
* Add title to USB modes popup
* cleanup
2024-12-19 18:25:00 +01:00
janek bb3c68b1b4 buzzer, remove not needed ARR register value limit 2024-12-19 11:37:49 +01:00
Janek 41791f34e2 buzzer driver improvements, fix vario, cleanup (#448) 2024-12-19 11:19:39 +01:00
Janek a6430ddb24 Update config.yml
Update docker image to latest to use gcc 14.2
2024-12-17 10:24:14 +01:00
janek 9cacfb0df2 cleanup 2024-12-16 22:15:14 +01:00
Janek 91e8418631 int module init, file renames (#447)
* use proper internal module timer alias from hal.h,
* rename *_arm to generic file names,
* added APB2 SYSCFG define to hal.h, removed from intmoduleAfhds2aStart,
* cleanup of dead code
2024-12-16 20:22:49 +01:00
Janek 3eab877f54 AFHDS2A Fixes (#445)
* fixed custom failsafe channels setup missing for channels > 8,
* fixed checkModelIdUnique on invalid menu line,
* default model internal module off,
* refactored findNextUnusedModelId (opentx#7259)
* remove undocumented long press OK to auto assign next free model ID, reeanable unique ID warn
2024-12-12 13:20:02 +01:00
Janek bec94560d7 Remove not used translations from firmware (#443)
* removed not used translations
* remove DATETIME translation
* exclude VKEYS for non MENU_DIAG_ANAS_KEYS builds
* exclude SLIDERTYPES when NUM_SLIDERS == 0
2024-12-12 13:08:26 +01:00
janek c861ac899e exclude External Module bind 2024-12-11 17:28:55 +01:00
janek 97d9f1c19d enable SBUS_TRAINER back for official builds 2024-12-11 13:22:31 +01:00
janek 70a24b992d rename stream to channel 2024-12-11 12:53:14 +01:00
Janek b6b24dcf94 Update telemetry.cpp
cleanup
2024-12-11 00:50:36 +01:00
janek 14888fdc3a simplify 2024-12-10 21:07:27 +01:00
janek 7f2a5cafd3 Disable IDLE interrupt for telemetry,
cleanup buzzer init,
2024-12-10 21:05:47 +01:00
janek c935e0b5cf cleanup 2024-12-09 22:47:14 +01:00
janek 9bd0397f83 optimize loop iterator type 2024-12-09 22:19:40 +01:00
janek 68195be6d9 crossfireTelemetryPush allow up to full 64 bytes 2024-12-09 12:49:10 +01:00
janek d0bf6310e3 added CMake CROSSFIRE definition 2024-12-08 18:12:57 +01:00
janek b434750207 Merge remote-tracking branch 'origin/master' 2024-12-08 17:54:52 +01:00
janek 5627957dbd update common build options 2024-12-08 17:54:40 +01:00
Janek f7e573fff9 RAM & Flash savings (#444)
* RAM savings: split moduleData structs,
* cleanup not used protocols,
* Flash savings, pxx cleanup
2024-12-08 17:49:57 +01:00
janek 17d3cc2801 add warning 2024-12-08 17:45:48 +01:00
janek 9660f70308 Enable USB Serial for EN on DFPlayer build 2024-12-08 16:12:27 +01:00
Janek 559b2af2e8 Add CRSF Full duplex mode (#442)
* Add CRSF Full duplex mode
* Removed CRSF_UNINVERTED
* correct GPIO AF for RX
2024-12-07 13:56:10 +01:00
janek 24c8653790 cleanup, remove not used telemetryInit modes 2024-12-05 11:26:06 +01:00
janek d976bb0dec do not use EEPROM_VARIANT on PCBI6X 2024-12-05 00:23:58 +01:00
janek 0fde774398 cleanup 2024-12-04 12:52:30 +01:00
janek 60baf50708 Rename Sticks to Axis 2024-12-03 17:35:49 +01:00
janek 0ef6cc2ca8 cleanup 2024-12-03 10:03:34 +01:00
janek 2e1c8dc366 cleanup 2024-12-03 09:52:41 +01:00
janek ef1d6d0b32 Add space to SD edit name (#8405) 2024-12-03 09:50:11 +01:00
janek 33f08f01a4 Move Contrast after Backlight items in Radio Setup 2024-12-03 09:45:11 +01:00
janek 8a0e6f5005 Minor types change to match current OpenTX/EdgeTX 2024-12-03 09:44:24 +01:00
janek 2b4a6ace18 Merge TelemetryProtocols define 2024-12-03 09:42:54 +01:00
janek d97ed48069 Adjust joystick mixer period rate to match usb update rate, added afhds2a period define 2024-11-30 16:24:26 +01:00
janek 76c6c4a7ff typo fix 2024-11-30 11:54:12 +01:00
janek ed930033de Further SKY9X remove 2024-11-30 11:52:34 +01:00
janek 65f2929525 Merge remote-tracking branch 'origin/master' 2024-11-30 11:41:08 +01:00
janek 6a5ec7b803 Further SKY9X remove 2024-11-30 11:40:56 +01:00
Janek ec4da489b3 Added native USB connection detection (#441) 2024-11-30 11:32:32 +01:00
Janek d49cc03892 Update README.md 2024-11-30 00:11:33 +01:00
janek 9eae3f02aa Merge remote-tracking branch 'origin/master' 2024-11-29 23:24:24 +01:00
janek 16e665e05f inav lite typo + size optimization 2024-11-29 23:24:15 +01:00
Janek 900fb616df Update README.md 2024-11-29 10:58:21 +01:00
janek 9af695ed0e FI translation fix 2024-11-28 11:29:44 +01:00
janek a933cc9299 Remove SKY9X target, remove drawFieldLabel 2024-11-24 22:02:18 +01:00
janek 40628f5dca Merge remote-tracking branch 'origin/master' 2024-11-24 21:29:04 +01:00
janek 6c76ebe5ec skip modes when SBUS_TRAINER not defined 2024-11-24 21:28:57 +01:00
Janek a2a9a00774 Elrs optional arming in module setup (#440)
* ELRS optional arming method
2024-11-24 21:27:38 +01:00
janek 4eb8f7310e minor definition fix 2024-11-24 13:58:51 +01:00
Janek 5d1e179e03 Update README.md 2024-11-23 12:14:28 +01:00
Janek 80a2ae5b7d Update README.md 2024-11-23 12:12:25 +01:00
Janek 05a8dc9983 Update README.md 2024-11-23 12:09:58 +01:00
Janek bb47d974f7 Update README.md 2024-11-23 12:08:35 +01:00
Janek 350c18b68e Update README.md 2024-11-23 12:04:13 +01:00
Janek c812a8140a Update README.md 2024-11-23 11:54:25 +01:00
Janek a1d4c9b1cb Update README.md 2024-11-23 11:35:37 +01:00
Janek 1c3a7397bc Update README.md 2024-11-23 10:06:10 +01:00
Janek 0c3ee642cd README.md updated buttons description 2024-11-23 09:58:10 +01:00
Janek 068265a7c1 README.md reorder positions 2024-11-23 09:46:25 +01:00
janek 8daccf079a fix 2024-11-21 13:45:43 +01:00
janek d57a77b103 removed SET Screen function on switches limited i6X 2024-11-21 13:33:42 +01:00
janek d1cb47dd30 enable USB_SERIAL for all HELI builds 2024-11-21 11:30:58 +01:00
janek 7fce538ac1 remove PCBI6X_ prefix from build options 2024-11-21 11:24:37 +01:00
Janek 6752c3c1f6 USB Serial modes (#436)
* USB Serial mode
* USB vid, pid
* shorten USB strings
* single USB mode define, as in EdgeTX
* added CRSF and AFHDS2A USB Telem mirror,
* Reduce CDC_IN_FRAME_INTERVAL since we have smaller buffer and this matches EdgeTX
* fix GCC warnings
2024-11-21 11:11:40 +01:00
Janek baa5ed36f3 added SBUS_TRAINER define to make it build time option (#439)
* added SBUS_TRAINER define to make it build time option
* exclude more, exclude trainer connect/disconnect sounds, make it build time option
2024-11-21 10:56:17 +01:00
Janek 6a5e87c40b Update README.md 2024-11-19 23:13:25 +01:00
Janek ec6d70f198 Update README.md 2024-11-18 17:27:40 +01:00
janek 7994ec402f Revert "remove eeprom version from version screen"
This reverts commit f5180b01df.
2024-11-15 19:30:25 +01:00
janek f5180b01df remove eeprom version from version screen 2024-11-15 19:29:55 +01:00
janek e931b4f212 Combine flags enabling to reduce size 2024-11-14 14:30:04 +01:00
janek 088bdfff11 Reduce DEBUG build size 2024-11-14 14:29:13 +01:00
janek 641ac61119 Match EdgeTX priorities 2024-11-13 00:55:10 +01:00
janek 680a3e3b54 Match Horus driver behaviour. 2024-11-12 20:53:54 +01:00
janek 177a00f1c4 Rewrite DMA init to reduce code size 2024-11-12 14:01:22 +01:00
janek d82393c9cb Remove firmware.txt contents from USB MSD to reduce size 2024-11-12 11:35:15 +01:00
janek 45d3abd883 Fn rename 2024-11-11 02:05:36 +01:00
janek 6aac5b6555 Enable syncing at 1000 Hz 2024-11-11 01:06:01 +01:00
janek d519064f6e size optimization 2024-11-10 16:00:58 +01:00
Janek 13db3d3ef9 Enable Telemetry RX DMA + IDLE interrupt (#437)
* Enabled DMA accelerated telemetry RX
* Additional baud rates in comments
* Cleanup
2024-11-10 15:52:49 +01:00
Janek 315e585353 Update README.md 2024-11-03 14:21:53 +01:00
Janek efabd68aee Update README.md 2024-11-03 14:18:26 +01:00
Janek dd67c8f56c Update README.md 2024-11-03 14:16:19 +01:00
Janek c4347e3e8d Update README.md 2024-11-02 11:50:49 +01:00
Janek 57c8905177 CRSF optional STRING and FLOAT support (#435)
* Add FLOAT support
* increase buffer to accommodate for Param size
* added CRSF_EXTENDED_TYPES guard for STRING and FLOAT support
2024-11-01 20:08:35 +01:00
janek 663e857f54 Readjusted DFPlayer volume levels 2024-11-01 16:56:19 +01:00
janek 39272da5d0 Bump version 2024-11-01 13:46:52 +01:00
janek c698bb0e1e Fixed an issue where DFPlayer was not working in Radio Setup menu and volume was not saved. 2024-11-01 13:40:02 +01:00
janek 3551a8cdbe increase space for option just in case 2024-11-01 13:10:15 +01:00
janek e75fd9b657 optimize for size 2024-11-01 12:44:22 +01:00
janek 4b7a8b03a4 revert 2024-10-31 16:04:07 +01:00
janek e8d6d2a720 optimized for size 2024-10-31 13:43:18 +01:00
janek 529b3e6ed9 simplify condition 2024-10-31 12:56:31 +01:00
janek a7b6614d81 OK button label 2024-10-31 10:49:31 +01:00
janek 36aecef4cf cleanup 2024-10-31 02:07:47 +01:00
janek 7d901ad7a0 Refactored telemetry mirror mode select 2024-10-30 12:59:08 +01:00
janek 3a7312f85d Translations update 2024-10-30 12:09:39 +01:00
janek 023e96b79e Set Screen translations update 2024-10-29 14:01:42 +01:00
janek f14b715b79 DE translation fixes 2024-10-29 13:57:10 +01:00
janek e1e8177aa9 Update CircleCI config 2024-10-29 13:12:39 +01:00
Janek b1c9798365 Fixed popup menus regression (#434) 2024-10-29 12:49:14 +01:00
janek 90f968e2f5 fix(telemetry): wrong scaling after changing unit to rpm (Edgetx/edgetx#4875) 2024-10-23 15:19:18 +02:00
Janek b047c748f2 PCBI6X_USB_MSD exposed as build time option (#432) 2024-10-23 13:26:10 +02:00
janek 98c73ea7bb use paramStringDisplay for INFO 2024-10-22 17:50:17 +02:00
janek e482d3dc03 use paramStringDisplay for INFO 2024-10-22 17:49:24 +02:00
Janek 84d80625f4 ELRS menu: (do not) use maxlen for STRING (#427)
* fix s_editMode state
2024-10-22 17:22:25 +02:00
janek cf3f78e27d More stable batt voltage readings 2024-10-22 11:51:24 +02:00
janek 368d77b446 ELRS menu: increase buffers, fixed initial paramData pointer 2024-10-21 16:43:26 +02:00
janek a025433a3c PL translations 2024-10-21 11:03:38 +02:00
janek 12948100b2 ELRS menu: use s_editMode directly 2024-10-21 02:39:24 +02:00
janek c268229a16 ELRS menu: reuse checkIncDec 2024-10-21 01:51:33 +02:00
janek 9686955ac0 PL translations 2024-10-21 00:55:38 +02:00
janek 6306a89b38 AFHDS2A use local txPacket,
remove global packet pointers,
cleanup
2024-10-21 00:25:51 +02:00
Janek ab51eaa00c AFHDS2A ppm center adjustment (#426)
* AFHDS2A ppm center adjustment
2024-10-20 23:18:01 +02:00
janek d74f533eca By default do not inject AFHDS2A RSSI at ch 17 2024-10-20 19:10:54 +02:00
Janek 3ff3020ba9 ELRS menu: additional data types support (#420)
* support for INT8,UINT16,INT16, STRING
* optimizations for code size
2024-10-20 18:52:05 +02:00
janek 3dffcf7e55 simplify 2024-10-17 00:03:42 +02:00
janek 859b002c49 cosmetics 2024-10-16 23:56:54 +02:00
janek 7c5d6f5a02 elrs cleanup 2024-10-16 14:42:18 +02:00
janek fd5c4711cd elrs cleanup 2024-10-16 14:40:51 +02:00
janek faef96eeaa elrs minor refactor 2024-10-16 14:38:13 +02:00
janek 614c202824 cleanup 2024-10-15 09:53:49 +02:00
janek 8b21998ed4 get back some not used RAM 2024-10-14 22:41:18 +02:00
janek 5cccfe1b68 clean up 2024-10-14 21:14:31 +02:00
janek dfa722036f alignment 2024-10-14 20:07:51 +02:00
janek 2efe7d62f3 elrs fixed popup issue 2024-10-14 17:52:09 +02:00
janek 18c6f98d31 elrs fixes 2024-10-14 16:30:05 +02:00
janek a533acf529 Remove index column from Radio tools 2024-10-12 14:38:51 +02:00
janek e778aec12f Merge remote-tracking branch 'origin/master' 2024-10-12 14:02:10 +02:00
janek ad918726a3 ELRS menu: nicer packet stats alignment, fix paramId reset 2024-10-12 14:01:46 +02:00
janek 68db045da1 ELRS menu: nicer packet stats alignment, fix paramId reset 2024-10-12 14:00:58 +02:00
janek eb118683e8 Unify buttons handling, cleanup 2024-10-12 12:02:53 +02:00
janek 0bcc458ec2 fixed switch midpos delay handling,
allow settings all switches as true 3pos,
cleanup
2024-10-12 00:21:27 +02:00
janek 21dc245974 fixed switch midpos delay handling,
allow settings all switches as true 3pos
2024-10-12 00:20:46 +02:00
janek 30d6006110 cleanup 2024-10-11 15:43:02 +02:00
janek dd919defa6 revert optimized lcdPutPattern 2024-10-11 15:40:08 +02:00
janek 60dca26963 memory layout fix, use board's startup code 2024-10-11 01:26:19 +02:00
janek dd06512823 statistics: removed additional margin 2024-10-10 21:50:05 +02:00
janek 690445c9c0 Optimized lcdPutPattern,
deduplicated draw time code
2024-10-10 21:44:49 +02:00
janek c4c3390465 Cleanup hal.h defines 2024-10-10 18:13:32 +02:00
janek f75ce7bf52 bum version 2024-10-07 15:27:35 +02:00
janek 1b7daf89ba ppmInput -> trainerInput 2024-10-07 12:30:24 +02:00
Janek 3041b1ee04 ELRS menu: optimizations (#425)
* removed tiny_string dependency,
* replaced goodBadPkt and elrsFlags with linkstat,
* do not reset linkstat.flags on device change,
* update CMAKE size comment
2024-10-07 10:48:57 +02:00
Janek edebfb9306 Add 'Set Screen' special function (port edgetx#5589) (#423)
* Add 'Set Screen' special function (port edgetx#5589)
* add to translations, PL translation
* silence warning
2024-10-06 17:46:29 +02:00
Janek f26283d836 Merge pull request #424 from OpenI6X/usb-joystick-fix
Usb joystick fix (cherry picked @dim13 change)
2024-10-05 09:21:24 +02:00
janek 6536089586 ELRS menu: minor refactor 2024-10-05 09:15:48 +02:00
janek 7d54485e60 ELRS menu: minor refactor 2024-10-04 20:29:46 +02:00
janek bc37064a8d Cleanup old USB Joystick hacks 2024-10-04 00:18:35 +02:00
Dimitri Sokolyuk 52bd029303 Fix USB HID joystick detection
(cherry picked from commit 390c6490dc5ee9cc32c12bc60f370eba3259da93)
2024-10-04 00:13:51 +02:00
janek 68e39fd029 ELRS menu: do not highlight unit 2024-10-02 01:01:51 +02:00
janek 31a30bf683 cleanup 2024-10-01 19:09:27 +02:00
janek 29849b0c48 Restore trainer back/lost sounds 2024-10-01 17:05:31 +02:00
janek b82bf9d940 ELRS menu: unit display fix 2024-09-30 17:57:35 +02:00
janek 2e1435f22a ELRS menu: renamed field to param,
removed unneeded condition,
added common unitDisplay,
cleanup
2024-09-30 10:20:24 +02:00
janek ba6e108f03 Adjust popups to match EdgeTX look. 2024-09-30 10:13:41 +02:00
janek 3a1c59e6d6 Merge remote-tracking branch 'origin/master' 2024-09-25 15:13:35 +02:00
janek c7831e4ebc minor ELRS menu fixes 2024-09-25 15:13:23 +02:00
Wilhelm 10675c4048 added compiletime option EXTPWR_INVERT to invert the polarity of PC13 to drive directly a p-channel mosfet (#422) 2024-09-25 14:31:49 +02:00
janek babaeb0bb0 remove/reduce some debug logs 2024-09-24 17:38:45 +02:00
janek ea611b46c7 remove/reduce some debug logs 2024-09-24 17:38:36 +02:00
janek a328f218cc Reduced PRINTF_BUFFER_SIZE for DEBUG builds,
FLYSKY_GIMBAL have the same aux serial buffer as other builds,
compilation warning fix
2024-09-23 09:24:13 +02:00
Janek 08ed0191cb Create fake RSSI from TRSS when former not present (#413)
* Create fake RSSI from TRSS when former not present.
* guarded by build time option FAKE_RSSI
2024-09-21 14:31:24 +02:00
Janek 49b7497750 ELRS optimizing RAM allocation (#419)
* increased fieldData buffer size by overlapping it with general data buffer
* increased max devices count,
* renamed some functions,
* do not store popup msg if popup is not shown,
* skip field on first chunk if wrong folder,
* reduced FieldProps size,
2024-09-20 21:05:20 +02:00
Janek a4a2ee5cb6 Backport: Fix #7601 - Wrong Flight Mode Index when exiting from Gvar Menu (128x64 display) (#7601) (#411)
GVars menu issue, (Backport: Fix opentx#7601)
2024-09-16 10:23:18 +02:00
Janek 8b31041cdc Update README.md - added languages to comparison table 2024-09-15 13:13:52 +02:00
janek 0db1af3a90 Fixed AUX Serial init 2024-07-30 19:09:10 +02:00
janek f43cba34c9 buzzer driver minor refactor 2024-07-27 15:52:06 +02:00
janek 0bd2c23fda Fix PL translations for DFPLAYER builds 2024-07-27 15:50:50 +02:00
janek ba7c9a768c Match EdgeTX default channel unit precision 2024-06-08 17:24:17 +02:00
janek 52f2616736 Make USB_GPIO_PIN_VBUS optional 2024-06-08 17:22:49 +02:00
janek 4315f93a5e Fixed Special Functions description in DFPLAYER builds for CZ and DE translations
New sticks translation for EN
Closes: #396
2024-06-08 17:06:15 +02:00
janek 60b2cb981e Fixed radio setup menu in non DFPLAYER builds
Closes: #391
2024-06-08 16:47:32 +02:00
Asparuh Nestorov 56ad701183 INAV Light fix - telemetry type 7 (#397)
* INAV fix mode 7
2024-05-12 08:55:10 +02:00
Janek 4d11bba9ad Update README.md 2023-12-29 09:37:05 +01:00
janek 3939780d4f License + readme update 2023-12-28 12:06:02 +01:00
janek ebefeb7afb Bump patch version 2023-12-28 11:40:25 +01:00
janek c5e76d3f6d Draw analogs as decimal value 2023-12-27 20:59:38 +01:00
janek febd1fc49c Fixed issue with unable to set Play Sound sound type. 2023-12-27 09:29:48 +01:00
janek 2b196c3938 Corrected mixer scheduler priority for STM32F0 2023-12-25 12:04:04 +01:00
janek 4ed536a8c6 Free up some more RAM 2023-12-25 10:43:25 +01:00
janek cbfa4fc81b Merge remote-tracking branch 'origin/master' 2023-12-23 18:54:22 +01:00
janek d7308a27a1 adjusted dfplayer volume levels, clean up 2023-12-23 18:54:13 +01:00
Janek 60321620e9 Update README.md 2023-12-22 17:38:28 +01:00
janek 72cfcd4b95 Merge remote-tracking branch 'origin/master' 2023-12-21 21:19:46 +01:00
janek 464d0c4340 removed fm-5 sound 2023-12-21 21:19:38 +01:00
Janek 6ed15b39b4 Update README.md 2023-12-21 20:43:24 +01:00
Janek 8c1052dc88 Update README.md 2023-12-21 20:42:23 +01:00
Janek 57cf1119b9 Update README.md 2023-12-17 09:02:43 +01:00
janek 2379fc4c53 removed telemetryErrors counter 2023-12-16 08:01:36 +01:00
janek 151db8fa49 removed telemetryErrors counter 2023-12-15 22:28:01 +01:00
janek 3a962fb165 Fixed stack end 2023-12-11 19:04:54 +01:00
janek b9961e711e Fix for possible reset on value over 100 2023-12-10 12:11:29 +01:00
janek a13f6f8316 Update startup code 2023-12-09 20:08:22 +01:00
janek e0acedb9a2 Clenaup CircleCI config 2023-12-09 20:05:10 +01:00
janek 473e1ce669 Bump version number 2023-12-09 20:04:47 +01:00
janek 22a953218d Elrs: Add some more space for data 2023-12-09 20:04:25 +01:00
janek ab10aec41c updated readme 2023-12-09 10:42:18 +01:00
janek afe8eb68bd updated readme 2023-12-09 10:31:34 +01:00
Janek 7874bc1a28 Defer AFHDS2A telemetry handling from ISR to task (#384)
* Defer AFHDS2A telemetry handing from ISR to task
* pass buffer by reference
2023-12-08 21:57:11 +01:00
janek 0a09e0686d update translations 2023-12-08 21:52:51 +01:00
janek 77ae8165e2 Remove not existing FM sounds 2023-12-08 19:32:41 +01:00
janek 7ca6373851 Update translations 2023-12-08 19:31:39 +01:00
Janek f1d600cfe3 Optionaly uninvert CRSF pin. (#383)
* Optionaly uninvert CRSF pin.
* Internal pull up for uninvert CRSF pin.
* Add build flag to CMakeLists.txt
2023-12-08 16:10:39 +01:00
janek c28396f145 Update translations 2023-12-05 18:34:20 +01:00
janek a2c0b76dc0 Update translations 2023-12-05 18:33:52 +01:00
janek 34eb0042d8 Reduce gimbal jitter 2023-12-03 15:58:02 +01:00
Janek adfead46c5 Separate lat long sensors merged to single GPS sensor (Port EdgeTX#4080) (#374)
* Separate lat long sensors merged to single GPS sensor (Port EdgeTX#4080)
* Reverted previous solution
* Missing removed sensor definition
2023-12-03 14:01:15 +01:00
janek 5cc5df9a40 Readjusted dfplayer volumes, fixed MH2024K init 2023-11-19 19:21:17 +01:00
janek 12eabec625 Revert fixed external module power on startup to do not break PPM Out 2023-11-18 15:35:15 +01:00
janek 034ae1f4fa Third col offscrn when bars and timer (EdgeTX port) 2023-11-17 17:37:25 +01:00
janek f5662368f3 enable INAV Lite Radar for all languages 2023-11-17 07:41:40 +01:00
Janek bb1ef6b959 DFPlayer voice support (#377)
* Use standard Fifo for buzzer
* Added DFPlayer driver,
integrated with buzzer driver,
* enabled Play Value and Play Track special functions,
* split AUX2 into AUX3 and AUX4 Serial
* 2 pots on i6X,
* fixed definitions after AUX split
* renamed buzzerEvent to audioEvent
* aux4 init potential fix
* Added volume adjustment, removed delays for now.
* fixed play track + interval,
* fixed boot sounds and sounds order,
* unify delays timer init,
* Fixed volume levels
* Do not skip frequent sounds
* Fixed welcome sound order,
* Added filenames for Play Track
* Readjusted volume levels
* Do not play "zero" by default,
* added support for 9 custom tracks
* buid fix
2023-11-16 16:40:34 +01:00
Janek 2ff8343d23 Unified backlight driver (#380)
* Unified backlight driver

* Unified CircleCI config

* Proper build flags

* Fixed std backlight
2023-11-14 19:43:43 +01:00
janek 458aa445dd update to GCC 13.2, optimize RAM usage, cosmetics 2023-11-12 18:11:35 +01:00
janek 106ef955e4 debug screen reset fix 2023-11-01 18:30:58 +01:00
janek 334a52d8fc Merge two debug screens into one 2023-11-01 18:17:23 +01:00
janek 07d8112e22 Polish translations fixes 2023-11-01 17:15:16 +01:00
janek 23b973e3a5 LCD driver optimization (twice as fast?), ADC driver cleanup 2023-11-01 17:09:32 +01:00
janek e33b334a4d Match EdgeTX naming, cleanup 2023-10-25 17:06:13 +02:00
janek 82b5209ee9 Remove not used definitions, updated comments 2023-10-23 16:00:01 +02:00
janek 6f980ce98c Minor elrs refactor 2023-10-23 15:57:07 +02:00
janek 0e3b97135e fixed external module power on startup, probably breaks ppm out on startup (broken somewhere else) 2023-10-23 15:55:10 +02:00
janek feabfa8fbb Merge remote-tracking branch 'origin/master' 2023-10-19 11:51:53 +02:00
janek 4627f83996 minor elrs buffer change 2023-10-19 11:51:34 +02:00
Rafael Olguin 304eedf856 Since hardware optimisations, a low buffer for the (#379)
32 byte buffer for flysky gimbal
2023-10-16 08:23:33 +02:00
Janek 49f5da2d28 Merge pull request #378 from rafolg/master
Delay for FSgimbal throttle check
2023-10-15 13:46:43 +02:00
Rafael Olguin f2bf93a1d2 Delay for successful throttle check of FSgimbal 2023-10-15 20:34:00 +10:00
janek 78773476a0 build fix 2023-10-14 15:02:29 +02:00
Rafael Olguin 508101d481 Working Flysky Hall Gimbal implementation (#376)
* Flysky Gimbal implementation for the FS-i6X, this
this is possible thanks to the work of Janek, by
enabling the idle callback function for UART4

* Some changes done as requested by Janek
Outstanding requests:
 - Write adc values directly to the DMA variable, this is
   currently not possible as disabling channels 0-3 in
   adcInit() messes with the order of the switches, pots
   and sticks

* Hardware CRC16 1021 implemented and working well

* Direct write of adcValues is now completed
* Serial idle callback is now inside a void function
flysky_gimbal_init which is called in board.cpp
2023-10-14 13:10:57 +02:00
janek 4a9aa62d5a minor fixes 2023-10-14 11:09:51 +02:00
Janek 2abe68bb72 AUX2 Serial driver with idle callback (#368)
* Added AUX2 Serial definitions, cleanup
* enable IDLE flag interrupt callback
* added DFPLAYER guard for AUX2
* adjust serial buffers by build type
2023-10-05 17:03:58 +02:00
Janek 64ddd7d4e1 AFHDS2A telemetry and other fixes (#373)
* use exact method names, timing and interface as Multiprotocol

* added spi error flags handling

* added CRC checking for A7105

* removed AFHDS2A sensor ID guard due to CRC checking

* cleanup

* CRCF check on Bind result

* Validate RX address
2023-10-02 16:27:51 +02:00
janek adca844879 Inav screen orientation fix, thx @FRPProject 2023-09-28 16:44:48 +02:00
janek 6d32c44539 Minor refactor, size optimization 2023-09-28 16:42:15 +02:00
janek 2f106e6497 Merge remote-tracking branch 'origin/master' 2023-09-22 17:10:01 +02:00
janek 9e05244ef6 compilation warnings fixes, cleanup 2023-09-22 17:09:16 +02:00
Janek 227b0ca02a Update README.md 2023-08-17 23:13:13 +02:00
janek 4dba99481e Elrs: proper buffers sizes 2023-07-25 23:45:57 +02:00
janek 68f70c8054 INAV Lite: North Up fix 2023-07-25 23:44:27 +02:00
janek e4b3ca1f6a Build cleanup 2023-07-25 17:13:20 +02:00
janek c38b4c9b2d FIx warning 2023-07-24 17:01:26 +02:00
janek 670d5dee05 INAV Lite: North Up fix,
changed home icon
2023-07-24 16:54:29 +02:00
janek 195aab5635 INAV Lite: Reuse telemetry header,
fixed telemetry header Timer 1 display,
revert INVERS support for drawValueWithUnit,
small refactor,
2023-07-24 16:16:18 +02:00
Janek e264d4d9c7 Update README.md
Some ExpressLRS clarifications
2023-07-24 14:05:50 +02:00
janek 2ad10f29b0 updated readme.md 2023-07-20 17:14:36 +02:00
Janek 78ceda4511 INAV Lite changes & fixes (#359)
* Do not drop AFHDS2A_ID_GPS_STATUS high byte if not zero
* INAV Lite: report true rssi, fixed afhds2a alt, galt, curr, sats display,
Switched to 4 byte sensors (ibus_telemetry_type=7/8/135/136) for simplicity
* fixed display of GAlt unit
* fixed yaw
* added Vertical speed indicator
* remove debug display
* alt position fix
* Set home position on fix. emit sound.
* Show sats also on standard telemetry screens.
* hide HDOP
* reverted decode sats instead of fix
* cleanup
2023-07-20 16:22:03 +02:00
janek a11fc238f7 bump version 2023-07-08 12:12:52 +02:00
janek 8657d738db cleanup 2023-07-08 11:53:32 +02:00
janek b8fd920b47 Default baudrate is 400k 2023-07-08 09:09:00 +02:00
janek fdce008662 Restore third build 2023-06-19 10:21:59 +02:00
janek fd13f124d6 Restore third build 2023-06-19 10:19:29 +02:00
janek 09724157a4 rename ELRSV3 to ELRS,
guard against reset on non supported filed type,
small optimization
2023-06-15 16:40:30 +02:00
janek a5a80b1106 elrs cleanup 2023-06-13 16:02:20 +02:00
janek ed6f3f1327 size optimization 2023-06-13 16:01:31 +02:00
Janek 313cb11a87 Change output value calculation to 'round away from 0' instead 'floor'. (#358)
Change output value calculation to 'round away from 0' instead 'floor'.
Port of https://github.com/EdgeTX/edgetx/pull/3292
2023-06-01 13:31:44 +02:00
janek 9798668b63 pipeline fix 2023-06-01 13:29:08 +02:00
janek 6c390e5a7d A7105 proper buf size 2023-05-30 17:15:41 +02:00
janek c53ec0c3b5 Size optimization 2023-05-30 17:15:08 +02:00
janek c639f11011 Change "RSSI" label to "RQly" for both AFHDS2A and Crossfire. 2023-05-30 16:39:10 +02:00
janek 2df74c181e Change "RSSI" label to "RQly" for both AFHDS2A and Crossfire. 2023-05-30 16:37:45 +02:00
janek 82268a3e64 cleanup, adde comments 2023-05-29 10:19:17 +02:00
janek ff2d27b1b0 elrsv3: missing buffer increase change 2023-05-26 15:51:05 +02:00
Janek 3539f83991 Fixed AFHDS2A telemetry GPS lat/lon display. (#354)
Fixed AFHDS2A telemetry GPS lat/lon display.
2023-05-26 15:36:19 +02:00
janek 0b1fb163d2 minor exclude related to sdcard logs 2023-05-26 14:57:56 +02:00
janek 6e5bf4cd34 elrsv3: defines instead of magic numbers, little buffer increase 2023-05-26 14:55:21 +02:00
janek dfb5d7ba92 updated docker image 2023-05-26 14:36:13 +02:00
janek e273c921d2 Reduce RAM usage on non elrsv3 builds to fix DEBUG builds 2023-05-18 10:41:07 +02:00
janek 72548da279 INAV Lite: possibility to disable CRSF/AFHDS2A telemetry support,
CmakeLists update comment and cleanup
2023-05-15 21:30:00 +02:00
janek 994c8f7fc3 INAV Lite: disable unfinished home heading reset, always North up 2023-05-15 21:19:26 +02:00
janek 7dd6418ed0 INAV Lite: unify current draw display, cleanup 2023-05-15 20:40:13 +02:00
janek f9988352a2 pipeline fix 2023-05-14 20:01:50 +02:00
janek a7053bd993 reduce number of builds 2023-05-14 20:00:10 +02:00
Janek bb9ebd0473 An attempt to implement custom INAV radar screen (#346)
* An attempt to port INAV radar screen.
* removed splash to make it fit in the flash.
* reenable afhds2a sensor values. fixed galt screen position
* proper scale for altitude
* Fixed speed scaling
* display speed with one digit fraction
* Fixed rssi reading and sats icon position
* Fixed mode display for AFHDS2A
* Throttle display to 10fps
* Display HDOP, RX batt, cell voltage, updated layout,
* allow inversion of unit
* draw distance for CRSF and AFHDS2A
* use dist or "420" for CRSF dist
* keep data between sessions
* allow display as telemetry screen
* always enable radio tools, add INAV lite as build time option
2023-05-14 19:53:19 +02:00
janek cbb6368d48 space optimization 2023-05-14 18:44:27 +02:00
janek 92f76f73b2 draw sensor ID column for debug 2023-05-14 17:39:33 +02:00
janek 54921372b1 free up some RAM 2023-05-14 17:38:17 +02:00
janek 1c4971fef7 code size optimization, 2023-05-14 17:27:52 +02:00
janek 585c7b8dc1 ExpressLRS: code size optimization, increased buffers 2023-05-12 18:18:22 +02:00
janek 6babc010b4 ExpressLRS - don't show warning error code 2023-05-01 17:36:46 +02:00
janek aa6f9d89aa Space optimization - exclude logs flag 2023-04-25 16:11:12 +02:00
janek 73292995c8 Translations: changed channel order label, removed not present timer countdown modes 2023-04-22 17:13:31 +02:00
janek 404953ddfd Blink unexpected reboot asterisk 2023-04-22 17:11:25 +02:00
janek dade98c82f Remove memcpy from AFHDS2A telemetry 2023-04-22 17:10:44 +02:00
janek d28c8fc011 Further space optimization in power management. 2023-04-22 16:44:02 +02:00
janek 70561a159e Fix CRSF GPS heading precision.
Port of https://github.com/EdgeTX/edgetx/pull/3177
2023-04-22 11:50:39 +02:00
janek 579985087b Remove not used sleep screen to save space. 2023-04-20 09:24:34 +02:00
janek 375f0186f1 Small refactor for size optimization 2023-04-16 17:00:07 +02:00
janek 43705a0f3c reverted set default baudrate on reset. 2023-04-16 16:23:50 +02:00
janek 6bc0db45e3 Remove aux serial delay 2023-04-16 16:18:50 +02:00
Janek d3744477b3 ExpressLRS confg tool improvements (#352)
* Refactored memory model to be more flexible and to support upcoming ExpressLRS version.
* Fixed save bug present on master
* removed shortening functions
2023-04-16 14:36:40 +02:00
janek 2b593e2956 minor elrs adjustment 2023-03-12 10:12:05 +01:00
janek cd85f46740 Restore OpenTX behaviour to force calibration on reset instead of providing defaults. 2023-03-12 10:01:30 +01:00
janek f2d1eb2308 skip setting default voice language 2023-03-12 09:33:33 +01:00
janek d4046d68e6 Revert sync at 1000Hz 2023-03-12 09:06:46 +01:00
janek af7274f78d ExpressLRS tool:
refactored to skip parent property,
safe copy strings,
optimized for size,
shorten "AUX" to "A" in values,
readjusted buffers for future options
2023-01-31 20:40:15 +01:00
janek 0af5d26bb1 Merge remote-tracking branch 'origin/master' 2023-01-28 14:16:28 +01:00
janek 30498c7c44 Cleanup of not supported features 2023-01-28 14:16:21 +01:00
Janek 837a2e7ea3 Update README.md 2023-01-28 12:55:48 +01:00
Janek bddca0c7dd Update README.md
Added telemetry mirror for AFHDS2A
2023-01-27 17:59:45 +01:00
janek 7afedd8f05 Report AFHDS2A_ID_S84 to AFHDS2A_ID_S8a sensors,
but skip truly unknown ones
2023-01-27 17:53:56 +01:00
Janek d71d6dac4e AFHDS2A telemetry mirror (#166)
* AFHDS2A telemetry mirror
* Mimic Multiprotocol module telemetry data format
* copy telemetry data to separate buffer
* increase telemetry mirror serial speed
* fixed telem sensor labels
2023-01-27 17:18:37 +01:00
janek b84ac75beb cosmetics 2023-01-27 16:25:02 +01:00
janek f4344e7a98 Increase special functions to 18 2023-01-27 16:24:06 +01:00
janek 40de080eeb Default to 400k baudrate to improve UX 2023-01-27 13:40:20 +01:00
Janek 58efa39ac5 Update README.md
updated credits
2023-01-09 15:08:36 +01:00
Janek 8114825294 Restore heartbeat workaround (#336) 2023-01-08 08:51:04 +01:00
janek 4c6c419503 Added banner, updated infographics with switches and reorganized 2023-01-07 16:57:12 +01:00
janek 7aa093f6f7 Added banner, updated infographics with switches and reorganized 2023-01-07 16:44:15 +01:00
janek dd304c9b0e Added banner, updated infographics with switches and reorganized 2023-01-07 16:42:26 +01:00
janek 5661c58ae4 Increase telemetry slots to 30,
report all ibus sensors
2022-12-25 17:57:00 +01:00
Janek 51a5d8c625 Increased special functions count and telemetry slots (#328)
* Increased special functions count and telemetry slots
2022-12-25 11:39:28 +01:00
Janek d5aab13de0 Reuse telemetryRxBuffer for native AFHDS2A support (#329) 2022-12-25 11:31:28 +01:00
janek bb1c8276a2 RAM saving 2022-12-24 15:56:39 +01:00
Janek 6d8f29378b better setupPulses guard (#327)
* Hearbeat bootloop fix
2022-12-23 14:15:28 +01:00
janek 8b57b3fdc0 minor cleanup 2022-12-22 21:56:33 +01:00
janek 2dee6452e1 minor cleanup 2022-12-22 19:08:47 +01:00
Janek d4a7e1baf1 Update README.md
Added note on powering from 2S acu
2022-12-22 11:52:44 +01:00
Janek 58221d9f55 ExpressLRS configurator improvements (#317)
- reload folder on change to refresh possible changes in Switch Mode and RX PWM mapping,
- use single continuous buffer to do not waste RAM + readjusted buffers, 
- remove not used "reloadFolder" functionality,
2022-12-11 14:56:21 +01:00
janek 20819991f4 Allow sync at 1000Hz 2022-12-08 18:16:17 +01:00
janek 7426c69239 ExpressLRS configurator:
-store max value instead of recomputing,
- refresh data in exact lua timing,
- removed guard
2022-12-08 18:15:53 +01:00
janek 307465a6ec Bump version 2022-12-03 19:30:05 +01:00
janek 6492d02d77 Reverted mixer scheduler min refresh rate change 2022-12-03 19:15:55 +01:00
janek efa8706042 Enable splash for english translation 2022-12-03 18:32:47 +01:00
janek f061d49f60 Disable trainer lost/back sounds 2022-12-03 18:29:56 +01:00
janek dd0e3aea0d ExpressLRS, throttle fields loading to better match Lua behaviour 2022-12-03 18:29:28 +01:00
Janek 55accee9c1 CRSF port of https://github.com/EdgeTX/edgetx/pull/1533 (#315)
restored standard Tlm RX error counter,
allow sync at 1000Hz
2022-12-03 10:47:28 +01:00
janek 33eb2ed832 Expose example Hello world tool as build time option 2022-11-30 20:18:40 +01:00
janek 31dbb62927 Fix for ExpressLRS error display,
added example Hello world tool,
new splash,
minor refactor
2022-11-30 20:12:09 +01:00
Janek 6a37008076 Port of https://github.com/EdgeTX/edgetx/pull/2538 (#314)
* Fix for invalid custom source name alignment, port of EdgeTX/edgetx#2538
* Minor refactor
2022-11-29 11:12:57 +01:00
Janek 26db4812c1 Update README.md 2022-11-28 13:43:49 +01:00
Janek cd3dd658eb Update README.md 2022-11-27 11:42:31 +01:00
Janek ede5a6bcb5 Update README.md 2022-11-27 11:41:12 +01:00
janek ef20534c0f Updated readme for new USB Connect method and contributors. 2022-11-26 18:31:53 +01:00
janek 763d373e68 define improvements 2022-11-26 12:07:54 +01:00
janek 6aa2bb8168 restore standard OpenTX heartbeat check 2022-11-26 11:52:20 +01:00
Janek b106639258 Added USB Connect to main menu popup (#313)
* Added USB Connect to main menu popup

* reorder
2022-11-26 09:57:34 +01:00
Janek 13b82503e0 Removed elrs workaround for missing last 2 bytes (#310) 2022-11-24 21:12:01 +01:00
Janek 7bd7ed17a5 Cleaned some debug logs and added comments (#312) 2022-11-24 19:59:44 +01:00
Janek f415076c77 Fixed PPM Out (#311)
* Fixed PPM Out
2022-11-24 19:53:18 +01:00
Janek f51c578845 Removed channels monitor shortcuts due to key conflicts (#309) 2022-11-21 21:19:28 +01:00
Janek 03dcdaf38c Move cScriptRunning to GlobalData, (#308)
ExpressLRS configurator minor fixes,
cleanup
2022-11-20 12:01:13 +01:00
Janek f6350fea01 Update README.md 2022-11-20 11:45:33 +01:00
janek f2c6fbffa0 Readme updates 2022-11-20 11:44:09 +01:00
janek 6834e7387f Quiet some warnings, AFHDS2A_LQI_CH is now build time option 2022-11-16 09:28:23 +01:00
janek 57a270e5fb PL translations update 2022-11-15 20:38:16 +01:00
janek 5985c1762a Enable USB Mass storage mode for elrsv3 build,
do not compile elrsV3.cpp when not needed,
cleanup
2022-11-15 20:27:12 +01:00
Janek 787f3e5850 ExpressLRS improvements (#305)
- adjusted buffers,
- load folder items faster,
- added workaround for missing packet last 2 bytes,
- keep focus only on value, like in original lua,
- use unions for correct naming of popup and command fields,
- removed popup guards and added volatile instead,
2022-11-15 20:25:38 +01:00
Janek 57fd7a8a20 removed rssi poweroff alarm, (#304) 2022-11-15 20:03:21 +01:00
Janek 71f823d9c8 fixed A7105 sleep mode (#300) 2022-11-14 18:57:47 +01:00
Janek 7df416da03 Compatibility with GCC 12.2 + LTO (#303)
* Compatibility with GCC 12.2 + LTO

* use prepared docker image for all builds
2022-11-14 16:59:40 +01:00
Janek c942195d36 menu improvements cosmetics backport (#302) 2022-11-14 10:27:19 +01:00
Janek 699727cbc9 Fixed hardware menus definition, (#301)
* Fixed hardware menus definition,
fixed radio setup menu focus,
enabled DELETE action for special functions menu,
Unified Receiver row name to be always "Receiver" instead of "RxNum",
fixed splash screen delay option,
enabled channels monitor shortcut for model input edit and mixer edit by long press BIND button

* menu improvements backport (Fixes #7036)
2022-11-14 10:20:42 +01:00
janek 324dae967a Cleanup 2022-11-14 08:54:39 +01:00
Janek 21b6f96b28 Compilation fixes for newer gcc versions, (#297)
fixed double USBD_StrDesc declaration,
2022-11-06 17:52:49 +01:00
janek 68bdb9e6ae Bump version 2022-11-04 19:03:18 +01:00
janek 2de6b43e1a increased elrs buffer last time... 2022-11-04 18:18:52 +01:00
janek 1a1ec3164f fixed failsafe warning,
fixed elrs buffer size
2022-11-04 09:22:59 +01:00
janek 7c1864b382 Added fw comparison table to readme. 2022-11-03 20:54:52 +01:00
Janek 046364ea35 Refactored ModuleData (#296)
refactored ModuleData for for size and generated code size,
don't validate AFHDS2A servoFreq twice,
store AFHDS2A servoFreq in union,
reenabled PT translation builds,
fix HAS_RF_PROTOCOL_FAILSAFE implementation
2022-11-03 20:41:48 +01:00
janek d7a6a1bc17 Readme update 2022-11-02 20:53:01 +01:00
Janek 19b0fe60fd ExpressLRS configurator final touch (#295)
* Added ExpressLRS configurator guards preventing radio reset,
* adjusted buffers to free up some RAM.
2022-11-02 20:39:24 +01:00
janek cdb7ca08d7 build fix 2022-11-02 06:30:26 +01:00
janek 65e81f6820 Disabled PT translation due to size restrictions.
Remove asterisk icon for elrsv3 build for CZ language due to size restrictions.
2022-11-01 21:48:00 +01:00
janek f1f135f61f Compilation fixes for CZ 2022-11-01 21:37:05 +01:00
Janek 69ad4f6eaf Use RxNum for AFHDS2A receiver identification (#293)
* Use RxNum for AFHDS2A receiver identification
* Compilation fixes
* better data alignment,
* remove storing backlightColor for i6X,
* bump eeprom version,
* added RadioData and ModelData checks
* cosmetics
* subType should be able to store all modes
2022-11-01 21:30:58 +01:00
janek 4775d87b7c Use correct label for CRSF receiver id 2022-11-01 13:56:07 +01:00
janek beb198fb2e Build fix for PT translation 2022-11-01 13:33:38 +01:00
Janek a568454a55 CRSF RxNum handling (#294)
* CRSF RxNum handling backport,
refactor

* compilation fix, flash space optimization

* cosmetics

* Show RxNum in menu
2022-11-01 13:05:54 +01:00
janek 3a95e7debe Reverted not working USB fix,
Backported minor naming refactors
2022-10-31 17:15:15 +01:00
janek f730b23d7c ExpressLRS:
- removed unnecessary guards to save flash,
- preparation for other integer types support,
- cleanup
2022-10-30 19:51:24 +01:00
Janek baa4d28d22 ExpressLRS configurator fixes: (#292)
* UINT8 save, load and display were ignored,
* UINT8 min, max, unit offset was wrong,
* Other devices and back button IDs could overwrite actual field ID,
2022-10-30 12:59:41 +01:00
Janek 194d351972 ExpressLRS configurator refactor, UINT8 and units support (#291)
refactored to optimizer RAM usage,
added units support,
added CRSF_UINT8 support,
fixed bug where value of hidden field was stored,
display whole values: Packet Rate sensitivity is now visible,
2022-10-29 15:53:39 +02:00
Janek 587c99302c Always display output channel name on mix screen (backport #8076) (#290) 2022-10-25 15:46:13 +02:00
Janek a0ff01edbb Backports: (#287)
- Remove module choice from special function set failsafe (backport #8156)
- Fix mixer overflow (backport #7747)
- Bars inverse (backport #7709)
- Fix scale and telemetry fields (backport #7704)
Cosmetics
2022-10-25 09:50:44 +02:00
Janek 69afe82e7e Fixed USB DFU mode on DEBUG builds (#285) 2022-10-14 12:56:06 +02:00
Janek 157b92d79f Update README.md 2022-10-12 12:17:26 +02:00
Janek 8480c30462 Update README.md 2022-10-12 12:10:20 +02:00
Janek 0c38727322 Added failsafe warning for AFHDS2A (#284) 2022-10-08 20:41:19 +02:00
janek 02cd8c9e08 Update readme with table of contents and backlight mod 2022-09-26 09:15:46 +02:00
Janek 10dfed5d10 Restore warning hand icon to match OpenTX/EdgeTX look (#281) 2022-09-22 15:46:56 +02:00
Janek 46a2dd61f8 EdgeTX port: Optionally support CRSF_VARIO in BARO_ALT telemetry (#280) 2022-09-21 13:09:00 +02:00
janek ad780c30ec Version bump 2022-09-12 12:52:17 +02:00
Janek ff7d71e753 Skip proper wait ti save some flash space. (#279) 2022-09-12 12:51:16 +02:00
Janek 8066d5ca45 Put "Save All" as first option to reduce required button pushes to force save configuration to eeprom. (#278) 2022-09-12 12:46:34 +02:00
Janek bcbb36bc8a ExpressLRS: (#277)
- readjusted buffers to match ExpressLRS 3.0 needs,
- removed strings in brackets to save RAM,
- renamed elrsv2 to elrsv3
2022-09-12 12:43:26 +02:00
Janek 29aa4534aa Update README.md
Renamed ELRSV2 references to ELRSV3 to clear up that this is working with ExpressLRS 3.0 also.
2022-08-29 22:38:06 +02:00
janek ad2e2dd8e7 fixed translation regression 2022-06-02 20:56:45 +02:00
janek 244fd86e10 bump version 2022-05-30 21:38:11 +02:00
janek d8c4c36b37 Fixed back EN translation 2022-05-30 21:26:59 +02:00
Janek 793fd3de76 ELRSV2 ability to exclude other devices support (#259) 2022-05-24 23:41:04 +02:00
Janek da3cfa0563 Exclude sensor logs option. (#258)
Optimize i2c routine for size.
Reduce serial tx wait loop.
Better defines.
2022-05-24 23:27:00 +02:00
janek d8e1b25dcf Merge remote-tracking branch 'origin/master' 2022-05-24 23:26:11 +02:00
janek 0937701490 minor translations cleanup and size reduce 2022-05-24 23:26:03 +02:00
Janek 44f33a0f3a Update README.md 2022-05-19 22:18:23 +02:00
Janek 233b909196 Update README.md 2022-05-19 22:17:45 +02:00
Janek d9a262ac79 Update README.md 2022-05-19 09:32:31 +02:00
janek 73807dd683 remove other unused translations 2022-05-17 23:44:17 +02:00
Janek 1894ce9471 Translations fixes and optimizations (#255)
* Translations fixes and optimizations
2022-05-17 23:30:50 +02:00
Janek ca39bd2804 Fixed bulk eeprom read. (#254)
Added proper eeprom write wait
2022-05-17 18:37:48 +02:00
Janek 66f4c7d570 Update README.md 2022-05-17 15:37:22 +02:00
janek c41367cedf Readme: Added note on USB connection.
Cropped hardware connections image.
2022-05-16 23:04:24 +02:00
Janek 223017680f Enable basic special function menu (#251)
* Enable basic special function menu
* Disable unsupported volume function
* Fixed defines
* Skip unsupported volume fn
2022-05-16 15:07:54 +02:00
Janek 9b0fd2792a Enable backlight mod builds on pipeline (#250)
* Additional build targets for backlight mod
* Updated readme.md
* unified build option name
2022-05-13 09:48:13 +02:00
janek 3d4648c6f6 Updated hardware connections infographic 2022-05-12 07:18:51 +02:00
janek d82962fdc3 Merge remote-tracking branch 'origin/master' 2022-05-12 07:10:03 +02:00
janek bda5bbbcbb Updated hardware connections infographic 2022-05-12 07:09:57 +02:00
Janek fbdd1b0a5d Update README.md 2022-05-12 06:43:58 +02:00
Janek d3c7804f77 Update README.md 2022-05-11 15:48:00 +02:00
janek ad9865b982 Default to screen backlight ON (backport) 2022-05-10 20:47:39 +02:00
janek d0776ec945 Merge remote-tracking branch 'origin/master' 2022-05-10 07:59:55 +02:00
janek 0c5d4f55a7 Enable backlight dimming on pipeline builds 2022-05-10 07:59:47 +02:00
Janek c72c18cd7d Update README.md 2022-05-09 20:43:24 +02:00
Janek 7178884f1c Adjustable backlight level (#249)
* Dimmable backlight
* uses TIM3 CH4 PWM mode
* renamed backlightOn to resetBacklightTimeout (backport)
* updated readme
* EXT module power is moved from `PC9` to `PC13`
* Fix initial 100% blink
* renamed define
* Brightness adjust from backlight function (backport)
* Fixed dim light event with backlight off
* Defines improvement
2022-05-09 20:11:26 +02:00
janek ad660c51d1 Merge remote-tracking branch 'origin/master' 2022-05-09 15:18:01 +02:00
janek bc61c9d65b Added PCBI6X_USB_VBUS build option 2022-05-09 15:17:50 +02:00
Janek 51f0059769 Update README.md 2022-05-07 21:41:19 +02:00
janek 520760c292 Back to PREC0 2022-05-06 12:36:14 +02:00
janek 363888d2b4 Bump version 2022-05-06 12:25:25 +02:00
janek 1a1c75ec2d Reorder mixer actions to match OpenTX 2022-05-06 12:25:12 +02:00
janek 87a862c8e4 Missing refactor for model notes 2022-05-05 00:22:36 +02:00
janek ec062b81c6 Small fix. 2022-05-04 19:12:17 +02:00
janek 2dcf1dad8d Do not pollute global namespace with elrsv2 definitions. 2022-05-04 19:11:41 +02:00
janek defb98b444 Skip board off routines for i6X 2022-05-04 17:48:20 +02:00
janek aab19bafcf Move timer metods to stm32 common timers_driver.c (backport) 2022-05-04 15:30:11 +02:00
Janek a9b6fa9530 Update README.md
Replaced graceful shutdown with "Save all" option.
2022-05-04 12:07:22 +02:00
Janek 69b2a5bd74 Replaced gracefull shutdown with "save all" menu option (#247)
* Replaced gracefull shutdown with "save all" menu option
* watchdogSuspend just in case
* cleanup
* pwrOff exclude on SWITCH mode
2022-05-04 12:01:53 +02:00
janek d1cda7c5bc Merge remote-tracking branch 'origin/master' 2022-05-03 11:43:58 +02:00
janek 68f3f9009a Fix adjustable SBUS refresh rate (backport) 2022-05-03 11:43:49 +02:00
Janek daef3fbae8 Update README.md 2022-05-02 12:39:52 +02:00
janek 92667b8524 Increase AUX Serial tx fifo size.
Reduce CFG_MAX_USER_TASKS again.
2022-05-02 12:32:17 +02:00
Janek dbdb3306bc Trainer followup to #242 (#244)
* removed not supported Slave/Jack option
* different trainer lost/back sound
* cleanup
2022-04-29 18:43:39 +02:00
Janek 1f4160f063 Update README.md 2022-04-29 14:15:48 +02:00
janek 002cac465e Merge remote-tracking branch 'origin/master' 2022-04-29 13:51:24 +02:00
janek cbadc37bae model outputs rename 2022-04-29 13:51:12 +02:00
Janek 7599c493f9 Update README.md
Added hardware pins description
2022-04-29 13:31:14 +02:00
janek f308a16fe3 Removed parallelism to CircleCI 2022-04-29 10:56:43 +02:00
janek 2c65d47f59 Added parallelism to CircleCI 2022-04-29 10:47:03 +02:00
janek 5f45ac411c Disabled Sonar fix 2022-04-29 10:21:01 +02:00
janek ac8e5d452f Disabled Sonar 2022-04-29 10:19:42 +02:00
Janek 550c1d7ded Fixes #6439 Second back needed after popup in model outputs (backport) (#245) 2022-04-29 10:13:31 +02:00
Janek 140d699456 Update README.md 2022-04-27 19:06:02 +02:00
janek 76d7ebb0c6 Translation fix 2022-04-27 16:15:36 +02:00
janek 11663ae817 Translation fix 2022-04-27 16:03:27 +02:00
janek d3550ebbbd Translation fix 2022-04-27 15:55:26 +02:00
janek eb390b339a Translation fix 2022-04-27 15:47:47 +02:00
Janek 955cb7f851 Missing translations (#243)
* Missing translations
2022-04-27 15:39:51 +02:00
Janek 194bc1d10a Update README.md
Added SBUS Trainer to readme
2022-04-27 13:07:16 +02:00
Janek 50db772fe1 Serial port SBUS Trainer (#242)
* SBUS Trainer
* Fixed rx fifo again,
* Always invert UART RX because only SBUS for now,
* HAL libs don't care about mask
* Better workaround for CNDTR reading
* Move trainer functions to trainer.c (backport)
* Enable 16 channels trainer
* Enable trainer lost and back sounds
* Do not process sbus input when not enabled,
* Added translations
2022-04-27 11:43:19 +02:00
Janek 6d8816a601 Update README.md 2022-04-26 19:28:37 +02:00
Janek 0d10b809e5 Update README.md 2022-04-26 19:24:52 +02:00
janek e8b7a87d69 PT translation fix + cleanup 2022-04-25 17:42:23 +02:00
janek 22563fdccf Cleanup unused vars from AFHDS2A 2022-04-25 16:12:56 +02:00
janek f8c0fe2ee6 Disable POT1 navigation 2022-04-24 20:43:28 +02:00
Janek 5f054d963a Do not enable serial rx interrupt, (#241)
Fixed occasional reboots on serial fifo full,
2022-04-24 20:23:46 +02:00
janek 79089010cf auxSerialRxFifo is enough, enable DMA for SBUS Trainer 2022-04-24 11:15:45 +02:00
janek c0036b876e * added sbus guard 2022-04-24 11:05:08 +02:00
janek dc969e7715 * added trainer sbus support to serial driver
* fixed some compilation warnings
2022-04-24 11:01:01 +02:00
janek e5c09d404a * Reverted allowing switches 2/3POS change,
* Skip pots saving to save flash,
* Fixed PWR_BUTTON SWITCH option
2022-04-24 00:55:24 +02:00
janek f580933670 explicitly pass PPM_UNIT 2022-04-23 20:25:09 +02:00
janek 49f7f280e8 auxSerialStop for DMA RX,
better guard
2022-04-23 19:55:08 +02:00
Janek a94373779f AUX Serial RX DMA fifo (#240)
* Aux serial RX fifo DMA works
* reverted to keep serial driver RX DMA working but define guarded
2022-04-23 18:48:16 +02:00
Janek e76a2a0855 Aux serial improvements (#239)
* enable tx fifo
* restored common stm32 aux serial driver
* always receive serial data (backport)
* disabled aux receive for now (no use)
2022-04-22 12:51:55 +02:00
Janek b50687e766 Translation fixes (#238)
* pt translation,
* minor i6X opimizations
2022-04-20 08:37:00 +02:00
janek 8c9936ff88 Save 104 bytes 2022-04-19 22:04:34 +02:00
janek 7d8f2e6870 use docker instead of machine 2022-04-19 10:42:57 +02:00
Janek 7144c4080d Update README.md 2022-04-18 19:13:55 +02:00
Janek b718b8f066 Skip attempt to build companion (#237)
* skip attempt to build companion,
* improvements for polish translation
* images naming
2022-04-18 10:46:56 +02:00
Janek 003e7cb5eb Update README.md 2022-04-17 15:18:29 +02:00
Janek a94fca57f7 Translations (#236)
* Fixed pl and es translations
* updated cz and ds translations
2022-04-17 15:07:27 +02:00
janek d8abc4f56c Merge remote-tracking branch 'origin/master' 2022-04-16 23:46:19 +02:00
janek 3909a30de0 cleanup 2022-04-16 23:46:10 +02:00
Janek 454da140c8 Update README.md 2022-04-16 23:32:58 +02:00
Janek 519795d4d0 split builds between feature sets (#235) 2022-04-16 23:32:03 +02:00
Janek d7ef1d79bb Update README.md 2022-04-16 23:02:52 +02:00
Janek 78ca8f06f5 Standard build script + multilingual builds (#234)
* Standard build script
* built multiple versions at once
* build all languages only on master
* cleanup
2022-04-16 22:54:50 +02:00
janek 23f99ded22 elrsv2 allow up to 8 devices,
fix minor code smells
2022-04-15 08:52:04 +02:00
Janek 1873e2d74a Configured Sonar (#233)
* Configured Sonar
* typo
* just to trigger build
* updated projectKey
* updated config
* added I6X commit-tests,
* separated sonar job
* disable companion
* add compiler
* changed image
* try to reload path, added pillow
2022-04-15 08:01:05 +02:00
Janek 95a8c5b3e5 Crossfire: add barometer altitude sensor (#232) 2022-04-14 22:31:13 +02:00
Janek 2c37760dfe Move crossfire stuff to crossfire.h (#230)
Removed duplicated defs
2022-04-10 18:51:31 +02:00
Janek 1427b07e82 Set switch warnings on long press OK. (#229)
Set switch warnings on long press OK.
Allow to set any switch to 3POS.
2022-04-09 14:28:30 +02:00
Janek 1721f6bbd6 Crossfire baudrate was ignored! (#228)
Crossfire baudrate was ignored
ELRSv2 proper flag placement,
Reversed baudrate order to make it more intuitive,
2022-04-08 22:54:31 +02:00
janek 88e2c98b5e ELRSv2 use drawChar for char 2022-04-08 14:25:41 +02:00
Janek f1d84e62ca ELRSv2 fixed bug where armed state would hog cpu, (#227)
allow longer device names
2022-04-08 14:11:17 +02:00
Janek b1dd38a730 Readme updates for new version (#192)
* Readme updates for new version
* protocols
* Shutdown clarification.
* 16 channels
* telemetry sensors count
* added save icon explaination
* added nightlies info
* added Mode 1 info.
2022-04-07 11:25:29 +02:00
janek 50068accf4 bump version 2022-04-07 11:21:38 +02:00
janek fec8404f2a simplification 2022-04-07 09:56:30 +02:00
janek a867c66960 possibility to jump to the last model page from the first one. 2022-04-07 09:54:08 +02:00
janek 10df817334 increase lcd reset delay to the same as on other boards 2022-04-06 10:51:46 +02:00
janek 554bf8e7ed fix chan/mix monitor toggle after going back from elrs menu,
possible fix for other devices sometimes not fully populated,
cleanup,
2022-04-06 10:46:06 +02:00
Janek 437fce00cb Bump eeprom version due to changes in struct and telemetry sensors count. (#212) 2022-04-05 12:35:04 +02:00
janek 980a718f02 Fixed save icon overlaps reset icon 2022-04-05 11:55:28 +02:00
Janek 720849363a elrsv2 Other devices support (#218)
* Show Other Devices
* list devices
* select device
* Ignore unsupported fields,
* cleanup
* static
* do not trim before full packet is received,
* fields index reading on edit fix
2022-04-05 11:53:47 +02:00
janek 6d3d6d370b idle task is also a task,
do not create audioMutex for PCBI6X,
back to RTOS_WAIT_MS for i2c
2022-04-04 18:35:06 +02:00
Janek bcfde29ca2 i2c final adjustments, (#223)
aux serial gpio speed,
cleanup
2022-04-04 16:14:59 +02:00
Janek 9cd7fd4355 Fix for eeprom (#222) 2022-04-03 19:21:30 +02:00
janek 9e6b96826b do not fail on missing git_tag.txt 2022-04-03 10:32:19 +02:00
janek 359be8240e lcd reduced reset delay is back 2022-04-03 10:32:02 +02:00
janek 5d48391bd9 restored lcd delay 2022-04-03 08:50:51 +02:00
janek d5b9e3f564 git ignore git_tag.txt,
renamed define
2022-04-02 20:24:50 +02:00
Janek 2d2537a379 Missing git commit sha fix (#221)
* Missing git commit sha fix

* remove new line

* remove new line v2

* added commit sha to all builds
2022-04-02 17:48:35 +02:00
janek ccc2599c11 Cleanup
Init backlight only once
2022-04-02 15:24:29 +02:00
janek e266d1cf3f non negative splash 2022-04-01 12:00:57 +02:00
janek 3e4e396ef8 LCD wait is too long 2022-04-01 11:59:07 +02:00
Janek 6b27d7140b Watchdog (#220)
* Restored original heartbeat (pulses) related watchdog reset.
* Fixed watchdogSuspend was ignored.
* Changed heartbeat condition.
2022-03-31 20:53:29 +02:00
Janek 6524524cd6 reduced usb reboots count? (#219)
* reduced usb reboots count?
2022-03-30 21:21:27 +02:00
janek 38259e2b8e Cleanup 2022-03-29 18:39:06 +02:00
janek 533d587df6 Use same I2C config values as erfly6 2022-03-29 18:38:09 +02:00
Janek 70659d1bbd Completely removes the macro MOVE_CURSOR_FROM_HERE() which was for AVR (backport #6880) (#217) 2022-03-24 19:05:01 +01:00
Janek dceea44867 eeprom i2c driver rework (#208)
* ported i2c driver from Taranis
* no paging in read mode - as in eeprom spec
* ACK polling instead of hardcoded wait
* wait for internal block write broken, replaced by hard delay
* removed libopencm3 i2c libs
* gpio speed should be higher
* timeout error handling,
* do not use additional RAM for writes,
2022-03-24 18:32:30 +01:00
Janek 5675b3278e add eeprom write indicator (#216) 2022-03-24 18:14:28 +01:00
janek e80214c318 define fixes 2022-03-23 19:21:02 +01:00
Janek 3f316abb6c elrsv2 sync with elrsv2.lua (#215) 2022-03-21 19:49:28 +01:00
Janek a2ff7a19d1 CRSF ppm center handling (backport #7870) (#214) 2022-03-21 17:58:47 +01:00
Janek 7f6b307404 set storageDirty for changed jitter filter and serial mode (#211)
set storageDirty for added telemetry sensor (backport #8887)
2022-03-20 19:01:05 +01:00
Janek bbb1266cc3 Flash space and RAM optimizations (#210) 2022-03-19 01:00:01 +01:00
janek 73be86d09b Tuned elrsV2 buffers again.
Leave "A" instead of completely removing "AUX".
Disable info fields trim.
2022-03-15 18:24:56 +01:00
Janek 66c2eb22d5 Fine-tuned elrsV2 buffers. (#207)
Enabled commit sha on version row.
2022-03-14 21:39:31 +01:00
Janek 2471fb3d25 Prevent reboot on entering info fields. (#205)
Trim info field instead of cmd.
2022-03-12 21:28:46 +01:00
Janek af50c720d1 Properly align data (#203)
Reduce polling interval
2022-03-11 14:11:30 +01:00
Janek 8639796258 USB description size fix (again) (#202)
USB device name update
Small flash saving
2022-03-10 21:22:07 +01:00
Janek 1e8bde309b Do not reserve heap - like on other targets. (#201) 2022-03-10 18:19:28 +01:00
Janek fb428984c7 Trim INFO message name (#200) 2022-03-10 08:12:58 +01:00
Janek 65afc5aeb2 AFHDS2A 16 channel modes menu (#196)
* AFHDS2A 16 channel modes menu

* dynamic channel count

* cosmetics
2022-03-09 11:48:48 +01:00
janek dded11c6a8 Don't init LCD twice. 2022-03-08 22:55:04 +01:00
Janek 5586485708 Fixed navigation and edit issue (backport) (#198)
Closes #146
2022-03-08 21:35:30 +01:00
Janek 0bda125e51 Display flight modes like on Taranis (#197) 2022-03-08 20:31:54 +01:00
Wilhelm b71fd642e4 SBus16/IBus16 (#173)
* first try for sbus16

* next try on sbus16/ibus16

* cosmetics

* improved full ibus18 code

* reverted to use MAX_OUTPUT_CHANNELS=16 even for AFHDS2A_CHANNELS>16
2022-03-08 14:19:42 +01:00
Janek e4b406f3f2 Move Factory reset to radio hardware menu (#195)
Smaller font for radio version
2022-03-08 13:07:25 +01:00
Janek a13ad9f98e minor backports: (#194)
- throttle warn,
- ext module power bug,
- statistics screen font,
- NULL -> nullptr
2022-03-08 10:06:32 +01:00
Janek d246865130 Reduced ELRSV2 size by another 48 bytes (#191) 2022-03-06 12:05:03 +01:00
janek 87181c9fff too long telemetry warning + minor backports 2022-03-05 23:49:21 +01:00
Janek 6301acecd0 Menus order and minor backport (#190) 2022-03-05 23:03:47 +01:00
Janek 7997b97fc0 Menu refactor + batt calibration fix (#188)
Menu refactor
- redone battery voltage measurement
- moved calibation to hardware page
- moved diag analogs and keys to hardware page (disabled)
2022-03-05 20:13:58 +01:00
Janek e9e4f4cec4 Fixed an issue where moving right in model menu will skip second tab (#189) 2022-03-05 16:59:46 +01:00
janek 603172faba labels fix 2022-03-05 09:22:43 +01:00
Janek 0616ee16d5 Navigate back on long press BIND button. (#187)
Navigate back on long press BIND button.
Disable POT2 navigation.
2022-03-04 21:33:01 +01:00
Janek 60ef33b13c Fixed CZ translations (#186) 2022-03-04 18:32:09 +01:00
Janek 8b17eb6922 Default to percent display (#179) 2022-03-01 18:29:15 +01:00
Janek 91b4cd800c ExpressLRS V3.0 Support (#140)
* Reduced elrsv2 size.
* Don't store hidden field names.
* Skip hidden field support.
* don't leave line for field without a name
* reuse fieldData buffer for commandMessage,
* backport warning timeout reset on flags change
* Trim only command names
* new lcd_Warn backport
* reduce chunks buffer usage
* Load only current folder into buffers.
* Rearrange buffers to reduce RAM usage.
* increased fieldData buffer
* Replaced sprintf with custom implementation.
* Skip unsupported field type.
2022-03-01 17:38:04 +01:00
Janek 546145bdf7 unify telemetry sensors at 26 for all builds to keep the same eeprom version (#175) 2022-02-27 11:35:08 +01:00
Janek e290b6bc37 reduce flash usage (#174) 2022-02-27 11:32:39 +01:00
Janek 8c1b3cf7c1 Make injecting LQI optional at any channel in board CMAkeLists.txt (#172) 2022-02-26 12:53:07 +01:00
janek 0eff5958be Merge remote-tracking branch 'origin/master' 2022-02-20 21:20:04 +01:00
Janek efc15cd855 Update README.md 2022-02-20 21:19:44 +01:00
janek e7bc2b24f5 hardware connections image 2022-02-20 21:19:26 +01:00
Janek 216775051b Update README.md
Added hardware connections infographics
2022-02-20 18:38:15 +01:00
janek fa6a2d8375 hardware connections image 2022-02-20 18:34:03 +01:00
Janek ce57cd0a08 Fixed switch warning menu (#164)
Fixed switch warning display
Removed preflight checklist
2022-02-19 08:44:45 +01:00
Janek 308b4c5dc2 Decrease mixer period for USB Joystick mode, increase report rate #8721 (#163) 2022-02-17 17:14:34 +01:00
Janek 4af5b51024 Fixes 5602 Special Functions Inc/Dec Gvar (2.3) #6442 backport (#162) 2022-02-17 16:08:21 +01:00
Janek a225c681ef Move adcRead() to mixer scheduler IRQ to reduce sample jitter #8480 backport (#161) 2022-02-17 16:07:59 +01:00
Janek 6c865775c1 CircleCI requires to upgrade image. (#156) 2022-02-16 19:40:55 +01:00
Janek 3d3859122a Fix chan/mixer view switching #7518 backport (#159) 2022-02-16 19:40:37 +01:00
Janek 0a2c00e92a Battery warning can go down to 3.5V for users with 1S + step-up but with direct batt voltage to adc (#160) 2022-02-16 19:40:17 +01:00
Janek cd110f2bc7 USB fix (#153)
* Increase usb desc to proper size (fuuu...)
Don't enable backlight twice on boot

* init usb before eeprom

* init usb before eeprom
2022-02-15 14:27:45 +01:00
janek b0ff5ac281 updated aux serial mode names 2022-02-04 22:59:54 +01:00
Janek 573564dba5 Merge pull request #149 from OpenI6X/janek/aux-serial-telemetry-mirror
small init fix, removed inversion
2022-02-04 19:20:19 +01:00
janek 5c15d8c0f6 small init fix, removed inversion 2022-02-04 19:19:27 +01:00
Janek 61d3304888 Merge pull request #148 from OpenI6X/janek/aux-serial-telemetry-mirror
Aux serial S-Port mirror
2022-02-04 19:10:57 +01:00
janek 584dfebe08 small init fix, removed inversion 2022-02-04 19:08:16 +01:00
janek 8c02feabf9 aux serial crossfire telemetry inversion 2022-02-02 21:57:35 +01:00
janek c245116abc crossfire telemetry mirror backport 2022-02-02 10:55:08 +01:00
janek eb547df41a Aux serial S-Port mirror
Aux serial backports
2022-02-01 21:10:53 +01:00
Janek 8d92bc2eb4 Update README.md 2022-01-31 20:54:27 +01:00
Janek 11f6ac1750 Merge pull request #147 from OpenI6X/janek/eeprom-write-delay
Eeprom use default 2s delay
2022-01-31 19:31:57 +01:00
janek d0cb395307 Eeprom use default 2s delay 2022-01-31 19:13:02 +01:00
Janek 0b39f768e1 Merge pull request #144 from OpenI6X/janek/cosmetics-backport-6512
Cosmetics_(#6512) (saves flash)
2022-01-31 18:44:58 +01:00
Janek 91b2771f04 Merge pull request #143 from OpenI6X/janek/ram-saved-backport
128_bytes_RAM_saved (backport)
2022-01-29 09:18:07 +01:00
janek 174dd0411f Cosmetics_(#6512) (saves flash) 2022-01-29 09:17:31 +01:00
janek b09dfc3ae8 128_bytes_RAM_saved (backport) 2022-01-28 17:30:31 +01:00
Janek 62fa9bf88a Merge pull request #137 from OpenI6X/janek/write-delay
Reduce eeprom write delay to 3s
2022-01-22 11:30:20 +01:00
janek 9533fb2031 Reduce eeprom write delay to 3s
Minor backports
2022-01-22 11:28:12 +01:00
Janek 9911be0aba Merge pull request #136 from OpenI6X/janek/gauges-cleaner-look
Do not display too many horizontals (backport #7854)
2022-01-19 12:34:33 +01:00
ajjjjjjjj 3c1de930f4 Do not display too many horintals (backport #7854) 2022-01-19 12:33:26 +01:00
Janek f311667271 Merge pull request #135 from OpenI6X/janek/version-bump
Version bump
2022-01-18 20:33:15 +01:00
ajjjjjjjj 1667d67b65 Version bump 2022-01-18 20:31:38 +01:00
Janek 388116a73e Merge pull request #134 from OpenI6X/janek/version-bump
Version bump
2022-01-18 20:31:12 +01:00
ajjjjjjjj 46d4f67080 Version bump 2022-01-18 20:06:53 +01:00
Janek f353f661e5 Merge pull request #133 from OpenI6X/janek/sticks-view
Only 2 pots so display sticks like on Taranis
2022-01-18 19:32:31 +01:00
ajjjjjjjj 57522773f1 Only 2 pots so display sticks like on taranis 2022-01-18 19:31:36 +01:00
Janek 0e6ba30aa8 Merge pull request #132 from OpenI6X/janek/channels-mixers-monitor
Full screen channels & mixers monitor
2022-01-18 18:11:09 +01:00
Janek 5fdca53e83 Merge pull request #127 from OpenI6X/jnek/key-driver-fix
Switch state was invalid for edge values.
2022-01-18 18:10:33 +01:00
ajjjjjjjj b1b8951df2 ELRSV2 should cleanup after itself otherwise reusableBuffer data maybe broken 2022-01-18 18:08:03 +01:00
ajjjjjjjj 634f6ec6b8 duplicated entry 2022-01-18 12:26:10 +01:00
ajjjjjjjj ba3c530889 Full screen channels & mixers monitor (backport)
Timers display fixes (backport)
Disabled MENU_DIAGKEYS for elrsv2 build
2022-01-18 12:23:36 +01:00
ajjjjjjjj b18f1f5de0 New str definition fix 2022-01-18 12:22:00 +01:00
ajjjjjjjj 39d5901abd Preparation for custom popups (backport) 2022-01-18 12:21:42 +01:00
Janek 586b3b8fb6 Merge pull request #128 from tmcadam/fixed_afhds2a_subtype_selection
modified conditionals for afhds2a subtype selection
2022-01-16 12:59:28 +01:00
Tom McAdam c3096c22bc modified conditionals for afhds2a subtype selection 2022-01-16 21:34:42 +10:00
Janek 9371aca098 Merge pull request #126 from OpenI6X/janek/ext-module-power-down
Power down external module on soft shutdown.
2022-01-16 10:16:53 +01:00
ajjjjjjjj d1b0c3674d Switch state was invalid for edge values.
Code refactor.
2022-01-15 21:59:25 +01:00
ajjjjjjjj f3ead55347 Switch state was invalid for edge values.
Code refactor.
2022-01-15 20:10:53 +01:00
ajjjjjjjj bb26df472d Power down external module on soft shutdown. 2022-01-15 19:31:12 +01:00
Janek 3e15ec9dcd Merge pull request #123 from OpenI6X/janek/trims-read-fix
Fixed trims reading in functions
2022-01-14 20:31:48 +01:00
ajjjjjjjj b68bb52971 Fixed trims reading in functions 2022-01-14 20:30:37 +01:00
Janek 84d4443f18 Update README.md 2022-01-13 18:00:51 +01:00
Janek 3ef02803d4 Merge pull request #122 from OpenI6X/janek/play-tone-repeat
Added repeat implementation for play tone.
2022-01-13 17:57:00 +01:00
ajjjjjjjj c7029ca136 Added repeat implementation for play tone. 2022-01-13 17:37:04 +01:00
Janek efa36713fa Merge pull request #118 from OpenI6X/janek/diagkeys-and-cleanup
Enable menu_diagkeys back, there is enough space at this  point.
2022-01-09 11:57:23 +01:00
ajjjjjjjj b9e9ee394d Enable menu_diagkeys back, there is enough space at this point.
General and USB cleanup.
2022-01-08 12:07:36 +01:00
Janek b5377a16bc Merge pull request #117 from OpenI6X/janek/pwr-trigger-btn
Power key trigger should be time related
2022-01-08 10:29:25 +01:00
ajjjjjjjj 176015d5b3 Power key trigger should be time related
closes #103
2022-01-07 21:42:23 +01:00
ajjjjjjjj 59c06d0f23 Power key trigger should be time related
closes #103
2022-01-07 21:37:57 +01:00
Janek 4550b16512 Update README.md 2022-01-07 10:47:03 +01:00
Janek bf8d42b3f5 Update README.md
Added Rakish Rc YT channel.
2022-01-06 16:16:42 +01:00
Janek 7700b280d9 Update README.md 2022-01-06 13:59:56 +01:00
Janek bfc40c406c Update README.md 2022-01-06 13:55:58 +01:00
ajjjjjjjj 9df252490e separated lua api port from main code 2022-01-06 11:58:39 +01:00
Janek 244d6c041e Merge pull request #116 from OpenI6X/janek/backport-7160-and-others
backport #7160 and logical switch fix backport
2022-01-06 09:50:39 +01:00
ajjjjjjjj 3a345eb5c2 backport #7160 and logical switch fix backport
popup naming backport
2022-01-06 09:50:03 +01:00
Janek 14bf19bd78 Merge pull request #114 from OpenI6X/janek/aetr
Default to AETR
2022-01-06 02:14:54 +01:00
Janek cad8df9a6a Merge pull request #115 from OpenI6X/janek-usb-cdc
USB CDC improvements (still broken)
2022-01-06 01:51:54 +01:00
ajjjjjjjj 777e75af23 backport #7160 and logical switch fix backport
popup naming backport
2022-01-06 01:49:19 +01:00
ajjjjjjjj 6d2780065f Default to AETR 2022-01-06 01:46:52 +01:00
ajjjjjjjj 3b0c363c11 USB CDC improvements (still broken) 2022-01-06 01:43:22 +01:00
Janek aa03c7de44 Merge pull request #113 from OpenI6X/janek/flash-space
Flash space & key gpio config
2022-01-05 16:56:17 +01:00
Janek 15da9219f7 Merge pull request #112 from OpenI6X/janek/backport-7444
Backport: Radio tools related fixes (#7444)
2022-01-05 14:54:53 +01:00
ajjjjjjjj 4a38181a70 Flash space optimization 2022-01-05 14:53:29 +01:00
ajjjjjjjj 4f8b6dc2ad Flash space optimization
Minor keys config fix
2022-01-05 14:36:01 +01:00
ajjjjjjjj def148df15 Backport: Radio tools related fixes (#7444) 2022-01-05 14:34:05 +01:00
Janek 14f45cbe12 Merge pull request #111 from OpenI6X/janek/eeprom-219
EEPROM version bump to force factory reset
2022-01-04 20:13:51 +01:00
ajjjjjjjj 48d753809d Eeprom version bump to force factory reset 2022-01-04 19:45:52 +01:00
Janek f7e264001e Merge pull request #110 from OpenI6X/janek/elrsv2-next-reboot-fix
Fixed next elrsv2 reboot issue
2022-01-04 18:29:41 +01:00
Janek 4328367155 Merge pull request #109 from OpenI6X/janek/cleanup
General cleanup and flash size optimization.
2022-01-04 18:29:31 +01:00
ajjjjjjjj d609a52ca2 General cleanup and flash size optimization. 2022-01-04 18:26:19 +01:00
ajjjjjjjj 49ca6f737d Fixed next elrsv2 reboot issue 2022-01-04 18:22:22 +01:00
Janek 21bdc20906 Merge pull request #105 from OpenI6X/janek/model-powered-power-off
Remove model still powered popup for PCBI6X. Fixes soft shutdown issue.
2022-01-04 08:49:17 +01:00
ajjjjjjjj ad9b4ca68a Remove model still powered popup for PCBI6X 2022-01-03 14:56:39 +01:00
ajjjjjjjj 0b7962c6e4 bump version 2022-01-03 13:01:06 +01:00
ajjjjjjjj 2d6c37c622 Updated build names and bump version 2022-01-03 12:55:53 +01:00
ajjjjjjjj aee793fb4d Fixed vario unpleasant buzz
Simplified CMakeLists rule
Remove gvars from build names
26 telemetry slots for elrsv2 build
2022-01-03 12:46:42 +01:00
Janek 304f765e58 Merge pull request #101 from OpenI6X/janek/gvars-elrsv2
Added GVARS to ELRSV2 build (now fits!)
2021-12-30 08:19:37 +01:00
Janek a295625e58 Merge pull request #100 from OpenI6X/janek/translations-de
Updated DE translations and EN translations cleanup
2021-12-30 08:17:32 +01:00
Janek 7c0fa35317 Merge pull request #102 from OpenI6X/janek/nicer-size-report
Even nicer size report
2021-12-29 22:19:11 +01:00
ajjjjjjjj 3d9e38c8c8 Even nicer size report 2021-12-29 22:17:50 +01:00
ajjjjjjjj b786fa86b2 Removed unused XXLSIZE font
Added GVARS to ELRSV2 build (now fits!)
Optimized ELRSV2 for size once again.
Make ELRSV2 idle update as fas as other menus
Hide Storage mode in options when not available
Removed frsky splash
2021-12-29 22:14:59 +01:00
ajjjjjjjj a3c7c142cf Updated DE translations and EN translations cleanup 2021-12-29 21:51:53 +01:00
Janek 347dc02c18 Update README.md 2021-12-29 21:25:42 +01:00
Janek 72b14cbef6 Update README.md 2021-12-29 19:20:44 +01:00
Janek ebee8ea729 Update README.md 2021-12-29 19:19:51 +01:00
Janek e51da758ea Update README.md 2021-12-29 19:14:04 +01:00
Janek c855760b38 Update README.md 2021-12-29 19:13:06 +01:00
Janek a982ffb7a7 Update README.md 2021-12-29 19:07:33 +01:00
Janek 5dc00608dc Update README.md 2021-12-29 19:02:21 +01:00
Janek 89353eda6a Update README.md
badges
2021-12-29 19:01:36 +01:00
Janek 456ec40959 Update README.md 2021-12-28 22:15:04 +01:00
Janek ad1194671a Merge pull request #99 from OpenI6X/janek/logical-switch-fix
Fixed clear action
2021-12-28 20:23:00 +01:00
ajjjjjjjj 594f9facbe Removed logical switches clipboard actions
Fixed clear action
2021-12-28 20:21:26 +01:00
Janek 89be9a6ff8 Merge pull request #98 from OpenI6X/janek/ext-module-pwr
Fixed external module power on PC9
2021-12-28 20:09:56 +01:00
ajjjjjjjj 5e1499e8d0 Fixed external module power on PC9 2021-12-28 20:04:00 +01:00
Janek b4138515d2 Merge pull request #96 from OpenI6X/janek/ci-improvements
CI build only on master
2021-12-26 19:43:13 +01:00
Janek 66cb7791a0 Merge pull request #97 from OpenI6X/janek/nice-size-report
Nice size report
2021-12-26 19:42:37 +01:00
ajjjjjjjj 52d8654ad2 Nice size report 2021-12-26 19:41:03 +01:00
ajjjjjjjj c0e50bc767 CI build only on master
single point of version entry
2021-12-26 19:12:45 +01:00
ajjjjjjjj 15ccf61ae7 CI improvements 2021-12-26 19:08:28 +01:00
ajjjjjjjj 3fab9104c3 CI build only on master
single point of version entry
2021-12-26 19:02:57 +01:00
Janek a7e611b054 Merge pull request #93 from OpenI6X/janek/circleci-bump-version
bump version on CI
2021-12-26 13:26:35 +01:00
ajjjjjjjj 4fe1c16b91 bump version on CI 2021-12-26 13:23:39 +01:00
Janek 82f949ee48 Merge pull request #92 from OpenI6X/janek/elrsv2-reboot-fix
ExpressLRS V2 popup reboot fix
2021-12-26 13:15:03 +01:00
ajjjjjjjj 083ae4127b Fixed ExpressLRS V2 popup reboot issue + code density optimizations
Use board name as boot debug name
Version 1.1.1
2021-12-26 13:07:56 +01:00
Janek ded430d4a1 Merge pull request #88 from OpenI6X/janek/eeprom-100k
EEPROM back to 100k
2021-12-22 21:20:59 +01:00
ajjjjjjjj ac519245bb - EEPROM back to 100k
- reverted task count 3 -> 2
2021-12-22 21:18:17 +01:00
Janek eb81636337 Merge pull request #87 from OpenI6X/janek/i6x-elrs
Correct name + ELRSV2 screen update rate
2021-12-22 20:45:40 +01:00
Janek c0d64ace98 Merge pull request #86 from OpenI6X/janek/blank-screen-fix
Blank screen fix
2021-12-22 20:45:21 +01:00
ajjjjjjjj 82f787e889 - Use correct name according to FlySky website - i6X instead of I6X.
- Faster update ELRSV2 screen when idle.
2021-12-22 20:38:03 +01:00
ajjjjjjjj 3a67e84c41 Blank screen fix 2021-12-22 20:35:52 +01:00
Janek 706daf27ad Merge pull request #81 from OpenI6X/janek/1.1
OpenI6X 1.1 - to make it short
2021-12-19 16:02:46 +01:00
ajjjjjjjj cd954a4316 Fixed custom func regression 2021-12-19 15:48:08 +01:00
ajjjjjjjj 9a19975fec Fixed many reboot issues.
Fixed mixer scheduler regression.
Fixed and optimized lcd driver.
Reduced RTOS task max count.
Increased telemetry slots count.
ExpressLRS V2.0 - better mimic ELRSV2.lua, fixed minor issues.
Updated button and USB modes labels.
Reduced FLASH and RAM usage.
Renamed PCBI^ to PCBI6X to reduce confussion.
Use OpenI6X branding and valid version.
Code cleanup.
2021-12-19 15:34:12 +01:00
Janek 0c59088b2f Update README.md 2021-12-16 06:58:52 +01:00
Janek 808bb43149 Update README.md 2021-12-16 06:54:04 +01:00
Janek 10e89bcb21 Update README.md 2021-12-14 14:21:30 +01:00
Mariano Dupont 11a01b7910 Disabled GVAR on ELRSv2 version as it doesn't fit 2021-12-14 09:30:59 -03:00
Mariano Dupont 1bb564eadf Removed GVARS flag override 2021-12-14 09:26:07 -03:00
Mariano Dupont b0b0117185 Merge branch 'master' of github.com:marianomd/opentx 2021-12-14 08:17:29 -03:00
Mariano Dupont 30b418fd5d Added GVARS to elrsv2 version 2021-12-14 08:17:16 -03:00
Mariano Dupont 1625d58d00 Update README.md 2021-12-13 21:26:09 -03:00
Mariano Dupont 1368f19f23 Update README.md 2021-12-13 21:25:31 -03:00
Mariano Dupont 09e3a81479 Making a backup with stm32cubeprogrammer 2021-12-13 21:16:58 -03:00
Mariano Dupont 9889681c93 smaller jpg 2021-12-13 20:59:25 -03:00
Mariano Dupont 3702f67c9f Merge branch 'master' of github.com:marianomd/opentx 2021-12-13 20:54:45 -03:00
Mariano Dupont 32ea418841 DFU pinout 2021-12-13 20:54:31 -03:00
Janek e7678f0dff Merge pull request #79 from OpenI6X/janek/mega-baud-lower
Removed 3.75M Mega baud rate, improved OK label
2021-12-13 21:48:22 +01:00
Janek 74050d1f9a Update README.md 2021-12-13 21:41:46 +01:00
Janek 1b9d302f9c Update README.md 2021-12-13 21:40:21 +01:00
ajjjjjjjj 423cef3384 Removed 3.75M Mega baud rate, improved label 2021-12-13 21:32:12 +01:00
Mariano Dupont f1657bf059 Update README.md 2021-12-13 17:19:35 -03:00
Mariano Dupont 8635906ec2 Merge pull request #78 from OpenI6X/2.3_M0
Back to 16 channels. Main view channels paging fixed.
2021-12-13 17:15:18 -03:00
Mariano Dupont 1675fa1b96 Merge branch '2.3_M0' of github.com:marianomd/opentx into 2.3_M0 2021-12-13 17:12:49 -03:00
Mariano Dupont ac7210c92d Back to 16 channels. Main view channels paging fixed. 2021-12-13 17:12:29 -03:00
Mariano Dupont fecb71a50c Merge pull request #77 from OpenI6X/ppm-in
Implements PPM IN. Fixes PPM protocol selection after using CRSF.
2021-12-13 17:04:41 -03:00
Mariano Dupont 1e40235bc4 Merge remote-tracking branch 'origin/2.3_M0' into ppm-in 2021-12-13 17:03:50 -03:00
Janek 556595fa84 Merge pull request #75 from OpenI6X/circleci-project-setup
Circleci project setup
2021-12-13 20:49:11 +01:00
Mariano Dupont 156a90302a Merge remote-tracking branch 'origin/2.3_M0' into ppm-in 2021-12-13 15:06:37 -03:00
Mariano Dupont d7a1f59cdb PPM in working. PPM - CRSF switching fixed 2021-12-13 15:05:36 -03:00
Janek 842c8b417b Merge pull request #76 from OpenI6X/janek/elrsv2-stability
ExpressELRS V2 stability fixes
2021-12-13 17:54:40 +01:00
ajjjjjjjj 567f312c5f Stability fixes, play nice with USB mass storage. 2021-12-13 17:42:21 +01:00
ajjjjjjjj a6da50aa1c Stability fixes, play nice with USB mass storage. 2021-12-13 14:54:07 +01:00
Mariano Dupont 35bebc9bbd wip 2021-12-13 00:40:30 -03:00
Mariano Dupont cfd5a8bb64 Merge remote-tracking branch 'origin/2.3_M0' into ppm-in 2021-12-12 19:15:05 -03:00
Mariano Dupont 8443a05152 wip 2021-12-12 19:11:34 -03:00
Mariano Dupont 419929f5a6 wip 2021-12-12 18:08:03 -03:00
ajjjjjjjj 511e34a025 CircleCI multiple pipelines attempt 2021-12-12 14:25:05 +01:00
ajjjjjjjj 35fda853ae CircleCI multiple pipelines attempt 2021-12-12 14:18:32 +01:00
ajjjjjjjj 03a8b68011 CircleCI multiple pipelines attempt 2021-12-12 14:13:02 +01:00
ajjjjjjjj 1715725d3e CircleCI multiple pipelines attempt 2021-12-12 14:11:49 +01:00
ajjjjjjjj 273cc54189 CircleCI multiple pipelines attempt 2021-12-12 14:05:16 +01:00
ajjjjjjjj d01288a73d CircleCI multiple pipelines attempt 2021-12-12 13:59:38 +01:00
ajjjjjjjj aac4957fc4 CircleCI multiple pipelines attempt 2021-12-12 13:56:41 +01:00
ajjjjjjjj 9214909d36 CircleCI multiple pipelines attempt 2021-12-12 13:53:52 +01:00
ajjjjjjjj 642a453fbf CircleCI multiple pipelines attempt 2021-12-12 13:51:13 +01:00
ajjjjjjjj 8ee824e02d CircleCI multiple pipelines attempt 2021-12-12 13:47:56 +01:00
ajjjjjjjj 0263691084 CircleCI multiple pipelines attempt 2021-12-12 13:45:20 +01:00
ajjjjjjjj 1ed1225123 CircleCI multiple pipelines attempt 2021-12-12 13:43:00 +01:00
ajjjjjjjj d36b177d20 CircleCI multiple pipelines attempt 2021-12-12 13:36:55 +01:00
ajjjjjjjj e009b88261 CircleCI multiple pipelines attempt 2021-12-12 13:32:32 +01:00
ajjjjjjjj 6e33f777bb CircleCI multiple pipelines attempt 2021-12-12 13:28:15 +01:00
ajjjjjjjj 7b371203ae CircleCI multiple pipelines attempt 2021-12-12 13:20:20 +01:00
ajjjjjjjj 7297bc8c21 CircleCI multiple pipelines attempt 2021-12-12 13:15:28 +01:00
ajjjjjjjj 572d585571 CircleCI multiple pipelines attempt 2021-12-12 13:10:01 +01:00
ajjjjjjjj 6f54bb3142 CircleCI multiple pipelines attempt 2021-12-12 13:05:45 +01:00
ajjjjjjjj 4df2f462e6 CircleCI multiple pipelines attempt 2021-12-12 13:02:47 +01:00
ajjjjjjjj 893b31e9ea CircleCI multiple pipelines attempt 2021-12-12 12:58:18 +01:00
ajjjjjjjj 726c33bbd6 CircleCI multiple pipelines attempt 2021-12-12 12:52:50 +01:00
ajjjjjjjj 7ab6edd608 CircleCI multiple pipelines attempt 2021-12-12 12:52:09 +01:00
ajjjjjjjj c921404082 CircleCI multiple pipelines attempt 2021-12-12 12:49:36 +01:00
ajjjjjjjj 5d9c549776 CircleCI multiple pipelines attempt 2021-12-12 12:47:55 +01:00
ajjjjjjjj 3711ac7376 CircleCI multiple pipelines attempt 2021-12-12 12:38:56 +01:00
ajjjjjjjj 8861f9169b CircleCI multiple pipelines attempt 2021-12-12 12:34:59 +01:00
ajjjjjjjj 1c69edf85e CircleCI multiple pipelines attempt 2021-12-12 12:32:02 +01:00
ajjjjjjjj 77b652ca53 CircleCI multiple pipelines attempt 2021-12-12 12:31:01 +01:00
ajjjjjjjj 7268d0036b CircleCI multiple pipelines attempt 2021-12-12 12:28:27 +01:00
ajjjjjjjj 5feae54108 CircleCI multiple pipelines attempt 2021-12-12 12:22:28 +01:00
ajjjjjjjj ad602d8316 CircleCI multiple pipelines attempt 2021-12-12 11:50:16 +01:00
ajjjjjjjj e61776f642 CircleCI multiple pipelines attempt 2021-12-12 11:44:15 +01:00
ajjjjjjjj 4a101b6d28 CircleCI multiple pipelines attempt 2021-12-12 11:41:11 +01:00
ajjjjjjjj 9d1f1b1048 CircleCI multiple pipelines attempt 2021-12-12 11:36:59 +01:00
ajjjjjjjj 2b9630f869 CircleCI multiple pipelines attempt 2021-12-12 11:24:47 +01:00
ajjjjjjjj 1fcb0d524b CircleCI multiple pipelines attempt 2021-12-12 11:18:35 +01:00
ajjjjjjjj d29e48f9dd CircleCI multiple pipelines attempt 2021-12-12 11:15:32 +01:00
ajjjjjjjj 3cfcde5e53 CircleCI multiple pipelines attempt 2021-12-12 11:06:42 +01:00
ajjjjjjjj d0de86c8e4 CircleCI multiple pipelines attempt 2021-12-12 11:01:20 +01:00
Mariano Dupont dfa00cfa2b PPM IN wip 2021-12-11 15:45:47 -03:00
479 changed files with 10307 additions and 91247 deletions
+79 -60
View File
@@ -2,68 +2,87 @@
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
build-elrsv2:
machine: true
steps:
- checkout
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=NO GVARS=NO LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO PCBI6_ELRSV2=YES" -v $PWD:/opentx vitass/opentx-fw-build
- store_artifacts:
path: opentx-i6x-2.3.0.bin
destination: ./artifacts/opentx-i6x-elrsv2-<< pipeline.git.tag >>.bin
build-gvars:
machine: true
steps:
- checkout
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=NO GVARS=YES LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO" -v $PWD:/opentx vitass/opentx-fw-build
- store_artifacts:
path: opentx-i6x-2.3.0.bin
destination: ./artifacts/opentx-i6x-gvars-<< pipeline.git.tag >>.bin
build-heli:
machine: true
steps:
- checkout
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=YES GVARS=YES LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO" -v $PWD:/opentx vitass/opentx-fw-build
- store_artifacts:
path: opentx-i6x-2.3.0.bin
destination: ./artifacts/opentx-i6x-heli-<< pipeline.git.tag >>.bin
publish-github-release:
build-std:
docker:
- image: cibuilds/github:0.13
- image: ajjjjjjjj/opentx-docker-i6x:1.4.0
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish Release on GitHub"
command: |
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete latest ./artifacts/
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
- checkout
- run: |
python3 ./tools/build-flysky.py -bI6X -tALL $PWD/
- store_artifacts:
path: output
build-std-dfplayer:
docker:
- image: ajjjjjjjj/opentx-docker-i6x:1.4.0
steps:
- checkout
- run: |
python3 ./tools/build-flysky.py -bI6X_DFPLAYER -tALL $PWD/
- store_artifacts:
path: output
build-heli:
docker:
- image: ajjjjjjjj/opentx-docker-i6x:1.4.0
steps:
- checkout
- run: |
python3 ./tools/build-flysky.py -bI6X_HELI -tALL $PWD/
- store_artifacts:
path: output
build-heli-dfplayer:
docker:
- image: ajjjjjjjj/opentx-docker-i6x:1.4.0
steps:
- checkout
- run: |
python3 ./tools/build-flysky.py -bI6X_HELI_DFPLAYER -tALL $PWD/
- store_artifacts:
path: output
build-en:
docker:
- image: ajjjjjjjj/opentx-docker-i6x:1.4.0
steps:
- checkout
- run: |
python3 ./tools/build-flysky.py -bI6X_DFPLAYER -bI6X_HELI -bI6X -tEN $PWD/
- store_artifacts:
path: output
workflows:
openi6x-workflow:
openi6x-release-workflow:
jobs:
- build-elrsv2
# filters:
# branches:
# ignore: /.*/
# tags:
# only: /.*-release$/
- build-gvars
# filters:
# branches:
# ignore: /.*/
# tags:
# only: /.*-release$/
- build-heli
# filters:
# branches:
# ignore: /.*/
# tags:
# only: /.*-release$/
- publish-github-release:
requires:
- build-elrsv2
- build-gvars
- build-heli
- build-en:
filters:
branches:
ignore:
- master
- /.*-maintenance/
- build-std:
filters:
branches:
only:
- master
- /.*-maintenance/
- build-std-dfplayer:
filters:
branches:
only:
- master
- /.*-maintenance/
- build-heli:
filters:
branches:
only:
- master
- /.*-maintenance/
- build-heli-dfplayer:
filters:
branches:
only:
- master
- /.*-maintenance/
+2 -3
View File
@@ -26,6 +26,5 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**General information**
- OpenTX version (e.g. 2.1.23 or N123)
- Hardware (e.g. Frsky X9D+ or 9X Pro)
- OpenTX Companion (e.g. 2.1.23 on Ubuntu 16.04)
- OpenI6X version (e.g. 1.8.0)
- Hardware (e.g. external module model)
+1
View File
@@ -20,3 +20,4 @@ radio/src/CmakeFiles/*
build.sh
firm.sh
flash.sh
*.patch
+7
View File
@@ -0,0 +1,7 @@
# .gitpod.yml
image:
file: Dockerfile
tasks:
- init: echo 'Welcome!'
- command: mkdir build && cd build
+3 -3
View File
@@ -1,7 +1,7 @@
project(OpenTX)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "3")
set(VERSION_MINOR "1")
set(VERSION_REVISION "0")
set(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
@@ -9,7 +9,7 @@ set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFI
set(SDCARD_REVISION "0018")
set(SDCARD_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}V${SDCARD_REVISION})
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.13)
cmake_policy(SET CMP0020 NEW)
cmake_policy(SET CMP0023 OLD)
if(POLICY CMP0042)
@@ -43,7 +43,7 @@ today(DATE)
now(TIME)
git_id(GIT_STR)
message(STATUS "OpenTX ${VERSION} @${GIT_STR}")
message(STATUS "OpenI6X ${VERSION} @${GIT_STR}")
# options shared by all targets
+46
View File
@@ -0,0 +1,46 @@
# Dockerfile
FROM archlinux:base
RUN pacman -Syu --noconfirm
# Install misc packages
RUN pacman -S --noconfirm \
7zip \
arm-none-eabi-gcc \
arm-none-eabi-newlib \
base-devel \
bc \
cmake \
cpio \
curl \
dos2unix \
erofs-utils \
git \
less \
nano \
python \
python-pip \
python-pilkit \
screen \
tree \
unzip \
vim \
wget \
zip
# HACK: Allow base-devel to run with root user
RUN sed -i '/E_ROOT/d' /usr/bin/makepkg
# Install yay
RUN git clone https://aur.archlinux.org/yay-bin.git /tmp/yay-bin && \
cd /tmp/yay-bin && \
makepkg -si --noconfirm && \
cd && rm -rf /tmp/yay-bin
#RUN git clone --recursive https://github.com/STMicroelectronics/STM32CubeG0.git /workspace/STM32CubeG0
#RUN git clone --recursive https://github.com/STMicroelectronics/STM32CubeG4.git /workspace/STM32CubeG4
# Personal dir dotfiles
#ADD home /home/
# Personal uploader scripts
#ADD root/bin /usr/local/bin/
View File
+50 -43
View File
@@ -1,52 +1,59 @@
# FlySky i6x port of OpenTX
[![Release](https://img.shields.io/github/v/release/OpenI6X/opentx?include_prereleases)](https://github.com/OpenI6X/opentx/releases/latest)
[![GitHub all releases](https://img.shields.io/github/downloads/OpenI6X/opentx/total)](https://github.com/OpenI6X/opentx/releases)
[![GitHub license](https://img.shields.io/github/license/OpenI6X/opentx)](https://github.com/openi6x/opentx/blob/master/LICENSE)
![OpenI6X](https://circleci.com/gh/OpenI6X/opentx.svg?style=shield)
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/openi6x/opentx/tree/master)
[![Discord](https://img.shields.io/discord/973289741862727741.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/3vKfYNTVa2)
This is a port of OpenTX for the venerable Flysky I6X RC radio transmitter. You can find the latest build and some instructions and videos contributed by fellow early adopters in the [RCGroups thread](https://www.rcgroups.com/forums/showthread.php?3916435-FlySky-I6X-port-of-OpenTX)
![Banner](https://github.com/OpenI6X/opentx/blob/master/doc/flysky/banner.png?raw=true)
## Implemented features
# Custom OpenTX / EdgeTX for Flysky FS-i6X
* AFHDS2A protocol
* PPM out
* CRSF working with ExpressLRS and Crossfire modules at rates from 115k to 3.75M bauds, CRSFshot enabled
* Telemetry
* Audio tones, alarms and vario custom implementation (Janek)
* USB (To enable on standard cable: General Settings > USB Detect set to "Once") (Janek)
* Joystick mode (Janek)
* Mass Storage to backup/restore eeprom (Janek)
* ExpressLRS V1.x configuration in model setup
## Users Telegram group
Join our [Discord](https://discord.gg/3vKfYNTVa2), [RCGroups](https://www.rcgroups.com/forums/showthread.php?3916435-FlySky-I6X-port-of-OpenTX) or [Telegram](https://t.me/otx_flysky_i6x) to contribute, discuss or get help.<br>
https://t.me/otx_flysky_i6x
## Instructions
## Navigation:
- [FlySky i6X user interface](https://github.com/OpenI6X/opentx/wiki/Manual) and other differences to official EdgeTX/OpenTX devices.<br>
- [EdgeTX manual](https://manual.edgetx.org/bw-radios)
- [How to install, upgrade or restore firmware](https://github.com/OpenI6X/opentx/wiki/Flashing-&-Upgrading)<br>
- [Developers guide, how to build](https://github.com/OpenI6X/opentx/wiki/Development)<br>
- [Modifications](https://github.com/OpenI6X/opentx/wiki/Modifications)<br>
| Key | Function |
| --- | --- |
| UP | Hold for stats |
| DOWN | Hold for telemetry |
| OK | Hold for Model menu |
| CANCEL | EXIT. Hold for graceful shutdown (Needed to save timers) |
| BIND | Go RIGHT. Go to next PAGE. Hold for general menu. |
| RIGHT POT | Scroll right or left |
## Comparison
## ST-Link pinout
| Feature | FlySky i6X | OpenI6X |
|---------------------------|------------|------------------------------|
| Channels | 6/10 | 16 |
| Mixers | 3 | 32 |
| Models | 20 | 20 / unlimited<sup>[1]</sup> |
| Protocols | AFHDS, AFHDS2A, PPM | AFHDS2A + 16Ch modes, PPM, CRSF |
| Trainer | PPM | PPM, SBUS |
| Timers | _ | ✓ |
| Voice annoucements | _ | ✓<sup>[2]</sup> |
| Variometer | _ | ✓ |
| ExpressLRS ready | _ | ✓ Configurator built-in (no need for LUA) |
| Adjustable screen brightness | _ | ✓<sup>[3]</sup> |
| USB Modes | Joystick | Joystick, Storage, Serial (Telemetry mirror, Debug) |
| AUX Serial port | _ | ✓ SBUS Trainer, Telemetry mirror, Debug |
| FlySky FS-HZCZ03-ADJ Gimbal support | _ | ✓<sup>[4]</sup> |
| Languages | EN, CN | PL, EN, CZ, DE, ES, FI, FR, IT, NL, PT, SE |
![ST-Link pinout](https://raw.githubusercontent.com/marianomd/opentx/2.3_M0/doc/flysky/flysky-i6x%20st-link%20pinout%20small.png)
<sub>[1] Unlimited by using USB mass storage mode eeprom backup/restore.</sub><br>
<sub>[2] By adding DFPlayer, see [instructions](https://github.com/OpenI6X/opentx/wiki/Modifications#dfplayer) in wiki.</sub><br>
<sub>[3] By wiring 2 pads, see [instructions](https://github.com/OpenI6X/opentx/wiki/Modifications#adjustable-backlight-level) in wiki.</sub><br>
<sub>[4] See [instructions](https://github.com/OpenI6X/opentx/wiki/Modifications#flysky-fs-hzcz03-adj-gimbal) in wiki.</sub>
## Credits
## Linux instructions
### Compile
`docker run --rm -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=NO GVARS=NO LUA_COMPILER=NO MULTIMODULE=NO DEBUG=YES" -v $PWD:/opentx vitass/opentx-fw-build`
### Flash
`sudo st-flash write <file_to_flash>.bin 0x08000000`
### Debug tty:
`sudo cat /dev/ttyUSB0 115200`
## Contributors
* Janek (@ajjjjjjjj) ongoing collaboration.
* All the RF code was taken from the great KotelloRC's erfly6: Er9X for i6 and i6x. You can find his project here: https://bitbucket.org/KotelloRC/erfly6/src/master/
* ADC code taken from OpenGround: https://github.com/fishpepper/OpenGround
* This work is based on Jakub's (qba667) work and is forked from his repo.
* All the contributors of OpenTX.
* Janek ([ajjjjjjjj](https://github.com/ajjjjjjjj)), continues Kuba's and Mariano's work, added sound, USB, ExpressLRS V2/V3 configuration, telemetry mirror, SBUS trainer, new/fixed drivers, ports, bugfixes.
* Mariano ([marianomd](https://github.com/marianomd)), continued Kuba's work and made it up to useable condition! Added gimbals, buttons, AFHDS2A, PPM, CRSF.
* Kuba ([qba667](https://github.com/qba667)), started this work and made this project possible, it is forked from his repo.
* Wilhelm ([wimalopaan](https://github.com/wimalopaan)) added 16 channels SBUS16 / IBUS16 modes.
* Rafael ([rafolg](https://github.com/rafolg)), ported FlySky Hall Gimbal support from EdgeTX.
* Tom ([tmcadam](https://github.com/tmcadam)) fixed AFHDS2A PWM mode selection.
* The internal RF code was taken from the great KotelloRC's [erfly6: Er9X for i6 and i6x](https://bitbucket.org/KotelloRC/erfly6/src/master/).
* Some of the internal RF fixes are a result of analysing [pascallanger's](https://github.com/pascallanger) [DIY-Multiprotocol-TX-Module](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module).
* ExpressLRS configurator is based on elrsV2/V3.lua from [ExpressLRS](https://github.com/ExpressLRS/ExpressLRS).
* Some of the ports are from [EdgeTX](https://github.com/EdgeTX/edgetx/).
* ADC code taken from [OpenGround](https://github.com/fishpepper/OpenGround).
* All the contributors of [OpenTX](https://github.com/opentx/opentx/).
+25 -15
View File
@@ -161,24 +161,24 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
if (func <= FuncInstantTrim) {
return QString("%1").arg(param);
}
else if (func==FuncLogs) {
else if (func == FuncLogs) {
return QString("%1").arg(param/10.0) + tr("s");
}
else if (func==FuncPlaySound) {
else if (func == FuncPlaySound) {
CustomFunctionData::populatePlaySoundParams(qs);
if (param>=0 && param<(int)qs.count())
return qs.at(param);
else
return tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (func==FuncPlayHaptic) {
else if (func == FuncPlayHaptic) {
CustomFunctionData::populateHapticParams(qs);
if (param>=0 && param<(int)qs.count())
return qs.at(param);
else
return tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if (func==FuncReset) {
else if (func == FuncReset) {
QComboBox cb;
CustomFunctionData::populateResetParams(model, &cb);
int pos = cb.findData(param);
@@ -187,11 +187,11 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
else
return tr("<font color=red><b>Inconsistent parameter</b></font>");
}
else if ((func==FuncVolume)|| (func==FuncPlayValue)) {
else if (func == FuncVolume || func == FuncPlayValue || func == FuncBacklight) {
RawSource item(param);
return item.toString(model);
}
else if ((func==FuncPlayPrompt) || (func==FuncPlayBoth)) {
else if (func == FuncPlayPrompt || func == FuncPlayBoth) {
if ( getCurrentFirmware()->getCapability(VoicesAsNumbers)) {
return QString("%1").arg(param);
}
@@ -199,7 +199,7 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
return paramarm;
}
}
else if ((func>=FuncAdjustGV1) && (func<FuncCount)) {
else if (func >= FuncAdjustGV1 && func < FuncCount) {
switch (adjustMode) {
case FUNC_ADJUST_GVAR_CONSTANT:
return tr("Value ")+QString("%1").arg(param);
@@ -207,8 +207,17 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
case FUNC_ADJUST_GVAR_GVAR:
return RawSource(param).toString();
case FUNC_ADJUST_GVAR_INCDEC:
if (param==0) return tr("Decr:") + " -1";
else return tr("Incr:") + " +1";
float val;
QString unit;
if (IS_ARM(getCurrentBoard())) {
val = param * model->gvarData[func - FuncAdjustGV1].multiplierGet();
unit = model->gvarData[func - FuncAdjustGV1].unitToString();
}
else {
val = param;
unit = "";
}
return QString("Increment: %1%2").arg(val).arg(unit);
}
}
return "";
@@ -230,11 +239,12 @@ QString CustomFunctionData::repeatToString() const
QString CustomFunctionData::enabledToString() const
{
if ((func>=FuncOverrideCH1 && func<=FuncOverrideCH32) ||
(func>=FuncAdjustGV1 && func<=FuncAdjustGVLast) ||
(func==FuncReset) ||
(func>=FuncSetTimer1 && func<=FuncSetTimer2) ||
(func==FuncVolume) ||
if ((func >= FuncOverrideCH1 && func <= FuncOverrideCH32) ||
(func >= FuncAdjustGV1 && func <= FuncAdjustGVLast) ||
(func == FuncReset) ||
(func >= FuncSetTimer1 && func <= FuncSetTimer2) ||
(func == FuncVolume) ||
(func == FuncBacklight) ||
(func <= FuncInstantTrim)) {
if (!enabled) {
return tr("DISABLED");
@@ -248,7 +258,7 @@ void CustomFunctionData::convert(RadioDataConversionState & cstate)
cstate.setComponent(tr("CFN"), 8);
cstate.setSubComp(nameToString(cstate.subCompIdx, (cstate.toModel() ? false : true)));
swtch.convert(cstate);
if (func == FuncVolume || func == FuncPlayValue || (func >= FuncAdjustGV1 && func <= FuncAdjustGVLast && adjustMode == 1)) {
if (func == FuncVolume || func == FuncBacklight || func == FuncPlayValue || (func >= FuncAdjustGV1 && func <= FuncAdjustGVLast && adjustMode == 1)) {
param = RawSource(param).convert(cstate.withComponentField("PARAM")).toValue();
}
}
+3
View File
@@ -58,8 +58,11 @@ class SensorData {
TELEM_CELL_INDEX_4,
TELEM_CELL_INDEX_5,
TELEM_CELL_INDEX_6,
// TELEM_CELL_INDEX_7, // PCBI6X: uses RAM and I don't think someone will use 8S with i6X
// TELEM_CELL_INDEX_8,
TELEM_CELL_INDEX_HIGHEST,
TELEM_CELL_INDEX_DELTA,
TELEM_CELL_INDEX_LAST = TELEM_CELL_INDEX_DELTA
};
enum
+16 -8
View File
@@ -425,8 +425,16 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
fswtchParam[i]->setDecimals(model->gvarData[gvidx].prec);
fswtchParam[i]->setSingleStep(model->gvarData[gvidx].multiplierGet());
fswtchParam[i]->setSuffix(model->gvarData[gvidx].unitToString());
fswtchParam[i]->setMinimum(model->gvarData[gvidx].getMinPrec());
fswtchParam[i]->setMaximum(model->gvarData[gvidx].getMaxPrec());
if (cfn.adjustMode==FUNC_ADJUST_GVAR_INCDEC) {
double rng = abs(model->gvarData[gvidx].getMax() - model->gvarData[gvidx].getMin());
rng *= model->gvarData[gvidx].multiplierGet();
fswtchParam[i]->setMinimum(-rng);
fswtchParam[i]->setMaximum(rng);
}
else {
fswtchParam[i]->setMinimum(model->gvarData[gvidx].getMinPrec());
fswtchParam[i]->setMaximum(model->gvarData[gvidx].getMaxPrec());
}
fswtchParam[i]->setValue(cfn.param * model->gvarData[gvidx].multiplierGet());
}
else {
@@ -709,28 +717,28 @@ void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, uint function, unsi
{
QStringList qs;
b->setModel(new QStandardItemModel(b)); // clear combo box but not any shared item model
if (function==FuncPlaySound) {
if (function == FuncPlaySound) {
CustomFunctionData::populatePlaySoundParams(qs);
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncPlayHaptic) {
else if (function == FuncPlayHaptic) {
CustomFunctionData::populateHapticParams(qs);
b->addItems(qs);
b->setCurrentIndex(value);
}
else if (function==FuncReset) {
else if (function == FuncReset) {
CustomFunctionData::populateResetParams(model, b, value);
}
else if (function==FuncVolume) {
else if (function == FuncVolume || function == FuncBacklight) {
b->setModel(rawSrcInputsItemModel);
b->setCurrentIndex(b->findData(value));
}
else if (function==FuncPlayValue) {
else if (function == FuncPlayValue) {
b->setModel(rawSrcAllItemModel);
b->setCurrentIndex(b->findData(value));
}
else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) {
else if (function >= FuncAdjustGV1 && function <= FuncAdjustGVLast) {
switch (adjustmode) {
case 1:
b->setModel(rawSrcInputsItemModel);
-381
View File
@@ -1,381 +0,0 @@
EESchema-LIBRARY Version 2.3 Date: 06/01/2017 11:42:37
#encoding utf-8
#
# +BATT
#
DEF +BATT #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -50 20 H I C CNN
F1 "+BATT" 0 100 30 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
X +BATT 1 0 0 0 U 20 20 0 0 W N
C 0 60 20 0 1 0 N
P 3 0 1 0 0 0 0 40 0 40 N
ENDDRAW
ENDDEF
#
# +HF
#
DEF +HF #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -50 20 H I C CNN
F1 "+HF" 0 100 50 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
X +BATT 1 0 0 0 U 20 20 0 0 W N
C 0 60 20 0 1 0 N
P 3 0 1 0 0 0 0 40 0 40 N
ENDDRAW
ENDDEF
#
# 4016
#
DEF 4016 U 0 0 Y Y 4 F N
F0 "U" 200 -149 40 H V C CNN
F1 "4016" 200 150 40 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
ALIAS 4066
DRAW
P 3 0 1 0 -100 -150 0 -50 0 -50 N
P 4 0 1 0 -100 0 100 100 100 -100 -100 0 N
P 4 0 1 0 -100 100 100 0 -100 -100 -100 100 N
X V- 7 0 -250 200 U 30 30 0 1 W
X V+ 14 0 250 200 D 30 30 0 1 W
X I/O 1 -300 0 200 R 40 40 1 1 P
X O/I 2 300 0 200 L 40 40 1 1 P
X ON 13 -300 -150 200 R 40 40 1 1 I
X O/I 3 300 0 200 L 40 40 2 1 P
X I/O 4 -300 0 200 R 40 40 2 1 P
X ON 5 -300 -150 200 R 40 40 2 1 I
X ON 6 -300 -150 200 R 40 40 3 1 I
X I/O 8 -300 0 200 R 40 40 3 1 P
X O/I 9 300 0 200 L 40 40 3 1 P
X O/I 10 300 0 200 L 40 40 4 1 P
X I/O 11 -300 0 200 R 40 40 4 1 P
X ON 12 -300 -150 200 R 40 40 4 1 I
ENDDRAW
ENDDEF
#
# 7805
#
DEF 7805 U 0 30 N Y 1 F N
F0 "U" 150 -196 60 H V C CNN
F1 "7805" 0 200 60 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
ALIAS LM7805 LM7812 78L05
DRAW
S -200 -150 200 150 0 1 0 N
X VI VI -400 50 200 R 40 40 1 1 I
X VO VO 400 50 200 L 40 40 1 1 w
X GND GND 0 -250 100 U 40 40 1 1 I
ENDDRAW
ENDDEF
#
# C
#
DEF C C 0 10 N Y 1 F N
F0 "C" 0 100 40 H V L CNN
F1 "C" 6 -85 40 H V L CNN
F2 "~" 38 -150 30 H V C CNN
F3 "~" 0 0 60 H V C CNN
$FPLIST
SM*
C?
C1-1
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 200 170 D 40 40 1 1 P
X ~ 2 0 -200 170 U 40 40 1 1 P
ENDDRAW
ENDDEF
#
# CONN_1
#
DEF ~CONN_1 P 0 30 N N 1 F N
F0 "P" 80 0 40 H V L CNN
F1 "CONN_1" 0 55 30 H I C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
C 0 0 31 0 1 0 N
P 2 0 1 0 -30 0 -50 0 N
X 1 1 -150 0 100 R 60 60 1 1 P
ENDDRAW
ENDDEF
#
# DIODESCH
#
DEF DIODESCH D 0 40 N N 1 F N
F0 "D" 0 100 40 H V C CNN
F1 "DIODESCH" 0 -100 40 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
$FPLIST
D?
S*
$ENDFPLIST
DRAW
P 3 0 1 0 -50 50 50 0 -50 -50 F
P 6 0 1 8 75 25 75 50 50 50 50 -50 25 -50 25 -25 N
X A 1 -200 0 150 R 40 40 1 1 P
X K 2 200 0 150 L 40 40 1 1 P
ENDDRAW
ENDDEF
#
# GND
#
DEF ~GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 0 30 H I C CNN
F1 "GND" 0 -70 30 H I C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
X GND 1 0 0 0 U 30 30 1 1 W N
ENDDRAW
ENDDEF
#
# LED
#
DEF LED D 0 40 Y N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "LED" 0 -100 50 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
$FPLIST
LED-3MM
LED-5MM
LED-10MM
LED-0603
LED-0805
LED-1206
LEDV
$ENDFPLIST
DRAW
P 2 0 1 0 50 50 50 -50 N
P 3 0 1 0 -50 50 50 0 -50 -50 F
P 3 0 1 0 65 -40 110 -80 105 -55 N
P 3 0 1 0 80 -25 125 -65 120 -40 N
X A 1 -200 0 150 R 40 40 1 1 P
X K 2 200 0 150 L 40 40 1 1 P
ENDDRAW
ENDDEF
#
# LM2903
#
DEF LM2903 U 0 20 Y Y 2 F N
F0 "U" 150 150 60 H V C CNN
F1 "LM2903" 200 -200 60 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
ALIAS LM293 LM393 LM193
DRAW
P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N
X ~ 1 500 0 300 L 40 40 1 1 C
X _ 2 -500 -100 300 R 40 40 1 1 I
X + 3 -500 100 300 R 40 40 1 1 I
X V- 4 -100 -400 250 U 40 40 1 1 W
X V+ 8 -100 400 250 D 40 40 1 1 W
X V- 4 -100 -400 250 U 40 40 2 1 W
X + 5 -500 100 300 R 40 40 2 1 I
X _ 6 -500 -100 300 R 40 40 2 1 I
X ~ 7 500 0 300 L 40 40 2 1 C
X V+ 8 -100 400 250 D 40 40 2 1 W
ENDDRAW
ENDDEF
#
# MOS_N
#
DEF MOS_N Q 0 0 N Y 1 F N
F0 "Q" 10 170 60 H V R CNN
F1 "MOS_N" 10 -150 60 H V R CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
ALIAS MOSFET_N
DRAW
P 2 0 1 8 -50 -100 -50 100 N
P 2 0 1 10 0 -150 0 150 N
P 2 0 1 0 100 -100 0 -100 N
P 2 0 1 0 100 100 0 100 N
P 3 0 1 8 100 -100 100 0 50 0 N
P 5 0 1 8 50 30 50 -30 0 0 50 30 50 30 N
X D D 100 200 100 D 40 40 1 1 P
X G G -200 0 150 R 40 40 1 1 I
X S S 100 -200 100 U 40 40 1 1 P
ENDDRAW
ENDDEF
#
# MOS_P
#
DEF MOS_P Q 0 40 Y N 1 F N
F0 "Q" 0 190 60 H V R CNN
F1 "MOS_P" 0 -180 60 H V R CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
ALIAS MOSFET_P
DRAW
P 2 0 1 8 -50 -100 -50 100 N
P 2 0 1 10 0 -150 0 150 N
P 2 0 1 8 30 0 0 0 N
P 2 0 1 0 100 -100 0 -100 N
P 2 0 1 0 100 100 0 100 N
P 3 0 1 0 80 0 100 0 100 -100 N
P 5 0 1 8 30 40 30 -30 80 0 30 40 30 40 N
X D D 100 200 100 D 40 40 1 1 P
X G G -200 0 150 R 40 40 1 1 I
X S S 100 -200 100 U 40 40 1 1 P
ENDDRAW
ENDDEF
#
# POT
#
DEF POT RV 0 40 Y N 1 F N
F0 "RV" 0 -100 50 H V C CNN
F1 "POT" 0 0 50 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
S -150 50 150 -50 0 1 0 N
P 3 0 1 0 0 50 -20 70 20 70 F
X 1 1 -250 0 100 R 40 40 1 1 P
X 2 2 0 150 80 D 40 40 1 1 P
X 3 3 250 0 100 L 40 40 1 1 P
ENDDRAW
ENDDEF
#
# R
#
DEF R R 0 0 N Y 1 F N
F0 "R" 80 0 40 V V C CNN
F1 "R" 7 1 40 V V C CNN
F2 "~" -70 0 30 V V C CNN
F3 "~" 0 0 30 H V C CNN
$FPLIST
R?
SM0603
SM0805
R?-*
SM1206
$ENDFPLIST
DRAW
S -40 150 40 -150 0 1 12 N
X ~ 1 0 250 100 D 60 60 1 1 P
X ~ 2 0 -250 100 U 60 60 1 1 P
ENDDRAW
ENDDEF
#
# SPEAKER
#
DEF SPEAKER SP 0 0 N Y 1 F N
F0 "SP" -100 250 70 H V C CNN
F1 "SPEAKER" -100 -250 70 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
P 4 0 0 0 100 150 250 300 250 -300 100 -150 N
P 5 0 0 0 -100 150 100 150 100 -150 -100 -150 -100 150 F
X 1 1 -300 100 200 R 40 40 1 1 I
X 2 2 -300 -100 200 R 40 40 1 1 I
ENDDRAW
ENDDEF
#
# SPST
#
DEF SPST SW 0 0 N Y 1 F N
F0 "SW" 0 100 70 H V C CNN
F1 "SPST" 0 -100 70 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
C -150 0 50 0 0 0 N
C 150 0 50 0 0 0 N
P 2 0 0 0 -100 0 100 100 N
X 1 1 -500 0 300 R 70 70 1 1 I
X 2 2 500 0 300 L 70 70 1 1 I
ENDDRAW
ENDDEF
#
# SW
#
DEF SW SW 0 40 N N 1 F N
F0 "SW" 0 100 50 H V C CNN
F1 "SW" 0 0 50 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
P 2 0 1 0 -100 0 100 50 N
X 1 1 -300 0 200 R 60 60 0 1 P I
X 2 2 300 0 200 L 60 60 0 1 P I
ENDDRAW
ENDDEF
#
# SW_PUSH
#
DEF SW_PUSH SW 0 40 N N 1 F N
F0 "SW" 150 110 50 H V C CNN
F1 "SW_PUSH" 0 -80 50 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
S -170 50 170 60 0 1 0 N
P 4 0 1 0 -40 60 -30 90 30 90 40 60 N
X 1 1 -300 0 200 R 60 60 0 1 P I
X 2 2 300 0 200 L 60 60 0 1 P I
ENDDRAW
ENDDEF
#
# TLP290
#
DEF TLP290 IC 0 40 Y Y 1 F N
F0 "IC" -213 178 40 H V C CNN
F1 "TLP290" 149 -184 40 H V C CNN
F2 "SOP4" -164 -174 29 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
C -175 -100 5 0 1 0 N
C -175 100 5 0 1 0 N
S -250 150 250 -150 0 1 10 f
P 2 0 1 10 -200 25 -150 25 N
P 2 0 1 0 -175 -25 -175 -100 N
P 2 0 1 0 -175 25 -175 100 N
P 2 0 1 10 -125 -25 -75 -25 N
P 2 0 1 0 100 25 175 100 N
P 2 0 1 0 175 -100 100 -25 F
P 2 0 1 0 175 -100 250 -100 N
P 2 0 1 0 175 100 250 100 N
P 3 0 1 0 -250 100 -100 100 -100 25 N
P 3 0 1 0 -100 -25 -100 -100 -250 -100 N
P 3 0 1 20 100 75 100 -75 100 -75 N
P 4 0 1 10 -175 25 -200 -25 -150 -25 -175 25 F
P 4 0 1 10 -100 -25 -125 25 -75 25 -100 -25 F
P 4 0 1 0 -20 10 1 30 1 10 31 40 N
P 4 0 1 0 31 40 11 30 21 20 31 40 N
P 5 0 1 0 120 -65 140 -45 160 -85 120 -65 120 -65 F
P 7 0 1 0 -20 -30 1 -10 1 -30 31 0 11 -10 21 -20 31 0 N
X ~ 1 -350 100 100 R 40 40 1 1 P
X ~ 2 -350 -100 100 R 40 40 1 1 P
X ~ 3 350 -100 100 L 40 40 1 1 P
X ~ 4 350 100 100 L 40 40 1 1 P
ENDDRAW
ENDDEF
#
# VCC
#
DEF VCC #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 100 30 H I C CNN
F1 "VCC" 0 100 30 H V C CNN
F2 "~" 0 0 60 H V C CNN
F3 "~" 0 0 60 H V C CNN
DRAW
X VCC 1 0 0 0 U 20 20 0 0 W N
C 0 50 20 0 1 0 N
P 3 0 1 0 0 0 0 30 0 30 N
ENDDRAW
ENDDEF
#
#End Library
-42
View File
@@ -1,42 +0,0 @@
update=07/01/2017 00:36:05
last_client=eeschema
[eeschema]
version=1
LibDir=
NetFmtName=
RptD_X=0
RptD_Y=100
RptLab=1
LabSize=60
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=transistors
LibName4=conn
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=microcontrollers
LibName14=dsp
LibName15=microchip
LibName16=analog_switches
LibName17=motorola
LibName18=texas
LibName19=intel
LibName20=audio
LibName21=interface
LibName22=digital-audio
LibName23=philips
LibName24=display
LibName25=cypress
LibName26=siliconi
LibName27=opto
LibName28=atmel
LibName29=contrib
LibName30=valves
LibName31=MEGA2560
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

-1
View File
@@ -1 +0,0 @@
/settings.sh
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
set -e
set -x
# in this file define ssh options (like private key)
source ~/.opentx-jenkins-settings
function download() {
# $1 is release directory name
mkdir -p ${1}
scp ${SCP_OPT} ${USERNAME}@jenkins.open-tx.org:/home/opentx/${1}/*.sh ${1}/
#chmod 774 ${1}/*.sh
}
download release-20
download nightly-21
download release-21
download nightly-22
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
source ./version.sh
# release all components
./release-companion.sh
./release-firmware.sh
-41
View File
@@ -1,41 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
DESTDIR=/var/www/html/downloads-${version}/nightly/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ${DIR}/companion-build/
mkdir -p ${DIR}/companion-build/
cd ${DIR}/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile21.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
wget -O companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
mv ${DIR}/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true
-46
View File
@@ -1,46 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
DESTDIR=/var/www/html/downloads-${version}/nightly/firmware
# copy the stamp and the release-notes to the http server
cd ${DIR}
cp opentx/radio/src/stamp-opentx.txt ${DESTDIR}
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua_fields_*.txt ${DESTDIR}
echo ${OPENTX_VERSION_SUFFIX} > ${DESTDIR}/suffix.txt
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp_header
rel=`grep "VERS_STR" opentx/radio/src/stamp-opentx.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=21
branch=master
winboxurl=http://winbox.open-tx.org/voice-builds
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
source ./version.sh
# release all components
./release-companion.sh
./release-firmware.sh
-40
View File
@@ -1,40 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
DESTDIR=/var/www/html/downloads-${version}/nightlies/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ${DIR}/companion-build/
mkdir -p $_
cd $_
cmake -DPCB=TARANIS ../opentx
make package
cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}/linux
chmod -Rf g+w ${DESTDIR}/linux/companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile22.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
wget -O windows/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
chmod -Rf g+w windows/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
# update windows stamp
cp $DIR/companion-build/version.h ./companion-windows.stamp
chmod -Rf g+w ./companion-windows.stamp
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make stamp.h
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua/lua_exports_taranis.inc lua/lua_exports_taranis_x9e.inc lua/lua_exports_horus.inc
DESTDIR=/var/www/html/downloads-${version}/nightlies/firmware
# copy the stamp and the release-notes to the http server
cd $DIR
cp opentx/radio/src/stamp.h ${DESTDIR}/stamp-opentx.txt
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua/lua_fields_*.txt ${DESTDIR}
echo ${OPENTX_VERSION_SUFFIX} > ${DESTDIR}/suffix.txt
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp.h
rel=`grep "VERSION" opentx/radio/src/stamp.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=22
branch=next
winboxurl=http://winbox.open-tx.org/voice-builds
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# release all components
./release-companion.sh
#./release-voices.sh
#./release-lua.sh
./release-firmware.sh
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
./update-repo.sh
# retrieve the version number
cd opentx/radio/src
line=`grep "VERSION = " Makefile`
version=`expr "$line" : 'VERSION = \([0-9]\..*\)'`
# create companion rpm
rm -rf ~opentx/release-20/companion-build/
mkdir -p $_
cd $_
cmake ../opentx/companion/src
make package
cp ./companion-$version-i686.rpm /var/www/html/downloads-20/companion/
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd /var/www/html/downloads-20/companion/
wget -qO- http://winbox.open-tx.org/companion-builds/compile20.php?branch=2.0
wget -O companionInstall_$version.exe http://winbox.open-tx.org/companion-builds/companionInstall_$version.exe
mv ~opentx/release-20/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
make lua_exports.cpp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# copy the stamp and the release-notes to the http server
cd ~opentx/release-20/
cp opentx/radio/src/stamp-opentx.txt /var/www/html/downloads-20/firmware/
cp opentx/radio/releasenotes.txt /var/www/html/downloads-20/firmware/
cp opentx/radio/src/lua_fields.txt /var/www/html/downloads-20/firmware/
# erase all previous builds
rm -f /var/www/html/downloads-20/firmware/binaries/opentx*.hex
rm -f /var/www/html/downloads-20/firmware/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/wizard/
zip -r /var/www/html/lua-20/wizard.zip *.lua *.bmp
-17
View File
@@ -1,17 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# get voice packs
wget -O /dev/null http://winbox.open-tx.org/voice-packs/compile.php
cd /var/www/html/voices-20/opentx-taranis/en/
wget -O english-irish-taranis.zip http://winbox.open-tx.org/voice-packs/english-irish-taranis.zip
wget -O english-scottish-taranis.zip http://winbox.open-tx.org/voice-packs/english-scottish-taranis.zip
wget -O english-american-taranis.zip http://winbox.open-tx.org/voice-packs/english-american-taranis.zip
wget -O english-australian-taranis.zip http://winbox.open-tx.org/voice-packs/english-australian-taranis.zip
# wget -O english-taranis.csv http://winbox.open-tx.org/voice-packs/english-irish-taranis.csv
cd /var/www/html/voices-20/opentx-taranis/fr/
wget -O french-taranis.zip http://winbox.open-tx.org/voice-packs/french-taranis.zip
# wget -O french-taranis.csv http://winbox.open-tx.org/voice-packs/french-taranis.csv
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release-20/
# pull the latest changes
cd opentx
git fetch
git checkout 2.0
git reset --hard origin/2.0
chmod -Rf g+w . || true
-17
View File
@@ -1,17 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
source ./version.sh
# release all components
./release-companion.sh
./release-voices.sh
./release-lua.sh
./release-firmware.sh
-40
View File
@@ -1,40 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
DESTDIR=/var/www/html/downloads-${version}/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ${DIR}/companion-build/
mkdir -p ${DIR}/companion-build/
cd ${DIR}/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-${release}-i686.rpm ${DESTDIR}
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile21.php?branch=${branch}
wget -O companion-windows-${release}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}.exe
mv ${DIR}/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
DESTDIR=/var/www/html/downloads-${version}/firmware
# copy the stamp and the release-notes to the http server
cd ${DIR}
cp opentx/radio/src/stamp-opentx.txt ${DESTDIR}
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua_fields_*.txt ${DESTDIR}
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# release wizard
cd opentx/radio/wizard/
zip -r /var/www/html/lua-${version}/wizard.zip *.lua *.bmp
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# retrieve release after the repo update
source ./version.sh
# build voice packs
wget -O /dev/null ${winboxurl}/compile.php?branch=${branch}
# get voice packs
cd /var/www/html/voices-${version}/opentx-taranis/en/
wget -O english-irish-taranis.zip ${winboxurl}/english-irish-taranis.zip
wget -O english-scottish-taranis.zip ${winboxurl}/english-scottish-taranis.zip
wget -O english-american-taranis.zip ${winboxurl}/english-american-taranis.zip
wget -O english-australian-taranis.zip ${winboxurl}/english-australian-taranis.zip
# wget -O english-taranis.csv ${winboxurl}/english-irish-taranis.csv # doesn't seem to work
cd /var/www/html/voices-${version}/opentx-taranis/fr/
wget -O french-taranis.zip ${winboxurl}/french-taranis.zip
# wget -O french-taranis.csv ${winboxurl}/french-taranis.csv #outdated
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp_header
rel=`grep "VERS_STR" opentx/radio/src/stamp-opentx.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=21
branch=master
winboxurl=http://winbox.open-tx.org/voice-builds
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
set -e
set -x
# in this file define ssh options (like private key)
source ~/.opentx-jenkins-settings
function upload() {
# $1 is release directory name
# copy scripts to server
scp ${SCP_OPT} ${1}/*.sh ${USERNAME}@jenkins.open-tx.org:/home/opentx/${1}/
}
upload release-20
upload nightly-21
upload release-21
upload nightly-22
-12
View File
@@ -1,12 +0,0 @@
opentx-companion22 (2.2.1~ppa01~artful) artful; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:37 +0100
opentx-companion22 (2.2.1~N432+test01~artful) artful; urgency=low
* New release 2.2.1~N432+test01
-- projectkk2glider <projectkk2glider@gmail.com> Fri, 10 Nov 2017 18:36:11 +0100
-6
View File
@@ -1,6 +0,0 @@
opentx-companion22 (2.2.1~ppa01~bionic) bionic; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:37 +0100
-1
View File
@@ -1 +0,0 @@
/suffix
-21
View File
@@ -1,21 +0,0 @@
Source: opentx-companion22
Section: utils
Priority: optional
Maintainer: projectkk2glider <projectkk2glider@gmail.com>
Build-Depends: cmake,
build-essential,
python,
python-qt4,
qt5-default,
qttools5-dev-tools,
qtmultimedia5-dev,
qttools5-dev,
libsdl1.2-dev,
libqt5svg5-dev
Homepage: http://www.open-tx.org/
Package: opentx-companion22
Architecture: any
Depends: ${shlibs:Depends}, libqt5multimedia5-plugins
Description: OpenTX Companion
Models and settings editor for the OpenTX open source firmware
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/make -f
BUILDDIR = build_dir
COMMON_OPTIONS = -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr \
-DSIMULATOR_INSTALL_PREFIX=/usr \
-DFIRMWARE_TARGET=NO \
-DGVARS=YES \
-DHELI=YES \
-DALLOW_NIGHTLY_BUILDS=NO \
-DVERSION_SUFFIX=__VERSION_SUFFIX__
STM32_OPTIONS = -DLUA=YES
# secondly called by launchpad
build:
mkdir $(BUILDDIR);
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=9X ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=GRUVIN9X ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=MEGA2560 ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=SKY9X ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) -DPCB=9XRPRO ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X7 ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X9D ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X9D+ ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X9E ../ ; make libsimulator
cd $(BUILDDIR); cmake $(COMMON_OPTIONS) $(STM32_OPTIONS) -DPCB=X12S ../ ; make libsimulator
make -C $(BUILDDIR) companion22 simulator22
# thirdly called by launchpad
binary: binary-indep binary-arch
binary-indep:
# nothing to be done
binary-arch:
# final cmake neede in order to find all simulators
cd $(BUILDDIR); cmake ../
cd $(BUILDDIR); cmake -P cmake_install.cmake
mkdir debian/tmp/DEBIAN
dpkg-shlibdeps debian/tmp/usr/bin/companion22 debian/tmp/usr/bin/simulator22 debian/tmp/usr/lib/companion22/*
dpkg-gencontrol -popentx-companion22
dpkg --build debian/tmp ..
# firstly called by launchpad
clean:
rm -rf $(BUILDDIR)
.PHONY: binary binary-arch binary-indep clean
-72
View File
@@ -1,72 +0,0 @@
#!/bin/sh
set -e
set -x
# $1 is distribution "trusty" OR "yakkety"
#
# Option "-n" or "--nightly" can be used to configure build script to produce a Companion with DALLOW_NIGHTLY_BUILDS=YES flag
cd `dirname ${0}`
nightly_build=0
while [ $# -gt 0 ]
do
case "$1" in
--nightly*)
nightly_build=1;;
-n*)
nightly_build=1;;
-*)
echo >&2 "usage: $0 [-n|--nightly] DISTRO"
exit 1;;
*)
break;; # terminate while loop
esac
shift
done
distro=${1%/}
. common/suffix
if [ -z ${distro} ] ; then
echo "Missing distribution name"
exit 1
fi
if [ ! -d ${distro} ] ; then
echo "Files for ${distro} not found. Most likely unsupported distribution. Aborting..."
exit 1
fi
echo "Preparing sources for ${distro}..."
# prepare debian directory
rm -f ../debian/*
mkdir -p ../debian/
cp common/* ../debian/
cp ${distro}/* ../debian/
if [ ${nightly_build} -gt 0 ] ; then
echo "Editing rules to set version suffix to \"${suffix}\""
sed -i "s/__VERSION_SUFFIX__/${suffix}/g" ../debian/rules
echo "Setting nightly build flag"
sed -i "s/DALLOW_NIGHTLY_BUILDS=YES/DALLOW_NIGHTLY_BUILDS=YES/g" ../debian/rules
else
sed -i "s/__VERSION_SUFFIX__//g" ../debian/rules
sed -i "s/DALLOW_NIGHTLY_BUILDS=YES/DALLOW_NIGHTLY_BUILDS=NO/g" ../debian/rules
fi
# remove old package and prepare new one
cd ..
rm -f ../opentx-companion22_*${distro}*
debuild -S -sa -I -Ijenkins -Ilaunchpad -Idoc -Ibuild -I*.luac
echo "Use this command to upload to launchpad (nightly builds):"
echo " dput ppa:opentx-test/ppa opentx-companion22_<version>.changes"
echo "OR releases:"
echo " dput ppa:opentx-test/rel opentx-companion22_<version>.changes"
-108
View File
@@ -1,108 +0,0 @@
# Launchpad instructions
## General description
This directory contains files and scripts that help to prepare the files needed by the Launchpad.net server to build the Debian packages of OpentX Companion for Ubuntu.
Each supported release of Ubuntu has its own sub-directory, but most of the files reside in the common directory. When preparing a source for certain Ubuntu release always use its the directory name.
There are several step to release a new version of Companion on Launchpad:
* update the Debian changelog
* package the source
* upload the source to Launchpad
The steps above should be repeated for every Ubuntu release. The example below will work with Ubuntu `trusty`
## Prerequisites
* you must have launchpad.net account and be a member of the team
* create and configure your GPG signing key
## Prepare your GPG key
Create GPG key using **name** and **email* that will later appear in the changelog. This will be the key
that will be used to sign the package before uploading it to Launchpad.
```
gpg --gen-key
```
Upload your GPG key (public part) to the Ubuntu key-server. First get the KEY ID (8 characters) of your key:
```
gpg --list-keys
```
Then upload it (replace <KEY ID> with your key ID):
```
gpg --send-keys --keyserver keyserver.ubuntu.com <KEY ID>
```
## Create a Launchpad account
* Go to https://launchpad.net/ and sign-in or register.
* Associate your GPG key with your launchpad account. You will need your keys fingerprint (<fingerprint looks like E448 37D6 EF6E F13C 30C0 415C E7A0 818F 4864 9459>), get it with:
```
gpg --fingerprint
```
* Join OpenTX team on launchpad (one of admins will add you to the team).
## Step 1: update the Debian changelog
You can edit changelog manually, but it is simpler to use a script that creates a generic entry in the changelog. You can always edit it later if needed.
The script is `update-changelog.sh` and it takes 4 parameters:
* email address in the form of `name <email@address>`, since it contains a space it must be enclosed in quotation marks. The email addres must be the same as the one in your GPG key!
* Ubuntu release (directory name)
* OpenTX version
* OpenTX sub-version (Nxxx for nightly builds)
Example:
```
cd opentx/launchpad
./update-changelog.sh "projectkk2glider <projectkk2glider@gmail.com>" trusty 2.2.0 N363
```
If there is an error and you need to build another version of the same OpenTX release, then just add `.n` to the sub-version like so:
```
N363.1
N363.2
etc
```
The script will append new section to the existing file in this case `trusty/changelog`. Now you have a chance to edit the file manually if needed.
## Step 2: prepare files for upload (package the source)
First make sure you don't have any files that you don't want included in the opentx directory. Then use the script `prepare.sh` with the name of release as the first parameter:
```
cd opentx/launchpad
./prepare.sh trusty
```
The result of this script are three files which are placed outside the OpenTX source tree at the same level as `opentx` directory:
```
ls -1 ../../opentx-companion22_2.2.0~N363*
../../opentx-companion22_2.2.0~N363~trusty.dsc
../../opentx-companion22_2.2.0~N363~trusty_source.build
../../opentx-companion22_2.2.0~N363~trusty_source.changes
../../opentx-companion22_2.2.0~N363~trusty.tar.gz
```
You should now make sure that the just build source archive `opentx-companion22_2.2.0~N363~trusty.tar.gz` does not contain any files or directories that you don;t want to share with the world, because this is one of the files that will be uploaded to the Launchpad server. Currently clean OpenTX tree produces this file with approximate size of 16.8MB.
## Upload the source to the Launchpad
Last step it to upload the new release to the Launchpad server and wait for it to be built. Use `dput` command with two arguments:
* name of the PPA `ppa:opentx-test/ppa` (your public key must be associated with that PPA)
* name of the release file `<dsfsfggg>.changes`
Upload to nightly PPA:
```
dput ppa:opentx-test/ppa ../../opentx-companion22_2.2.0~N363~trusty_source.changes
```
Upload to release PPA:
```
dput ppa:opentx-test/rel ../../opentx-companion22_2.2.0~N363~trusty_source.changes
```
-41
View File
@@ -1,41 +0,0 @@
#!/bin/sh
set -e
set -x
# $1 is changelog user and email, example "projectkk2glider <projectkk2glider@gmail.com>"
# $2 is distribution "trusty" OR "yakkety"
# $3 is version, example "2.2.1"
# $4 is suffix (optional, used for nightly builds, example "N360")
email=${1}
distro=${2%/}
version=${3}
suffix=${4}
echo "Updating changelog for ${distro}"
cd `dirname ${0}`
[ -z ${distro} ] && echo "Missing distribution name" && exit 1;
[ ! -z ${suffix} ] && version=${version}~${suffix}
if [ ! -d ${distro} ] ; then
echo "${distro} changelog not found. Most likely unsupported distribution. Aborting..."
exit 1
fi
echo "opentx-companion22 (${version}~${distro}) ${distro}; urgency=low" > tmp-changelog
echo "" >> tmp-changelog
echo " * New release ${version}" >> tmp-changelog
echo "" >> tmp-changelog
echo " -- ${email} "`date -R` >> tmp-changelog
echo "" >> tmp-changelog
cat tmp-changelog ${distro}/changelog > new-changelog
mv new-changelog ${distro}/changelog
rm tmp-changelog
echo "suffix=${suffix}" > common/suffix
echo "Result:"
cat ${distro}/changelog | head -n 20
-23
View File
@@ -1,23 +0,0 @@
opentx-companion22 (2.2.1~ppa01~xenial) xenial; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:44 +0100
opentx-companion22 (2.2.1~N432+test01~xenial) xenial; urgency=low
* New release 2.2.1~N432+test01
-- projectkk2glider <projectkk2glider@gmail.com> Fri, 10 Nov 2017 18:55:08 +0100
opentx-companion22 (2.2.0~ppa02~xenial) xenial; urgency=low
* New release 2.2.0~ppa02
-- projectkk2glider <projectkk2glider@gmail.com> Wed, 31 May 2017 22:37:54 +0200
opentx-companion22 (2.2.0~ppa01~xenial) xenial; urgency=low
* OpenTX version 2.2.0
-- projectkk2glider <projectkk2glider@gmail.com> Wed, 31 May 2017 21:50:57 +0200
-12
View File
@@ -1,12 +0,0 @@
opentx-companion22 (2.2.1~ppa01~zesty) zesty; urgency=low
* New release 2.2.1~ppa01
-- projectkk2glider <projectkk2glider@gmail.com> Sun, 17 Dec 2017 17:32:48 +0100
opentx-companion22 (2.2.1~N432+test01~zesty) zesty; urgency=low
* New release 2.2.1~N432+test01
-- projectkk2glider <projectkk2glider@gmail.com> Fri, 10 Nov 2017 18:37:33 +0100
+31 -21
View File
@@ -3,7 +3,8 @@ include(Bitmaps)
set(PCB_TYPES X7 XLITE X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X I6X)
set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL)
set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
#set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
set(TTS_LANGUAGES EN) # i6X dfplayer
set(PCB "X9D+" CACHE STRING "Radio type, one of: ${PCB_TYPES}")
set_property(CACHE PCB PROPERTY STRINGS ${PCB_TYPES})
@@ -11,8 +12,6 @@ set(TRANSLATIONS "EN" CACHE STRING "Radio language, one of: ${GUI_LANGUAGES}")
set_property(CACHE TRANSLATIONS PROPERTY STRINGS ${GUI_LANGUAGES})
set(SPLASH "DEFAULT" CACHE STRING "Splash (DEFAULT/OFF/FRSKY)")
set_property(CACHE SPLASH PROPERTY STRINGS DEFAULT OFF FRSKY)
set(PPM_UNIT "PERCENT_PREC1" CACHE STRING "PPM display unit (US/PERCENT_PREC1/PERCENT_PREC0)")
set_property(CACHE PPM_UNIT PROPERTY STRINGS US PERCENT_PREC1 PERCENT_PREC0)
set(DEFAULT_MODE "" CACHE STRING "Default sticks mode")
set(FONT "STD" CACHE STRING "Choose font : STD or SQT5")
set_property(CACHE FONT PROPERTY STRINGS SQT5)
@@ -31,6 +30,7 @@ option(AUTOSOURCE "Automatic source detection in menus" ON)
option(AUTOSWITCH "Automatic switch detection in menus" ON)
option(SEMIHOSTING "Enable debugger semihosting" OFF)
option(JITTER_MEASURE "Enable ADC jitter measurement" OFF)
option(WATCHDOG "Enable hardware Watchdog" ON)
option(WATCHDOG_DISABLED "Disable hardware Watchdog" OFF)
if(SDL_FOUND)
option(SIMU_AUDIO "Enable simulator audio." ON)
@@ -47,7 +47,8 @@ option(FRSKY_STICKS "Reverse sticks for FrSky sticks" OFF)
option(NANO "Use nano newlib and binalloc")
option(NIGHTLY_BUILD_WARNING "Warn this is a nightly build" OFF)
option(MODULE_R9M_FLEX_FW "Add R9M options for non certified firmwwares" OFF)
option(PXX2 "Enable PXX v2 support" OFF)
option(EXTPWR_INVERT "Enable inverted pwr enable on PC13" OFF)
option(CRSF_FULLDUPLEX "Enable CRSF full duplex mode with RX on PA15" OFF)
# since we reset all default CMAKE compiler flags for firmware builds, provide an alternate way for user to specify additional flags.
set(FIRMWARE_C_FLAGS "" CACHE STRING "Additional flags for firmware target c compiler (note: all CMAKE_C_FLAGS[_*] are ignored for firmware/bootloader).")
@@ -238,6 +239,14 @@ if(JITTER_MEASURE)
add_definitions(-DJITTER_MEASURE)
endif()
if(ASTERISK)
add_definitions(-DASTERISK)
endif()
if(WATCHDOG)
add_definitions(-DWATCHDOG)
endif()
if(WATCHDOG_DISABLED)
add_definitions(-DWATCHDOG_DISABLED)
endif()
@@ -263,14 +272,6 @@ if(SHUTDOWN_CONFIRMATION)
add_definitions(-DSHUTDOWN_CONFIRMATION)
endif()
if(PPM_UNIT STREQUAL US)
add_definitions(-DPPM_UNIT_US)
elseif(PPM_UNIT STREQUAL PERCENT_PREC1)
add_definitions(-DPPM_UNIT_PERCENT_PREC1)
else()
add_definitions(-DPPM_UNIT_PERCENT_PREC0)
endif()
if(PPM_CENTER_ADJUSTABLE)
add_definitions(-DPPM_CENTER_ADJUSTABLE)
endif()
@@ -325,8 +326,12 @@ if(MODULE_R9M_FLEX_FW)
add_definitions(-DMODULE_R9M_FLEX_FW)
endif()
if(PXX2)
add_definitions(-DPXX2)
if(EXTPWR_INVERT)
add_definitions(-DEXTPWR_INVERT)
endif()
if(CRSF_FULLDUPLEX)
add_definitions(-DCRSF_FULLDUPLEX)
endif()
set(SRC
@@ -339,7 +344,7 @@ set(SRC
mixer_scheduler.cpp
stamp.cpp
timers.cpp
trainer_input.cpp
trainer.cpp
)
if(GUI)
@@ -370,10 +375,8 @@ foreach(FILE ${PULSES_SRC})
set(SRC ${SRC} pulses/${FILE})
endforeach()
add_definitions(-DCORRECT_NEGATIVE_SHIFTS)
if(NOT MSVC)
set(WARNING_FLAGS "${WARNING_FLAGS} -Wall -Wno-strict-aliasing -Wformat -Wreturn-type -Wunused -Wuninitialized -Wunknown-pragmas -Wno-switch -Wtype-limits")
set(WARNING_FLAGS "${WARNING_FLAGS} -Wall -Wno-address-of-packed-member -Wno-strict-aliasing -Wformat -Wreturn-type -Wunused -Wuninitialized -Wunknown-pragmas -Wno-switch -Wtype-limits")
if(WARNINGS_AS_ERRORS)
set(WARNING_FLAGS "${WARNING_FLAGS} -Werror")
endif(WARNINGS_AS_ERRORS)
@@ -441,14 +444,14 @@ if(NOT MSVC)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -o <OBJECT> <SOURCE>")
set(COMMON_FLAGS "-mcpu=${MCU} -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=firmware.lst -O${OPT} -gdwarf-2 -DHSE_VALUE=${HSE_VALUE} -fno-exceptions -fdata-sections -ffunction-sections ${WARNING_FLAGS}")
set(COMMON_FLAGS "-mcpu=${MCU} -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=firmware.lst -O${OPT} -flto=auto -gdwarf-2 -DHSE_VALUE=${HSE_VALUE} -fno-exceptions -fdata-sections -ffunction-sections ${WARNING_FLAGS}")
set(COMMON_FLAGS "${COMMON_FLAGS} ${FPU_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS} -Wimplicit")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS}")
# these are in addition to CMAKE_CXX_FLAGS
set(CMAKE_EXE_LINKER_FLAGS "-lm -T${RADIO_SRC_DIRECTORY}/${LINKER_SCRIPT} -Wl,-Map=firmware.map,--cref,--no-warn-mismatch,--gc-sections")
set(CMAKE_EXE_LINKER_FLAGS "-lm -T${RADIO_SRC_DIRECTORY}/${LINKER_SCRIPT} -Wl,-Map=firmware.map,--cref,--no-warn-mismatch,--no-warn-rwx-segments,--gc-sections")
if(SEMIHOSTING)
add_definitions(-DSEMIHOSTING)
@@ -494,9 +497,16 @@ if(NOT MSVC)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
# add_custom_command(
# TARGET firmware POST_BUILD
# COMMAND arm-none-eabi-size firmware.elf
# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
# )
add_custom_command(
TARGET firmware POST_BUILD
COMMAND arm-none-eabi-size firmware.elf
COMMAND ${PROJECT_SOURCE_DIR}/tools/get-fw-size.sh firmware.elf 0x20000 0x4000
DEPENDS firmware
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
-8
View File
@@ -181,10 +181,6 @@ const char * const audioFilenames[] = {
"servoko",
"rxko",
"modelpwr",
#if defined(PCBSKY9X)
"highmah",
"hightemp",
#endif
"error",
"warning1",
"warning2",
@@ -1077,10 +1073,6 @@ void audioEvent(unsigned int index)
audioQueue.playTone(2250, 80, 20, PLAY_REPEAT(2));
break;
case AU_TX_BATTERY_LOW:
#if defined(PCBSKY9X)
case AU_TX_MAH_HIGH:
case AU_TX_TEMP_HIGH:
#endif
audioQueue.playTone(1950, 160, 20, PLAY_REPEAT(2), 1);
audioQueue.playTone(2550, 160, 20, PLAY_REPEAT(2), -1);
break;
-6
View File
@@ -564,10 +564,6 @@ void audioTimerCountdown(uint8_t timer, int value);
#define AUDIO_WARNING1() AUDIO_BUZZER(audioEvent(AU_WARNING1), beep(3))
#define AUDIO_WARNING2() AUDIO_BUZZER(audioEvent(AU_WARNING2), beep(2))
#define AUDIO_TX_BATTERY_LOW() AUDIO_BUZZER(audioEvent(AU_TX_BATTERY_LOW), beep(4))
#if defined(PCBSKY9X)
#define AUDIO_TX_MAH_HIGH() audioEvent(AU_TX_MAH_HIGH)
#define AUDIO_TX_TEMP_HIGH() audioEvent(AU_TX_TEMP_HIGH)
#endif
#define AUDIO_ERROR() AUDIO_BUZZER(audioEvent(AU_ERROR), beep(4))
#define AUDIO_TIMER_COUNTDOWN(idx, val) audioTimerCountdown(idx, val)
#define AUDIO_TIMER_ELAPSED(idx) AUDIO_BUZZER(audioEvent(AU_TIMER1_ELAPSED+idx), beep(3))
@@ -588,8 +584,6 @@ void audioTimerCountdown(uint8_t timer, int value);
#define AUDIO_TRAINER_LOST() audioEvent(AU_TRAINER_LOST)
#define AUDIO_TRAINER_BACK() audioEvent(AU_TRAINER_BACK)
#define AUDIO_HEARTBEAT()
enum AutomaticPromptsCategories {
SYSTEM_AUDIO_CATEGORY,
MODEL_AUDIO_CATEGORY,
+1 -1
View File
@@ -97,7 +97,7 @@ void *bin_l_alloc (void *ud, void *ptr, size_t osize, size_t nsize)
free(ptr);
}
}
return NULL;
return nullptr;
}
else {
#if defined(DEBUG)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

+6 -6
View File
@@ -72,7 +72,7 @@ char * bluetoothReadline(bool error_reset)
#if defined(PCBX9E) && !defined(USEHORUSBT) // X9E BT module can get unresponsive
TRACE("NO RESPONSE FROM BT MODULE");
#endif
return NULL;
return nullptr;
}
TRACE_NOCRLF("%02X ", byte);
if (byte == '\n') {
@@ -116,11 +116,11 @@ void bluetoothProcessTrainerFrame(const uint8_t * bluetoothBuffer)
for (uint8_t channel=0, i=1; channel<8; channel+=2, i+=3) {
// +-500 != 512, but close enough.
ppmInput[channel] = bluetoothBuffer[i] + ((bluetoothBuffer[i+1] & 0xf0) << 4) - 1500;
ppmInput[channel+1] = ((bluetoothBuffer[i+1] & 0x0f) << 4) + ((bluetoothBuffer[i+2] & 0xf0) >> 4) + ((bluetoothBuffer[i+2] & 0x0f) << 8) - 1500;
trainerInput[channel] = bluetoothBuffer[i] + ((bluetoothBuffer[i+1] & 0xf0) << 4) - 1500;
trainerInput[channel+1] = ((bluetoothBuffer[i+1] & 0x0f) << 4) + ((bluetoothBuffer[i+2] & 0xf0) >> 4) + ((bluetoothBuffer[i+2] & 0x0f) << 8) - 1500;
}
ppmInputValidityTimer = PPM_IN_VALID_TIMEOUT;
trainerInputValidityTimer = TRAINER_IN_VALID_TIMEOUT;
}
void bluetoothAppendTrainerByte(uint8_t data)
@@ -280,7 +280,7 @@ void bluetoothWakeup(void)
uint8_t len = ZLEN(g_eeGeneral.bluetoothName);
if (len > 0) {
for (int i = 0; i < len; i++) {
*cur++ = idx2char(g_eeGeneral.bluetoothName[i]);
*cur++ = zchar2char(g_eeGeneral.bluetoothName[i]);
}
}
else {
@@ -380,7 +380,7 @@ void bluetoothWakeup()
uint8_t len = ZLEN(g_eeGeneral.bluetoothName);
if (len > 0) {
for (int i = 0; i < len; i++) {
*cur++ = idx2char(g_eeGeneral.bluetoothName[i]);
*cur++ = zchar2char(g_eeGeneral.bluetoothName[i]);
}
}
else {
+6 -24
View File
@@ -20,30 +20,12 @@
#include "opentx.h"
void pushPrompt(uint16_t value)
{
TRACE("pushPrompt %u", value);
}
#if !defined(DFPLAYER)
#define pushPrompt(value)
#define pushCustomPrompt(value)
#define pushNumberPrompt(value)
void pushCustomPrompt(uint8_t value)
{
pushPrompt(PROMPT_CUSTOM_BASE + value);
}
void pushNumberPrompt(uint8_t value)
{
pushPrompt(PROMPT_I18N_BASE + value);
}
void pushUnit(uint8_t unit, uint8_t idx, uint8_t id){
TRACE("pushUnit %u", unit);
}
void audioEvent(unsigned int index){
TRACE("audioEvent %u", index);
}
bool isPlaying(){
TRACE("isPlaying");
bool isPlaying(uint8_t id){
return false;
}
#endif
+129 -40
View File
@@ -21,26 +21,119 @@
#ifndef _BUZZER_H_
#define _BUZZER_H_
enum FragmentTypes {
FRAGMENT_EMPTY,
FRAGMENT_TONE,
FRAGMENT_FILE,
};
extern void pushPrompt(uint16_t prompt);
extern void pushUnit(uint8_t unit, uint8_t idx, uint8_t id);
extern bool isPlaying();
extern void audioEvent(unsigned int index);
extern uint8_t g_beepCnt;
extern uint8_t beepAgain;
extern uint8_t beepAgainOrig;
extern uint8_t beepOn;
extern bool warble;
extern bool warbleC;
extern bool isPlaying(uint8_t id = 0);
#if defined(HAPTIC)
extern uint8_t hapticTick;
#endif /* HAPTIC */
void buzzerEvent(unsigned int index);
void audioEvent(unsigned int index);
#define AUDIO_ERROR_MESSAGE(e) buzzerEvent(e)
#if defined(DFPLAYER)
extern Fifo<uint16_t, 16> dfplayerFifo;
extern uint32_t getAudioFileIndex(uint32_t i);
extern bool isAudioFileReferenced(uint32_t i);
void audioPlay(unsigned int index);
#define AUDIO_ERROR_MESSAGE(e) audioEvent(e)
#define AUDIO_TIMER_MINUTE(t) playDuration(t, 0, 0)
#define AUDIO_KEY_PRESS() audioKeyPress()
#define AUDIO_KEY_ERROR() audioKeyError()
#define AUDIO_HELLO() audioPlay(AUDIO_HELLO)
#define AUDIO_BYE() //
#define AUDIO_WARNING1() audioEvent(AU_WARNING1)
#define AUDIO_WARNING2() audioEvent(AU_WARNING2)
#define AUDIO_TX_BATTERY_LOW() audioEvent(AU_TX_BATTERY_LOW)
#define AUDIO_ERROR() audioEvent(AU_ERROR)
#define AUDIO_TIMER_COUNTDOWN(idx, val) audioTimerCountdown(idx, val)
#define AUDIO_TIMER_ELAPSED(idx) audioEvent(AU_TIMER1_ELAPSED+idx)
#define AUDIO_INACTIVITY() audioEvent(AU_INACTIVITY)
#define AUDIO_MIX_WARNING(x) audioEvent(AU_MIX_WARNING_1+x-1)
#define AUDIO_POT_MIDDLE(x) audioEvent(AU_STICK1_MIDDLE+x)
#define AUDIO_TRIM_MIDDLE() audioEvent(AU_TRIM_MIDDLE)
#define AUDIO_TRIM_MIN() audioEvent(AU_TRIM_MIN)
#define AUDIO_TRIM_MAX() audioEvent(AU_TRIM_MAX)
#define AUDIO_TRIM_PRESS(val) audioTrimPress(val)
#define AUDIO_PLAY(p) audioEvent(p)
#define AUDIO_VARIO(fq, t, p, f) playTone(fq, t, p, f)
#define AUDIO_RSSI_ORANGE() audioEvent(AU_RSSI_ORANGE)
#define AUDIO_RSSI_RED() audioEvent(AU_RSSI_RED)
#define AUDIO_RAS_RED() audioEvent(AU_RAS_RED)
#define AUDIO_TELEMETRY_LOST() audioEvent(AU_TELEMETRY_LOST)
#define AUDIO_TELEMETRY_BACK() audioEvent(AU_TELEMETRY_BACK)
#define AUDIO_TRAINER_LOST() audioEvent(AU_TRAINER_LOST)
#define AUDIO_TRAINER_BACK() audioEvent(AU_TRAINER_BACK)
// enum AutomaticPromptsCategories {
// SYSTEM_AUDIO_CATEGORY,
// MODEL_AUDIO_CATEGORY,
// PHASE_AUDIO_CATEGORY,
// SWITCH_AUDIO_CATEGORY,
// LOGICAL_SWITCH_AUDIO_CATEGORY,
// };
// enum AutomaticPromptsEvents {
// AUDIO_EVENT_OFF,
// AUDIO_EVENT_ON,
// AUDIO_EVENT_MID,
// };
enum {
// IDs for special functions [0:64]
// IDs for global functions [64:128]
ID_PLAY_PROMPT_BASE = 179,
ID_PLAY_FROM_SD_MANAGER = 255,
};
extern void pushPrompt(uint16_t prompt, uint8_t id=0);
extern void pushUnit(uint8_t unit, uint8_t idx, uint8_t id);
extern void playModelName();
extern void playModelEvent(uint8_t category, uint8_t index, event_t event=0);
#define PLAY_PHASE_OFF(phase) //playModelEvent(PHASE_AUDIO_CATEGORY, phase, AUDIO_EVENT_OFF)
#define PLAY_PHASE_ON(phase) //playModelEvent(PHASE_AUDIO_CATEGORY, phase, AUDIO_EVENT_ON)
#define PLAY_SWITCH_MOVED(sw) //playModelEvent(SWITCH_AUDIO_CATEGORY, sw)
#define PLAY_LOGICAL_SWITCH_OFF(sw) //playModelEvent(LOGICAL_SWITCH_AUDIO_CATEGORY, sw, AUDIO_EVENT_OFF)
#define PLAY_LOGICAL_SWITCH_ON(sw) //playModelEvent(LOGICAL_SWITCH_AUDIO_CATEGORY, sw, AUDIO_EVENT_ON)
#define PLAY_MODEL_NAME()
#define START_SILENCE_PERIOD()
#define IS_SILENCE_PERIOD_ELAPSED() (true)
#define PROMPT_CUSTOM_BASE 0
#define PROMPT_I18N_BASE 0
#define PROMPT_SYSTEM_BASE 0
#define I18N_PLAY_FUNCTION(lng, x, ...) void lng ## _ ## x(__VA_ARGS__, uint8_t id)
#define PLAY_FUNCTION(x, ...) void x(__VA_ARGS__, uint8_t id)
#define PUSH_CUSTOM_PROMPT(p, id) pushPrompt(PROMPT_CUSTOM_BASE+(p))
#define PUSH_NUMBER_PROMPT(p) pushPrompt((EN_PROMPT_NUMBERS_BASE + p), id)
#define PUSH_UNIT_PROMPT(p, i) pushUnit((EN_PROMPT_UNITS_BASE + ((p - 1/*RAW index*/) * 2)), (i), id)
#define PLAY_NUMBER(n, u, a) playNumber((n), (u), (a), id)
#define PLAY_DURATION(d, att) playDuration((d), (att), id)
#define PLAY_TIME 1
#define IS_PLAY_TIME() (flags&PLAY_TIME)
#define IS_PLAYING(id) isPlaying((id))
#define PLAY_VALUE(v, id) playValue((v), (id))
#define PLAY_FILE(f, id) dfPlayerQueuePlayFile((f))
#define AUDIO_FLUSH() //audioQueue.flush()
#define setScaledVolume(v)
#else // buzzer
extern void pushPrompt(uint16_t prompt);
extern void pushUnit(uint8_t unit, uint8_t idx, uint8_t id);
#define AUDIO_ERROR_MESSAGE(e) audioEvent(e)
#define AUDIO_TIMER_MINUTE(t)
#define AUDIO_KEY_PRESS() audioKeyPress()
@@ -48,34 +141,28 @@ void buzzerEvent(unsigned int index);
#define AUDIO_HELLO() PUSH_SYSTEM_PROMPT(AUDIO_HELLO)
#define AUDIO_BYE()
#define AUDIO_WARNING1() buzzerEvent(AU_WARNING1)
#define AUDIO_WARNING2() buzzerEvent(AU_WARNING2)
#define AUDIO_TX_BATTERY_LOW() buzzerEvent(AU_TX_BATTERY_LOW)
#if defined(PCBSKY9X)
#define AUDIO_TX_MAH_HIGH() buzzerEvent(AU_TX_MAH_HIGH)
#define AUDIO_TX_TEMP_HIGH() buzzerEvent(AU_TX_TEMP_HIGH)
#endif
#define AUDIO_ERROR() buzzerEvent(AU_ERROR)
#define AUDIO_WARNING1() audioEvent(AU_WARNING1)
#define AUDIO_WARNING2() audioEvent(AU_WARNING2)
#define AUDIO_TX_BATTERY_LOW() audioEvent(AU_TX_BATTERY_LOW)
#define AUDIO_ERROR() audioEvent(AU_ERROR)
#define AUDIO_TIMER_COUNTDOWN(idx, val) audioTimerCountdown(idx, val)
#define AUDIO_TIMER_ELAPSED(idx) buzzerEvent(AU_TIMER1_ELAPSED+idx)
#define AUDIO_INACTIVITY() buzzerEvent(AU_INACTIVITY)
#define AUDIO_MIX_WARNING(x) buzzerEvent(AU_MIX_WARNING_1+x-1)
#define AUDIO_POT_MIDDLE(x) buzzerEvent(AU_STICK1_MIDDLE+x)
#define AUDIO_TRIM_MIDDLE() buzzerEvent(AU_TRIM_MIDDLE)
#define AUDIO_TRIM_MIN() buzzerEvent(AU_TRIM_MIN)
#define AUDIO_TRIM_MAX() buzzerEvent(AU_TRIM_MAX)
#define AUDIO_TIMER_ELAPSED(idx) audioEvent(AU_TIMER1_ELAPSED+idx)
#define AUDIO_INACTIVITY() audioEvent(AU_INACTIVITY)
#define AUDIO_MIX_WARNING(x) audioEvent(AU_MIX_WARNING_1+x-1)
#define AUDIO_POT_MIDDLE(x) audioEvent(AU_STICK1_MIDDLE+x)
#define AUDIO_TRIM_MIDDLE() audioEvent(AU_TRIM_MIDDLE)
#define AUDIO_TRIM_MIN() audioEvent(AU_TRIM_MIN)
#define AUDIO_TRIM_MAX() audioEvent(AU_TRIM_MAX)
#define AUDIO_TRIM_PRESS(val) audioTrimPress(val)
#define AUDIO_PLAY(p) buzzerEvent(p)
#define AUDIO_PLAY(p) audioEvent(p)
#define AUDIO_VARIO(fq, t, p, f) playTone(fq, t, p, f)
#define AUDIO_RSSI_ORANGE() buzzerEvent(AU_RSSI_ORANGE)
#define AUDIO_RSSI_RED() buzzerEvent(AU_RSSI_RED)
#define AUDIO_RAS_RED() buzzerEvent(AU_RAS_RED)
#define AUDIO_TELEMETRY_LOST() buzzerEvent(AU_TELEMETRY_LOST)
#define AUDIO_TELEMETRY_BACK() buzzerEvent(AU_TELEMETRY_BACK)
#define AUDIO_TRAINER_LOST() buzzerEvent(AU_TRAINER_LOST)
#define AUDIO_TRAINER_BACK() buzzerEvent(AU_TRAINER_BACK)
#define IS_AUDIO_BUSY() (g_beepCnt || beepAgain || beepOn)
#define AUDIO_RSSI_ORANGE() audioEvent(AU_RSSI_ORANGE)
#define AUDIO_RSSI_RED() audioEvent(AU_RSSI_RED)
#define AUDIO_RAS_RED() audioEvent(AU_RAS_RED)
#define AUDIO_TELEMETRY_LOST() audioEvent(AU_TELEMETRY_LOST)
#define AUDIO_TELEMETRY_BACK() audioEvent(AU_TELEMETRY_BACK)
#define AUDIO_TRAINER_LOST() audioEvent(AU_TRAINER_LOST)
#define AUDIO_TRAINER_BACK() audioEvent(AU_TRAINER_BACK)
#define AUDIO_RESET()
#define AUDIO_FLUSH()
@@ -87,6 +174,7 @@ void buzzerEvent(unsigned int index);
#define PLAY_LOGICAL_SWITCH_ON(sw)
#define PLAY_MODEL_NAME()
#define START_SILENCE_PERIOD()
#define IS_SILENCE_PERIOD_ELAPSED() (true)
#define PROMPT_CUSTOM_BASE 0
#define PROMPT_I18N_BASE 256
@@ -99,14 +187,15 @@ void buzzerEvent(unsigned int index);
#define PUSH_NUMBER_PROMPT(p) pushPrompt(PROMPT_I18N_BASE+(p))
#define PUSH_SYSTEM_PROMPT(p) pushPrompt(PROMPT_SYSTEM_BASE+(p))
#define PLAY_NUMBER(n, u, a)
#define PUSH_UNIT_PROMPT(p, i) pushUnit((p), (i), id)
#define PUSH_UNIT_PROMPT(p, i)
#define PLAY_DURATION(d, att) {}
#define PLAY_TIME
#define IS_PLAY_TIME() (0)
#define IS_PLAYING(id) isPlaying()
#define IS_PLAYING(id) isPlaying((id))
#define PLAY_VALUE(v, id) playValue((v), (id))
#define setScaledVolume(v)
#endif // DFPLAYER
#endif // _BUZZER_H_
+9 -11
View File
@@ -72,7 +72,7 @@ int toLongLongInt(const char ** argv, int index, long long int * val)
base = 16;
s = &argv[index][2];
}
char * endptr = NULL;
char * endptr = nullptr;
*val = strtoll(s, &endptr, base);
if (*endptr == '\0')
return 1;
@@ -709,9 +709,7 @@ int cliTrace(const char ** argv)
int cliStackInfo(const char ** argv)
{
#if !defined(PCBI6)
serialPrint("[MAIN] %d available / %d", stackAvailable(), stackSize() * 4); // stackSize() returns size in 32bit chunks
#endif
serialPrint("[MENUS] %d available / %d", menusStack.available(), menusStack.size());
serialPrint("[MIXER] %d available / %d", mixerStack.available(), mixerStack.size());
#if defined(AUDIO)
@@ -792,13 +790,13 @@ const MemArea memAreas[] = {
{ "GPIOD", GPIOD, sizeof(GPIO_TypeDef) },
{ "GPIOE", GPIOE, sizeof(GPIO_TypeDef) },
{ "GPIOF", GPIOF, sizeof(GPIO_TypeDef) },
#if !defined(PCBI6)
#if !defined(PCBI6X)
{ "GPIOG", GPIOG, sizeof(GPIO_TypeDef) },
#endif
{ "USART1", USART1, sizeof(USART_TypeDef) },
{ "USART2", USART2, sizeof(USART_TypeDef) },
{ "USART3", USART3, sizeof(USART_TypeDef) },
{ NULL, NULL, 0 },
{ nullptr, nullptr, 0 },
};
int cliSet(const char ** argv)
@@ -966,7 +964,7 @@ int cliDisplay(const char ** argv)
{
long long int address = 0;
for (const MemArea * area = memAreas; area->name != NULL; area++) {
for (const MemArea * area = memAreas; area->name != nullptr; area++) {
if (!strcmp(area->name, argv[1])) {
dump((uint8_t *)area->start, area->size);
return 0;
@@ -1035,7 +1033,7 @@ int cliDisplay(const char ** argv)
case 2:
tim = TIM2;
break;
#if !defined(PCBI6)
#if !defined(PCBI6X)
case 13:
tim = TIM13;
break;
@@ -1063,7 +1061,7 @@ int cliDisplay(const char ** argv)
serialPrint(" CCR4 0x%x", tim->CCR4);
}
}
#if !defined(PCBI6)
#if !defined(PCBI6X)
else if (!strcmp(argv[1], "dma")) {
serialPrint("DMA1_Stream7");
serialPrint(" CR 0x%x", DMA1_Stream7->CR);
@@ -1246,12 +1244,12 @@ const CliCommand cliCommands[] = {
#if defined(BLUETOOTH)
{ "bt", cliBlueTooth, "<baudrate>|<command>" },
#endif
{ NULL, NULL, NULL } /* sentinel */
{ nullptr, nullptr, nullptr } /* sentinel */
};
int cliHelp(const char ** argv)
{
for (const CliCommand * command = cliCommands; command->name != NULL; command++) {
for (const CliCommand * command = cliCommands; command->name != nullptr; command++) {
if (argv[1][0] == '\0' || !strcmp(command->name, argv[0])) {
serialPrint("%s %s", command->name, command->args);
if (argv[1][0] != '\0') {
@@ -1270,7 +1268,7 @@ int cliExecCommand(const char ** argv)
if (argv[0][0] == '\0')
return 0;
for (const CliCommand * command = cliCommands; command->name != NULL; command++) {
for (const CliCommand * command = cliCommands; command->name != nullptr; command++) {
if (!strcmp(command->name, argv[0])) {
return command->func(argv);
}
+3 -5
View File
@@ -20,8 +20,6 @@
#include "opentx.h"
uint8_t s_curveChan;
int8_t * curveEnd[MAX_CURVES];
void loadCurves()
{
@@ -317,8 +315,8 @@ int applyCustomCurve(int x, uint8_t idx)
point_t getPoint(uint8_t i)
{
point_t result = {0, 0};
CurveInfo & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
CurveInfo & crv = g_model.curves[s_currIdxSubMenu];
int8_t * points = curveAddress(s_currIdxSubMenu);
bool custom = (crv.type == CURVE_TYPE_CUSTOM);
uint8_t count = 5+crv.points;
if (i < count) {
@@ -333,5 +331,5 @@ point_t getPoint(uint8_t i)
int applyCurrentCurve(int x)
{
return applyCustomCurve(x, s_curveChan);
return applyCustomCurve(x, s_currIdxSubMenu);
}
+61 -69
View File
@@ -58,32 +58,17 @@
#define MAX_INPUTS 32
#define MAX_TRAINER_CHANNELS 16
#define MAX_TELEMETRY_SENSORS 32
#elif defined(PCBSKY9X)
#define MAX_MODELS 60
#define MAX_OUTPUT_CHANNELS 32 // number of real output channels CH1-CH32
#define MAX_FLIGHT_MODES 9
#define MAX_MIXERS 64
#define MAX_EXPOS 32
#define MAX_LOGICAL_SWITCHES 64
#define MAX_SPECIAL_FUNCTIONS 64 // number of functions assigned to switches
#define MAX_INPUTS 32
#define MAX_TRAINER_CHANNELS 16
#define MAX_TELEMETRY_SENSORS 32
#elif defined(PCBI6)
#define MAX_MODELS 16
#define MAX_OUTPUT_CHANNELS 14 // number of real output channels CH1-CH14
#elif defined(PCBI6X)
#define MAX_MODELS 20
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
#define MAX_FLIGHT_MODES 5
#define MAX_MIXERS 32
#define MAX_EXPOS 14
#define MAX_LOGICAL_SWITCHES 12
#define MAX_SPECIAL_FUNCTIONS 11 // number of functions assigned to switches
#define MAX_TRAINER_CHANNELS 8
#define MAX_SPECIAL_FUNCTIONS 18 // number of functions assigned to switches, 20B each
#define MAX_TRAINER_CHANNELS 16
#define MAX_INPUTS 16
#if defined(PCBI6_ELRSV2)
#define MAX_TELEMETRY_SENSORS 22
#else
#define MAX_TELEMETRY_SENSORS 28
#endif
#define MAX_TELEMETRY_SENSORS 30 // 48B each
#define MAX_SCRIPTS 0
#else
#define MAX_MODELS 16
@@ -149,7 +134,7 @@ enum CurveType {
#define MAX_CURVE_POINTS 512
#endif
#if defined(PCBTARANIS) || defined(PCBSKY9X) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
#define NUM_MODULES 2
#else
#define NUM_MODULES 1
@@ -157,16 +142,8 @@ enum CurveType {
#define XPOTS_MULTIPOS_COUNT 6
#if defined(PCBSKY9X) && defined(REVX)
#define MAX_ROTARY_ENCODERS 1
#define NUM_ROTARY_ENCODERS 0
#elif defined(PCBSKY9X)
#define MAX_ROTARY_ENCODERS 1
#define NUM_ROTARY_ENCODERS 1
#else
#define MAX_ROTARY_ENCODERS 0
#define NUM_ROTARY_ENCODERS 0
#endif
#define MAX_ROTARY_ENCODERS 0
#define NUM_ROTARY_ENCODERS 0
#if defined(COLORLCD)
enum MainViews {
@@ -192,6 +169,7 @@ enum MainViews {
VIEW_OUTPUTS_BARS,
VIEW_INPUTS,
VIEW_TIMER2,
VIEW_CHAN_MONITOR,
VIEW_COUNT
};
#endif
@@ -203,16 +181,26 @@ enum BeeperMode {
e_mode_all
};
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
enum ModuleIndex {
INTERNAL_MODULE,
EXTERNAL_MODULE,
TRAINER_MODULE,
FLASHING_MODULE,
};
enum ArmingMode {
ARMING_MODE_FIRST = 0,
ARMING_MODE_CH5 = ARMING_MODE_FIRST,
ARMING_MODE_SWITCH = 1,
ARMING_MODE_LAST = ARMING_MODE_SWITCH,
};
enum TrainerMode {
TRAINER_MODE_MASTER_TRAINER_JACK,
#if !defined(PCBI6X)
TRAINER_MODE_SLAVE,
#endif
#if defined(PCBTARANIS)
TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE,
TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE,
@@ -223,26 +211,24 @@ enum BeeperMode {
TRAINER_MODE_SLAVE_BLUETOOTH,
#endif
};
#elif defined(PCBSKY9X)
enum ModuleIndex {
EXTERNAL_MODULE,
EXTRA_MODULE,
TRAINER_MODULE
};
#endif
#if defined(BLUETOOTH)
#define TRAINER_MODE_MAX() TRAINER_MODE_SLAVE_BLUETOOTH
#elif defined(PCBX7) || defined(PCBXLITE)
#define TRAINER_MODE_MAX() TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE
#elif defined(PCBI6X)
#if defined(SBUS_TRAINER)
#define TRAINER_MODE_MAX() TRAINER_MODE_MASTER_BATTERY_COMPARTMENT
#else
#define TRAINER_MODE_MAX() TRAINER_MODE_MASTER_TRAINER_JACK
#endif
#else
#define TRAINER_MODE_MAX() HAS_WIRELESS_TRAINER_HARDWARE() ? TRAINER_MODE_MASTER_BATTERY_COMPARTMENT : TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE
#endif
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
#define IS_INTERNAL_MODULE_ENABLED() (g_model.moduleData[INTERNAL_MODULE].type != MODULE_TYPE_NONE)
#elif defined(PCBSKY9X)
#define IS_INTERNAL_MODULE_ENABLED() (false)
#endif
#define IS_EXTERNAL_MODULE_ENABLED() (g_model.moduleData[EXTERNAL_MODULE].type != MODULE_TYPE_NONE)
@@ -254,9 +240,15 @@ enum UartModes {
UART_MODE_NONE,
#endif
UART_MODE_TELEMETRY_MIRROR,
#if !defined(PCBI6X)
UART_MODE_TELEMETRY,
#endif
#if defined(SBUS_TRAINER)
UART_MODE_SBUS_TRAINER,
#endif
#if defined(LUA)
UART_MODE_LUA,
#endif
UART_MODE_COUNT,
UART_MODE_MAX = UART_MODE_COUNT-1
};
@@ -336,17 +328,19 @@ enum TelemetryUnit {
enum TelemetryScreenType {
TELEMETRY_SCREEN_TYPE_NONE,
TELEMETRY_SCREEN_TYPE_VALUES,
TELEMETRY_SCREEN_TYPE_GAUGES,
#if defined(LUA)
TELEMETRY_SCREEN_TYPE_BARS,
TELEMETRY_SCREEN_TYPE_SCRIPT,
#if defined(LUA)
TELEMETRY_SCREEN_TYPE_MAX = TELEMETRY_SCREEN_TYPE_SCRIPT
#elif defined(PCBI6X)
TELEMETRY_SCREEN_TYPE_MAX = TELEMETRY_SCREEN_TYPE_SCRIPT
#else
TELEMETRY_SCREEN_TYPE_MAX = TELEMETRY_SCREEN_TYPE_GAUGES
TELEMETRY_SCREEN_TYPE_MAX = TELEMETRY_SCREEN_TYPE_BARS
#endif
};
#define MAX_TELEMETRY_SCREENS 4
#define TELEMETRY_SCREEN_TYPE(screenIndex) TelemetryScreenType((g_model.frsky.screensType >> (2*(screenIndex))) & 0x03)
#define IS_BARS_SCREEN(screenIndex) (TELEMETRY_SCREEN_TYPE(screenIndex) == TELEMETRY_SCREEN_TYPE_GAUGES)
#define IS_BARS_SCREEN(screenIndex) (TELEMETRY_SCREEN_TYPE(screenIndex) == TELEMETRY_SCREEN_TYPE_BARS)
#define FAILSAFE_CHANNEL_HOLD 2000
#define FAILSAFE_CHANNEL_NOPULSE 2001
@@ -376,7 +370,7 @@ enum SwitchSources {
SWSRC_FIRST_SWITCH,
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
SWSRC_SA0 = SWSRC_FIRST_SWITCH,
SWSRC_SA1,
SWSRC_SA2,
@@ -389,22 +383,22 @@ enum SwitchSources {
SWSRC_SD0,
SWSRC_SD1,
SWSRC_SD2,
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SE0,
SWSRC_SE1,
SWSRC_SE2,
#endif
#if !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SF0,
SWSRC_SF1,
SWSRC_SF2,
#endif
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SG0,
SWSRC_SG1,
SWSRC_SG2,
#endif
#if !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SH0,
SWSRC_SH1,
SWSRC_SH2,
@@ -444,7 +438,7 @@ enum SwitchSources {
#if defined(PCBX9E)
SWSRC_TRAINER = SWSRC_SH2,
SWSRC_LAST_SWITCH = SWSRC_SR2,
#elif defined(PCBXLITE) || defined(PCBI6)
#elif defined(PCBXLITE) || defined(PCBI6X)
SWSRC_TRAINER = SWSRC_SD2,
SWSRC_LAST_SWITCH = SWSRC_SD2,
#else
@@ -488,10 +482,6 @@ enum SwitchSources {
SWSRC_TrimT6Up,
#endif
#if defined(PCBSKY9X)
SWSRC_REa,
#endif
SWSRC_FIRST_LOGICAL_SWITCH,
SWSRC_SW1 = SWSRC_FIRST_LOGICAL_SWITCH,
SWSRC_SW2,
@@ -574,7 +564,7 @@ enum MixSources {
MIXSRC_SLIDER3, LUA_EXPORT("lcs", "Left center slider (X9E only)")
MIXSRC_SLIDER4, LUA_EXPORT("rcs", "Right center slider (X9E only)")
MIXSRC_LAST_POT = MIXSRC_SLIDER4,
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBI6)
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBI6X)
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
MIXSRC_LAST_POT = MIXSRC_POT2,
@@ -598,11 +588,6 @@ enum MixSources {
MIXSRC_MOUSE2, LUA_EXPORT("jsy", "Joystick Y")
#endif
#if defined(PCBSKY9X)
MIXSRC_REa,
MIXSRC_LAST_ROTARY_ENCODER = MIXSRC_REa,
#endif
MIXSRC_MAX,
MIXSRC_FIRST_HELI,
@@ -625,7 +610,7 @@ enum MixSources {
MIXSRC_FIRST_SWITCH,
#if defined(PCBXLITE) || defined(PCBI6)
#if defined(PCBXLITE) || defined(PCBI6X)
MIXSRC_SA = MIXSRC_FIRST_SWITCH, LUA_EXPORT("sa", "Switch A")
MIXSRC_SB, LUA_EXPORT("sb", "Switch B")
MIXSRC_SC, LUA_EXPORT("sc", "Switch C")
@@ -749,16 +734,16 @@ enum Functions {
// then the other functions
FUNC_FIRST_WITHOUT_ENABLE,
FUNC_PLAY_SOUND = FUNC_FIRST_WITHOUT_ENABLE,
// FUNC_PLAY_TRACK,
// FUNC_PLAY_VALUE,
FUNC_PLAY_TRACK,
FUNC_PLAY_VALUE,
FUNC_RESERVE4,
FUNC_PLAY_SCRIPT,
FUNC_RESERVE5,
// FUNC_BACKGND_MUSIC,
// FUNC_BACKGND_MUSIC_PAUSE,
// FUNC_BACKGND_MUSIC,
// FUNC_BACKGND_MUSIC_PAUSE,
FUNC_VARIO,
FUNC_HAPTIC,
// FUNC_LOGS,
// FUNC_LOGS,
FUNC_BACKLIGHT,
#if defined(PCBTARANIS)
FUNC_SCREENSHOT,
@@ -781,7 +766,7 @@ enum TimerModes {
enum CountDownModes {
COUNTDOWN_SILENT,
COUNTDOWN_BEEPS,
#if defined(VOICE)
#if defined(VOICE) || defined(DFPLAYER)
COUNTDOWN_VOICE,
#endif
#if defined(HAPTIC)
@@ -823,4 +808,11 @@ enum BluetoothModes {
BLUETOOTH_TRAINER,
};
// PPM Units
enum PPMUnit {
PPM_PERCENT_PREC0,
PPM_PERCENT_PREC1,
PPM_US
};
#endif // _DATACONSTANTS_H_
+34 -80
View File
@@ -154,21 +154,26 @@ PACK(struct CustomFunctionData {
int16_t swtch : 9;
uint16_t func : 7;
PACK(union {
#if !defined(PCBI6X) // SDCARD + VOICE
NOBACKUP(PACK(struct {
char name[LEN_FUNCTION_NAME];
}) play);
#endif
PACK(struct {
int16_t val;
uint8_t mode;
uint8_t param;
#if !defined(PCBI6X) // SDCARD + VOICE
NOBACKUP(CFN_SPARE_TYPE spare);
#endif
})
all;
NOBACKUP(PACK(struct {
int32_t val1;
#if !defined(PCBI6X) // SDCARD + VOICE
NOBACKUP(CFN_SPARE_TYPE val2);
#endif
}) clear);
});
uint8_t active;
@@ -406,18 +411,15 @@ PACK(struct TelemetrySensor {
#define MM_RF_CUSTOM_SELECTED 0xff
PACK(struct ModuleData {
uint8_t type : 4;
int8_t rfProtocol : 4;
uint8_t type; // : 4; // use full byte to reduce code size on PCBI6X
int8_t rfProtocol; // : 4
uint8_t channelsStart;
int8_t channelsCount; // 0=8 channels
uint8_t failsafeMode : 4; // only 3 bits used
uint8_t subType : 3;
uint8_t invertedSerial : 1; // telemetry serial inverted from standard
#if defined(PCBI6)
uint8_t rxID[4];
uint16_t servoFreq;
#endif
int16_t failsafeChannels[MAX_OUTPUT_CHANNELS];
union {
struct {
int8_t delay : 6;
@@ -433,21 +435,20 @@ PACK(struct ModuleData {
uint8_t lowPowerMode : 1;
int8_t optionValue;
} multi);
NOBACKUP(struct {
uint8_t power : 2; // 0=10 mW, 1=100 mW, 2=500 mW, 3=1W
uint8_t spare1 : 2;
uint8_t receiver_telem_off : 1; // false = receiver telem enabled
uint8_t receiver_channel_9_16 : 1; // false = pwm out 1-8, true 9-16
uint8_t external_antenna : 1; // false = internal antenna, true = external antenna
uint8_t fast : 1; // TODO: to be used later by external module (fast means serial @ high speed)
uint8_t spare2;
} pxx);
NOBACKUP(struct {
uint8_t spare1 : 6;
uint8_t noninverted : 1;
uint8_t spare2 : 1;
int8_t refreshRate; // definition as framelength for ppm (* 5 + 225 = time in 1/10 ms)
} sbus);
NOBACKUP(struct {
uint16_t servoFreq; // 50 - 400
} afhds2a);
NOBACKUP(struct {
uint8_t crsfArmingMode:1;
int16_t crsfArmingTrigger:10;
int16_t spare1:5;
} crsf);
};
// Helper functions to set both of the rfProto protocol at the same time
@@ -492,7 +493,7 @@ typedef uint32_t swarnenable_t;
typedef uint16_t swconfig_t;
typedef uint16_t swarnstate_t;
typedef uint8_t swarnenable_t;
#elif defined(PCBI6)
#elif defined(PCBI6X)
typedef uint8_t swconfig_t;
typedef uint8_t swarnstate_t;
typedef uint8_t swarnenable_t;
@@ -566,7 +567,7 @@ PACK(struct CustomScreenData {
char inputNames[MAX_INPUTS][LEN_INPUT_NAME]; \
uint8_t potsWarnEnabled; \
int8_t potsWarnPosition[NUM_POTS + NUM_SLIDERS];
#elif defined(PCBI6)
#elif defined(PCBI6X)
#define MODELDATA_EXTRA \
NOBACKUP(uint8_t spare : 3); \
NOBACKUP(uint8_t trainerMode : 3); \
@@ -576,15 +577,6 @@ PACK(struct CustomScreenData {
uint8_t potsWarnEnabled; \
int8_t potsWarnPosition[NUM_POTS + NUM_SLIDERS]; \
uint8_t rxBattAlarms[2];
#elif defined(PCBSKY9X)
#define MODELDATA_EXTRA \
uint8_t spare : 6; \
uint8_t potsWarnMode : 2; \
ModuleData moduleData[NUM_MODULES + 1]; \
char inputNames[MAX_INPUTS][LEN_INPUT_NAME]; \
uint8_t potsWarnEnabled; \
int8_t potsWarnPosition[NUM_POTS + NUM_SLIDERS]; \
uint8_t rxBattAlarms[2];
#else
#define MODELDATA_EXTRA
#endif
@@ -661,12 +653,6 @@ PACK(struct TrainerData {
NOBACKUP(TrainerMix mix[4]);
});
#if defined(PCBHORUS)
#define SPLASH_MODE uint8_t splashSpares : 3
#else
#define SPLASH_MODE int8_t splashMode : 3
#endif
#define EXTRA_GENERAL_FIELDS_ARM \
NOBACKUP(uint8_t backlightBright); \
NOBACKUP(uint32_t globalTimer); \
@@ -677,7 +663,8 @@ PACK(struct TrainerData {
NOBACKUP(uint8_t jitterFilter : 1); /* 0 - active */ \
NOBACKUP(uint8_t disableRssiPoweroffAlarm : 1); \
NOBACKUP(uint8_t USBMode : 2); \
NOBACKUP(uint8_t spareExtraArm : 3); \
NOBACKUP(uint8_t spare : 1); \
NOBACKUP(uint8_t ppmunit : 2); \
NOBACKUP(char ttsLanguage[2]); \
NOBACKUP(int8_t beepVolume : 4); \
NOBACKUP(int8_t wavVolume : 4); \
@@ -691,7 +678,7 @@ PACK(struct TrainerData {
#if defined(PCBHORUS)
#define EXTRA_GENERAL_FIELDS \
EXTRA_GENERAL_FIELDS_ARM \
NOBACKUP(uint8_t serial2Mode : 4); \
NOBACKUP(uint8_t auxSerialMode : 4); \
uint8_t slidersConfig : 4; \
uint32_t switchConfig; \
uint8_t potsConfig; /* two bits per pot */ \
@@ -701,7 +688,7 @@ PACK(struct TrainerData {
NOBACKUP(uint8_t spare : 1); \
NOBACKUP(uint8_t blOffBright : 7); \
NOBACKUP(char bluetoothName[LEN_BLUETOOTH_NAME]);
#elif defined(PCBTARANIS) || defined(PCBI6)
#elif defined(PCBTARANIS) || defined(PCBI6X)
#if defined(BLUETOOTH)
#define BLUETOOTH_FIELDS \
uint8_t spare; \
@@ -711,30 +698,15 @@ PACK(struct TrainerData {
#endif
#define EXTRA_GENERAL_FIELDS \
EXTRA_GENERAL_FIELDS_ARM \
uint8_t serial2Mode : 4; \
uint8_t auxSerialMode : 4; \
uint8_t slidersConfig : 4; \
uint8_t potsConfig; /* two bits per pot */ \
uint8_t backlightColor; \
swarnstate_t switchUnlockStates; \
swconfig_t switchConfig; \
char switchNames[NUM_SWITCHES][LEN_SWITCH_NAME]; \
char anaNames[NUM_STICKS + NUM_POTS + NUM_SLIDERS][LEN_ANA_NAME]; \
uint8_t receiverId[16][4]; /* AFHDS2A RxNum */ \
BLUETOOTH_FIELDS
#elif defined(PCBSKY9X)
#define EXTRA_GENERAL_FIELDS \
EXTRA_GENERAL_FIELDS_ARM \
int8_t txCurrentCalibration; \
int8_t temperatureWarn; \
uint8_t mAhWarn; \
uint16_t mAhUsed; \
int8_t temperatureCalib; \
uint8_t optrexDisplay; \
uint8_t sticksGain; \
uint8_t rotarySteps; \
char switchNames[NUM_SWITCHES][LEN_SWITCH_NAME]; \
char anaNames[NUM_STICKS + NUM_POTS + NUM_SLIDERS][LEN_ANA_NAME]; \
\
#define EXTRA_GENERAL_FIELDS EXTRA_GENERAL_FIELDS_ARM
#endif
#if defined(PCBHORUS)
@@ -755,7 +727,7 @@ PACK(struct TrainerData {
PACK(struct RadioData {
NOBACKUP(uint8_t version);
NOBACKUP(uint16_t variant);
NOBACKUP(uint16_t variant); // not used on PCBI6X, reuse for swconfig_t?
CalibData calib[NUM_CALIBRATED_ANALOGS];
NOBACKUP(uint16_t chkSum);
N_HORUS_FIELD(int8_t currModel);
@@ -776,7 +748,7 @@ PACK(struct RadioData {
NOBACKUP(uint8_t adjustRTC : 1);
NOBACKUP(uint8_t inactivityTimer);
uint8_t telemetryBaudrate : 3;
SPLASH_MODE; /* 3bits */
int8_t splashMode : 3;
NOBACKUP(int8_t hapticMode : 2); // -2=quiet, -1=only alarms, 0=no keys, 1=all
int8_t switchesDelay;
NOBACKUP(uint8_t lightAutoOff);
@@ -804,7 +776,6 @@ PACK(struct RadioData {
#undef TELEMETRY_DATA
#undef MODELDATA_EXTRA
#undef CUSTOM_SCREENS_DATA
#undef SPLASH_MODE
#undef EXTRA_GENERAL_FIELDS
#undef THEME_DATA
#undef NOBACKUP
@@ -874,24 +845,11 @@ static inline void check_struct() {
CHKSIZE(CurveData, 4);
CHKSIZE(CustomScreenData, 610);
CHKSIZE(Topbar::PersistentData, 216);
#elif defined(PCBSKY9X)
CHKSIZE(MixData, 20);
CHKSIZE(ExpoData, 17);
CHKSIZE(LimitData, 11);
CHKSIZE(CustomFunctionData, 9);
CHKSIZE(FlightModeData, 38);
CHKSIZE(TimerData, 11);
CHKSIZE(SwashRingData, 8);
CHKSIZE(FrSkyBarData, 5);
CHKSIZE(FrSkyLineData, 2);
CHKSIZE(FrSkyTelemetryData, 88);
CHKSIZE(ModelHeader, 12);
CHKTYPE(CurveData, 4);
#elif defined(PCBI6)
#elif defined(PCBI6X)
CHKSIZE(LimitData, 11);
CHKSIZE(MixData, 20);
CHKSIZE(ExpoData, 17);
CHKSIZE(CustomFunctionData, 9);
CHKSIZE(CustomFunctionData, 7);
CHKSIZE(FlightModeData, 36);
CHKSIZE(TimerData, 11);
CHKSIZE(SwashRingData, 8);
@@ -924,18 +882,17 @@ static inline void check_struct() {
CHKSIZE(LogicalSwitchData, 9);
CHKSIZE(TelemetrySensor, 14);
#if defined(PCBI6)
CHKSIZE(ModuleData, 40);
#else
CHKSIZE(ModuleData, 70);
#endif
CHKSIZE(ModuleData, 7 + (2 * MAX_OUTPUT_CHANNELS));
CHKSIZE(GVarData, 7);
CHKSIZE(RssiAlarmData, 2);
CHKSIZE(TrainerData, 16);
#if defined(PCBXLITE)
#if defined(PCBI6X)
CHKSIZE(RadioData, 318);
CHKSIZE(ModelData, 2848);
#elif defined(PCBXLITE)
CHKSIZE(RadioData, 844);
CHKSIZE(ModelData, 6025);
#elif defined(PCBX7)
@@ -947,9 +904,6 @@ static inline void check_struct() {
#elif defined(PCBX9D)
CHKSIZE(RadioData, 872);
CHKSIZE(ModelData, 6507);
#elif defined(PCBSKY9X)
CHKSIZE(RadioData, 727);
CHKSIZE(ModelData, 5188);
#elif defined(PCBHORUS)
CHKSIZE(RadioData, 847);
CHKSIZE(ModelData, 9380);
+2 -2
View File
@@ -47,7 +47,7 @@ void debugPrintf(const char * format, ...)
#if defined(DEBUG_TRACE_BUFFER)
static struct TraceElement traceBuffer[TRACE_BUFFER_LEN];
static uint8_t traceBufferPos;
extern Fifo<uint8_t, 512> serial2TxFifo;
extern Fifo<uint8_t, 512> auxSerialTxFifo;
gtime_t filltm(const gtime_t *t, struct gtm *tp);
void trace_event(enum TraceEvent event, uint32_t data)
@@ -93,7 +93,7 @@ void dumpTraceBuffer()
if (traceBuffer[n].time == 0 && traceBuffer[n].time_ms == 0) break;
#if !defined(SIMU)
if ((n % 5) == 0) {
while (!serial2TxFifo.isEmpty()) {
while (!auxSerialTxFifo.isEmpty()) {
RTOS_WAIT_TICKS(1);
}
}
+9 -9
View File
@@ -34,7 +34,7 @@
extern "C" {
#endif
uint8_t serial2TracesEnabled();
uint8_t auxSerialTracesEnabled();
#if defined(SIMU)
typedef void (*traceCallbackFunc)(const char * text);
@@ -45,7 +45,7 @@ uint8_t serial2TracesEnabled();
#define debugPrintf(...) printf(__VA_ARGS__)
#elif defined(DEBUG) && defined(CLI)
#define debugPrintf(...) do { if (cliTracesEnabled) serialPrintf(__VA_ARGS__); } while(0)
#elif defined(DEBUG) && defined(SERIAL2)
#elif defined(DEBUG) && defined(AUX_SERIAL)
#define debugPrintf(...) do { serialPrintf(__VA_ARGS__); } while(0)
#else
#define debugPrintf(...)
@@ -157,27 +157,27 @@ void dumpTraceBuffer();
#else // #if defined(DEBUG_TRACE_BUFFER)
#define TRACE_EVENT(condition, event, data)
#define TRACEI_EVENT(condition, event, data)
#define TRACE_EVENT(condition, event, data)
#define TRACEI_EVENT(condition, event, data)
#endif // #if defined(DEBUG_TRACE_BUFFER)
#if defined(TRACE_SD_CARD)
#define TRACE_SD_CARD_EVENT(condition, event, data) TRACE_EVENT(condition, event, data)
#else
#define TRACE_SD_CARD_EVENT(condition, event, data)
#define TRACE_SD_CARD_EVENT(condition, event, data)
#endif
#if defined(TRACE_FATFS)
#define TRACE_FATFS_EVENT(condition, event, data) TRACE_EVENT(condition, event, data)
#else
#define TRACE_FATFS_EVENT(condition, event, data)
#define TRACE_FATFS_EVENT(condition, event, data)
#endif
#if defined(TRACE_AUDIO)
#define TRACE_AUDIO_EVENT(condition, event, data) TRACE_EVENT(condition, event, data)
#define TRACEI_AUDIO_EVENT(condition, event, data) TRACEI_EVENT(condition, event, data)
#else
#define TRACE_AUDIO_EVENT(condition, event, data)
#define TRACEI_AUDIO_EVENT(condition, event, data)
#define TRACE_AUDIO_EVENT(condition, event, data)
#define TRACEI_AUDIO_EVENT(condition, event, data)
#endif
@@ -248,7 +248,7 @@ enum InterruptNames {
#endif // #if defined(DEBUG_USB_INTERRUPTS)
INT_LAST
};
#elif defined(PCBTARANIS) || defined(PCBI6)
#elif defined(PCBTARANIS) || defined(PCBI6X)
enum InterruptNames {
INT_TICK,
INT_5MS,
+6
View File
@@ -22,6 +22,8 @@
#define _DEFINITIONS_H_
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#if !defined(UNUSED)
#define UNUSED(x) ((void)(x)) /* to avoid warnings */
@@ -65,4 +67,8 @@
#define CONVERT_UINT_PTR(x) ((uint32_t *)(x))
#endif
#if !defined(DIM)
#define DIM(__arr) (sizeof((__arr)) / sizeof((__arr)[0]))
#endif
#endif // _DEFINITIONS_H_
+5 -5
View File
@@ -27,8 +27,8 @@ template <int N>
class DMAFifo
{
public:
DMAFifo(DMA_Stream_TypeDef * stream):
stream(stream),
explicit DMAFifo(DMA_Channel_TypeDef * channel):
channel(channel),
ridx(0)
{
}
@@ -45,7 +45,7 @@ class DMAFifo
uint8_t last(int index)
{
return fifo[(2*N - stream->NDTR - index) & (N-1)];
return fifo[(2*N - channel->CNDTR - index) & (N-1)];
}
bool isEmpty()
@@ -53,7 +53,7 @@ class DMAFifo
#if defined(SIMU)
return true;
#endif
return (ridx == N - stream->NDTR);
return (ridx == N - channel->CNDTR);
}
bool pop(uint8_t & element)
@@ -73,9 +73,9 @@ class DMAFifo
return fifo;
}
DMA_Channel_TypeDef * channel;
protected:
uint8_t fifo[N];
DMA_Stream_TypeDef * stream;
volatile uint32_t ridx;
};
+1 -1
View File
@@ -30,7 +30,7 @@ uint8_t dumpPosition;
void dumpStart(unsigned int size)
{
dumpPrintf("DUMP %d bytes ...\n\r", size);
dumpPrintf("DUMP %d b\n\r", size);
dumpPosition = 0;
}
+14 -7
View File
@@ -21,6 +21,8 @@
#ifndef _FIFO_H_
#define _FIFO_H_
#include <inttypes.h>
template <class T, int N>
class Fifo
{
@@ -40,7 +42,7 @@ class Fifo
void push(T element)
{
uint32_t next = (widx+1) & (N-1);
uint32_t next = nextIndex(widx);
if (next != ridx) {
fifo[widx] = element;
widx = next;
@@ -54,7 +56,7 @@ class Fifo
}
else {
element = fifo[ridx];
ridx = (ridx+1) & (N-1);
ridx = nextIndex(ridx);
return true;
}
}
@@ -64,23 +66,23 @@ class Fifo
return (ridx == widx);
}
bool isFull()
bool isFull() const
{
uint32_t next = (widx+1) & (N-1);
uint32_t next = nextIndex(widx);
return (next == ridx);
}
void flush()
{
while (!isEmpty()) {};
while (!isEmpty());
}
uint32_t size() const
{
return (N + widx - ridx) & (N-1);
return (N + widx - ridx) & (N - 1);
}
uint32_t hasSpace(uint32_t n) const
bool hasSpace(uint32_t n) const
{
return (N > (size() + n));
}
@@ -100,6 +102,11 @@ class Fifo
T fifo[N];
volatile uint32_t widx;
volatile uint32_t ridx;
static inline uint32_t nextIndex(uint32_t idx)
{
return (idx + 1) & (N - 1);
}
};
#endif // _FIFO_H_
+97 -60
View File
@@ -36,6 +36,7 @@ void testFunc()
}
#endif
#if !defined(PCBI6X) || defined(DFPLAYER)
PLAY_FUNCTION(playValue, source_t idx)
{
if (IS_FAI_FORBIDDEN(idx))
@@ -86,6 +87,7 @@ PLAY_FUNCTION(playValue, source_t idx)
PLAY_NUMBER(val, 0, 0);
}
}
#endif
#if defined(VOICE)
void playCustomFunctionFile(const CustomFunctionData * sd, uint8_t id)
@@ -99,9 +101,17 @@ void playCustomFunctionFile(const CustomFunctionData * sd, uint8_t id)
PLAY_FILE(filename, sd->func == FUNC_BACKGND_MUSIC ? PLAY_BACKGROUND : 0, id);
}
}
#elif defined(DFPLAYER)
void playCustomFunctionFile(const CustomFunctionData * sd, uint8_t id)
{
uint16_t val = sd->all.val;
if (val != 0) { // Custom files start at DFPLAYER_CUSTOM_FILE_INDEX
PLAY_FILE(val, id);
}
}
#endif
#if defined(VOICE)
#if defined(VOICE) || defined(PCBI6X)
bool isRepeatDelayElapsed(const CustomFunctionData * functions, CustomFunctionsContext & functionsContext, uint8_t index)
{
const CustomFunctionData * cfn = &functions[index];
@@ -130,26 +140,30 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
MASK_FUNC_TYPE newActiveFunctions = 0;
MASK_CFN_TYPE newActiveSwitches = 0;
#if defined(DFPLAYER)
uint8_t playFirstIndex = (functions == g_model.customFn ? 1 : 1+MAX_SPECIAL_FUNCTIONS);
#define PLAY_INDEX (i+playFirstIndex)
#else
#define PLAY_INDEX 0
#endif
#if defined(ROTARY_ENCODERS) && defined(GVARS)
static rotenc_t rePreviousValues[ROTARY_ENCODERS];
#endif
#if defined(OVERRIDE_CHANNEL_FUNCTION)
for (uint8_t i=0; i<MAX_OUTPUT_CHANNELS; i++) {
for (uint32_t i=0; i<MAX_OUTPUT_CHANNELS; i++) {
safetyCh[i] = OVERRIDE_CHANNEL_UNDEFINED;
}
#endif
#if defined(GVARS)
for (uint8_t i=0; i<NUM_TRIMS; i++) {
for (uint32_t i=0; i<NUM_TRIMS; i++) {
trimGvar[i] = -1;
}
#endif
for (uint8_t i=0; i<MAX_SPECIAL_FUNCTIONS; i++) {
for (uint32_t i=0; i<MAX_SPECIAL_FUNCTIONS; i++) {
const CustomFunctionData * cfn = &functions[i];
swsrc_t swtch = CFN_SWITCH(cfn);
if (swtch) {
@@ -161,7 +175,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
active &= (bool)CFN_ACTIVE(cfn);
}
if (active || IS_PLAY_BOTH_FUNC(CFN_FUNC(cfn))) {
if (active) {
switch (CFN_FUNC(cfn)) {
@@ -239,7 +253,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
{
unsigned int moduleIndex = CFN_PARAM(cfn);
if (moduleIndex < NUM_MODULES) {
moduleFlag[moduleIndex] = 1 + CFN_FUNC(cfn) - FUNC_RANGECHECK;
moduleState[moduleIndex].mode = 1 + CFN_FUNC(cfn) - FUNC_RANGECHECK;
}
break;
}
@@ -274,7 +288,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
}
break;
#endif
#if !defined(PCBI6X)
case FUNC_VOLUME:
{
getvalue_t raw = getValue(CFN_PARAM(cfn));
@@ -285,11 +299,13 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
requiredSpeakerVolume = ((1024 + requiredSpeakerVolumeRawLast) * VOLUME_LEVEL_MAX) / 2048;
break;
}
#if defined(SDCARD)
#endif
#if defined(SDCARD) || defined(PCBI6X)
case FUNC_PLAY_SOUND:
// case FUNC_PLAY_TRACK:
// case FUNC_PLAY_VALUE:
#if defined(DFPLAYER)
case FUNC_PLAY_TRACK:
case FUNC_PLAY_VALUE:
#endif
#if defined(HAPTIC)
case FUNC_HAPTIC:
#endif
@@ -297,43 +313,51 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (isRepeatDelayElapsed(functions, functionsContext, i)) {
if (!IS_PLAYING(PLAY_INDEX)) {
if (CFN_FUNC(cfn) == FUNC_PLAY_SOUND) {
#if defined(PCBI6X)
if (true) {
#else
if (audioQueue.isEmpty()) {
#endif
AUDIO_PLAY(AU_SPECIAL_SOUND_FIRST + CFN_PARAM(cfn));
}
}
// else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
// PLAY_VALUE(CFN_PARAM(cfn), PLAY_INDEX);
// }
// #if defined(HAPTIC)
// else if (CFN_FUNC(cfn) == FUNC_HAPTIC) {
// haptic.event(AU_SPECIAL_SOUND_LAST+CFN_PARAM(cfn));
// }
// #endif
// else {
// playCustomFunctionFile(cfn, PLAY_INDEX);
// }
#if defined(DFPLAYER)
else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
PLAY_VALUE(CFN_PARAM(cfn), PLAY_INDEX);
}
#endif
#if defined(HAPTIC)
else if (CFN_FUNC(cfn) == FUNC_HAPTIC) {
haptic.event(AU_SPECIAL_SOUND_LAST+CFN_PARAM(cfn));
}
#endif
else {
#if defined(DFPLAYER)
playCustomFunctionFile(cfn, PLAY_INDEX);
#endif
}
}
}
break;
}
#if !defined(PCBI6X)
case FUNC_BACKGND_MUSIC:
if (!(newActiveFunctions & (1 << FUNCTION_BACKGND_MUSIC))) {
newActiveFunctions |= (1 << FUNCTION_BACKGND_MUSIC);
if (!IS_PLAYING(PLAY_INDEX)) {
playCustomFunctionFile(cfn, PLAY_INDEX);
}
}
break;
// case FUNC_BACKGND_MUSIC:
// if (!(newActiveFunctions & (1 << FUNCTION_BACKGND_MUSIC))) {
// // newActiveFunctions |= (1 << FUNCTION_BACKGND_MUSIC);
// // if (!IS_PLAYING(PLAY_INDEX)) {
// // playCustomFunctionFile(cfn, PLAY_INDEX);
// // }
// }
// break;
// case FUNC_BACKGND_MUSIC_PAUSE:
// // newActiveFunctions |= (1 << FUNCTION_BACKGND_MUSIC_PAUSE);
// break;
case FUNC_BACKGND_MUSIC_PAUSE:
newActiveFunctions |= (1 << FUNCTION_BACKGND_MUSIC_PAUSE);
break;
#endif
#else
case FUNC_PLAY_SOUND:
// case FUNC_PLAY_TRACK:
// case FUNC_PLAY_VALUE:
case FUNC_PLAY_TRACK:
case FUNC_PLAY_VALUE:
{
tmr10ms_t tmr10ms = get_tmr10ms();
uint8_t repeatParam = CFN_PLAY_REPEAT(cfn);
@@ -343,15 +367,16 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (CFN_FUNC(cfn) == FUNC_PLAY_SOUND) {
AUDIO_PLAY(AU_SPECIAL_SOUND_FIRST+param);
}
// else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
// PLAY_VALUE(param, PLAY_INDEX);
// }
// else {
// #if defined(GVARS)
// if (CFN_FUNC(cfn) == FUNC_PLAY_TRACK && param > 250)
// param = GVAR_VALUE(param-251, getGVarFlightMode(mixerCurrentFlightMode, param-251));
// #endif
// }
else if (CFN_FUNC(cfn) == FUNC_PLAY_VALUE) {
PLAY_VALUE(param, PLAY_INDEX);
}
else {
#if defined(GVARS)
if (CFN_FUNC(cfn) == FUNC_PLAY_TRACK && param > 250)
param = GVAR_VALUE(param-251, getGVarFlightMode(mixerCurrentFlightMode, param-251));
#endif
PUSH_CUSTOM_PROMPT(active ? param : param+1, PLAY_INDEX);
}
}
if (!active) {
// PLAY_BOTH would change activeFnSwitches otherwise
@@ -359,27 +384,40 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
}
break;
}
#endif
#endif // PCBI6X || SDCARD
#if defined(TELEMETRY_FRSKY) && defined(VARIO)
case FUNC_VARIO:
newActiveFunctions |= (1 << FUNCTION_VARIO);
newActiveFunctions |= (1u << FUNCTION_VARIO);
break;
#endif
//#if defined(SDCARD)
// case FUNC_LOGS:
// if (CFN_PARAM(cfn)) {
// newActiveFunctions |= (1 << FUNCTION_LOGS);
// logDelay = CFN_PARAM(cfn);
// }
// break;
//#endif
#if defined(SDCARD)
case FUNC_LOGS:
if (CFN_PARAM(cfn)) {
newActiveFunctions |= (1u << FUNCTION_LOGS);
logDelay = CFN_PARAM(cfn);
}
break;
#endif
case FUNC_BACKLIGHT:
newActiveFunctions |= (1 << FUNCTION_BACKLIGHT);
{
newActiveFunctions |= (1u << FUNCTION_BACKLIGHT);
if (!CFN_PARAM(cfn)) { // When no source is set, backlight works like original backlight and turn on regardless of backlight settings
requiredBacklightBright = BACKLIGHT_FORCED_ON;
break;
}
getvalue_t raw = getValue(CFN_PARAM(cfn));
#if defined(COLORLCD)
requiredBacklightBright = (1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) / 2048;
#else
requiredBacklightBright = (1024 - raw) * 100 / 2048;
#endif
break;
}
#if defined(PCBTARANIS)
case FUNC_SCREENSHOT:
@@ -388,7 +426,6 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
}
break;
#endif
#if defined(DEBUG)
case FUNC_TEST:
testFunc();
@@ -408,7 +445,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
{
unsigned int moduleIndex = CFN_PARAM(cfn);
if (moduleIndex < NUM_MODULES) {
moduleFlag[moduleIndex] = 0;
moduleState[moduleIndex].mode = 0;
}
break;
}
@@ -423,7 +460,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
functionsContext.activeFunctions = newActiveFunctions;
#if defined(ROTARY_ENCODERS) && defined(GVARS)
for (uint8_t i=0; i<ROTARY_ENCODERS; i++) {
for (uint32_t i=0; i<ROTARY_ENCODERS; i++) {
rePreviousValues[i] = (rotencValue[i] / ROTARY_ENCODER_GRANULARITY);
}
#endif
+4 -3
View File
@@ -124,9 +124,10 @@ const unsigned char font_8x10[] = {
#endif
};
const unsigned char font_22x38_num[] = {
#include "font_22x38_num.lbm"
};
// only lua uses those
// const unsigned char font_22x38_num[] = {
// #include "font_22x38_num.lbm"
// };
const unsigned char font_4x6_extra[] = {
#include "font_04x06_extra.lbm"
+26 -27
View File
@@ -35,9 +35,6 @@
#define HEADER_LINE_COLUMNS 0,
#endif
#define COLUMN_X 0
#define drawFieldLabel(x, y, str) lcdDrawTextAlignedLeft(y, str)
#define NUM_BODY_LINES (LCD_LINES-1)
#define MENU_HEADER_HEIGHT FH
#define MENU_INIT_VPOS 0
@@ -53,21 +50,9 @@ extern uint8_t noHighlightCounter;
#define NO_HIGHLIGHT() (noHighlightCounter > 0)
#define START_NO_HIGHLIGHT() do { noHighlightCounter = 25; } while(0)
void drawSlider(coord_t x, coord_t y, uint8_t width, uint8_t value, uint8_t max, uint8_t attr);
void drawSlider(coord_t x, coord_t y, uint8_t value, uint8_t max, uint8_t attr);
#if defined(NAVIGATION_POT1)
extern int16_t p1valdiff;
#else
#define p1valdiff 0
#endif
#if defined(NAVIGATION_POT2)
extern int8_t p2valdiff;
#else
#define p2valdiff 0
#endif
extern int8_t checkIncDec_Ret; // global helper vars
#define EDIT_SELECT_MENU -1
@@ -225,8 +210,22 @@ void title(const char * s);
typedef int choice_t;
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event);
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char * label, LcdFlags attr, event_t event);
choice_t editChoice(coord_t x, coord_t y, const char *label,
const char *values, choice_t value, choice_t min,
choice_t max, LcdFlags attr, event_t event);
choice_t editChoice(coord_t x, coord_t y, const char *label,
const char *values, choice_t value, choice_t min,
choice_t max, LcdFlags attr, event_t event, coord_t lblX);
choice_t editChoice(coord_t x, coord_t y, const char *label,
const char *values, choice_t value, choice_t min,
choice_t max, LcdFlags attr, event_t event, coord_t lblX,
IsValueAvailable isValueAvailable);
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char * label,
LcdFlags attr, event_t event);
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char *label,
LcdFlags attr, event_t event, coord_t lblX);
int8_t editSwitch(coord_t x, coord_t y, int8_t value, LcdFlags attr, event_t event);
#define ON_OFF_MENU_ITEM(value, x, y, label, attr, event) value = editCheckBox(value, x, y, label, attr, event)
@@ -263,10 +262,6 @@ void editSingleName(coord_t x, coord_t y, const char * label, char * name, uint8
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay);
#define EDIT_DELAY(x, y, event, attr, str, delay) editDelay(y, event, attr, str, delay)
#define WARNING_TYPE_ASTERISK 0
#define WARNING_TYPE_CONFIRM 1
#define WARNING_TYPE_INPUT 2
extern const char * warningText;
extern const char * warningInfoText;
extern uint8_t warningInfoLength;
@@ -279,7 +274,7 @@ extern uint8_t s_copyMode;
extern int8_t s_copySrcRow;
extern int8_t s_copyTgtOfs;
extern uint8_t s_currIdx;
extern uint8_t s_curveChan;
extern uint8_t s_currIdxSubMenu;
extern uint8_t s_copySrcIdx;
extern uint8_t s_copySrcCh;
extern int8_t s_currCh;
@@ -299,6 +294,9 @@ void drawStatusLine();
void pushModelNotes();
void readModelNotes();
void menuChannelsView(event_t event);
void menuChannelsViewCommon(event_t event);
#define LABEL(...) (uint8_t)-1
#define CURSOR_MOVED_LEFT(event) (IS_ROTARY_LEFT(event) || EVT_KEY_MASK(event) == KEY_LEFT)
@@ -320,7 +318,6 @@ void drawStatusLine();
#define IS_ROTARY_EVENT(evt) (EVT_KEY_MASK(evt) >= 0x0e)
void repeatLastCursorMove(event_t event);
#define REPEAT_LAST_CURSOR_MOVE() { if (EVT_KEY_MASK(event) >= 0x0e) putEvent(event); else repeatLastCursorMove(event); }
#define MOVE_CURSOR_FROM_HERE() if (menuHorizontalPosition > 0) REPEAT_LAST_CURSOR_MOVE()
#else
#define IS_ROTARY_LEFT(evt) (0)
#define IS_ROTARY_RIGHT(evt) (0)
@@ -329,7 +326,6 @@ void drawStatusLine();
#define IS_ROTARY_EVENT(evt) (0)
void repeatLastCursorMove(event_t event);
#define REPEAT_LAST_CURSOR_MOVE() repeatLastCursorMove(event)
#define MOVE_CURSOR_FROM_HERE() if (menuHorizontalPosition > 0) REPEAT_LAST_CURSOR_MOVE()
#endif
// TODO enum
@@ -371,6 +367,8 @@ void doMainScreenGraphics();
void drawProgressBar(const char * label, int num, int den);
void drawSleepBitmap();
void drawChannelValue(coord_t x, coord_t y, uint8_t ch, int16_t value, LcdFlags flags);
void drawVerticalScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uint16_t count, uint8_t visible);
void drawGauge(coord_t x, coord_t y, coord_t w, coord_t h, int32_t val, int32_t max);
@@ -378,6 +376,7 @@ void drawGauge(coord_t x, coord_t y, coord_t w, coord_t h, int32_t val, int32_t
void drawAlertBox(const char * title, const char * text, const char * action);
#endif
void drawAlertBox(const char * title, const char * text, const char * action);
void showAlertBox(const char * title, const char * text, const char * action , uint8_t sound);
#define SET_SCROLLBAR_X(x)
@@ -385,11 +384,11 @@ void showAlertBox(const char * title, const char * text, const char * action , u
#define IS_MAIN_VIEW_DISPLAYED() menuHandlers[0] == menuMainView
#if defined(TELEMETRY_FRSKY)
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuViewTelemetryFrsky
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuViewTelemetry
#else
#define IS_TELEMETRY_VIEW_DISPLAYED() false
#endif
#define IS_OTHER_VIEW_DISPLAYED() false
#define IS_OTHER_VIEW_DISPLAYED() menuHandlers[0] == menuChannelsView
void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags flags);
+91 -43
View File
@@ -66,7 +66,7 @@ void lcdPutPattern(coord_t x, coord_t y, const uint8_t * pattern, uint8_t width,
}
else if (i<=width) {
uint8_t skip = true;
for (uint8_t j=0; j<lines; j++) {
for (uint32_t j=0; j<lines; j++) {
b[j] = *(pattern++); /*top byte*/
if (b[j] != 0xff) {
skip = false;
@@ -74,7 +74,7 @@ void lcdPutPattern(coord_t x, coord_t y, const uint8_t * pattern, uint8_t width,
}
if (skip) {
if (flags & FIXEDWIDTH) {
for (uint8_t j=0; j<lines; j++) {
for (uint32_t j=0; j<lines; j++) {
b[j] = 0;
}
}
@@ -129,7 +129,7 @@ uint8_t getPatternWidth(const PatternData * pattern)
uint8_t lines = (pattern->height+7)/8;
const uint8_t * data = pattern->data;
for (int8_t i=0; i<pattern->width; i++) {
for (uint8_t j=0; j<lines; j++) {
for (uint32_t j=0; j<lines; j++) {
if (data[j] != 0xff) {
result += 1;
break;
@@ -172,11 +172,11 @@ void getCharPattern(PatternData * pattern, unsigned char c, LcdFlags flags)
pattern->data = &font_10x14[((uint16_t)c_remapped)*20];
}
}
else if (fontsize == XXLSIZE) {
pattern->width = 22;
pattern->height = 38;
pattern->data = &font_22x38_num[((uint16_t)c-'0'+5)*110];
}
// else if (fontsize == XXLSIZE) { // only lua uses those
// pattern->width = 22;
// pattern->height = 38;
// pattern->data = &font_22x38_num[((uint16_t)c-'0'+5)*110];
// }
else if (fontsize == MIDSIZE) {
pattern->width = 8;
pattern->height = 12;
@@ -248,10 +248,10 @@ void lcdDrawChar(coord_t x, coord_t y, const unsigned char c, LcdFlags flags)
}
lcdPutPattern(x, y, q, 10, 16, flags);
}
else if (fontsize == XXLSIZE) {
q = &font_22x38_num[((uint16_t)c-'0'+5)*110];
lcdPutPattern(x, y, q, 22, 38, flags);
}
// else if (fontsize == XXLSIZE) { // only lua uses those
// q = &font_22x38_num[((uint16_t)c-'0'+5)*110];
// lcdPutPattern(x, y, q, 22, 38, flags);
// }
else if (fontsize == MIDSIZE) {
q = &font_8x10[((uint16_t)c-0x20)*16];
lcdPutPattern(x, y, q, 8, 12, flags);
@@ -292,7 +292,7 @@ uint8_t getTextWidth(const char * s, uint8_t len, LcdFlags flags)
{
uint8_t width = 0;
for (int i=0; len==0 || i<len; ++i) {
unsigned char c = (flags & ZCHAR) ? idx2char(*s) : *s;
unsigned char c = (flags & ZCHAR) ? zchar2char(*s) : *s;
if (!c) {
break;
}
@@ -328,7 +328,7 @@ void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len, LcdFlag
switch (flags & ZCHAR) {
#if !defined(BOOT)
case ZCHAR:
c = idx2char(*s);
c = zchar2char(*s);
break;
#endif
default:
@@ -409,6 +409,11 @@ void lcdDrawTextAlignedLeft(coord_t y, const char * s)
lcdDrawText(0, y, s);
}
void lcdDrawTextIndented(coord_t y, const char * s)
{
lcdDrawText(INDENT_WIDTH, y, s);
}
#if !defined(BOOT)
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char * s,uint8_t idx, LcdFlags flags)
{
@@ -434,12 +439,12 @@ void lcdDraw8bitsNumber(coord_t x, coord_t y, int8_t val)
lcdDrawNumber(x, y, val);
}
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags flags)
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags flags)
{
lcdDrawNumber(x, y, val, flags, 0);
}
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags flags, uint8_t len)
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags flags, uint8_t len)
{
char str[16+1];
char *s = str+16;
@@ -522,7 +527,7 @@ void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat, Lc
#endif
void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlags att)
void lcdDrawVerticalLine(coord_t x, coord_t y, coord_t h, uint8_t pat, LcdFlags att)
{
if (x >= LCD_W) return;
// should never happen on 9X
@@ -558,7 +563,7 @@ void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlag
}
}
void lcdDrawSolidVerticalLine(coord_t x, scoord_t y, scoord_t h, LcdFlags att)
void lcdDrawSolidVerticalLine(coord_t x, coord_t y, coord_t h, LcdFlags att)
{
lcdDrawVerticalLine(x, y, h, SOLID, att);
}
@@ -573,9 +578,9 @@ void lcdDrawRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat, LcdFla
}
#if !defined(BOOT)
void lcdDrawFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, uint8_t pat, LcdFlags att)
void lcdDrawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat, LcdFlags att)
{
for (scoord_t i=y; i<(scoord_t)(y+h); i++) { // cast to scoord_t needed otherwise (y+h) is promoted to int (see #5055)
for (coord_t i=y; i<y+h; i++) { // cast to coord_t needed otherwise (y+h) is promoted to int (see #5055)
if ((att&ROUND) && (i==y || i==y+h-1))
lcdDrawHorizontalLine(x+1, i, w-2, pat, att);
else
@@ -588,10 +593,10 @@ void drawTelemetryTopBar()
{
putsModelName(0, 0, g_model.header.name, g_eeGeneral.currModel, 0);
uint8_t att = (IS_TXBATT_WARNING() ? BLINK : 0);
putsVBat(14*FW,0,att);
putsVBat(10*FW-1,0,att);
if (g_model.timers[0].mode) {
att = (timersStates[0].val<0 ? BLINK : 0);
drawTimer(17*FW+5*FWNUM+1, 0, timersStates[0].val, att, att);
drawTimer(13*FW+5, 0, timersStates[0].val, att, att);
}
lcdInvertLine(0);
}
@@ -603,7 +608,7 @@ void drawRtcTime(coord_t x, coord_t y, LcdFlags att)
}
#endif
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2)
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att, LcdFlags att2)
{
div_t qr;
if (IS_RIGHT_ALIGNED(att)) {
@@ -694,11 +699,11 @@ void drawSource(coord_t x, coord_t y, uint32_t idx, LcdFlags att)
idx = idx - MIXSRC_Rud;
if (ZEXIST(g_eeGeneral.anaNames[idx])) {
if (idx < MIXSRC_FIRST_POT-MIXSRC_Rud )
lcdDrawChar(x, y, '\307', att); // stick symbol
lcdDrawText(x, y, "\307", att); // stick symbol
else if (idx <= MIXSRC_LAST_POT-MIXSRC_Rud )
lcdDrawChar(x, y, '\310', att); // pot symbol
lcdDrawText(x, y, "\310", att); // pot symbol
else
lcdDrawChar(x, y, '\311', att); // slider symbol
lcdDrawText(x, y, "\311", att); // slider symbol
lcdDrawSizedText(lcdNextPos, y, g_eeGeneral.anaNames[idx], LEN_ANA_NAME, ZCHAR|att);
}
else {
@@ -708,7 +713,7 @@ void drawSource(coord_t x, coord_t y, uint32_t idx, LcdFlags att)
else if (idx >= MIXSRC_FIRST_SWITCH && idx <= MIXSRC_LAST_SWITCH) {
idx = idx-MIXSRC_FIRST_SWITCH;
if (ZEXIST(g_eeGeneral.switchNames[idx])) {
lcdDrawChar(x, y, '\312', att); //switch symbol
lcdDrawText(x, y, "\312", att); //switch symbol
lcdDrawSizedText(lcdNextPos, y, g_eeGeneral.switchNames[idx], LEN_SWITCH_NAME, ZCHAR|att);
}
else {
@@ -767,10 +772,12 @@ void putsModelName(coord_t x, coord_t y, char *name, uint8_t id, LcdFlags att)
}
}
void drawSwitch(coord_t x, coord_t y, swsrc_t idx, LcdFlags flags)
void drawSwitch(coord_t x, coord_t y, swsrc_t idx, LcdFlags flags, bool autoBold)
{
char s[8];
getSwitchString(s, idx);
getSwitchPositionName(s, idx);
if (autoBold && idx != SWSRC_NONE && getSwitch(idx))
flags |= BOLD;
lcdDrawText(x, y, s, flags);
}
@@ -781,7 +788,7 @@ void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att)
lcdDrawText(x, y, s, att);
}
void drawTimerMode(coord_t x, coord_t y, int8_t mode, LcdFlags att)
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att)
{
if (mode >= 0) {
if (mode < TMRMODE_COUNT)
@@ -836,7 +843,7 @@ void putsRotaryEncoderMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, Lcd
}
#endif
void drawValueWithUnit(coord_t x, coord_t y, lcdint_t val, uint8_t unit, LcdFlags att)
void drawValueWithUnit(coord_t x, coord_t y, int32_t val, uint8_t unit, LcdFlags att)
{
// convertUnit(val, unit);
lcdDrawNumber(x, y, val, att & (~NO_UNIT));
@@ -867,21 +874,28 @@ void drawGPSCoord(coord_t x, coord_t y, int32_t value, const char * direction, L
lcdLastRightPos += 3;
}
}
#if !defined(PCBI6X) // GPS format setting disabled
else {
absvalue /= 10000;
lcdDrawNumber(lcdLastRightPos+FW, y, absvalue, att|LEFT|PREC2); // mm.mmm
}
#endif
lcdDrawSizedText(lcdLastRightPos+1, y, direction + (value>=0 ? 0 : 1), 1);
}
void drawTime(coord_t x, coord_t y, TelemetryItem & telemetryItem, LcdFlags att)
{
lcdDrawNumber(x, y, telemetryItem.datetime.hour, att|LEADING0, 2);
lcdDrawText(lcdNextPos, y, ":", att);
lcdDrawNumber(lcdNextPos, y, telemetryItem.datetime.min, att|LEADING0, 2);
lcdDrawText(lcdNextPos, y, ":", att);
lcdDrawNumber(lcdNextPos, y, telemetryItem.datetime.sec, att|LEADING0, 2);
}
void drawDate(coord_t x, coord_t y, TelemetryItem & telemetryItem, LcdFlags att)
{
if (BLINK_ON_PHASE) {
lcdDrawNumber(x, y, telemetryItem.datetime.hour, att|LEADING0, 2);
lcdDrawText(lcdNextPos, y, ":", att);
lcdDrawNumber(lcdNextPos, y, telemetryItem.datetime.min, att|LEADING0, 2);
lcdDrawText(lcdNextPos, y, ":", att);
lcdDrawNumber(lcdNextPos, y, telemetryItem.datetime.sec, att|LEADING0, 2);
drawTime(x, y, telemetryItem, att);
}
else {
lcdDrawNumber(x, y, telemetryItem.datetime.year, att|LEADING0|LEFT, 4);
@@ -892,17 +906,51 @@ void drawDate(coord_t x, coord_t y, TelemetryItem & telemetryItem, LcdFlags att)
}
}
void drawTimerWithMode(coord_t x, coord_t y, uint8_t index, LcdFlags att)
{
const TimerData &timer = g_model.timers[index];
if (timer.mode) {
const TimerState &timerState = timersStates[index];
const uint8_t negative = (timerState.val < 0 ? BLINK | INVERS : 0);
if (timerState.val < 60 * 60) { // display MM:SS
div_t qr = div((int) abs(timerState.val), 60);
lcdDrawNumber(x - 5, y, qr.rem, att | LEADING0 | negative, 2);
lcdDrawText(lcdLastLeftPos, y, ":", att | BLINK | negative);
lcdDrawNumber(lcdLastLeftPos, y, qr.quot, att | negative);
if (negative)
lcdDrawText(lcdLastLeftPos, y, "-", att | negative);
}
else if (timerState.val < (99 * 60 * 60) + (59 * 60)) { // display HHhMM
div_t qr = div((int) (abs(timerState.val) / 60), 60);
lcdDrawNumber(x - 5, y, qr.rem, att | LEADING0, 2);
lcdDrawText(lcdLastLeftPos, y, "h", att);
lcdDrawNumber(lcdLastLeftPos, y, qr.quot, att);
if (negative)
lcdDrawText(lcdLastLeftPos, y, "-", att);
}
else { //display HHHH for crazy large persistent timers
lcdDrawText(x - 5, y, "h", att);
lcdDrawNumber(lcdLastLeftPos, y, timerState.val / 3600, att);
}
uint8_t xLabel = (negative ? x - 56 : x - 49);
uint8_t len = zlen(timer.name, LEN_TIMER_NAME);
if (len > 0) {
lcdDrawSizedText(xLabel, y + FH, timer.name, len, RIGHT | ZCHAR);
}
else {
drawTimerMode(xLabel, y + FH, timer.mode, RIGHT);
}
}
}
void drawTelemScreenDate(coord_t x, coord_t y, source_t sensor, LcdFlags att)
{
y+=3;
sensor = (sensor-MIXSRC_FIRST_TELEM) / 3;
TelemetryItem & telemetryItem = telemetryItems[sensor];
lcdDrawNumber(x, y, telemetryItem.datetime.hour, att|LEADING0, 2);
lcdDrawText(lcdNextPos, y, ":", att);
lcdDrawNumber(lcdNextPos, y, telemetryItem.datetime.min, att|LEADING0, 2);
lcdDrawText(lcdNextPos, y, ":", att);
lcdDrawNumber(lcdNextPos, y, telemetryItem.datetime.sec, att|LEADING0, 2);
drawTime(x, y, telemetryItem, att);
lcdDrawNumber(x-29, y, telemetryItem.datetime.month, att|LEADING0|LEFT, 2);
lcdDrawChar(lcdNextPos, y, '-', att);
@@ -912,7 +960,7 @@ void drawTelemScreenDate(coord_t x, coord_t y, source_t sensor, LcdFlags att)
void drawGPSPosition(coord_t x, coord_t y, int32_t longitude, int32_t latitude, LcdFlags flags)
{
if (flags & DBLSIZE) {
x -= (g_eeGeneral.gpsFormat == 0 ? 62 : 61);
x -= 62; // (g_eeGeneral.gpsFormat == 0 ? 62 : 61);
flags &= ~0x0F00; // TODO constant
drawGPSCoord(x, y, latitude, "NS", flags);
drawGPSCoord(x, y+FH, longitude, "EW", flags);
@@ -943,7 +991,7 @@ void lcdDraw1bitBitmap(coord_t x, coord_t y, const uint8_t * img, uint8_t idx, L
uint8_t hb = ((*q++) + 7) / 8;
bool inv = (att & INVERS) ? true : (att & BLINK ? BLINK_ON_PHASE : false);
q += idx*w*hb;
for (uint8_t yb = 0; yb < hb; yb++) {
for (uint32_t yb = 0; yb < hb; yb++) {
uint8_t *p = &displayBuf[(y / 8 + yb) * LCD_W + x];
for (coord_t i=0; i<w; i++){
uint8_t b = *q++;
+25 -37
View File
@@ -23,15 +23,14 @@
#include <inttypes.h>
typedef int coord_t;
typedef uint32_t LcdFlags;
typedef uint8_t display_t;
#define BOX_WIDTH 23
#define coord_t uint8_t
#define scoord_t int8_t
#define CENTER
#define CENTER_OFS 0
typedef int32_t lcdint_t;
typedef uint32_t lcduint_t;
#define FW 6
#define FWNUM 5
#define FH 8
@@ -45,7 +44,7 @@
#define BLINK 0x01
#define INVERS 0x02
#if defined(BOLD_FONT)
#define BOLD 0x40
#define BOLD 0x40u
#else
#define BOLD 0x00
#endif
@@ -54,13 +53,11 @@
#define CENTERED 0x20
#define CONDENSED 0x08
#define FIXEDWIDTH 0x10
/* lcd puts flags */
/* no 0x80 here because of "GV"1 which is aligned LEFT */
/* no 0x10 here because of "MODEL"01 which uses LEADING0 */
#define ZCHAR 0x80
#define ZCHAR 0x80u
/* lcdDrawNumber additional flags */
#define UNSIGN 0x08
#define LEADING0 0x10
#define PREC1 0x20
#define PREC2 0x30
@@ -90,9 +87,6 @@
#define TIMEHOUR 0x2000
#define STREXPANDED 0x4000
typedef uint32_t LcdFlags;
#define display_t uint8_t
#define DISPLAY_BUFFER_SIZE (LCD_W*((LCD_H+7)/8))
extern display_t displayBuf[DISPLAY_BUFFER_SIZE];
@@ -103,11 +97,6 @@ extern coord_t lcdNextPos;
#define DISPLAY_END (displayBuf + DISPLAY_BUFFER_SIZE)
#define ASSERT_IN_DISPLAY(p) assert((p) >= displayBuf && (p) < DISPLAY_END)
#if defined(PCBSKY9X)
extern volatile uint8_t lcdLock ;
extern volatile uint32_t lcdInputs ;
#endif
void lcdDrawChar(coord_t x, coord_t y, const unsigned char c);
void lcdDrawChar(coord_t x, coord_t y, const unsigned char c, LcdFlags flags);
void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags flags);
@@ -116,23 +105,23 @@ void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len, L
void lcdDrawText(coord_t x, coord_t y, const char * s);
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len);
void lcdDrawTextAlignedLeft(coord_t y, const char * s);
#define lcdDrawTextAlignedCenter(y, s) lcdDrawText((LCD_W-sizeof(TR_##s)*FW+FW+1)/2, y, STR_##s)
void lcdDrawTextIndented(coord_t y, const char * s);
void drawTimerWithMode(coord_t x, coord_t y, uint8_t index, LcdFlags att);
void lcdDrawHexNumber(coord_t x, coord_t y, uint32_t val, LcdFlags mode=0);
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags mode, uint8_t len);
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags mode=0);
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags mode, uint8_t len);
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags mode=0);
void lcdDraw8bitsNumber(coord_t x, coord_t y, int8_t val);
void drawStringWithIndex(coord_t x, coord_t y, const char * str, uint8_t idx, LcdFlags att=0);
void putsModelName(coord_t x, coord_t y, char * name, uint8_t id, LcdFlags att);
#if !defined(BOOT) // TODO not here ...
void drawSwitch(coord_t x, coord_t y, swsrc_t swtch, LcdFlags att=0);
void drawSwitch(coord_t x, coord_t y, swsrc_t swtch, LcdFlags att=0, bool autoBold = true);
void drawSource(coord_t x, coord_t y, mixsrc_t idx, LcdFlags att=0);
#endif
void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, int8_t mode, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att=0);
void drawTrimMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, LcdFlags att);
void drawShortTrimMode(coord_t x, coord_t y, uint8_t mode, uint8_t idx, LcdFlags att);
@@ -147,13 +136,11 @@ void putsChnLetter(coord_t x, coord_t y, uint8_t idx, LcdFlags attr);
void putsVolts(coord_t x, coord_t y, uint16_t volts, LcdFlags att);
void putsVBat(coord_t x, coord_t y, LcdFlags att);
#define putstime_t int32_t
#define FlightModesType uint16_t
#define FlightModesType uint16_t
void drawRtcTime(coord_t x, coord_t y, LcdFlags att);
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2);
inline void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att)
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att, LcdFlags att2);
inline void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att)
{
drawTimer(x, y, tme, att, att);
}
@@ -165,13 +152,11 @@ void lcdDrawPoint(coord_t x, coord_t y, LcdFlags att=0);
void lcdMaskPoint(uint8_t *p, uint8_t mask, LcdFlags att=0);
void lcdDrawSolidHorizontalLine(coord_t x, coord_t y, coord_t w, LcdFlags att=0);
void lcdDrawHorizontalLine(coord_t x, coord_t y, coord_t w, uint8_t pat, LcdFlags att=0);
void lcdDrawSolidVerticalLine(coord_t x, scoord_t y, scoord_t h, LcdFlags att=0);
void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlags att=0);
void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat=SOLID, LcdFlags att=0);
void lcdDrawFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, uint8_t pat=SOLID, LcdFlags att=0);
inline void lcdDrawSolidFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, LcdFlags att=0)
void lcdDrawSolidVerticalLine(coord_t x, coord_t y, coord_t h, LcdFlags att=0);
void lcdDrawVerticalLine(coord_t x, coord_t y, coord_t h, uint8_t pat, LcdFlags att=0);
void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat=SOLID, LcdFlags att=0);
void lcdDrawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat=SOLID, LcdFlags att=0);
inline void lcdDrawSolidFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, LcdFlags att=0)
{
lcdDrawFilledRect(x, y, w, h, SOLID, att);
}
@@ -179,7 +164,10 @@ void lcdDrawRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat=SOLID,
void lcdInvertLine(int8_t line);
#define lcdInvertLastLine() lcdInvertLine(LCD_LINES-1)
inline void lcdDrawSquare(coord_t x, coord_t y, coord_t w, LcdFlags att=0) { lcdDrawRect(x, y, w, w, SOLID, att); }
inline void lcdDrawSquare(coord_t x, coord_t y, coord_t w, LcdFlags att=0)
{
lcdDrawRect(x, y, w, w, SOLID, att);
}
void drawTelemetryTopBar();
@@ -189,7 +177,7 @@ void drawTelemetryTopBar();
lcdDrawSolidVerticalLine(xx+1,yy-ll,ll)
void lcdClear(void);
void lcdClear();
void lcdDraw1bitBitmap(coord_t x, coord_t y, const unsigned char * img, uint8_t idx, LcdFlags att=0);
inline void lcdDrawBitmap(coord_t x, coord_t y, const uint8_t * bitmap)
{
+2 -1
View File
@@ -24,7 +24,7 @@
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay)
{
lcdDrawTextAlignedLeft(y, str);
lcdDrawNumber(MIXES_2ND_COLUMN, y, (10/DELAY_STEP)*delay, attr|PREC1|LEFT);
lcdDrawNumber(MIXES_2ND_COLUMN, y, delay, attr|PREC1|LEFT);
if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, delay, DELAY_MAX);
return delay;
}
@@ -46,3 +46,4 @@ void editSingleName(coord_t x, coord_t y, const char * label, char * name, uint8
}
uint8_t s_currIdx;
uint8_t s_currIdxSubMenu;
+2 -2
View File
@@ -67,8 +67,8 @@ void menuModelNotes(event_t event)
{
if (event == EVT_ENTRY) {
#if defined(SDCARD)
strcpy(s_text_file, MODELS_PATH "/");
char *buf = strcat_modelname(&s_text_file[sizeof(MODELS_PATH)], g_eeGeneral.currModel);
strcpy(reusableBuffer.viewText.filename, MODELS_PATH "/");
char *buf = strcat_modelname(&reusableBuffer.viewText.filename[sizeof(MODELS_PATH)], g_eeGeneral.currModel);
strcpy(buf, TEXT_EXT);
#endif
}
+8 -24
View File
@@ -65,33 +65,23 @@ inline MenuHandlerFunc lastPopMenu()
void onMainViewMenu(const char * result);
void menuFirstCalib(event_t event);
void menuMainView(event_t event);
void menuViewTelemetryFrsky(event_t event);
void menuViewTelemetry(event_t event);
void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomFunctionsContext * functionsContext);
enum MenuRadioIndexes
{
#if defined(PCBI6_ELRSV2)
#if defined(RADIO_TOOLS)
MENU_RADIO_TOOLS,
#endif
MENU_RADIO_SETUP,
CASE_SDCARD(MENU_RADIO_SD_MANAGER)
MENU_RADIO_SETUP,
MENU_RADIO_SPECIAL_FUNCTIONS,
MENU_RADIO_TRAINER,
MENU_RADIO_VERSION,
#if defined(MENU_DIAGKEYS)
MENU_RADIO_SWITCHES_TEST,
#endif
#if defined(MENU_ANALOGS)
MENU_RADIO_ANALOGS_TEST,
#endif
MENU_RADIO_HARDWARE,
MENU_RADIO_CALIBRATION,
MENU_RADIO_VERSION,
MENU_RADIO_PAGES_COUNT
};
#if defined(PCBI6_ELRSV2)
void menuRadioTools(event_t event);
#endif
void menuRadioSetup(event_t event);
void menuRadioSdManager(event_t event);
void menuRadioSpecialFunctions(event_t event);
@@ -100,25 +90,19 @@ void menuRadioVersion(event_t event);
void menuRadioDiagKeys(event_t event);
void menuRadioDiagAnalogs(event_t event);
void menuRadioHardware(event_t event);
void menuRadioTools(event_t event);
void menuRadioCalibration(event_t event);
static const MenuHandlerFunc menuTabGeneral[] = {
#if defined(PCBI6_ELRSV2)
#if defined(RADIO_TOOLS)
menuRadioTools,
#endif
menuRadioSetup,
CASE_SDCARD(menuRadioSdManager)
menuRadioSpecialFunctions,
menuRadioTrainer,
menuRadioVersion,
#if defined(MENU_DIAGKEYS)
menuRadioDiagKeys,
#endif
#if defined(MENU_DIAGANAS)
menuRadioDiagAnalogs,
#endif
menuRadioHardware,
menuRadioCalibration
menuRadioVersion
};
enum MenuModelIndexes {
@@ -181,7 +165,7 @@ static const MenuHandlerFunc menuTabModel[] = {
void menuStatisticsView(event_t event);
void menuStatisticsDebug(event_t event);
void menuStatisticsDebug2(event_t event);
#if !defined(PCBI6)
#if !defined(PCBI6X)
void menuAboutView(event_t event);
#endif
#endif // _MENUS_H_
+53 -18
View File
@@ -20,17 +20,39 @@
#include "opentx.h"
void displayPresetChoice(event_t event)
void runPopupCurvePreset(event_t event)
{
runPopupWarning(event);
lcdDrawNumber(WARNING_LINE_X+FW*7, WARNING_LINE_Y, 45*warningInputValue/4, LEFT|INVERS);
warningResult = false;
drawMessageBox();
lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y+2*FH, STR_POPUPS_ENTER_EXIT);
switch (event) {
case EVT_KEY_BREAK(KEY_ENTER):
warningResult = true;
// no break
case EVT_KEY_BREAK(KEY_EXIT):
warningText = NULL;
warningType = WARNING_TYPE_ASTERISK;
break;
default:
s_editMode = EDIT_MODIFY_FIELD;
reusableBuffer.curveEdit.preset = checkIncDec(event, reusableBuffer.curveEdit.preset, -4, 4);
s_editMode = EDIT_SELECT_FIELD;
break;
}
lcdDrawNumber(WARNING_LINE_X+FW*7, WARNING_LINE_Y, 45 * reusableBuffer.curveEdit.preset / 4, LEFT|INVERS);
lcdDrawChar(lcdLastRightPos, WARNING_LINE_Y, '@', INVERS);
if (warningResult) {
warningResult = 0;
CurveInfo & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
int k = 25 * warningInputValue;
CurveInfo & crv = g_model.curves[s_currIdxSubMenu];
int8_t * points = curveAddress(s_currIdxSubMenu);
int k = 25 * reusableBuffer.curveEdit.preset;
int dx = 2000 / (5+crv.points-1);
for (uint8_t i=0; i<5+crv.points; i++) {
int x = -1000 + i * dx;
@@ -45,17 +67,18 @@ void displayPresetChoice(event_t event)
void onCurveOneMenu(const char * result)
{
if (result == STR_CURVE_PRESET) {
POPUP_INPUT(STR_PRESET, displayPresetChoice, 0, -4, 4);
reusableBuffer.curveEdit.preset = 4; // 45°
POPUP_INPUT(STR_PRESET, runPopupCurvePreset);
}
else if (result == STR_MIRROR) {
CurveInfo & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
CurveInfo & crv = g_model.curves[s_currIdxSubMenu];
int8_t * points = curveAddress(s_currIdxSubMenu);
for (int i=0; i<5+crv.points; i++)
points[i] = -points[i];
}
else if (result == STR_CLEAR) {
CurveInfo & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
CurveInfo & crv = g_model.curves[s_currIdxSubMenu];
int8_t * points = curveAddress(s_currIdxSubMenu);
for (int i=0; i<5+crv.points; i++)
points[i] = 0;
if (crv.type == CURVE_TYPE_CUSTOM) {
@@ -66,10 +89,10 @@ void onCurveOneMenu(const char * result)
void menuModelCurveOne(event_t event)
{
CurveData & crv = g_model.curves[s_curveChan];
int8_t * points = curveAddress(s_curveChan);
CurveData & crv = g_model.curves[s_currIdxSubMenu];
int8_t * points = curveAddress(s_currIdxSubMenu);
drawStringWithIndex(PSIZE(TR_MENUCURVES)*FW+FW, 0, STR_CV, s_curveChan+1);
drawStringWithIndex(PSIZE(TR_MENUCURVES)*FW+FW, 0, STR_CV, s_currIdxSubMenu+1);
SIMPLE_SUBMENU(STR_MENUCURVES, 4 + 5+crv.points + (crv.type==CURVE_TYPE_CUSTOM ? 5+crv.points-2 : 0));
@@ -85,9 +108,9 @@ void menuModelCurveOne(event_t event)
uint8_t newType = checkIncDecModelZero(event, crv.type, CURVE_TYPE_LAST);
if (newType != crv.type) {
for (int i = 1; i < 4 + crv.points; i++) {
points[i] = calcRESXto100(applyCustomCurve(calc100toRESX(getCurveX(5 + crv.points, i)), s_curveChan));
points[i] = calcRESXto100(applyCustomCurve(calc100toRESX(getCurveX(5 + crv.points, i)), s_currIdxSubMenu));
}
if (moveCurve(s_curveChan, checkIncDec_Ret > 0 ? 3 + crv.points : -3 - crv.points)) {
if (moveCurve(s_currIdxSubMenu, checkIncDec_Ret > 0 ? 3 + crv.points : -3 - crv.points)) {
if (newType == CURVE_TYPE_CUSTOM) {
resetCustomCurveX(points, 5 + crv.points);
}
@@ -108,8 +131,8 @@ void menuModelCurveOne(event_t event)
newPoints[0] = points[0];
newPoints[4 + count] = points[4 + crv.points];
for (int i = 1; i < 4 + count; i++)
newPoints[i] = calcRESXto100(applyCustomCurve(calc100toRESX(getCurveX(5 + count, i)), s_curveChan));
if (moveCurve(s_curveChan, checkIncDec_Ret * (crv.type == CURVE_TYPE_CUSTOM ? 2 : 1))) {
newPoints[i] = calcRESXto100(applyCustomCurve(calc100toRESX(getCurveX(5 + count, i)), s_currIdxSubMenu));
if (moveCurve(s_currIdxSubMenu, checkIncDec_Ret * (crv.type == CURVE_TYPE_CUSTOM ? 2 : 1))) {
for (int i = 0; i < 5 + count; i++) {
points[i] = newPoints[i];
if (crv.type == CURVE_TYPE_CUSTOM && i != 0 && i != 4 + count)
@@ -138,6 +161,18 @@ void menuModelCurveOne(event_t event)
POPUP_MENU_START(onCurveOneMenu);
}
break;
#if defined(NAVIGATION_X7)
case EVT_KEY_LONG(KEY_MENU):
pushMenu(menuChannelsView);
killEvents(event);
break;
#elif defined(NAVIGATION_XLITE)
case EVT_KEY_LONG(KEY_SHIFT):
pushMenu(menuChannelsView);
killEvents(event);
break;
#endif
}
drawCurve(0);
@@ -33,12 +33,12 @@ void onModelCustomScriptMenu(const char *result)
ScriptData &sd = g_model.scriptsData[s_currIdx];
if (result == STR_UPDATE_LIST) {
if (!sdListFiles(SCRIPTS_MIXES_PATH, SCRIPTS_EXT, sizeof(sd.file), NULL)) {
if (!sdListFiles(SCRIPTS_MIXES_PATH, SCRIPTS_EXT, sizeof(sd.file), nullptr)) {
POPUP_WARNING(STR_NO_SCRIPTS_ON_SD);
}
}
else {
// The user choosed a lua file in the list
else if (result) {
// The user chosen a lua file in the list
copySelection(sd.file, result, sizeof(sd.file));
memset(sd.inputs, 0, sizeof(sd.inputs));
storageDirty(EE_MODEL);
+49 -31
View File
@@ -50,31 +50,56 @@ enum MenuModelDisplayItems {
#else
#define DISPLAY_COL2 (8*FW)
#endif
#define DISPLAY_COL3 (17*FW+2)
#define DISPLAY_COL3 (15*FW+2)
#if defined(LUA)
#define SCREEN_TYPE_ROWS 1
#define DISPLAY_LINE_ROWS(x) ((TELEMETRY_SCREEN_TYPE(x) == TELEMETRY_SCREEN_TYPE_NONE || TELEMETRY_SCREEN_TYPE(x) == TELEMETRY_SCREEN_TYPE_SCRIPT) ? HIDDEN_ROW : (TELEMETRY_SCREEN_TYPE(x) == TELEMETRY_SCREEN_TYPE_GAUGES ? (uint8_t)2 : (uint8_t)1))
#else
#define SCREEN_TYPE_ROWS 0
#define DISPLAY_LINE_ROWS(x) (TELEMETRY_SCREEN_TYPE(x) == TELEMETRY_SCREEN_TYPE_NONE ? HIDDEN_ROW : (TELEMETRY_SCREEN_TYPE(x) == TELEMETRY_SCREEN_TYPE_GAUGES ? (uint8_t)2 : (uint8_t)1))
#endif
#define TELEMETRY_SCREEN_ROWS(x) SCREEN_TYPE_ROWS, DISPLAY_LINE_ROWS(x), DISPLAY_LINE_ROWS(x), DISPLAY_LINE_ROWS(x), DISPLAY_LINE_ROWS(x)
#define TELEMETRY_CURRENT_SCREEN(k) (k < ITEM_DISPLAY_SCREEN_LABEL2 ? 0 : (k < ITEM_DISPLAY_SCREEN_LABEL3 ? 1 : (k < ITEM_DISPLAY_SCREEN_LABEL4 ? 2 : 3)))
#if defined(LUA)
void onTelemetryScriptFileSelectionMenu(const char *result)
inline uint8_t SCREEN_TYPE_COLUMNS(uint8_t screenIndex)
{
int screenIndex = TELEMETRY_CURRENT_SCREEN(menuVerticalPosition - HEADER_LINE);
#if defined(LUA)
if (TELEMETRY_SCREEN_TYPE(screenIndex) == TELEMETRY_SCREEN_TYPE_SCRIPT)
return 1;
else
#endif
return 0;
}
inline uint8_t SCREEN_LINE_COLUMNS(uint8_t screenIndex, uint8_t lineIndex)
{
switch (TELEMETRY_SCREEN_TYPE(screenIndex)) {
case TELEMETRY_SCREEN_TYPE_VALUES:
return 1;
case TELEMETRY_SCREEN_TYPE_BARS:
return g_model.frsky.screens[screenIndex].bars[lineIndex].source ? 2 : 0;
default:
return HIDDEN_ROW;
}
}
#define TELEMETRY_SCREEN_ROWS(x) SCREEN_TYPE_COLUMNS(x), SCREEN_LINE_COLUMNS(x, 0), SCREEN_LINE_COLUMNS(x, 1), SCREEN_LINE_COLUMNS(x, 2), SCREEN_LINE_COLUMNS(x, 3)
inline uint8_t DISPLAY_CURRENT_SCREEN(uint8_t line)
{
if (line < ITEM_DISPLAY_SCREEN_LABEL2)
return 0;
else if (line < ITEM_DISPLAY_SCREEN_LABEL3)
return 1;
else if (line < ITEM_DISPLAY_SCREEN_LABEL4)
return 2;
else
return 3;
}
#if defined(LUA)
void onTelemetryScriptFileSelectionMenu(const char * result)
{
int screenIndex = DISPLAY_CURRENT_SCREEN(menuVerticalPosition - HEADER_LINE);
if (result == STR_UPDATE_LIST) {
if (!sdListFiles(SCRIPTS_TELEM_PATH, SCRIPTS_EXT, sizeof(g_model.frsky.screens[screenIndex].script.file), NULL)) {
POPUP_WARNING(STR_NO_SCRIPTS_ON_SD);
}
}
else {
// The user choosed a file in the list
else if (result != STR_EXIT) {
// The user chosen a file in the list
memcpy(g_model.frsky.screens[screenIndex].script.file, result, sizeof(g_model.frsky.screens[screenIndex].script.file));
storageDirty(EE_MODEL);
LUA_LOAD_MODEL_SCRIPTS();
@@ -82,7 +107,6 @@ void onTelemetryScriptFileSelectionMenu(const char *result)
}
#endif
int skipHiddenLines(int noRows, const uint8_t * mstate_tab, int row)
{
for(int i=0; i<noRows; ++i) {
@@ -106,7 +130,7 @@ void menuModelDisplay(event_t event)
int8_t sub = menuVerticalPosition - HEADER_LINE;
for (uint8_t i=0; i<NUM_BODY_LINES; i++) {
for (uint32_t i=0; i<NUM_BODY_LINES; i++) {
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
int k = i + menuVerticalOffset;
SKIP_HIDDEN_MENU_ROWS(k);
@@ -120,7 +144,7 @@ void menuModelDisplay(event_t event)
case ITEM_DISPLAY_SCREEN_LABEL3:
case ITEM_DISPLAY_SCREEN_LABEL4:
{
uint8_t screenIndex = TELEMETRY_CURRENT_SCREEN(k);
uint8_t screenIndex = DISPLAY_CURRENT_SCREEN(k);
drawStringWithIndex(0*FW, y, STR_SCREEN, screenIndex+1);
TelemetryScreenType oldScreenType = TELEMETRY_SCREEN_TYPE(screenIndex);
TelemetryScreenType newScreenType = (TelemetryScreenType)editChoice(DISPLAY_COL2, y, "", STR_VTELEMSCREENTYPE, oldScreenType, 0, TELEMETRY_SCREEN_TYPE_MAX, (menuHorizontalPosition==0 ? attr : 0), event);
@@ -149,9 +173,6 @@ void menuModelDisplay(event_t event)
}
}
}
else if (attr) {
MOVE_CURSOR_FROM_HERE();
}
#endif
break;
}
@@ -207,9 +228,6 @@ void menuModelDisplay(event_t event)
drawSourceCustomValue(DISPLAY_COL3, y, bar.source, bar.barMax, (menuHorizontalPosition==2 ? attr : 0) | lf);
}
}
else if (attr) {
MOVE_CURSOR_FROM_HERE();
}
if (attr && s_editMode>0) {
switch (menuHorizontalPosition) {
case 0:
@@ -226,10 +244,10 @@ void menuModelDisplay(event_t event)
}
break;
case 1:
bar.barMin = checkIncDec(event, bar.barMin, barMin, bar.barMax, EE_MODEL|NO_INCDEC_MARKS);
bar.barMin = checkIncDec(event, bar.barMin, barMin, barMax, EE_MODEL|NO_INCDEC_MARKS);
break;
case 2:
bar.barMax = checkIncDec(event, bar.barMax, bar.barMin, barMax, EE_MODEL|NO_INCDEC_MARKS);
bar.barMax = checkIncDec(event, bar.barMax, barMin, barMax, EE_MODEL|NO_INCDEC_MARKS);
break;
}
}
@@ -237,11 +255,11 @@ void menuModelDisplay(event_t event)
else {
for (int c=0; c<NUM_LINE_ITEMS; c++) {
LcdFlags cellAttr = (menuHorizontalPosition==c ? attr : 0);
source_t & value = g_model.frsky.screens[screenIndex].lines[lineIndex].sources[c];
source_t * value = &g_model.frsky.screens[screenIndex].lines[lineIndex].sources[c];
const coord_t pos[] = {DISPLAY_COL1, DISPLAY_COL2, DISPLAY_COL3};
drawSource(pos[c], y, value, cellAttr);
drawSource(pos[c], y, *value, cellAttr);
if (cellAttr && s_editMode>0) {
value = checkIncDec(event, value, 0, MIXSRC_LAST_TELEM, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailable);
*value = checkIncDec(event, *value, 0, MIXSRC_LAST_TELEM, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailable);
}
}
if (attr && menuHorizontalPosition == NUM_LINE_ITEMS) {
+19 -14
View File
@@ -83,16 +83,17 @@ void menuModelFlightModeOne(event_t event)
int8_t editMode = s_editMode;
#if defined(GVARS) && !defined(PCBSTD)
if (s_currIdx == 0 && sub>=ITEM_MODEL_FLIGHT_MODE_SWITCH) sub += VERTICAL_SHIFT;
if (s_currIdx == 0 && sub>=ITEM_MODEL_FLIGHT_MODE_SWITCH)
sub += VERTICAL_SHIFT;
for (uint8_t k=0; k<LCD_LINES-1; k++) {
for (uint32_t k=0; k<LCD_LINES-1; k++) {
coord_t y = MENU_HEADER_HEIGHT + 1 + k*FH;
int8_t i = k + menuVerticalOffset;
if (s_currIdx == 0 && i>=ITEM_MODEL_FLIGHT_MODE_SWITCH) i += VERTICAL_SHIFT;
uint8_t attr = (sub==i ? (editMode>0 ? BLINK|INVERS : INVERS) : 0);
#else
for (uint8_t i=0, k=0, y=PHASE_ONE_FIRST_LINE; i<ITEM_MODEL_FLIGHT_MODE_MAX; i++, k++, y+=FH) {
for (uint32_t i=0, k=0, y=PHASE_ONE_FIRST_LINE; i<ITEM_MODEL_FLIGHT_MODE_MAX; i++, k++, y+=FH) {
if (s_currIdx == 0 && i==ITEM_MODEL_FLIGHT_MODE_SWITCH) i = ITEM_MODEL_FLIGHT_MODE_FADE_IN;
uint8_t attr = (sub==k ? (editMode>0 ? BLINK|INVERS : INVERS) : 0);
#endif
@@ -107,9 +108,13 @@ void menuModelFlightModeOne(event_t event)
case ITEM_MODEL_FLIGHT_MODE_TRIMS:
lcdDrawTextAlignedLeft(y, STR_TRIMS);
for (uint8_t t = 0; t < NUM_STICKS; t++) {
for (uint32_t t = 0; t < NUM_STICKS; t++) {
drawTrimMode(MIXES_2ND_COLUMN + (t*2*FW), y, s_currIdx, t, menuHorizontalPosition == t ? attr : 0);
#if defined(NAVIGATION_9X)
if (s_editMode > 0 && attr && menuHorizontalPosition == t) {
#else
if (s_editMode >= 0 && attr && menuHorizontalPosition == t) {
#endif
trim_t & v = fm->trim[t];
v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, k==0 ? 0 : 2*MAX_FLIGHT_MODES-1, EE_MODEL, isTrimModeAvailable);
}
@@ -121,7 +126,7 @@ void menuModelFlightModeOne(event_t event)
lcdDrawTextAlignedLeft(y, STR_ROTARY_ENCODER);
for (uint8_t t=0; t<NUM_ROTARY_ENCODERS; t++) {
putsRotaryEncoderMode(MIXES_2ND_COLUMN+(t*FW), y, s_currIdx, t, menuHorizontalPosition==t ? attr : 0);
if (attr && menuHorizontalPosition==t && ((editMode>0) || p1valdiff)) {
if (attr && menuHorizontalPosition==t && (editMode > 0)) {
int16_t v = flightModeAddress(s_currIdx)->rotaryEncoders[t];
if (v < ROTARY_ENCODER_MAX) v = ROTARY_ENCODER_MAX;
v = checkIncDec(event, v, ROTARY_ENCODER_MAX, ROTARY_ENCODER_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
@@ -157,7 +162,7 @@ void menuModelFlightModeOne(event_t event)
drawStringWithIndex(INDENT_WIDTH, y, STR_GV, idx+1, posHorz==0 ? attr : 0);
lcdDrawSizedText(4*FW, y,g_model.gvars[idx].name, LEN_GVAR_NAME, ZCHAR);
if (attr && editMode>0 && posHorz==0) {
s_currIdx = sub - ITEM_MODEL_FLIGHT_MODE_GV1;
s_currIdxSubMenu = sub - ITEM_MODEL_FLIGHT_MODE_GV1;
editMode = 0;
pushMenu(menuModelGVarOne);
}
@@ -170,7 +175,7 @@ void menuModelFlightModeOne(event_t event)
else {
lcdDrawText(9*FW, y, STR_OWN, posHorz==1 ? attr : 0);
}
if (attr && s_currIdx>0 && posHorz==1 && (editMode>0 || p1valdiff)) {
if (attr && s_currIdx>0 && posHorz==1 && editMode > 0) {
if (v < GVAR_MAX) v = GVAR_MAX;
v = checkIncDec(event, v, GVAR_MAX, GVAR_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
if (checkIncDec_Ret) {
@@ -198,7 +203,7 @@ void menuModelFlightModeOne(event_t event)
#define TRIMS_OFS (-FW/2-4)
#define ROTARY_ENC_OFS (2)
#endif
#elif defined(PCBTARANIS)
#elif defined(PCBTARANIS) || defined(PCBI6X)
#define NAME_POS 20
#define SWITCH_POS 59
#define TRIMS_POS 79
@@ -239,14 +244,14 @@ void menuModelFlightModesAll(event_t event)
att = (i==sub ? INVERS : 0);
FlightModeData * p = flightModeAddress(i);
drawFlightMode(0, y, i+1, att|(getFlightMode()==i ? BOLD : 0));
#if defined(PCBTARANIS)
#if defined(PCBTARANIS) || defined(PCBI6X)
lcdDrawSizedText(NAME_POS, y, p->name, sizeof(p->name), ZCHAR);
#else
lcdDrawSizedText(4*FW+NAME_OFS, y, p->name, sizeof(p->name), ZCHAR);
#endif
if (i == 0) {
for (uint8_t t=0; t<NUM_STICKS; t++) {
#if defined(PCBTARANIS)
for (uint32_t t=0; t<NUM_STICKS; t++) {
#if defined(PCBTARANIS) || defined(PCBI6X)
drawTrimMode(TRIMS_POS+t*FW*2, y, i, t, 0);
#else
drawShortTrimMode((9+LEN_FLIGHT_MODE_NAME+t)*FW+TRIMS_OFS, y, i, t, 0);
@@ -254,14 +259,14 @@ void menuModelFlightModesAll(event_t event)
}
}
else {
#if defined(PCBTARANIS)
#if defined(PCBTARANIS) || defined(PCBI6X)
drawSwitch(SWITCH_POS, y, p->swtch, 0);
for (uint8_t t=0; t<NUM_STICKS; t++) {
for (uint32_t t=0; t<NUM_STICKS; t++) {
drawTrimMode(TRIMS_POS+t*FW*2, y, i, t, 0);
}
#else
drawSwitch((4+LEN_FLIGHT_MODE_NAME)*FW+SWITCH_OFS, y, p->swtch, 0);
for (uint8_t t=0; t<NUM_STICKS; t++) {
for (uint32_t t=0; t<NUM_STICKS; t++) {
drawShortTrimMode((9+LEN_FLIGHT_MODE_NAME+t)*FW+TRIMS_OFS, y, i, t, 0);
}
#endif
+14 -14
View File
@@ -23,28 +23,28 @@
void editGVarValue(coord_t x, coord_t y, event_t event, uint8_t gvar, uint8_t flightMode, LcdFlags flags)
{
FlightModeData * fm = &g_model.flightModeData[flightMode];
gvar_t & v = fm->gvars[gvar];
gvar_t * v = &fm->gvars[gvar];
int16_t vmin, vmax;
if (v > GVAR_MAX) {
uint8_t fm = v - GVAR_MAX - 1;
if (*v > GVAR_MAX) {
uint8_t fm = *v - GVAR_MAX - 1;
if (fm >= flightMode) fm++;
drawFlightMode(x, y, fm + 1, flags&(~LEFT));
vmin = GVAR_MAX + 1;
vmax = GVAR_MAX + MAX_FLIGHT_MODES - 1;
}
else {
drawGVarValue(x, y, gvar, v, flags);
drawGVarValue(x, y, gvar, *v, flags);
vmin = GVAR_MIN + g_model.gvars[gvar].min;
vmax = GVAR_MAX - g_model.gvars[gvar].max;
}
if (flags & INVERS) {
if (event == EVT_KEY_LONG(KEY_ENTER) && flightMode > 0) {
v = (v > GVAR_MAX ? 0 : GVAR_MAX+1);
*v = (*v > GVAR_MAX ? 0 : GVAR_MAX+1);
storageDirty(EE_MODEL);
}
else if (s_editMode > 0) {
v = checkIncDec(event, v, vmin, vmax, EE_MODEL);
*v = checkIncDec(event, *v, vmin, vmax, EE_MODEL);
}
}
}
@@ -64,10 +64,10 @@ enum GVarFields {
void menuModelGVarOne(event_t event)
{
GVarData * gvar = &g_model.gvars[s_currIdx];
GVarData * gvar = &g_model.gvars[s_currIdxSubMenu];
drawStringWithIndex(PSIZE(TR_GVARS)*FW+FW, 0, STR_GV, s_currIdx+1, 0);
drawGVarValue(32*FW, 0, s_currIdx, getGVarValue(s_currIdx, getFlightMode()));
drawStringWithIndex(PSIZE(TR_GVARS)*FW+FW, 0, STR_GV, s_currIdxSubMenu+1, 0);
drawGVarValue(32*FW, 0, s_currIdxSubMenu, getGVarValue(s_currIdxSubMenu, getFlightMode()));
lcdDrawFilledRect(0, 0, LCD_W, FH, SOLID);
SIMPLE_SUBMENU(STR_GVARS, GVAR_FIELD_LAST);
@@ -91,14 +91,14 @@ void menuModelGVarOne(event_t event)
break;
case GVAR_FIELD_MIN:
lcdDrawText(0, y, STR_MIN);
drawGVarValue(GVAR_2ND_COLUMN, y, s_currIdx, GVAR_MIN+gvar->min, LEFT|attr);
lcdDrawTextAlignedLeft(y, STR_MIN);
drawGVarValue(GVAR_2ND_COLUMN, y, s_currIdxSubMenu, GVAR_MIN+gvar->min, LEFT|attr);
if (attr) gvar->min = checkIncDec(event, GVAR_MIN+gvar->min, GVAR_MIN, GVAR_MAX-gvar->max, EE_MODEL) - GVAR_MIN;
break;
case GVAR_FIELD_MAX:
lcdDrawText(0, y, STR_MAX);
drawGVarValue(GVAR_2ND_COLUMN, y, s_currIdx, GVAR_MAX-gvar->max, LEFT|attr);
lcdDrawTextAlignedLeft(y, STR_MAX);
drawGVarValue(GVAR_2ND_COLUMN, y, s_currIdxSubMenu, GVAR_MAX-gvar->max, LEFT|attr);
if (attr) gvar->max = GVAR_MAX - checkIncDec(event, GVAR_MAX-gvar->max, GVAR_MIN+gvar->min, GVAR_MAX, EE_MODEL);
break;
@@ -108,7 +108,7 @@ void menuModelGVarOne(event_t event)
default:
drawStringWithIndex(0, y, STR_FM, k-GVAR_FIELD_FM0);
editGVarValue(GVAR_2ND_COLUMN, y, event, s_currIdx, k-GVAR_FIELD_FM0, LEFT|attr);
editGVarValue(GVAR_2ND_COLUMN, y, event, s_currIdxSubMenu, k-GVAR_FIELD_FM0, LEFT|attr);
break;
}
}
+16 -5
View File
@@ -21,7 +21,6 @@
#include "opentx.h"
#define EXPO_ONE_2ND_COLUMN (7*FW+3*FW+2)
#define EXPO_ONE_FM_WIDTH (5*FW)
int expoFn(int x)
{
@@ -40,6 +39,7 @@ void drawFunction(FnFuncP fn, uint8_t offset)
for (int xv=-CURVE_SIDE_WIDTH; xv<=CURVE_SIDE_WIDTH; xv++) {
coord_t yv = (LCD_H-1) - (((uint16_t)RESX + fn(xv * (RESX/CURVE_SIDE_WIDTH))) / 2 * (LCD_H-1) / RESX);
yv = limit (0, yv, LCD_H-1);
if (prev_yv != (coord_t)-1) {
if (abs((int8_t)yv-prev_yv) <= 1) {
lcdDrawPoint(CURVE_CENTER_X+xv-offset-1, prev_yv, FORCE);
@@ -72,6 +72,17 @@ enum ExposFields {
void menuModelExpoOne(event_t event)
{
#if defined(NAVIGATION_X7)
if (event == EVT_KEY_LONG(KEY_MENU)) {
pushMenu(menuChannelsView);
killEvents(event);
}
#elif defined(NAVIGATION_XLITE)
if (event == EVT_KEY_LONG(KEY_SHIFT)) {
pushMenu(menuChannelsView);
killEvents(event);
}
#endif
ExpoData * ed = expoAddress(s_currIdx);
drawSource(PSIZE(TR_MENUINPUTS)*FW+FW, 0, MIXSRC_FIRST_INPUT+ed->chn, 0);
@@ -100,14 +111,14 @@ void menuModelExpoOne(event_t event)
break;
case EXPO_FIELD_SOURCE:
lcdDrawTextAlignedLeft(y, NO_INDENT(STR_SOURCE));
lcdDrawTextAlignedLeft(y, STR_SOURCE);
drawSource(EXPO_ONE_2ND_COLUMN, y, ed->srcRaw, RIGHT|STREXPANDED|attr);
if (attr) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isInputSourceAvailable);
if (attr) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailableInInputs);
break;
case EXPO_FIELD_SCALE:
lcdDrawTextAlignedLeft(y, STR_SCALE);
drawSensorCustomValue(EXPO_ONE_2ND_COLUMN, y, (ed->srcRaw - MIXSRC_FIRST_TELEM)/3, convertTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1, ed->scale), attr);
drawSensorCustomValue(EXPO_ONE_2ND_COLUMN, y, (ed->srcRaw - MIXSRC_FIRST_TELEM)/3, convertTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1, ed->scale), RIGHT | attr);
if (attr) ed->scale = checkIncDec(event, ed->scale, 0, maxTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1), EE_MODEL);
break;
@@ -117,7 +128,7 @@ void menuModelExpoOne(event_t event)
break;
case EXPO_FIELD_OFFSET:
lcdDrawTextAlignedLeft(y, NO_INDENT(STR_OFFSET));
lcdDrawTextAlignedLeft(y, STR_OFFSET);
ed->offset = GVAR_MENU_ITEM(EXPO_ONE_2ND_COLUMN, y, ed->offset, -100, 100, RIGHT | attr, 0, event);
break;
+12 -24
View File
@@ -114,7 +114,7 @@ void insertExpoMix(uint8_t expo, uint8_t idx)
memmove(mix+1, mix, (MAX_MIXERS-(idx+1))*sizeof(MixData));
memclear(mix, sizeof(MixData));
mix->destCh = s_currCh-1;
mix->srcRaw = (s_currCh > 4 ? MIXSRC_Rud - 1 + s_currCh : MIXSRC_Rud - 1 + channel_order(s_currCh));
mix->srcRaw = (s_currCh > 4 ? MIXSRC_Rud - 1 + s_currCh : MIXSRC_Rud - 1 + channelOrder(s_currCh));
mix->weight = 100;
}
resumeMixerCalculations();
@@ -240,7 +240,7 @@ void menuModelExpoOne(event_t event)
coord_t y = MENU_HEADER_HEIGHT + 1;
for (uint8_t i=0; i<EXPO_FIELD_MAX+1; i++) {
for (uint32_t i=0; i<EXPO_FIELD_MAX+1; i++) {
uint8_t attr = (sub==i ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0);
switch (i) {
case EXPO_FIELD_NAME:
@@ -271,7 +271,7 @@ void menuModelExpoOne(event_t event)
CHECK_INCDEC_MODELVAR_ZERO(event, ed->curveParam, CURVE_BASE+MAX_CURVES-1);
if (ed->curveParam) ed->curveMode = MODE_CURVE;
if (ed->curveParam>=CURVE_BASE && event==EVT_KEY_LONG(KEY_ENTER)) {
s_curveChan = ed->curveParam - CURVE_BASE;
s_currIdxSubMenu = ed->curveParam - CURVE_BASE;
pushMenu(menuModelCurveOne);
}
}
@@ -361,13 +361,13 @@ void drawOffsetBar(uint8_t x, uint8_t y, MixData * md)
}
lcdDrawSolidVerticalLine(x+GAUGE_WIDTH/2-1, y, GAUGE_HEIGHT+1);
if (barMin == -101) {
for (uint8_t i=0; i<3; ++i) {
for (uint32_t i=0; i<3; ++i) {
lcdDrawPoint(x+i, y+4-i);
lcdDrawPoint(x+3+i, y+4-i);
}
}
if (barMax == 101) {
for (uint8_t i=0; i<3; ++i) {
for (uint32_t i=0; i<3; ++i) {
lcdDrawPoint(x+GAUGE_WIDTH-8+i, y+4-i);
lcdDrawPoint(x+GAUGE_WIDTH-5+i, y+4-i);
}
@@ -404,17 +404,17 @@ void menuModelMixOne(event_t event)
editSingleName(COLUMN_X+MIXES_2ND_COLUMN, y, STR_MIXNAME, md2->name, sizeof(md2->name), event, attr);
break;
case MIX_FIELD_SOURCE:
drawFieldLabel(COLUMN_X, y, NO_INDENT(STR_SOURCE));
lcdDrawTextAlignedLeft(y, STR_SOURCE);
drawSource(COLUMN_X+MIXES_2ND_COLUMN, y, md2->srcRaw, STREXPANDED|attr);
if (attr) CHECK_INCDEC_MODELSOURCE(event, md2->srcRaw, 1, MIXSRC_LAST);
break;
case MIX_FIELD_WEIGHT:
drawFieldLabel(COLUMN_X, y, STR_WEIGHT);
lcdDrawTextAlignedLeft(y, STR_WEIGHT);
gvarWeightItem(COLUMN_X+MIXES_2ND_COLUMN, y, md2, attr|LEFT, event);
break;
case MIX_FIELD_OFFSET:
{
drawFieldLabel(COLUMN_X, y, NO_INDENT(STR_OFFSET));
lcdDrawTextAlignedLeft(y, STR_OFFSET);
u_int8int16_t offset;
MD_OFFSET_TO_UNION(md2, offset);
offset.word = GVAR_MENU_ITEM(COLUMN_X+MIXES_2ND_COLUMN, y, offset.word, GV_RANGELARGE_OFFSET_NEG, GV_RANGELARGE_OFFSET, attr|LEFT, 0, event);
@@ -427,7 +427,7 @@ void menuModelMixOne(event_t event)
{
uint8_t not_stick = (md2->srcRaw > NUM_STICKS);
int8_t carryTrim = -md2->carryTrim;
drawFieldLabel(COLUMN_X, y, STR_TRIM);
lcdDrawTextAlignedLeft(y, STR_TRIM);
lcdDrawTextAtIndex((not_stick ? COLUMN_X+MIXES_2ND_COLUMN : COLUMN_X+6*FW-3), y, STR_VMIXTRIMS, (not_stick && carryTrim == 0) ? 0 : carryTrim+1, menuHorizontalPosition==0 ? attr : 0);
if (attr && menuHorizontalPosition==0 && (not_stick || editMode>0)) md2->carryTrim = -checkIncDecModel(event, carryTrim, not_stick ? TRIM_ON : -TRIM_OFF, -TRIM_AIL);
if (!not_stick) {
@@ -443,13 +443,13 @@ void menuModelMixOne(event_t event)
case MIX_FIELD_CURVE:
{
drawFieldLabel(COLUMN_X, y, STR_CURVE);
lcdDrawTextAlignedLeft(y, STR_CURVE);
int8_t curveParam = md2->curveParam;
if (md2->curveMode == MODE_CURVE) {
drawCurveName(COLUMN_X+MIXES_2ND_COLUMN, y, curveParam, attr);
if (attr) {
if (event==EVT_KEY_LONG(KEY_ENTER) && (curveParam<0 || curveParam>=CURVE_BASE)){
s_curveChan = (curveParam<0 ? -curveParam-1 : curveParam-CURVE_BASE);
s_currIdxSubMenu = (curveParam<0 ? -curveParam-1 : curveParam-CURVE_BASE);
pushMenu(menuModelCurveOne);
}
else {
@@ -482,7 +482,7 @@ void menuModelMixOne(event_t event)
md2->swtch = editSwitch(COLUMN_X+MIXES_2ND_COLUMN, y, md2->swtch, attr, event);
break;
case MIX_FIELD_WARNING:
drawFieldLabel(COLUMN_X+MIXES_2ND_COLUMN, y, STR_MIXWARNING);
lcdDrawTextAlignedLeft(y, STR_MIXWARNING);
if (md2->mixWarn)
lcdDrawNumber(COLUMN_X+MIXES_2ND_COLUMN, y, md2->mixWarn, attr|LEFT);
else
@@ -524,7 +524,6 @@ void menuModelMixOne(event_t event)
#define MIX_LINE_SWITCH_POS 16*FW
#define MIX_LINE_DELAY_POS 19*FW+7
#if defined(NAVIGATION_MENUS)
void onExpoMixMenu(const char *result)
{
bool expo = (menuHandlers[menuLevel] == menuModelExposAll);
@@ -551,7 +550,6 @@ void onExpoMixMenu(const char *result)
deleteExpoMix(expo, s_currIdx);
}
}
#endif
void displayMixInfos(coord_t y, MixData *md)
{
@@ -672,7 +670,6 @@ void menuModelExpoMix(uint8_t expo, event_t event)
}
else {
if (s_copyMode) s_currCh = 0;
#if defined(NAVIGATION_MENUS)
if (s_currCh) {
if (reachExpoMixCountLimit(expo)) break;
insertExpoMix(expo, s_currIdx);
@@ -691,15 +688,6 @@ void menuModelExpoMix(uint8_t expo, event_t event)
POPUP_MENU_ADD_ITEM(STR_DELETE);
POPUP_MENU_START(onExpoMixMenu);
}
#else
if (s_currCh) {
if (reachExpoMixCountLimit(expo)) break;
insertExpoMix(expo, s_currIdx);
}
pushMenu(expo ? menuModelExpoOne : menuModelMixOne);
s_copyMode = 0;
return;
#endif
}
}
break;

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