fix: prevent BLE freeze on NIRS streaming stop
Clear mcj callback immediately on stop to prevent stale responses from triggering new polling chains. Delay battery polling resume by 500ms to avoid command collision with in-flight mcj response. Add sendNirsPowerOff for future use. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -287,6 +287,10 @@ class BleManager private constructor(private val context: Context) {
|
||||
sendRaw(CRC16.buildCommand("mta", intArrayOf(1)))
|
||||
}
|
||||
|
||||
fun sendNirsPowerOff() {
|
||||
sendRaw(CRC16.buildCommand("mta", intArrayOf(0)))
|
||||
}
|
||||
|
||||
fun sendMqqQuery() {
|
||||
sendRaw(CRC16.buildCommand("mqq"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user