Atmel radio bug fix when setting tx-power. Spotted by Voravit Tanyingyong

This commit is contained in:
Robert Olsson 2017-06-02 08:42:43 +02:00
parent bb90d50ba1
commit bb5d5546ce

View File

@ -494,7 +494,8 @@ set_value(radio_param_t param, radio_value_t value)
return RADIO_RESULT_OK;
case RADIO_PARAM_TXPOWER:
if(value < TX_PWR_MIN || value > TX_PWR_MAX) {
/* MIN = 15, MAX = 0 */
if(value > TX_PWR_MIN || value < TX_PWR_MAX) {
return RADIO_RESULT_INVALID_VALUE;
}
rf230_set_txpower(value);