Skip to content

Commit 03fb5f9

Browse files
committed
fix NimBLEDevice::setPower for Nimble V1
1 parent e7a98a2 commit 03fb5f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/nimble/NimbleBluetooth.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#include "configuration.h"
22
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
33
#include "BluetoothCommon.h"
4-
#include "NimBLEAdvertising.h"
5-
#include "NimBLEExtAdvertising.h"
64
#include "NimbleBluetooth.h"
75
#include "PowerFSM.h"
8-
#include "PowerStatus.h"
96

107
#include "main.h"
118
#include "mesh/PhoneAPI.h"
@@ -316,7 +313,11 @@ void NimbleBluetooth::setup()
316313
LOG_INFO("Init the NimBLE bluetooth module");
317314

318315
NimBLEDevice::init(getDeviceName());
316+
#ifdef NIMBLE_TWO
319317
NimBLEDevice::setPower(9);
318+
#else
319+
NimBLEDevice::setPower(ESP_PWR_LVL_P9);
320+
#endif
320321

321322
if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) {
322323
NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND | BLE_SM_PAIR_AUTHREQ_MITM | BLE_SM_PAIR_AUTHREQ_SC);

0 commit comments

Comments
 (0)