Skip to content

fix(midi): restore TX/MOX toggle by reading isTransmitting() not isMox() (#3369). Principle I.#3371

Merged
aethersdr-agent[bot] merged 1 commit into
mainfrom
aetherclaude/issue-3369
Jun 3, 2026
Merged

fix(midi): restore TX/MOX toggle by reading isTransmitting() not isMox() (#3369). Principle I.#3371
aethersdr-agent[bot] merged 1 commit into
mainfrom
aetherclaude/issue-3369

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #3369

What was changed

fix(midi): restore TX/MOX toggle by reading isTransmitting() not isMox() (#3369). Principle I.

Files modified

  • src/gui/MainWindow.cpp
 src/gui/MainWindow.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)


🤖 aethersdr-agent · cost: $3.1932 · model: claude-opus-4-7

…x() (#3369). Principle I.

The MIDI Toggle dispatch reads the getter, flips it, and calls the setter.
For tx.mox and global.txButton the getter regressed to isMox() in #3221
(commit 6c37e37), silently reverting the fix from #2858 (407ae4c).

Per FlexLib (Principle I), the radio never publishes `mox=` in
`transmit status` messages, so m_mox stays false forever. The toggle
then always reads 0, always flips to 1, always calls setTransmit(true) —
stuck-on TX, mouse-only recovery.

isTransmitting() reflects the optimistic state set inside
TransmitModel::setMox() the moment setTransmit() fires, so the toggle
correctly inverts on the next press. Matches the FlexControl handler
already fixed by #2858.

Fixes #3369.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aethersdr-agent aethersdr-agent Bot requested a review from a team as a code owner June 3, 2026 02:31
@aethersdr-agent aethersdr-agent Bot enabled auto-merge (squash) June 3, 2026 02:31
@aethersdr-agent aethersdr-agent Bot mentioned this pull request Jun 3, 2026
2 tasks

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good — clean, minimal, correct fix. Thanks for picking this up.

The change aligns the MIDI getter with how every other TX-state observer in the codebase reads transmit state: the on-screen TX toggle (MainWindow.cpp:6734, :6932, :14964), the aetherial strip TX LED, the HID button bitmask (:6896), rigctl, and TCI all read isTransmitting(). The MIDI getters were the only outliers.

The root cause is consistent with the explanatory comment at MainWindow.cpp:12444: the radio doesn't reliably echo mox= in transmit status, so m_mox is stale. setTransmit() does, however, flip m_transmitting optimistically on the user's edge (RadioModel.cpp:1234), so isTransmitting() gives accurate LED feedback immediately on press — which is what a toggle controller needs.

Scope is tight (2 lines), no AppSettings/RAII concerns, nothing outside the stated scope.


🤖 aethersdr-agent · cost: $17.8262 · model: claude-opus-4-7

@jensenpat jensenpat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed independently: confirmed regression from #3221 (commit 6c37e37 reverted #2859's isTransmitting() getter back to isMox()). m_mox is never set from radio transmit status, so the MIDI toggle was stuck-on. Fix restores isTransmitting() — optimistically set in the setter path — matching every other TX observer in the codebase. Two-line scope, CI green. LGTM.

@aethersdr-agent aethersdr-agent Bot merged commit 1cf2611 into main Jun 3, 2026
5 checks passed
@aethersdr-agent aethersdr-agent Bot deleted the aetherclaude/issue-3369 branch June 3, 2026 14:47
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
…x() (aethersdr#3369). Principle I. (aethersdr#3371)

## Summary

Fixes aethersdr#3369

### What was changed

fix(midi): restore TX/MOX toggle by reading isTransmitting() not isMox()
(aethersdr#3369). Principle I.

### Files modified

- `src/gui/MainWindow.cpp`

```
 src/gui/MainWindow.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
```

---
Generated by AetherClaude (automated agent for AetherSDR)

---
<sub>🤖 aethersdr-agent · cost: $3.1932 · model: claude-opus-4-7</sub>

Co-authored-by: aethersdr-agent[bot] <273844287+aethersdr-agent[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Midi Mapping Functions.

1 participant