Fixed that decreaseFrequency() got lost during refactoring

This commit is contained in:
dankito 2020-01-25 11:31:30 +01:00 committed by dankito
parent 3507bcd0ab
commit d7c8d19da7
1 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,14 @@ open class ChipTanFlickerCodeView @JvmOverloads constructor(
} }
open fun decreaseFrequency() {
if (currentFrequency - FrequencyStepSize >= MinFrequency) {
currentFrequency -= FrequencyStepSize
setFrequency(currentFrequency)
}
}
open fun increaseFrequency() { open fun increaseFrequency() {
if (currentFrequency + FrequencyStepSize <= MaxFrequency) { if (currentFrequency + FrequencyStepSize <= MaxFrequency) {
currentFrequency += FrequencyStepSize currentFrequency += FrequencyStepSize