mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Self-review fixes
Three fixes applied: BLELogInterface.h:108 — setMinPreferred(0x12) → setMaxPreferred(0x12) (bug: was clobbering the min value instead of setting max) BLELogInterface.h:42 — removed the redundant _line_len = 0 in flushLine(), collapsed the guard to a one-liner heltec_tracker/platformio.ini and sensecap_solar/platformio.ini — re-commented MESH_PACKET_LOGGING and BLE_PACKET_LOGGING
This commit is contained in:
parent
b670a7a709
commit
f15e6994d0
3 changed files with 6 additions and 9 deletions
|
|
@ -39,10 +39,7 @@ class BLELogInterface : public Print, BLEServerCallbacks {
|
|||
}
|
||||
|
||||
void flushLine() {
|
||||
if (_line_len == 0 || !_connected) {
|
||||
_line_len = 0;
|
||||
return;
|
||||
}
|
||||
if (_line_len == 0 || !_connected) return;
|
||||
const int chunk = notifyPayloadSize();
|
||||
int offset = 0;
|
||||
while (offset < _line_len) {
|
||||
|
|
@ -105,7 +102,7 @@ public:
|
|||
adv->addServiceUUID(NUS_SERVICE_UUID);
|
||||
adv->setScanResponse(true);
|
||||
adv->setMinPreferred(0x06); // helps iOS find and stay connected to the device
|
||||
adv->setMinPreferred(0x12);
|
||||
adv->setMaxPreferred(0x12);
|
||||
BLEDevice::startAdvertising();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@ build_flags =
|
|||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D ROOM_PASSWORD='"hello"'
|
||||
-D MESH_PACKET_LOGGING=1
|
||||
-D BLE_PACKET_LOGGING=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D BLE_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${Heltec_tracker_base.build_src_filter}
|
||||
+<helpers/ui/ST7735Display.cpp>
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ build_flags =
|
|||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
-D MAX_NEIGHBOURS=50
|
||||
-D MESH_PACKET_LOGGING=1
|
||||
-D BLE_PACKET_LOGGING=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D BLE_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
||||
+<../examples/simple_repeater/*.cpp>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue