1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-23 00:28:26 +02:00

Setting the transmit power was broken. (And LQ works, by the way.)

- atrf/tools/atspi-txrx/atspi-txrx.c (set_power): don't wrap around at
  minimum power to maximum power
This commit is contained in:
Werner Almesberger 2010-08-24 07:17:42 -03:00
parent 73043a52ea
commit 2514804a79

View File

@ -72,7 +72,7 @@ static void set_power(usb_dev_handle *dev, double power)
{ {
int n; int n;
for (n = 0; n != sizeof(tx_pwr)/sizeof(*tx_pwr); n++) for (n = 0; n != sizeof(tx_pwr)/sizeof(*tx_pwr)-1; n++)
if (tx_pwr[n] <= power) if (tx_pwr[n] <= power)
break; break;
atspi_reg_write(dev, REG_PHY_TX_PWR, TX_AUTO_CRC_ON | n); atspi_reg_write(dev, REG_PHY_TX_PWR, TX_AUTO_CRC_ON | n);