add API to setup TxPowerLevels
This commit is contained in:
parent
13ed67ec1e
commit
78696699c8
1 changed files with 5 additions and 4 deletions
|
@ -141,16 +141,17 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Update the txPower for a particular mode in the powerLevels table.
|
||||
* Update the txPowerLevels table.
|
||||
*/
|
||||
void setTxPowerLevel(TXPowerModes_t mode, int8_t txPowerIn) {
|
||||
powerLevels[mode] = txPowerIn;
|
||||
void setTxPowerLevels(const int8_t powerLevelsIn[NUM_POWER_MODES]) {
|
||||
memcpy(powerLevels, powerLevelsIn, sizeof(powerLevels));
|
||||
updateTxPowerLevelsCharacteristic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the effective power mode from one of the values in the powerLevels tables.
|
||||
*/
|
||||
void useTxPowerMode(TXPowerModes_t mode) {
|
||||
void setTxPowerMode(TXPowerModes_t mode) {
|
||||
txPowerMode = mode;
|
||||
configureGAP();
|
||||
updateTxPowerModeCharacteristic();
|
||||
|
|
Loading…
Reference in a new issue