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:
Sybren A. Stüvel 2026-03-15 18:30:46 +01:00
parent b670a7a709
commit f15e6994d0
3 changed files with 6 additions and 9 deletions

View file

@ -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();
}