edgetx
edgetx copied to clipboard
feat: add inverted sources
Summary of Changes
As a pre-requisite for #4452 add the ability to invert a 'Source'.
Currently supports Inputs, Mixes, Logical Switches and Special/Global functions.
TODO:
- [x] B&W UI
- [x] Companion support
- [ ] Add other 'Sources'
Companion changes: The Companion refactor changes RawSource index from zero to one based to support negative indexes (as RawSwitch).
The opportunity was taken to undertake some overdue housekeeping of RawSource and move timers from source type Special to new Timers. Also rename legacy type SOURCE_TYPE_STICK to SOURCE_TYPE_INPUT as more appropriate.
It might be easier for me to revert my Companion changes and rebase my PR to this PR.
I'll have a play with it later in the week.
I need to 'merge' #4735 into this one
Merge of 4735 done
@elecpower When you have a chance can you rebase this to current main. I'd like to continue testing in conjunction with the radio side changes.
@elecpower When you have a chance can you rebase this to current main. I'd like to continue testing in conjunction with the radio side changes.
Request noted
@philmoz rebased
Looks good, thanks. If you're ok with it, I will add the radio side changes to this PR.
I'm okay with you adding your changes.
I have merged the radio changes into this PR, I will close 4513 in favour of the one. I think this is ready for review.
Might be a good idea to include the other PR's summary above and remove my what happens next.
@elecpower - when you have a chance can you please check the rebase to make sure I haven't messed anything up.
@elecpower - when you have a chance can you please check the rebase to make sure I haven't messed anything up.
Will check out now I have Cloudbuild in a testable state.
@philmoz rebase okay but I have found some more areas where some fixes are required due to the +1 shift:
- Conversion of Timers 1 - 3
- Conversion of SF Adjust GV and when using a GV 1 - 9
- Conversion 6 pos switches are wrong in the GUI dropdown lists due to hardware settings - this is a ADC refactor caused issue with incorrect type being set #4876. This has a flow on affect to model settings as they are imported. I'll need to create a new PR to fix v2.10-rc3 too.
I'll fix these with individual commits
Refer PR #4890 for last part of fixes
Thanks for the rebase @philmoz ... am I right in the assumption it is ready for review?
Thanks for the rebase @philmoz ... am I right in the assumption it is ready for review?
I think so.
Possibly issues from all the rebases - will take a look.
Colorlcd (TX16S):
- "Invert" button seems to be a couple pixels too far down and to the right, means the toolbar moves when you press the button
Generally:
- SF -> Adjust -> GV# -> mixer source : inverted source does not survive power cycle
- LS -> a>x seems generally broken visually - colourlcd won't let me set V2 values any more - shows !GPS instead of 0, bw128 shows wrong V1 on overview
- bw128 EM'd when paging from curves to LS screen with above config after having written it via Companion, or after attempting to configure it on radio and exiting edit page.
- bw212 appears to be missing implementation of showing
!
but it is marked as a TODO
These should be fixed now.
BW128: LS -> a<x V1 does not show invert option. That said, I'm unsure if this is an issue or not, since you can always choose your V2 accordingly. But I feel it should be there.
BW128: LS -> a<x V1 does not show invert option. That said, I'm unsure if this is an issue or not, since you can always choose your V2 accordingly. But I feel it should be there.
It's working for me - can you share an image of where it's wrong for you.
Looking a lot better, thanks! :)
I think I caught it happening... on both bw128 and bw212, the "Invert" option falls off the popup menu if "Telemetry" item is present... ie. it will work just fine with a blank model, but seems as if it has telemetry sensors the option is never visible.
Without telem
With telem
bw212 inputs screen needs to learn to show !
also... rest of the screens seem to fine (inverted but no !)
common to both bw128 and 212 is that with some inverted inputs the V2 field changes it's units incorrectly... i.e. I have seen it show "0.0V" for one input, and can get this to happen in simulator (V2 field is blank, but somehow editable).
Looking a lot better, thanks! :)
I think I caught it happening... on both bw128 and bw212, the "Invert" option falls off the popup menu if "Telemetry" item is present... ie. it will work just fine with a blank model, but seems as if it has telemetry sensors the option is never visible.
bw212 inputs screen needs to learn to show
!
also... rest of the screens seem to fine (inverted but no !)common to both bw128 and 212 is that with some inverted inputs the V2 field changes it's units incorrectly... i.e. I have seen it show "0.0V" for one input, and can get this to happen in simulator (V2 field is blank, but somehow editable).
I think these are fixed now.