Save 40 bytes

This commit is contained in:
Armel FAUVEAU
2025-02-08 03:13:35 +01:00
parent aa5b927cd4
commit 28b26264be

16
radio.c
View File

@@ -572,6 +572,7 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo)
}
*/
/*
for(uint8_t p = 0; p < 3; p++)
{
switch (currentPower)
@@ -599,6 +600,21 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo)
break;
}
}
*/
static const uint8_t dividers[6] = { 25, 19, 13, 10, 7, 4};
for (uint8_t p = 0; p < 3; p++)
{
if (currentPower < 6)
{
Txp[p] = (Txp[p] * (currentPower == 5 ? 3 : 4)) / dividers[currentPower];
}
else // case 6
{
Txp[p] += 30;
}
}
#else
#ifdef ENABLE_REDUCE_LOW_MID_TX_POWER
// make low and mid even lower