Skip to content

Fix WINGUI missing break statements and DISC AUTO command sequence#22

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-init-skew-failure
Draft

Fix WINGUI missing break statements and DISC AUTO command sequence#22
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-init-skew-failure

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 27, 2026

INIT SKEW on MD1.40 (Dragon) consoles fails with Rx-command error: 122 because MECHA_TYPE_40 was sending FIX_GAIN param "0005" instead of the Dragon-specific "0105". This was already fixed in base/mecha-main.c but several follow-up fixes were never backported to PMAP-wingui/mecha-main.c.

Changes to PMAP-wingui/mecha-main.c

  • MechaAdjPlay fallthrough bug: break; was inside the if("FJ") block — when the drive is in DVDDL state and the arg is anything other than "FJ", execution fell through to the DVDSL/CD "Please STOP" message:

    // Before (buggy): break only fires if "FJ" was the argument
    if (!pstricmp(argv[1], "FJ")) {
        MechaCommandExecute(...);
        break;  // ← inside if-block
    }
    // After: break always fires for DVDDL case
    if (!pstricmp(argv[1], "FJ")) {
        MechaCommandExecute(...);
    }
    break;  // ← outside if-block
  • DISC AUTO command sequence (commit 2290c79): old code ran DISC_DETECT then set CD_8 mode, causing intermittent mis-detection as "CD 8cm". Updated to SLED HOME → set CD_12 mode → DISC_DETECT, matching the base fix.

  • Missing break; statements: Added trailing break; in the last switch cases of MechaAdjInit (DVD-SL, DVD-DL, SKEW), MechaAdjPlay speed switch defaults, MechaAdjPause, MechaAdjTxHandler/MechaAdjRxHandler, and all MechaTestPlay command handlers (REV, FWDL, REVL, STOP) — bringing WINGUI in sync with base/mecha-main.c from commit 39b66743.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/AKuHAK/PMAP/commits
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Fix INIT SKEW fails with Rx-command error 122 Fix WINGUI missing break statements and DISC AUTO command sequence Mar 27, 2026
Copilot AI requested a review from AKuHAK March 27, 2026 13:20
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.

[ISSUE]: INIT SKEW Fails - 0ca50005 DVD-SL ADJUSTMENT (FIX GAIN) - Rx-command error: 122

2 participants