fix(vision): clear config when switching camera sources
When switching between local and phone camera, clear the other source's configuration to prevent stale data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d8c764595d
commit
ff59612e7b
|
|
@ -137,13 +137,17 @@ export function AbacusVisionBridge({
|
|||
if (source === 'phone') {
|
||||
// Stop local camera - session will be created by RemoteCameraQRCode
|
||||
vision.disable()
|
||||
// Clear local camera config in parent context
|
||||
onConfigurationChange?.({ cameraDeviceId: null, calibration: null })
|
||||
} else {
|
||||
// Stop remote session and start local camera
|
||||
setRemoteCameraSessionId(null)
|
||||
vision.enable()
|
||||
// Clear remote session config in parent context
|
||||
onConfigurationChange?.({ remoteCameraSessionId: null })
|
||||
}
|
||||
},
|
||||
[vision]
|
||||
[vision, onConfigurationChange]
|
||||
)
|
||||
|
||||
// Handle session created by QR code component
|
||||
|
|
|
|||
Loading…
Reference in New Issue