fix: mpa 첫 스캔 시 1회만 전송 (매초 중복 전송 제거)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -301,11 +301,16 @@ fun PlacementGuideView(appState: AppState) {
|
||||
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
// Scan function (reusable)
|
||||
// 첫 스캔 시 1회만 piezo power on
|
||||
var piezoPowered by remember { mutableStateOf(false) }
|
||||
|
||||
fun performScan() {
|
||||
if (isScanning) return
|
||||
isScanning = true
|
||||
if (!piezoPowered) {
|
||||
bleManager.sendPiezoPowerOn()
|
||||
piezoPowered = true
|
||||
}
|
||||
bleManager.piezoCollector.onMultiChannelComplete = { channels ->
|
||||
isScanning = false
|
||||
scanCount++
|
||||
|
||||
Reference in New Issue
Block a user