2 Commits

Author SHA1 Message Date
Yurii
4702909043 fix: BLE power 9 dbm with NimBLE-Arduino 2.1.x 2024-12-18 21:58:45 +03:00
Yurii
4c32ccc450 fix: `Content-Length` on esp32 for chunked response 2024-12-18 20:53:33 +03:00
2 changed files with 2 additions and 3 deletions

View File

@@ -20,8 +20,7 @@ public:
this->webServer->setContentLength(measureJson(content));
#else
this->webServer->setContentLength(CONTENT_LENGTH_UNKNOWN);
this->webServer->sendHeader(F("Content-Length"), String(measureJson(content)));
this->webServer->setContentLength(measureJson(content));
this->webServer->send(code, contentType, emptyString);
#endif

View File

@@ -383,7 +383,7 @@ protected:
if (!NimBLEDevice::isInitialized() && millis() > 5000) {
Log.sinfoln(FPSTR(L_SENSORS_BLE), F("Initialized"));
BLEDevice::init("");
NimBLEDevice::setPower(ESP_PWR_LVL_P9);
NimBLEDevice::setPower(9);
}
for (uint8_t sensorId = 0; sensorId <= Sensors::getMaxSensorId(); sensorId++) {