test(radio): enshrine rc-soar.com documented mixer behavior#7220
Draft
raphaelcoeffic wants to merge 2 commits intoflatten-ls-statefrom
Draft
test(radio): enshrine rc-soar.com documented mixer behavior#7220raphaelcoeffic wants to merge 2 commits intoflatten-ls-statefrom
raphaelcoeffic wants to merge 2 commits intoflatten-ls-statefrom
Conversation
raphaelcoeffic
commented
Mar 26, 2026
Comment on lines
+701
to
+706
| // Sticky LS latches at startup when the set-condition is already satisfied. | ||
| // After logicalSwitchesReset(), lastValue.last starts at 0, so the first | ||
| // logicalSwitchesTimerTick() sees a 0→1 edge and latches immediately. | ||
| // rc-soar.com documents this as NOT latching, but actual firmware behavior | ||
| // does latch — this test enshrines the real behavior. | ||
| TEST_F(LswTest, StickyLatchesAtStartupWhenSetConditionTrue) |
Member
Author
There was a problem hiding this comment.
@RC-SOAR You probably want to have a look at this. It seems the behaviour you documented diverges from the actual behaviour.
There was a problem hiding this comment.
@RC-SOAR You probably want to have a look at this. It seems the behaviour you documented diverges from the actual behaviour.
It might be semantics (or my mislading documentation!) - I have assumed that a sticky LS is false at startup but immediately latches if the set-condition is true. Will double check during tests for any changed behaviour.
e821c2d to
bcc913d
Compare
6f3e652 to
b50b648
Compare
bcc913d to
43073c6
Compare
59bab6f to
b7d339f
Compare
…Switch Add tests enshrining mixer, flight-mode, and channel-cascade semantics documented at rc-soar.com/edgetx so refactoring does not silently break real-world user setups: - MultiplexAdd/Replace/MultiplyBasic/MultiplyOrderSensitive - WeightThenOffset (output = source * weight + offset) - CascadedChannelBypassesOutputClipping - CascadedWeightMultiplication - FlightModePriority (FM1 > FM2 > ... > FM0 fallback) - StickyLatchesAtStartupWhenSetConditionTrue - StickyFalseAtStartupWhenSetConditionFalse Also replace all manual switch-scanning loops across mixer.cpp, switches.cpp, and functions.cpp with findHwSwitch(), adding a startAfter parameter for finding a second distinct switch. Remove two #if defined(PCBTARANIS) guards from switches.cpp — those tests now run on all targets with a runtime skip when no suitable switch is available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Test the complete sequencer technique: a timebase channel (switch source with slow up/down) feeds a servo channel through a custom curve. Verifies that flat curve segments produce pauses where the servo holds position while the timebase ramps, and that reversing the switch automatically reverses the sequence through the same curve. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43073c6 to
057758a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add unit tests that capture documented mixer, flight-mode, and logical switch behavior from rc-soar.com/edgetx, protecting these semantics from regressions during future refactoring.
New behavior tests:
output = (source × weight) + offsetTest infrastructure cleanup:
startAfterparameter tofindHwSwitch()for finding a second distinct switchfindHwSwitch()across mixer.cpp, switches.cpp, functions.cpp#if defined(PCBTARANIS)guards fromOldTypeStickyCSWandinputWithTrim— now run on all targets with runtime skipTest plan
🤖 Generated with Claude Code