[SSD1306] Partial MAC address in BLE title (#1498)

* partial MAC in title

• Last three octets of MAC address in title to differentiate devices with the same model name.
• fixed memory leak
• process optimisation

* lcd to oled

lcd to oled renaming
This commit is contained in:
DigiH authored and GitHub committed 2023-03-03 14:53:07 -06:00
1 parent 578f522356
commit 1b5215de42
5 files changed
+77 -60

No files matched your search

+2 -3
View File
@@ -991,9 +991,8 @@ void launchBTDiscovery(bool overrideDiscovery) {
void PublishDeviceData(JsonObject& BLEdata, bool processBLEData) {
if (abs((int)BLEdata["rssi"] | 0) < abs(BTConfig.minRssi)) { // process only the devices close enough
if (processBLEData) process_bledata(BLEdata);
String topic = subjectBTtoMQTT;
if (BLEdata.containsKey("model") || BLEdata.containsKey("distance")) { // Only display sensor data
pubOled((char*)topic.c_str(), BLEdata);
if (BLEdata.containsKey("type") && (BLEdata.containsKey("model") || BLEdata.containsKey("distance"))) { // Only display sensor data with type
pubOled(subjectBTtoMQTT, BLEdata);
}
if (!BTConfig.pubAdvData) {
BLEdata.remove("servicedatauuid");