Skip to content

feat(usb): enable gadget when mounting the first image - #20

Merged
rodrig20 merged 1 commit into
mainfrom
feat/auto-enable-gadget
Dec 1, 2026
Merged

rodrig20 merged 1 commit into
mainfrom
feat/auto-enable-gadget

Conversation

@rodrig20

@rodrig20 rodrig20 commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Fixes #18

What changed

  • The per image switch is no longer disabled while the gadget is off. Tapping it turns the gadget on and then mounts the image, so mounting the first image takes one tap instead of two.
  • The enable logic now lives in one helper shared by the gadget switch and the auto enable path, so both show the same script errors and the same waiting for host message.
  • While the gadget starts, the switches stay locked and the gadget row shows "Applying USB change...".

Notes

  • If the gadget turns on but the mount fails, the gadget stays on. That keeps the state the user asked for and leaves the error visible.
  • Ejecting the last image does not turn the gadget off. The drive stays available for the next mount.

@rodrig20
rodrig20 merged commit 36521f8 into main Dec 1, 2026
1 check passed
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.

[Feature request] Auto USB gadget enabling on first image mounting

1 participant