Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
DCS fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dual Tachyon authored and Dual Tachyon committed Mar 10, 2024
1 parent 3a72613 commit ec8e053
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ uint16_t DCS_GetOption(uint8_t Index)
{
uint16_t Option = DCS_Options[Index];

if (Option > 63) {
if (Index > 63) {
Option |= 0x100;
}

Expand Down
6 changes: 3 additions & 3 deletions radio/detector.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ static void MuteCtcssScan(void)
}

// Double check the assembly, it didn't make sense!
Code = (Code & 0xFFF) << 16;
Code = (Code & 0xFFF) << 12;
Code |= BK4819_ReadRegister(0x6A) & 0xFFF;
gVfoState[gSettings.CurrentVfo].Golay = Code;

if ((Code & 0XFFFFFF) != 0x555555 && (Code & 0xFFFFFF) != 0xAAAAAA) {
if ((Code & 0xFFFFFF) != 0x555555 && (Code & 0xFFFFFF) != 0xAAAAAA) {
if (Code != 0x800000 && (Code & 0xFFFFFF) != 0xFFFFFF && (Code & 0xFFFFFF) != 0x7FFFFF) {
if (!gVfoState[gSettings.CurrentVfo].bIs24Bit) {
Code &= 0x7FFFFF;
Expand All @@ -213,7 +213,7 @@ static void MuteCtcssScan(void)
VFO_ClearMute();
Code = BK4819_ReadRegister(0x68);
if ((Code & 0x8000U) == 0) {
Code = (((Code & 0xFFFU) * 200U) / 412U) + 1U;
Code = (((Code & 0x1FFFU) * 200U) / 413U) + 1U;
if (Code > 500) {
Code &= 0xFFFU;
gVfoState[gSettings.CurrentVfo].RX.Code = Code;
Expand Down

0 comments on commit ec8e053

Please sign in to comment.