diff --git a/src/helpers/nrf52/SerialBLEInterface.cpp b/src/helpers/nrf52/SerialBLEInterface.cpp index 48708951..4bc9d10a 100644 --- a/src/helpers/nrf52/SerialBLEInterface.cpp +++ b/src/helpers/nrf52/SerialBLEInterface.cpp @@ -27,11 +27,7 @@ void SerialBLEInterface::begin(const char* device_name, uint32_t pin_code) { Bluefruit.configPrphBandwidth(BANDWIDTH_MAX); Bluefruit.configPrphConn(250, BLE_GAP_EVENT_LENGTH_MIN, 16, 16); // increase MTU -#ifdef BLE_LOW_POWER - Bluefruit.setTxPower(0); -#else - Bluefruit.setTxPower(4); -#endif + Bluefruit.setTxPower(BLE_TX_POWER); Bluefruit.begin(); Bluefruit.setName(device_name); diff --git a/src/helpers/nrf52/SerialBLEInterface.h b/src/helpers/nrf52/SerialBLEInterface.h index 12a4f46a..239cf6c4 100644 --- a/src/helpers/nrf52/SerialBLEInterface.h +++ b/src/helpers/nrf52/SerialBLEInterface.h @@ -3,6 +3,10 @@ #include "../BaseSerialInterface.h" #include +#ifndef BLE_TX_POWER +#define BLE_TX_POWER 4 +#endif + class SerialBLEInterface : public BaseSerialInterface { BLEUart bleuart; bool _isEnabled; diff --git a/variants/t1000-e/platformio.ini b/variants/t1000-e/platformio.ini index 88c0b45d..8978ec15 100644 --- a/variants/t1000-e/platformio.ini +++ b/variants/t1000-e/platformio.ini @@ -100,7 +100,7 @@ build_flags = ${t1000-e.build_flags} -D MAX_CONTACTS=100 -D MAX_GROUP_CHANNELS=8 -D BLE_PIN_CODE=123456 - -D BLE_LOW_POWER=1 + -D BLE_TX_POWER=0 ; -D BLE_DEBUG_LOGGING=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1