This commit is contained in:
Moritz Ruth 2023-07-08 10:04:30 +02:00
parent e923231c59
commit d4cff66261
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
2 changed files with 14 additions and 4 deletions

View file

@ -8,13 +8,17 @@ import de.moritzruth.theaterdsl.value.percent
import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlin.math.roundToLong import kotlin.math.roundToLong
import kotlin.system.measureTimeMillis import kotlin.system.measureTimeMillis
import kotlin.time.Duration.Companion.seconds
suspend fun main() = coroutineScope { suspend fun main() = coroutineScope {
EnttecOpenDmxUsb.start() EnttecOpenDmxUsb.start()
launch {
test() test()
}
while (isActive) { while (isActive) {
val took = measureTimeMillis { val took = measureTimeMillis {
@ -35,7 +39,13 @@ suspend fun main() = coroutineScope {
suspend fun test() = coroutineScope { suspend fun test() = coroutineScope {
Washs.both { Washs.both {
it.brightness.static(100.percent) it.brightness.static(50.percent)
it.pointAtCeiling() it.pointAtGuests()
}
delay(4000)
Washs.both {
it.pointAtCeiling(5.seconds)
} }
} }

View file

@ -327,7 +327,7 @@ fun ShowBuilderContext.fourthAct() = act("Vierter Akt") {
onRun { onRun {
spotRight.brightness.fade(50.percent, 10.seconds) spotRight.brightness.fade(50.percent, 10.seconds)
bar.color.static(Color(300.degrees, 70.percent)) // TODO: Sättigung testen bar.color.static(Color(300.degrees, 70.percent))
bar.brightness.fade(10.percent, 10.seconds) bar.brightness.fade(10.percent, 10.seconds)
Washs.both.forEach { Washs.both.forEach {