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