diff --git a/Include/config.h b/Include/config.h --- a/Include/config.h +++ b/Include/config.h @@ -10,6 +10,8 @@ // Transmitter config (si446x.c) // -------------------------------------------------------------------------- +// Transmit power (0-0x7F, 0mW - 40mw?) +#define SI446x_POWER 0x02 #define TUNE_FREQUENCY 433000000UL diff --git a/Libraries/Si446x/si446x.c b/Libraries/Si446x/si446x.c --- a/Libraries/Si446x/si446x.c +++ b/Libraries/Si446x/si446x.c @@ -133,7 +133,7 @@ void si446x_init(void) HAL_Delay(10); // Set Si446x initial output power, input to power amp (0-0x7F, 0mW - 40mw?) - uint8_t basepower = 0x02; + uint8_t basepower = SI446x_POWER; // FIXME: basepower should be 0x10 for underperforming units and 0x04 for normal units uint8_t set_power_level_command[] = {SI446x_CMD_SET_PROPERTY, 0x22, 0x01, 0x01, basepower}; si446x_sendcmd(5, set_power_level_command, SI446x_CHECK_ACK);