Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Companion] Adjust source value ranges and editors in LS/CF/Telemetry #5437

Merged
merged 13 commits into from
Dec 19, 2017

Conversation

mpaperno
Copy link
Member

@mpaperno mpaperno commented Nov 28, 2017

Went down a rabbit hole with regards to timer and RTC ranges and how they're used/limited/edited in regards to LS (comparison functions), CF (set timerN action), and telemetry display bar limits. Seems there's a bit of confusion here both in Companion and on radio (probably due to legacy issues).

Fixes #2984
Fixes #5362 (also negative values were not possible)
Fixes #5374
Fixes #5375
Fixes #5527
Fixes timer and RTC time ranges to comply with firmware limits.
Fixes not being able to use RTC time in LSs.
Fixes newly-added LS not being available in source lists (except when pasting).
Fixes bug with timer/rtc comparison values getting reset to value of spin box instead of time editor.
New TimerEdit GUI component for negative and other typically "invalid" times.
Removed the short limits on timer values.
GVars, trims, script outputs, and sticks/switches/cyclic/MAX get proper limits.
Fixes #3581 (Companion part).
Fixes sensor value offset and range editing (mentioned in 3581).

There are some issues/questions on the firmware side... I found a couple small bugs and will open a separate PR and bring them up there.

But the main question is why the limit of +/- 23m59s on timer values for LS comparison functions and telem. bar display min/max since the variable types (in firmware) can handle a lot more than that.

@kilrah
Copy link
Member

kilrah commented Nov 29, 2017

Nice!!

But the main question is why the limit of +/- 23m59s on timer values for LS comparison functions and telem. bar display min/max since the variable types (in firmware) can handle a lot more than that.

I think it was a limit somewhere on 9X Stock AVR at least at some point...

@mpaperno
Copy link
Member Author

This PR relates to #5445 and should be merged together. I wasn't really sure if it was clearer to separate them or put them both together.

Removed the short limits on timer values.
GVars, trims, script outputs, and sticks/switches/cyclic/MAX get proper limits.
Fixes #3581 (Companion part).
Fixes sensor value offset and range editing (mentioned in 3581).

@mpaperno mpaperno changed the title [Companion] Timers & RTC ranges and editors in LS/CF/Telemetry [Companion] Adjust source value ranges and editors in LS/CF/Telemetry Nov 30, 2017
@bsongis bsongis added this to the OpenTX 2.2.2 milestone Nov 30, 2017
@elecpower
Copy link

@mpaperno should the TimerEdit class also be applied to the timers in Model Setup?

@mpaperno
Copy link
Member Author

mpaperno commented Dec 1, 2017

Hi Neil, not really necessary to use it there since the timer start setting doesn't accept negative numbers. Though it could be good for UI consistency I suppose.

…ngle precision" flag and logic; Add logic for "short" timer handling.
… TimerEdit in LS, CF, and Telemetry (bars) editors;
…updates; Fix newly-added LS not being available in source lists; Fix bug with timer/rtc comparison values getting reset to value of spin box instead of time editor.
… refresh (fixes #5374); Improve data entry in spin boxes (fixes #5375).
…offset spinbox; Fix other minor range issues with ratio & offset.
@mpaperno
Copy link
Member Author

Rebased.

@bsongis bsongis merged commit 76ce186 into 2.2 Dec 19, 2017
@bsongis bsongis deleted the mpaperno/cpn_timers_range branch December 19, 2017 11:17
mr-pokryshkin pushed a commit to mr-pokryshkin/opentx that referenced this pull request Dec 19, 2017
…opentx#5437)

* [Companion] RawSourceRange: Fix for timers and RTC; Remove unused "single precision" flag and logic; Add logic for "short" timer handling.

* [Companion] Add TimerEdit class for editing negative times; Implement TimerEdit in LS, CF, and Telemetry (bars) editors;

* [Companion] Refactor LogicalSwitchesPanel for fewer & more efficient updates; Fix newly-added LS not being available in source lists; Fix bug with timer/rtc comparison values getting reset to value of spin box instead of time editor.

* Add forgotten #include.

* [Companion] LogicalSwitchesPanel: Update raw sources list upon screen refresh (fixes opentx#5374); Improve data entry in spin boxes (fixes opentx#5375).

* Make gcc happy.

* [Companion] Set proper RawSourceRange for GVars, trims, mixer scripts, and sticks/switches/cyclic/MAX.

* [Companion] Fix backwards precision/range logic on telemetry sensors offset spinbox; Fix other minor range issues with ratio & offset.

* [Companion] Remove short limit on min/max timer values for LS & telem. bars.

* Switch to TimerEdit in maxLibQt.

* Fix gcc build.

* Remove unused files.

* Caps fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants