Removed unnecessary animateFlickerCode() overload. It just set currentFrequency to DefaultFrequency, therefore overwriting a previously set frequency
This commit is contained in:
parent
b28f6ae68f
commit
5a06305171
|
@ -28,14 +28,8 @@ open class FlickerCodeAnimator {
|
||||||
|
|
||||||
|
|
||||||
open fun animateFlickerCode(flickerCode: FlickerCode, showStep: (Step) -> Unit) {
|
open fun animateFlickerCode(flickerCode: FlickerCode, showStep: (Step) -> Unit) {
|
||||||
animateFlickerCode(flickerCode, DefaultFrequency, showStep)
|
|
||||||
}
|
|
||||||
|
|
||||||
open fun animateFlickerCode(flickerCode: FlickerCode, frequency: Int, showStep: (Step) -> Unit) {
|
|
||||||
stop() // stop may still running previous animation
|
stop() // stop may still running previous animation
|
||||||
|
|
||||||
currentFrequency = frequency
|
|
||||||
|
|
||||||
animationJob = GlobalScope.launch(Dispatchers.Default) {
|
animationJob = GlobalScope.launch(Dispatchers.Default) {
|
||||||
val steps = FlickerCodeStepsCalculator().calculateSteps(flickerCode.parsedDataSet)
|
val steps = FlickerCodeStepsCalculator().calculateSteps(flickerCode.parsedDataSet)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue