mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-04-16 03:07:18 +02:00
Fix error state for stroboscope and SOS
This commit is contained in:
parent
b0ea8d8ef2
commit
18c8bf3c7a
@ -272,12 +272,12 @@ class MyCameraImpl private constructor(private val context: Context, private var
|
||||
handleCameraSetup()
|
||||
while (!shouldStroboscopeStop) {
|
||||
try {
|
||||
cameraFlash.runOrToast {
|
||||
cameraFlash!!.run {
|
||||
toggleFlashlight(true)
|
||||
}
|
||||
val onDuration = if (isStroboSOS) SOS[sosIndex++ % SOS.size] else stroboFrequency
|
||||
Thread.sleep(onDuration)
|
||||
cameraFlash.runOrToast {
|
||||
cameraFlash!!.run {
|
||||
toggleFlashlight(false)
|
||||
}
|
||||
val offDuration = if (isStroboSOS) SOS[sosIndex++ % SOS.size] else stroboFrequency
|
||||
|
Loading…
x
Reference in New Issue
Block a user