File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -561,22 +561,22 @@ static void UpdateFreqInput(KEY_Code_t key) {
561561 for (int i = 0 ; i < 10 ; ++ i ) {
562562 if (i < freqInputIndex ) {
563563 digitKey = freqInputArr [i ];
564- freqInputString [i ] = digitKey <= KEY_9 ? '0' + digitKey : '.' ;
564+ freqInputString [i ] = digitKey <= KEY_9 ? '0' + digitKey - KEY_0 : '.' ;
565565 } else {
566566 freqInputString [i ] = '-' ;
567567 }
568568 }
569569
570570 uint32_t base = 100000 ; // 1MHz in BK units
571571 for (int i = dotIndex - 1 ; i >= 0 ; -- i ) {
572- tempFreq += freqInputArr [i ] * base ;
572+ tempFreq += ( freqInputArr [i ]- KEY_0 ) * base ;
573573 base *= 10 ;
574574 }
575575
576576 base = 10000 ; // 0.1MHz in BK units
577577 if (dotIndex < freqInputIndex ) {
578578 for (int i = dotIndex + 1 ; i < freqInputIndex ; ++ i ) {
579- tempFreq += freqInputArr [i ] * base ;
579+ tempFreq += ( freqInputArr [i ]- KEY_0 ) * base ;
580580 base /= 10 ;
581581 }
582582 }
You can’t perform that action at this time.
0 commit comments