Woops (idk what im doing)

This commit is contained in:
Dionysus 2024-05-27 17:30:36 -04:00
parent 4972dd0c42
commit 20f3338187
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -742,9 +742,9 @@ uint16_t getColorFromCode(int colorCode) {
case 35: return 0x020E; case 35: return 0x020E;
case 36: return 0x000E; case 36: return 0x000E;
case 37: return 0x480E; case 37: return 0x480E;
case 38: return 0xBA08; case 38: return 0x700E;
case 39: return 0x7008; case 39: return 0x7008;
case 40: return 0xBA08; case 40: return 0xB000;
case 41: return 0xB300; case 41: return 0xB300;
case 42: return 0xB5A0; case 42: return 0xB5A0;
case 43: return 0x7DA0; case 43: return 0x7DA0;
@ -754,7 +754,7 @@ uint16_t getColorFromCode(int colorCode) {
case 47: return 0x0316; case 47: return 0x0316;
case 48: return 0x0016; case 48: return 0x0016;
case 49: return 0x7016; case 49: return 0x7016;
case 50: return 0xBA08; case 50: return 0xB016;
case 51: return 0xB00D; case 51: return 0xB00D;
case 52: return 0xF800; case 52: return 0xF800;
case 53: return 0xFC60; case 53: return 0xFC60;
@ -1017,24 +1017,21 @@ void updateTimeFromNTP() {
} }
String formatBytes(size_t bytes) { String formatBytes(size_t bytes) {
if (bytes < 1024) { if (bytes < 1024)
return String(bytes) + " B"; return String(bytes) + " B";
} else if (bytes < (1024 * 1024)) { else if (bytes < (1024 * 1024))
return String(bytes / 1024.0, 2) + " KB"; return String(bytes / 1024.0, 2) + " KB";
} else if (bytes < (1024 * 1024 * 1024)) { else if (bytes < (1024 * 1024 * 1024))
return String(bytes / 1024.0 / 1024.0, 2) + " MB"; return String(bytes / 1024.0 / 1024.0, 2) + " MB";
} else { else
return String(bytes / 1024.0 / 1024.0 / 1024.0, 2) + " GB"; return String(bytes / 1024.0 / 1024.0 / 1024.0, 2) + " GB";
}
} }
void printDeviceInfo() { void printDeviceInfo() {
// Get MAC Address // Get MAC Address
uint8_t mac[6]; uint8_t mac[6];
esp_efuse_mac_get_default(mac); esp_efuse_mac_get_default(mac);
String macAddress = String(mac[0], HEX) + ":" + String(mac[1], HEX) + ":" + String macAddress = String(mac[0], HEX) + ":" + String(mac[1], HEX) + ":" + String(mac[2], HEX) + ":" + String(mac[3], HEX) + ":" + String(mac[4], HEX) + ":" + String(mac[5], HEX);
String(mac[2], HEX) + ":" + String(mac[3], HEX) + ":" +
String(mac[4], HEX) + ":" + String(mac[5], HEX);
// Get Chip Info // Get Chip Info
uint32_t chipId = ESP.getEfuseMac(); // Unique ID uint32_t chipId = ESP.getEfuseMac(); // Unique ID