Skip to content

Commit 5370667

Browse files
Replaced BLE_LOW_POWER with BLE_TX_POWER & updated usages.
1 parent 7363a4f commit 5370667

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/helpers/nrf52/SerialBLEInterface.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ void SerialBLEInterface::begin(const char* device_name, uint32_t pin_code) {
2727

2828
Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);
2929
Bluefruit.configPrphConn(250, BLE_GAP_EVENT_LENGTH_MIN, 16, 16); // increase MTU
30-
#ifdef BLE_LOW_POWER
31-
Bluefruit.setTxPower(0);
32-
#else
33-
Bluefruit.setTxPower(4);
34-
#endif
30+
Bluefruit.setTxPower(BLE_TX_POWER);
3531
Bluefruit.begin();
3632
Bluefruit.setName(device_name);
3733

src/helpers/nrf52/SerialBLEInterface.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
#include "../BaseSerialInterface.h"
44
#include <bluefruit.h>
55

6+
#ifndef BLE_TX_POWER
7+
#define BLE_TX_POWER 4
8+
#endif
9+
610
class SerialBLEInterface : public BaseSerialInterface {
711
BLEUart bleuart;
812
bool _isEnabled;

variants/t1000-e/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ build_flags = ${t1000-e.build_flags}
100100
-D MAX_CONTACTS=100
101101
-D MAX_GROUP_CHANNELS=8
102102
-D BLE_PIN_CODE=123456
103-
-D BLE_LOW_POWER=1
103+
-D BLE_TX_POWER=0
104104
; -D BLE_DEBUG_LOGGING=1
105105
; -D MESH_PACKET_LOGGING=1
106106
; -D MESH_DEBUG=1

0 commit comments

Comments
 (0)