Commit Graph
57 Commits
Author SHA1 Message Date
philmozandGitHub 6985d3f24b feat(color,cpn): Updates to the model telemetry page, sensor ID consistency (#3401)
* Add 'Show Instance ID' button to telemetry page to show/hide sensor instance number (default is hidden).
Fix issues with page refresh when all sensors deleted.
Select closest sensor when a single sensor is deleted.
On change, only refresh the sensor list instead of the whole page.
The 'showInstanceIds' property is saved to the model file.
Update Companion to save/load 'showInstanceIds' in model YAML file. Add checkbox to telemetry edit page.

* Update all radio specific files.

* Keep focus on 'Discover/Stop' button when searching for new sensors.
Start sensor ID index at 1 to match B&W radios.
Keep focus on changed parameter when editing sensor, don't rebuild entire parameter list on change.

* Display actual 'instance' ID instead of 'instance' + 1.

* Fix incorrect ID when reloading simulator data.

* Fix incorrect ID when reloading simulator data on B&W radios.
2023-04-17 18:44:44 +10:00
661657feca feat: New advanced joystick mode on radio, improvements to Companion and Simulator joystick support (#3111)
* Allow switches on the connected radio to control switches in the simulator via the joystick interface.

* Merge configurable radio joystick interface from banyaszg.

* Add two more 'axis' channels to companion.

* Fix 6POS from USB joystick to simulator.

* Reduce data size.

* Fix build error on B&W radios.

* Add 'Companion' button mode to work with the button logic in the Companion app.

* Build Companion joystick setup layout at runtime.
Change #define names for simulator joystick.
Allow 15 axes and 32 buttons.
Initial support for trim sliders.

* Remove custom joystick button type for companion - use 3 buttons per switch in companion to control simulator switch state.

* Fix joystick constructor calls parameters. Connect some radio joystick trims to simulator widgets.

* Restore 'companion' button type to reduce number of buttons needed. Make trims work via buttons in USB joystick.

* Connect joystick trim buttons to simulator widgets.

* Use companion source names for trims.

* Add encode / decode of usb joystick custom settings to Companion.

* Convert to lvgl layouts.
Update language files.

* Fix generated YAML storage files.

* Fix initialisation error when editing button channel. Cleanup code.

* Fix rebase.

* Fix refresh of joystick channel list view after editing an entry.
Companion joystick config window uses two columns.

* Fix vertical joystick inversion bug.
Change stick axis labels.

---------

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-03-22 10:31:29 +10:00
46cc979875 fix: Regenerate yaml, carryTrim => trimSource cleanup (#3121)
PR #2995 didn't take into account the data model storage actually does change when you change a variable name. 
Boxer yaml generation was missed in earlier PR. 

* chore: Run `generate-yaml.sh`

* chore(cpn): carryTrim -> trimSource

* fix(build): Boxer missing from `generate-yaml`

* dodgy attempt to read old carryTrim

* fix: Don't break the byte boundary + reorder

* fix(yaml): indentation for attributes that should not be output

* chore: Regenerate YAML after rebase

---------

Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
2023-02-05 13:46:02 +10:00
eshifriandGitHub 8e8e78671a feat: Timer Voice & Haptic option, show elapsed speak time value when countdown (#2711)
* fix "odd" elapsed time announcement

* announce elapsed seconds

* Add support for "Beeps and Haptic" and "Voice and Haptic" for timer countdown.
2023-01-23 20:00:12 +10:00
Raphael CoefficandGitHub 6f494e109c feat(telemetry): extend link quality warnings range (#2251)
* feat(telemetry): extend link quality warnings range

* Set default values to the old legacy FrSky values

* Companion support
2022-10-12 14:28:32 +10:00
e576925bee feat: Reduce risk of corrupt radio.yml (#1481)
* reduce risk of corrupt radio.yml #1412

Adds CRC16 checksum to radio.yml when saved.
Adds save to temporary file, folowed by rename to radio.yml
Adds check on load, with fall-back to temporary file

* Made sure that only the first read block of radio.yml is checked for the 'checksum' value.
Added checksum generation on radio.yml produced by conversion.

* Added namespace.
Github actions triggered build failed on this - compiler difference.

* Fixed typo in code not run locally.

* Made checksum result code a enum class.
Fixed null-poionter dereference bug.

* Added check and handling for radio.yml file not read (will be handled as if checksum failed)
Added evaluation of checksum when radio_new.yml is read.
Added f_unlink() calls before f_rename() to ensure the target filename does not exist.

* Added radio.yml cheksum handling to Simulator/Companion.
Cleaned radio firmware handling of checksum field up to be newline agnostic.

* Added handling of files without checksum.
- Letting files pass the check if no checksum field is present (old files) and the size is realistic (25 bytes)

* Fixed bug causing new conversion from binary if no radio.yml BUT a radio_new.yaml
is present in the filesystem.

Now the conversion is only performed if neither file exsits.

* repair rebase problems

* rerun yaml generator

* fix another rebase problem

* update text in companion to be more meaningful when the radio.yml file has a checksum error
fix wrong error message in trace

* add trigger to check radio config when leavin menu_radio

* fix: add handling for temporary and error yaml radio settings files to simu/simulator/libsimulator

* fix corner cases when comverting non crc-ed files

* chore: Tweak radio data warnings for screen sizes
- Changed the define to be a little shorter
- Added missing define for TW
- Three string lengths to suit 128, 212 and basically colorlcd

Co-authored-by: gagarinlg <malte@langermann.net>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-08-31 12:56:17 +10:00
Raphael CoefficandRaphael Coeffic bb6c6d6e2d WiP PoC AFHDS3 internal module 2022-08-11 12:15:46 +02:00
62692dba6a feat: More rotary encoder options for B&W screens (see #2045)
* First build

* Fix X9

* Update api_general.cpp

* Update translations.h

* clean up translations

* fix: B&W option handling, remove magic numbers, cleanup
- Remove references to invertRotary, change to RotEncDir or similar
- Add compatabilty importing to companion, firmware
- Rename Lua API call
- Move magic numbers to enum
- Improve B&W option handling so it doesn't apply changes while in menu

* chore: yaml regen

* fix: Add missing guards for X9D/X9D+

* fix: Wrong enum name in simu

* fix(cpn): Use correct names for UI elements

* fix: Translations

* fix: Allow `rotEncMode` in all yaml due to x9d var
Of the three X9D variants, the X9D+2019 is the only one that
has a rotary encoder as standard. However, as the base config
file is for the X9D, this meant it wasn't reading or writing the
config value. Rather than add a seperate config file for it for
a single variable, simple to just allow it across all targets.

* fix: Companion string, change colorlcd to `Choice`

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-08-04 20:06:17 +10:00
be7a6a51ab feat: Allow the timer count direction to be selected (#2038)
* timer direction: ellapsed or left

* Add AUDIO announcement support

* Storage for showElapsed

* Translations

* Fix storage

* BW implementation

* Different BW implementation

* Companion support

* Color LCD implementation and rebase to lvgl

* Fix problems found by raphaelcoeffic

* chore: Regenerate the YAML files properly

* fix: Remove unused `TR_SHOW` remnant

* chore: Formatting and cleanup

* fix: Timer dir choice was shown in wrong place
Wrong newline used in ce23b50

* Fix cpn ui triggers, remove unnecessary code and some formatting

* fix(colorlcd): Hide timer dir opt if zero value

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: elecpower <neilh713@tpg.com.au>
2022-08-03 09:22:42 +10:00
3djcandPeter Feerick 03426c9afc yaml generate 2022-07-20 13:01:31 +10:00
3djcandPeter Feerick 8c828172e3 Fix conversions 2022-07-20 13:01:31 +10:00
Peter FeerickandGitHub 7d983f6fa8 chore(yaml): PR#2064 didn't regenerate files (#2133) 2022-07-17 18:59:21 +10:00
rotorman b1a3bc834f User controllable serial port power.
Thx to @raphaelcoeffic for numerous tips with YAML.
Tested with TX16S mkII.
2022-04-18 13:19:33 +02:00
d9b51f8ecf feat: Deadzone option for NV14 sticks (#1777)
Imported from open-flysky/Flysky-OpenTX-Test-Branch

* companion: Don't nuke `stickDeadZone` setting

* Implement data storage properly

* Add missing check for NV14 storage struct sizes

* Formatting

* Use one less byte in the packed data struct
Thanks @raphaelcoeffic :)

* Move setting of stickDeadZone default

* Use a Choice combo rather than NumberEdit

* Good riddance magic number

* Also set default stick zone if setting is missing

* Teach tests about `STICK_DEAD_ZONE`

* Tweak choice width

* Cpn NV14 add stick dead zone to hardware and section labels

* Cpn NV14 align default pot names to radio

Co-authored-by: elecpower <neilh713@tpg.com.au>
2022-04-06 10:30:20 +10:00
Raphael CoefficandRaphael Coeffic 9d5cd1876c Added support for Lemon-Rx DSMP 2022-03-24 10:40:17 +01:00
Raphael CoefficandRaphael Coeffic 86d1ca4364 Reorganize module type/subType/rfProtocol 2022-03-24 10:40:17 +01:00
Peter FeerickandGitHub b54ad7169a feat: Option for inverting rotary encoder direction (#1690)
* feat: Add option for rotary encoder direction
Based heavily on opentx/opentx#8852 by @3djc

* companion ui elements

* Cleanup

* Hook up UI, reading setting from yaml

* Teach simulator about rotEncDirection

* Simu and radio default scroll direction correction
Otherwise the "default" would be the opposite to how it has always been

* Remove what will be a confict with fix in #1586

* Wasn't using rotEncDirection consistently

* Zorro RE dir is opp to TX16, TX12, TPro, X9D+2019
2022-03-22 16:14:57 +10:00
Peter Feerick e0a1dca5cc Read telemetryBaudrate into internalModuleBaudrate 2022-03-22 15:48:59 +10:00
3djcandRaphael Coeffic 0cc2b95b09 Cosmetics 2022-03-21 11:48:50 +01:00
3djcandRaphael Coeffic e63eeb0984 Update yaml 2022-03-21 11:45:15 +01:00
3djcandRaphael Coeffic db3547d45c POC 2022-03-21 11:43:48 +01:00
Raphael Coeffic f1dc564c76 Read old auxSerialMode & aux2SerialMode 2022-03-20 16:30:58 +01:00
Raphael Coeffic b5779f2a6a More generic serial port config 2022-03-20 16:30:58 +01:00
Raphael CoefficandGitHub 610326f216 Write 'semver' tag with the current firmware version (#1695)
And remove `version`/`variant`.
2022-03-20 19:18:01 +10:00
a1e7d70722 chore: Clean up some issues introduced in #1363
* Clean up some errors introduced in PR #1363

- Cleaning up bad YAML definitions
- Reverted renaming of 'jitterfilter' radio setting in storage/conversions/yaml/ files

* Add a custom attribute to allow for backward compatibility

* Prevent custom attributes without a 'write' function to output a tag

* companion - read but don't write old name

Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-03-16 18:07:26 +10:00
bf931a5097 feat: Add facilty for custom throttle warning position (#1395)
* replace magic number for throttle idle with correct define

* settings for custom throttle warning position

* settings fixed not to break byte-aligment of bit-fields

* evaluate custom throttle warning position

* add requested throttle value to warning text

* comment about field alignment in ModelData struct

* Menu for editing custom throttle warning for 128x64 radios
Tested on RM TX12

* Improoved menu display

* move displayed strings to translation

* translation template added for each language

* support for 212x64 B&W radios

* menu for colorlcd
not tested

* corrected translation entry for TW

* corrected handling of padding bits in ModelData structure

* Companion support for custom throttle warning position

* Rebase catchup

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-01-30 15:04:40 +10:00
Peter FeerickandGitHub 4b93686a40 feat: ImmersionRC Ghost 12 bit support
IRC Ghost 12 bit support
2022-01-27 09:58:09 +10:00
c3c8a2e3f1 feat: Model level ADC Jitter filter option (#1363)
* ADC Filter - On/off state configurable at the model level

* Updated YAML configuration to match change from ADC Filter feature commit

* Companion changes to support ADC jitter filter to be a model configuration item.

* Renamed jitterFilter field to noJitterFilter.

This better describes the semantic, which is inverted.

* Updated after review

* Re-run generate-yaml

* Changed ADC Jitter filter control on Model to be tri state.
Off, On or use the radio setting

* Adde NOBACKUP() to the added field

* Re-generate yaml_datastructs

* Making the default state to use radio setting/Global value

* Updated after review:
Changing to more consistent naming across firmware and companion.

* Reverted  files that was accidently added to the commit.

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-01-26 20:54:23 +10:00
Raphael Coeffic 257d25b5eb Updated generated YAML parser files
And added the "ghost" union member to the selector.
2022-01-22 13:43:30 +01:00
Raphael Coeffic 9f9c3aba01 Add curve ref gvar support 2021-12-31 10:53:11 +01:00
Raphael Coeffic bf41080b57 Fix YAML radio format: outputs GVAR support and small fixes 2021-12-31 10:53:11 +01:00
Raphael Coeffic 91ea5998b7 Translate offset to support gvars 2021-12-31 10:53:09 +01:00
Raphael Coeffic d98a697aca Add "board" field and remove a few useless ones 2021-12-31 10:53:09 +01:00
Raphael Coeffic a4c718f6b7 YAML: remove useless constants 2021-12-18 15:25:52 +01:00
Raphael CoefficandGitHub 498bc152a3 Merge pull request #1040 from EdgeTX/sw-warnings 2021-12-17 13:05:13 +01:00
Peter FeerickandPeter Feerick 4e56f524fd FUNC_SOUNDS, not FUNC_FIRST_WITHOUT_ENABLE 2021-12-14 18:08:42 +10:00
Raphael Coeffic 865cf06b0d Revamped switch state checking 2021-12-09 09:20:01 +01:00
16fc05ad8e Fix showing of non-existent pots in warnings group (#1129)
* pots warning enabled fix

* yaml_generator whitespace

* Fix UART_MODE_DEBUG

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2021-12-07 20:03:28 +11:00
Raphael Coeffic 06c04c852a Use symbolic indexes for calibration data
Resolves #1083
2021-11-26 17:31:57 +01:00
Raphael CoefficandRaphael Coeffic ae552bd6fd WiP: support internal module as a hardware setting 2021-11-25 12:10:16 +01:00
Raphael Coeffic b72428bdba Improved module data output 2021-11-10 11:07:03 +01:00
Raphael Coeffic c6b847c9ac thrTraceSrc and potsWarnMode 2021-11-10 11:07:03 +01:00
Raphael Coeffic 397674021e Improved logical switches 2021-11-10 11:07:02 +01:00
Raphael Coeffic 682aabacec WiP logical switches 2021-11-10 11:07:02 +01:00
Raphael Coeffic b5e9c68056 Improve custom functions 2021-11-10 11:07:02 +01:00
Raphael Coeffic 3da2aee1ff Sensor type & formula 2021-11-10 11:07:02 +01:00
Raphael Coeffic 24b69098c7 Improved swashR, flightModes & sources 2021-11-10 11:07:02 +01:00
Raphael Coeffic b1521579ba Improved telemetry screen type output 2021-11-10 11:07:02 +01:00
Raphael Coeffic 4ee58045e1 Improved mixer source (de-)serialization 2021-11-10 11:07:02 +01:00
Raphael Coeffic b7640a830f WiP pass YamlTreeParser where needed 2021-11-10 11:07:02 +01:00