diff --git a/app/src/main/java/com/casic/detector/view/SearchLabelActivity.kt b/app/src/main/java/com/casic/detector/view/SearchLabelActivity.kt index 75249d4..2e4fb08 100644 --- a/app/src/main/java/com/casic/detector/view/SearchLabelActivity.kt +++ b/app/src/main/java/com/casic/detector/view/SearchLabelActivity.kt @@ -189,7 +189,7 @@ energy = 50 } - if (energy > 40) { + if (energy > 41) { isPlaying = if (!isPlaying) { fastSoundPool.play(fastResId, 1f, 1f, 0, 0, 1f) true @@ -197,7 +197,7 @@ fastSoundPool.stop(fastResId) false } - } else { + } else if (energy in 11..41) { isPlaying = if (!isPlaying) { slowSoundPool.play(slowResId, 1f, 1f, 0, 0, 1f) true @@ -207,10 +207,10 @@ } } - if (energy < 10) { + if (energy < 11) { energyTipsView.text = "标识器信号较弱,可能距离较远" energyTipsView.setTextColor(Color.RED) - } else if (energy > 40) { + } else if (energy > 41) { energyTipsView.text = "标识器信号极强,可能就在附近" energyTipsView.setTextColor(Color.GREEN)