Save 40 bytes
This commit is contained in:
16
radio.c
16
radio.c
@@ -572,6 +572,7 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
for(uint8_t p = 0; p < 3; p++)
|
for(uint8_t p = 0; p < 3; p++)
|
||||||
{
|
{
|
||||||
switch (currentPower)
|
switch (currentPower)
|
||||||
@@ -599,6 +600,21 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo)
|
|||||||
break;
|
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
|
#else
|
||||||
#ifdef ENABLE_REDUCE_LOW_MID_TX_POWER
|
#ifdef ENABLE_REDUCE_LOW_MID_TX_POWER
|
||||||
// make low and mid even lower
|
// make low and mid even lower
|
||||||
|
Reference in New Issue
Block a user