Fix SOS timing

Changes the SOS timing to use the lengths as described here: https://en.wikipedia.org/wiki/Morse_code#Representation,_timing,_and_speeds
Also change the unit to 200 instead of 250
This commit is contained in:
Mikkel-T 2022-10-19 16:15:29 +02:00
parent dc66f8bd66
commit b67d42a9d0

View File

@ -19,7 +19,9 @@ class MyCameraImpl(val context: Context) {
companion object { companion object {
var isFlashlightOn = false var isFlashlightOn = false
private val SOS = arrayListOf(250L, 250L, 250L, 250L, 250L, 250L, 500L, 250L, 500L, 250L, 500L, 250L, 250L, 250L, 250L, 250L, 250L, 1000L)
private var u = 200L // The length of one dit (Time unit)
private val SOS = arrayListOf(u, u, u, u, u, u * 3, u * 3, u, u * 3, u, u * 3, u * 3, u, u, u, u, u, u * 7)
private var camera: Camera? = null private var camera: Camera? = null
private var params: Camera.Parameters? = null private var params: Camera.Parameters? = null