* 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.
* 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>
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>
* 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>
* 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>
* 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>
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>
* 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
* 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>
* 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>
* 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>