BusScanner

This commit is contained in:
Yuri Trikoz
2020-06-25 17:57:17 +03:00
parent a1bd008867
commit d0c6d34f4a
19 changed files with 398 additions and 155 deletions

View File

@@ -1,6 +1,10 @@
#include "Utils/SysUtils.h"
#include "Utils/StringUtils.h"
#include "Global.h"
const String getUniqueId(const char* name) {
return String(name) + getMacAddress();
}
const String getChipId() {
String res;
@@ -62,6 +66,19 @@ String getHeapStats() {
}
#endif
const String getMacAddress() {
uint8_t mac[6];
char buf[13] = {0};
#if defined(ESP8266)
WiFi.macAddress(mac);
sprintf(buf, MACSTR, MAC2STR(mac));
#else
esp_read_mac(mac, ESP_MAC_WIFI_STA);
sprintf(buf, MACSTR, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
#endif
return String(buf);
}
//===================================================================
/*
void web_print (String text) {