{
static uint32_t last_radio_setting;
static uint8_t last_radio_rate;
+ static uint8_t last_radio_10mw;
ao_mutex_get(&ao_radio_mutex);
ao_radio_mode &= (uint16_t) ~AO_RADIO_MODE_BITS_PACKET;
last_radio_rate = ao_config.radio_rate;
}
+ if(ao_config.radio_10mw != last_radio_10mw) {
+ last_radio_10mw = ao_config.radio_10mw;
+ /*
+ * 0x37 "should" be 10dBm, but measurements on TBT
+ * v4.0 show that too hot, so use * 0x32 to make sure
+ * we're in spec.
+ */
+ if (ao_config.radio_10mw)
+ ao_radio_reg_write(CC1200_PA_CFG1, 0x32);
+ else
+ ao_radio_reg_write(CC1200_PA_CFG1, 0x3f);
+ }
ao_radio_set_len(len);
}