mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-02 00:01:27 +03:00
55Hz ctcss tail detection rounding
This commit is contained in:
parent
e3e2409854
commit
ad2298aa30
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user