mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-22 10:18:15 +00:00
ctcss scanner display results on 1st hit instead of 3rd
This commit is contained in:
parent
c4d68ab5dd
commit
b189470495
@ -462,19 +462,17 @@ void SCANNER_TimeSlice10ms(void)
|
||||
else if (scanResult == BK4819_CSS_RESULT_CTCSS) {
|
||||
const uint8_t Code = DCS_GetCtcssCode(ctcssFreq);
|
||||
if (Code != 0xFF) {
|
||||
if (Code == gScanCssResultCode && gScanCssResultType == CODE_TYPE_CONTINUOUS_TONE) {
|
||||
if (++scanHitCount >= 2) {
|
||||
gScanCssState = SCAN_CSS_STATE_FOUND;
|
||||
gScanUseCssResult = true;
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
scanHitCount = 0;
|
||||
|
||||
|
||||
++scanHitCount;
|
||||
gScanCssState = SCAN_CSS_STATE_FOUND;
|
||||
gScanUseCssResult = true;
|
||||
gUpdateStatus = true;
|
||||
gScanCssResultType = CODE_TYPE_CONTINUOUS_TONE;
|
||||
gScanCssResultCode = Code;
|
||||
}
|
||||
else {
|
||||
scanHitCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (gScanCssState < SCAN_CSS_STATE_FOUND) { // scanning or off
|
||||
|
Loading…
Reference in New Issue
Block a user