From 27a6ed11f3b0f9a50f6b7cd46a6ae2594f7ff4f7 Mon Sep 17 00:00:00 2001 From: Dan Roundhill Date: Thu, 29 Jan 2026 10:12:00 -0700 Subject: [PATCH] Fix Ring-Con not responding after onboarding When users clip in the Ring-Con during onboarding, the Joy-Con has already connected and the MCU initialization has completed. Since the Ring-Con wasn't attached during MCU init, the 0x59 detection command fails to detect it, and byte 40 (flex sensor data) remains at 0x00. This fix adds a reinitializeRingCon() method that re-runs the MCU configuration after onboarding completes, allowing the now-attached Ring-Con to be properly detected. Co-Authored-By: Claude Opus 4.5 --- RingBreak/ContentView.swift | 4 ++++ RingBreak/RingConDriver/RingConManager.swift | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/RingBreak/ContentView.swift b/RingBreak/ContentView.swift index 1fb8bb3..2883a2e 100644 --- a/RingBreak/ContentView.swift +++ b/RingBreak/ContentView.swift @@ -16,6 +16,10 @@ struct ContentView: View { RingBreakView(ringConManager: ringConManager, menubarController: menubarController) } else { OnboardingView { + // Re-initialize Ring-Con MCU after onboarding + // This is needed because the user clips in the Ring-Con during onboarding, + // after the Joy-Con has already connected and MCU initialized + ringConManager.reinitializeRingCon() hasCompletedOnboarding = true } } diff --git a/RingBreak/RingConDriver/RingConManager.swift b/RingBreak/RingConDriver/RingConManager.swift index 5fe647c..4207cd1 100644 --- a/RingBreak/RingConDriver/RingConManager.swift +++ b/RingBreak/RingConDriver/RingConManager.swift @@ -381,6 +381,25 @@ class RingConManager: NSObject, ObservableObject { yawRestSamples = 0 } + /// Re-initialize Ring-Con MCU configuration + /// Call this after the user clips in the Ring-Con to re-detect it + func reinitializeRingCon() { + guard isConnected else { return } + + // Reset Ring-Con state + ringConAttached = false + mcuInitialized = false + mcuReportCount = 0 + neutralFlexByte = nil + flexValue = 0.5 + lastFlexByte = 0x0A + + // Re-run MCU initialization + Task { + await initializeRingCon() + } + } + /// Start calibration process func calibrate() { startGuidedCalibration()