mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
55Hz ctcss tail detection rounding
This commit is contained in:
@ -288,7 +288,8 @@ void BK4819_SetCTCSSFrequency(uint32_t FreqControlWord)
|
|||||||
void BK4819_Set55HzTailDetection(void)
|
void BK4819_Set55HzTailDetection(void)
|
||||||
{
|
{
|
||||||
// CTC2 Frequency Control Word = round_nearest(25391 / 55) = 462
|
// CTC2 Frequency Control Word = round_nearest(25391 / 55) = 462
|
||||||
BK4819_WriteRegister(BK4819_REG_07, (1u << 13) | 462);
|
const unsigned int ctcss_Hz = 55;
|
||||||
|
BK4819_WriteRegister(BK4819_REG_07, (1u << 13) | ((25391 + (ctcss_Hz / 2)) / ctcss_Hz)); // with rounding
|
||||||
}
|
}
|
||||||
|
|
||||||
void BK4819_EnableVox(uint16_t VoxEnableThreshold, uint16_t VoxDisableThreshold)
|
void BK4819_EnableVox(uint16_t VoxEnableThreshold, uint16_t VoxDisableThreshold)
|
||||||
|
Reference in New Issue
Block a user