Replaced BLE_LOW_POWER with BLE_TX_POWER & updated usages.
This commit is contained in:
@@ -27,11 +27,7 @@ void SerialBLEInterface::begin(const char* device_name, uint32_t pin_code) {
|
|||||||
|
|
||||||
Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);
|
Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);
|
||||||
Bluefruit.configPrphConn(250, BLE_GAP_EVENT_LENGTH_MIN, 16, 16); // increase MTU
|
Bluefruit.configPrphConn(250, BLE_GAP_EVENT_LENGTH_MIN, 16, 16); // increase MTU
|
||||||
#ifdef BLE_LOW_POWER
|
Bluefruit.setTxPower(BLE_TX_POWER);
|
||||||
Bluefruit.setTxPower(0);
|
|
||||||
#else
|
|
||||||
Bluefruit.setTxPower(4);
|
|
||||||
#endif
|
|
||||||
Bluefruit.begin();
|
Bluefruit.begin();
|
||||||
Bluefruit.setName(device_name);
|
Bluefruit.setName(device_name);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
#include "../BaseSerialInterface.h"
|
#include "../BaseSerialInterface.h"
|
||||||
#include <bluefruit.h>
|
#include <bluefruit.h>
|
||||||
|
|
||||||
|
#ifndef BLE_TX_POWER
|
||||||
|
#define BLE_TX_POWER 4
|
||||||
|
#endif
|
||||||
|
|
||||||
class SerialBLEInterface : public BaseSerialInterface {
|
class SerialBLEInterface : public BaseSerialInterface {
|
||||||
BLEUart bleuart;
|
BLEUart bleuart;
|
||||||
bool _isEnabled;
|
bool _isEnabled;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ build_flags = ${t1000-e.build_flags}
|
|||||||
-D MAX_CONTACTS=100
|
-D MAX_CONTACTS=100
|
||||||
-D MAX_GROUP_CHANNELS=8
|
-D MAX_GROUP_CHANNELS=8
|
||||||
-D BLE_PIN_CODE=123456
|
-D BLE_PIN_CODE=123456
|
||||||
-D BLE_LOW_POWER=1
|
-D BLE_TX_POWER=0
|
||||||
; -D BLE_DEBUG_LOGGING=1
|
; -D BLE_DEBUG_LOGGING=1
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
; -D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
|
|||||||
Reference in New Issue
Block a user