Increase stack size for the BLE task (#1069)
* Add telemetry for BLE stack usage * Increase stack size for the BLE task
This commit is contained in:
parent
ebf8f452c5
commit
f8d38a0306
|
@ -32,7 +32,8 @@ build_flags =
|
|||
-Wno-stringop-overflow
|
||||
-Wformat-truncation
|
||||
-D ARDUINOJSON_ENABLE_NAN=0
|
||||
-D CONFIG_BT_NIMBLE_TASK_STACK_SIZE=4096
|
||||
-D CONFIG_BT_NIMBLE_TASK_STACK_SIZE=5632
|
||||
-D CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5632
|
||||
-D SCAN_TASK_STACK_SIZE=2562
|
||||
-D ARDUINO_LOOP_STACK_SIZE=6500
|
||||
-D MQTT_MIN_FREE_MEMORY=12192
|
||||
|
|
|
@ -114,6 +114,7 @@ bool sendTelemetry(unsigned int totalSeen, unsigned int totalFpSeen, int unsigne
|
|||
doc["maxHeap"] = maxHeap;
|
||||
doc["scanStack"] = uxTaskGetStackHighWaterMark(scanTaskHandle);
|
||||
doc["loopStack"] = uxTaskGetStackHighWaterMark(nullptr);
|
||||
doc["bleStack"] = bleStack;
|
||||
|
||||
String buffer;
|
||||
serializeJson(doc, buffer);
|
||||
|
@ -480,6 +481,7 @@ void reportLoop() {
|
|||
|
||||
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks {
|
||||
void onResult(BLEAdvertisedDevice *advertisedDevice) {
|
||||
bleStack = uxTaskGetStackHighWaterMark(nullptr);
|
||||
BleFingerprintCollection::Seen(advertisedDevice);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -56,6 +56,7 @@ int reconnectTries = 0;
|
|||
int teleFails = 0;
|
||||
bool online = false; // Have we successfully sent status=online
|
||||
bool sentDiscovery = false; // Have we successfully sent discovery
|
||||
UBaseType_t bleStack = 0;
|
||||
|
||||
int ethernetType = 0;
|
||||
String mqttHost, mqttUser, mqttPass;
|
||||
|
|
Loading…
Reference in New Issue