Skip to content

Commit

Permalink
Deal with SA818 and add -DSQL_TONE in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
armel committed Nov 2, 2024
1 parent a76673f commit ebd4878
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,11 @@ endif
ifeq ($(ENABLE_FEAT_F4HWN),1)
CFLAGS += -DENABLE_FEAT_F4HWN
CFLAGS += -DALERT_TOT=10
CFLAGS += -DSQL_TONE=550 # For SA818, use 600 and python3 sa818.py --port /dev/ttyS2 radio --frequency 434.975 --ctcss 71.9 --tail Open
CFLAGS += -DAUTHOR_STRING_1=\"$(AUTHOR_STRING_1)\" -DVERSION_STRING_1=\"$(VERSION_STRING_1)\"
CFLAGS += -DAUTHOR_STRING_2=\"$(AUTHOR_STRING_2)\" -DVERSION_STRING_2=\"$(VERSION_STRING_2)\"
else
CFLAGS += -DSQL_TONE=550
endif
ifeq ($(ENABLE_FEAT_F4HWN_SCREENSHOT),1)
CFLAGS += -DENABLE_FEAT_F4HWN_SCREENSHOT
Expand Down
11 changes: 3 additions & 8 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,13 +753,8 @@ void RADIO_SetupRegisters(bool switchToForeground)
{
default:
case CODE_TYPE_OFF:
BK4819_SetCTCSSFrequency(670);

//#ifndef ENABLE_CTCSS_TAIL_PHASE_SHIFT
BK4819_SetTailDetection(550); // QS's 55Hz tone method
//#else
// BK4819_SetTailDetection(670); // 67Hz
//#endif
BK4819_SetCTCSSFrequency(SQL_TONE);
BK4819_SetTailDetection(SQL_TONE); // Default 550 = QS's 55Hz tone method

InterruptMask = BK4819_REG_3F_CxCSS_TAIL | BK4819_REG_3F_SQUELCH_FOUND | BK4819_REG_3F_SQUELCH_LOST;
break;
Expand All @@ -768,7 +763,7 @@ void RADIO_SetupRegisters(bool switchToForeground)
BK4819_SetCTCSSFrequency(CTCSS_Options[Code]);

//#ifndef ENABLE_CTCSS_TAIL_PHASE_SHIFT
BK4819_SetTailDetection(550); // QS's 55Hz tone method
// BK4819_SetTailDetection(550); // QS's 55Hz tone method
//#else
// BK4819_SetTailDetection(CTCSS_Options[Code]);
//#endif
Expand Down

0 comments on commit ebd4878

Please sign in to comment.