1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-23 11:25:12 +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;
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)
break;
atspi_reg_write(dev, REG_PHY_TX_PWR, TX_AUTO_CRC_ON | n);