Jump to content
43oh

Vandemar

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hi, I have been checking the setTXPower method and there is a "hidden" mode. In the .h is declared as: void setTXpower(int8_t dBm=0); // Only a few values supported by this (0, -6, -12, -18 dBm) But the code shows an additional mode for param "7": void Enrf24::setTXpower(int8_t dBm) { uint8_t reg, pwr; reg = _readReg(RF24_RF_SETUP) & 0xF8; // preserve RF speed settings pwr = 0x06; if (dBm >= 7) pwr = 0x07; if (dBm < 0) pwr = 0x04; if (dBm < -6) pwr = 0x02; if (dBm < -12) pwr = 0x00; _writeReg(RF24_RF_SETUP, reg | pwr); } Somebody
×
×
  • Create New...