diff --git a/src/main.ino b/src/main.ino index 255dc0d..95462d1 100644 --- a/src/main.ino +++ b/src/main.ino @@ -742,9 +742,9 @@ uint16_t getColorFromCode(int colorCode) { case 35: return 0x020E; case 36: return 0x000E; case 37: return 0x480E; - case 38: return 0xBA08; + case 38: return 0x700E; case 39: return 0x7008; - case 40: return 0xBA08; + case 40: return 0xB000; case 41: return 0xB300; case 42: return 0xB5A0; case 43: return 0x7DA0; @@ -754,7 +754,7 @@ uint16_t getColorFromCode(int colorCode) { case 47: return 0x0316; case 48: return 0x0016; case 49: return 0x7016; - case 50: return 0xBA08; + case 50: return 0xB016; case 51: return 0xB00D; case 52: return 0xF800; case 53: return 0xFC60; @@ -1017,24 +1017,21 @@ void updateTimeFromNTP() { } String formatBytes(size_t bytes) { - if (bytes < 1024) { + if (bytes < 1024) return String(bytes) + " B"; - } else if (bytes < (1024 * 1024)) { + else if (bytes < (1024 * 1024)) 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"; - } else { + else return String(bytes / 1024.0 / 1024.0 / 1024.0, 2) + " GB"; - } } void printDeviceInfo() { // Get MAC Address uint8_t mac[6]; esp_efuse_mac_get_default(mac); - 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 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); // Get Chip Info uint32_t chipId = ESP.getEfuseMac(); // Unique ID