forked from mirror/uv-k5-firmware
Fixed missing digit voices.
This commit is contained in:
parent
b636c07536
commit
116025f08b
11
audio.c
11
audio.c
@ -265,19 +265,22 @@ uint8_t AUDIO_SetDigitVoice(uint8_t Index, uint32_t Value)
|
||||
Count = 0;
|
||||
Result = Value / 1000;
|
||||
Remainder = Value % 1000;
|
||||
if (Remainder >= 100) {
|
||||
if (Remainder < 100) {
|
||||
if (Remainder < 10) {
|
||||
goto Skip;
|
||||
}
|
||||
} else {
|
||||
Result = Remainder / 100;
|
||||
gVoiceID[gVoiceWriteIndex++] = Result;
|
||||
Count++;
|
||||
Remainder -= Result * 100;
|
||||
}
|
||||
if (Remainder >= 10) {
|
||||
Result = Remainder / 10;
|
||||
gVoiceID[gVoiceWriteIndex++] = Result;
|
||||
Count += 1;
|
||||
Count++;
|
||||
Remainder -= Result * 10;
|
||||
}
|
||||
|
||||
Skip:
|
||||
gVoiceID[gVoiceWriteIndex++] = Remainder;
|
||||
|
||||
return Count + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user