Compare commits

...
Sign in to create a new pull request.

31 commits

Author SHA1 Message Date
dc8e348aa3
fix: Set explicit littlefs version tag
All checks were successful
BTClock CI / build (push) Successful in 23m39s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 23s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 1m1s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 20s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 1m2s
BTClock CI / release (push) Successful in 14s
2025-02-19 15:38:54 +01:00
e4ac3c5c94
feat: switch to replaceable events for nostr source
Some checks failed
BTClock CI / build (push) Failing after 5m31s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Has been skipped
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Has been skipped
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Has been skipped
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Has been skipped
BTClock CI / release (push) Has been skipped
2025-02-19 15:15:53 +01:00
0b1a362b53
chore: dependency updates 2025-02-19 14:12:16 +01:00
3265eec308
chore: update dependencies and make eventsource use static jsondocument 2025-01-20 12:05:48 +01:00
678a4ba099
fix: Set WiFi country to NL for scanning 2025-01-19 22:32:04 +01:00
9ea0210864
fix: set better defaults for frontlight enabled devices 2025-01-16 00:30:40 +01:00
b01003f075
fix: Never write to LED0
All checks were successful
BTClock CI / build (push) Successful in 24m32s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 37s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 22s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 36s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 21s
BTClock CI / release (push) Successful in 11s
2025-01-15 22:09:05 +01:00
1083a3222b
Add local public pool support
All checks were successful
BTClock CI / build (push) Successful in 22m59s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 34s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 22s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 32s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 19s
BTClock CI / release (push) Successful in 11s
2025-01-08 02:14:33 +01:00
963f3b10b7
Update WebUI
All checks were successful
BTClock CI / build (push) Successful in 21m25s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 33s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 21s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 31s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 19s
BTClock CI / release (push) Successful in 10s
2025-01-06 01:30:46 +01:00
bf64b2f64f
Merge root certificates 2025-01-06 01:27:13 +01:00
1d61453563
Revert to esp websocket client because websocketsClient does not work 2025-01-06 01:13:09 +01:00
e330984ba2
Refactor BlockNotify to a class, use websocketsClient 2025-01-06 00:43:31 +01:00
ebbec75e6b
Fix V2 message parsing 2025-01-06 00:01:34 +01:00
e19cad05bc
Update ESPAsyncWebserver 2025-01-05 23:15:34 +01:00
7195b7d343
Rewrite price notify to websocketsclient 2025-01-05 23:13:25 +01:00
0999dd08ad
Remove deprecated ArduinoJson methods 2025-01-05 23:13:05 +01:00
178748b94d
WebUI update 2025-01-05 22:47:13 +01:00
b435552c92
fix: verify block update 2025-01-05 22:12:39 +01:00
a6a8b5a071
Refactor EPD code to EPDManager class 2025-01-05 22:11:53 +01:00
d023643090
Refactor LedHandler to a class 2025-01-05 21:19:28 +01:00
ac13098824
Refactor mining pool stats fetch to a class 2025-01-05 20:24:13 +01:00
c91428dd5f
Refactor BitAxeFetch to a class 2025-01-05 20:14:55 +01:00
fa15e46d34
Add compressed sat symbol font file 2025-01-05 20:07:56 +01:00
cd4dea9d34
Add explicit LED frequency, compress sats symbol font 2025-01-05 18:50:19 +01:00
b4864b1db6
Improve bitaxe handling code 2025-01-05 18:08:21 +01:00
b8428e1650 Add LED effect when retrying time synchronization 2024-12-31 11:51:34 +01:00
aea69d54b6 Add tag and HW revision to setup screen, change setup SSID same as hostname 2024-12-31 11:33:50 +01:00
2e1b15e688 Add Do Not Disturb feature
All checks were successful
BTClock CI / build (push) Successful in 21m1s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 31s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 21s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 28s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 19s
BTClock CI / release (push) Successful in 11s
2024-12-30 02:04:18 +01:00
13c8e67b4c More efficient handling of multiple fonts, restore data bugfix
All checks were successful
BTClock CI / build (push) Successful in 12m16s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 31s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 21s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 29s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 19s
BTClock CI / release (push) Successful in 39s
2024-12-30 00:53:50 +01:00
90d91ba216 Compress fonts and add Oswald font 2024-12-29 23:28:22 +01:00
73a20cf9a7 Screen handler bugfix for multi currency
All checks were successful
BTClock CI / build (push) Successful in 21m36s
BTClock CI / merge (map[name:btclock_rev_b version:esp32s3], 213epd) (push) Successful in 34s
BTClock CI / merge (map[name:btclock_v8 version:esp32s3], 213epd) (push) Successful in 33s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 213epd) (push) Successful in 32s
BTClock CI / merge (map[name:lolin_s3_mini version:esp32s3], 29epd) (push) Successful in 32s
BTClock CI / release (push) Successful in 12s
2024-12-29 17:11:34 +01:00
46 changed files with 6474 additions and 9484 deletions

2
data

@ -1 +1 @@
Subproject commit 468e105adfaded0440ff8bba61a8241d54f28cd4 Subproject commit 0116cd68cdfdf383823f74e0f9665a1700cf0500

View file

@ -4,6 +4,6 @@ dependencies:
source: source:
type: idf type: idf
version: 4.4.7 version: 4.4.7
manifest_hash: cd2f3ee15e776d949eb4ea4eddc8f39b30c2a7905050850eed01ab4928143cff manifest_hash: 1d4ef353a86901733b106a1897b186dbf9fc091a4981f0560ea2f6899b7a3d44
target: esp32s3 target: esp32s3
version: 1.0.0 version: 1.0.0

View file

@ -1,14 +1,20 @@
#include "bitaxe_handler.hpp" #include "bitaxe_handler.hpp"
std::array<std::string, NUM_SCREENS> parseBitaxeHashRate(std::string text) std::array<std::string, NUM_SCREENS> parseBitaxeHashRate(uint64_t hashrate)
{ {
std::array<std::string, NUM_SCREENS> ret; std::array<std::string, NUM_SCREENS> ret;
ret.fill(""); // Initialize all elements to empty strings ret.fill(""); // Initialize all elements to empty strings
std::size_t textLength = text.length(); // Convert hashrate to GH/s and round to nearest integer
double hashRateGH = static_cast<double>(hashrate) / std::pow(10, getHashrateMultiplier('G'));
std::string hashRateStr = std::to_string(static_cast<uint64_t>(std::round(hashRateGH)));
// Place the icons
ret[0] = "mdi:bitaxe";
ret[NUM_SCREENS - 1] = "GH/S";
// Calculate the position where the digits should start // Calculate the position where the digits should start
// Account for the position of the "mdi:pickaxe" and the "GH/S" label std::size_t textLength = hashRateStr.length();
std::size_t startIndex = NUM_SCREENS - 1 - textLength; std::size_t startIndex = NUM_SCREENS - 1 - textLength;
// Insert the "mdi:pickaxe" icon just before the digits // Insert the "mdi:pickaxe" icon just before the digits
@ -17,34 +23,64 @@ std::array<std::string, NUM_SCREENS> parseBitaxeHashRate(std::string text)
ret[startIndex - 1] = "mdi:pickaxe"; ret[startIndex - 1] = "mdi:pickaxe";
} }
// Place the digits // Place each digit
for (std::size_t i = 0; i < textLength; ++i) for (std::size_t i = 0; i < textLength; ++i)
{ {
ret[startIndex + i] = text.substr(i, 1); ret[startIndex + i] = std::string(1, hashRateStr[i]);
} }
ret[NUM_SCREENS - 1] = "GH/S";
ret[0] = "mdi:bitaxe";
return ret; return ret;
} }
std::array<std::string, NUM_SCREENS> parseBitaxeBestDiff(std::string text) std::array<std::string, NUM_SCREENS> parseBitaxeBestDiff(uint64_t difficulty)
{ {
std::array<std::string, NUM_SCREENS> ret; std::array<std::string, NUM_SCREENS> ret;
std::uint32_t firstIndex = 0; ret.fill("");
if (text.length() < NUM_SCREENS) // Add icons at the start
{ ret[0] = "mdi:bitaxe";
text.insert(text.begin(), NUM_SCREENS - text.length(), ' '); ret[1] = "mdi:rocket";
ret[0] = "mdi:bitaxe";
ret[1] = "mdi:rocket"; if (difficulty == 0) {
firstIndex = 2; ret[NUM_SCREENS - 1] = "0";
return ret;
} }
for (std::uint8_t i = firstIndex; i < NUM_SCREENS; i++) // Find the appropriate suffix and format the number
const std::pair<char, int> suffixes[] = {
{'Q', 15}, {'T', 12}, {'G', 9}, {'M', 6}, {'K', 3}
};
std::string text;
for (const auto& suffix : suffixes) {
if (difficulty >= std::pow(10, suffix.second)) {
double value = difficulty / std::pow(10, suffix.second);
char buffer[32];
snprintf(buffer, sizeof(buffer), "%.1f", value);
text = buffer;
// Remove trailing zeros and decimal point if not needed
if (text.find('.') != std::string::npos) {
text = text.substr(0, text.find_last_not_of('0') + 1);
if (text.back() == '.') {
text.pop_back();
}
}
text += suffix.first;
break;
}
}
if (text.empty()) {
text = std::to_string(difficulty);
}
// Calculate start position to right-align the text
std::size_t startIndex = NUM_SCREENS - text.length();
// Place the formatted difficulty string
for (std::size_t i = 0; i < text.length() && (startIndex + i) < NUM_SCREENS; ++i)
{ {
ret[i] = text[i]; ret[startIndex + i] = std::string(1, text[i]);
} }
return ret; return ret;

View file

@ -1,5 +1,7 @@
#include <array> #include <array>
#include <string> #include <string>
#include <cstdint>
#include "utils.hpp"
std::array<std::string, NUM_SCREENS> parseBitaxeHashRate(std::string text); std::array<std::string, NUM_SCREENS> parseBitaxeHashRate(uint64_t hashrate);
std::array<std::string, NUM_SCREENS> parseBitaxeBestDiff(std::string text); std::array<std::string, NUM_SCREENS> parseBitaxeBestDiff(uint64_t difficulty);

View file

@ -243,3 +243,14 @@ int getHashrateMultiplier(char unit) {
}; };
return multipliers.at(unit); return multipliers.at(unit);
} }
int getDifficultyMultiplier(char unit) {
if (unit == '0')
return 0;
static const std::unordered_map<char, int> multipliers = {
{'Q', 15}, {'T', 12}, {'B', 9}, {'M', 6}, {'K', 3}, {'G', 9},
{'q', 15}, {'t', 12}, {'b', 9}, {'m', 6}, {'k', 3}, {'g', 9}
};
return multipliers.at(unit);
}

View file

@ -16,4 +16,5 @@ std::string formatNumberWithSuffix(std::uint64_t num, int numCharacters = 4);
std::string formatNumberWithSuffix(std::uint64_t num, int numCharacters, bool mowMode); std::string formatNumberWithSuffix(std::uint64_t num, int numCharacters, bool mowMode);
int64_t getAmountInSatoshis(std::string bolt11); int64_t getAmountInSatoshis(std::string bolt11);
void parseHashrateString(const std::string& hashrate, std::string& label, std::string& output, unsigned int maxCharacters); void parseHashrateString(const std::string& hashrate, std::string& label, std::string& output, unsigned int maxCharacters);
int getHashrateMultiplier(char unit); int getHashrateMultiplier(char unit);
int getDifficultyMultiplier(char unit);

View file

@ -15,7 +15,7 @@ default_envs = lolin_s3_mini_213epd, lolin_s3_mini_29epd, btclock_rev_b_213epd,
[env] [env]
[btclock_base] [btclock_base]
platform = espressif32 @ ^6.9.0 platform = espressif32 @ ^6.10.0
framework = arduino, espidf framework = arduino, espidf
monitor_speed = 115200 monitor_speed = 115200
monitor_filters = esp32_exception_decoder, colorize monitor_filters = esp32_exception_decoder, colorize
@ -30,16 +30,17 @@ build_flags =
-DLAST_BUILD_TIME=$UNIX_TIME -DLAST_BUILD_TIME=$UNIX_TIME
-DARDUINO_USB_CDC_ON_BOOT -DARDUINO_USB_CDC_ON_BOOT
-DCORE_DEBUG_LEVEL=0 -DCORE_DEBUG_LEVEL=0
-D CONFIG_ASYNC_TCP_STACK_SIZE=16384
-fexceptions -fexceptions
build_unflags = build_unflags =
-Werror=all -Werror=all
-fno-exceptions -fno-exceptions
lib_deps = lib_deps =
https://github.com/joltwallet/esp_littlefs.git https://github.com/joltwallet/esp_littlefs.git#v1.16.4
bblanchon/ArduinoJson@^7.2.1 bblanchon/ArduinoJson@^7.3.0
mathieucarbou/ESPAsyncWebServer @ 3.3.23 esp32async/ESPAsyncWebServer @ 3.7.0
robtillaart/MCP23017@^0.8.0 robtillaart/MCP23017@^0.9.0
adafruit/Adafruit NeoPixel@^1.12.3 adafruit/Adafruit NeoPixel@^1.12.4
https://github.com/dsbaars/universal_pin#feature/mcp23017_rt https://github.com/dsbaars/universal_pin#feature/mcp23017_rt
https://github.com/dsbaars/GxEPD2#universal_pin https://github.com/dsbaars/GxEPD2#universal_pin
https://github.com/tzapu/WiFiManager.git#v2.0.17 https://github.com/tzapu/WiFiManager.git#v2.0.17
@ -78,9 +79,10 @@ build_flags =
-D I2C_SDA_PIN=35 -D I2C_SDA_PIN=35
-D I2C_SCK_PIN=36 -D I2C_SCK_PIN=36
-D HAS_FRONTLIGHT -D HAS_FRONTLIGHT
-D PCA_OE_PIN=45 -D PCA_OE_PIN=48
-D PCA_I2C_ADDR=0x42 -D PCA_I2C_ADDR=0x42
-D IS_HW_REV_B -D IS_HW_REV_B
lib_deps = lib_deps =
${btclock_base.lib_deps} ${btclock_base.lib_deps}
robtillaart/PCA9685@^0.7.1 robtillaart/PCA9685@^0.7.1
@ -99,6 +101,7 @@ build_flags =
-D USE_QR -D USE_QR
-D VERSION_EPD_2_13 -D VERSION_EPD_2_13
-D HW_REV=\"REV_A_EPD_2_13\" -D HW_REV=\"REV_A_EPD_2_13\"
-D CONFIG_ARDUINO_MAIN_TASK_STACK_SIZE=16384
platform_packages = platform_packages =
platformio/tool-mklittlefs@^1.203.210628 platformio/tool-mklittlefs@^1.203.210628
earlephilhower/tool-mklittlefs-rp2040-earlephilhower@^5.100300.230216 earlephilhower/tool-mklittlefs-rp2040-earlephilhower@^5.100300.230216
@ -111,6 +114,7 @@ build_flags =
-D USE_QR -D USE_QR
-D VERSION_EPD_2_13 -D VERSION_EPD_2_13
-D HW_REV=\"REV_B_EPD_2_13\" -D HW_REV=\"REV_B_EPD_2_13\"
-D CONFIG_ARDUINO_MAIN_TASK_STACK_SIZE=16384
platform_packages = platform_packages =
platformio/tool-mklittlefs@^1.203.210628 platformio/tool-mklittlefs@^1.203.210628
earlephilhower/tool-mklittlefs-rp2040-earlephilhower@^5.100300.230216 earlephilhower/tool-mklittlefs-rp2040-earlephilhower@^5.100300.230216

View file

@ -1,384 +1,191 @@
#pragma once
#include <Adafruit_GFX.h> #include <Adafruit_GFX.h>
#include <Arduino.h> #include <Arduino.h>
#include "fonts.hpp"
const uint8_t Antonio_SemiBold20pt7bBitmaps[] PROGMEM = { const uint8_t Antonio_SemiBold20pt7bBitmaps_Gzip[] = {
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, 0x66, 0x66, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xa5, 0x57,
0x66, 0x66, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x7B, 0xDE, 0xF7, 0x4f, 0x6f, 0xe3, 0xba, 0x11, 0xa7, 0xaa, 0xe2, 0xf1, 0x1d, 0x16, 0xe6,
0x98, 0xC6, 0x00, 0x03, 0x8F, 0x01, 0xC7, 0x80, 0xE3, 0x80, 0xF1, 0xC0, 0xf5, 0x1d, 0xbc, 0x62, 0x3f, 0xc2, 0xeb, 0xcd, 0x8b, 0x55, 0xac, 0xaf,
0x70, 0xE0, 0x38, 0x70, 0x1C, 0x78, 0x0E, 0x3C, 0x07, 0x1C, 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F, 0xFF, 0xFF,
0xFF, 0xFF, 0xFE, 0x07, 0xC3, 0xF1, 0xFC, 0x7E, 0x1E, 0x07, 0x81, 0xE0,
0x78, 0x1E, 0x07, 0x81, 0xE0, 0x78, 0x1E, 0x07, 0x81, 0xE0, 0xF8, 0x7E,
0x3F, 0x0F, 0x83, 0xF0, 0xFE, 0x0F, 0x81, 0xE0, 0x78, 0x1E, 0x07, 0x81,
0xE0, 0x78, 0x1E, 0x07, 0x81, 0xE0, 0x78, 0x1E, 0x07, 0xC1, 0xFC, 0x3F,
0x07, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF8, 0x3F, 0x0F,
0xC1, 0xF8, 0x3E, 0x07, 0x81, 0xE0, 0x78, 0x1E, 0x07, 0x81, 0xE0, 0x78,
0x1E, 0x07, 0x81, 0xE0, 0x78, 0x1F, 0x83, 0xF0, 0x7C, 0x3F, 0x1F, 0xC7,
0x81, 0xE0, 0x78, 0x1E, 0x07, 0x81, 0xE0, 0x78, 0x1E, 0x07, 0x81, 0xE0,
0x78, 0x3E, 0x0F, 0x8F, 0xC3, 0xF0, 0xF8, 0x00, 0x1E, 0x07, 0x9F, 0xF3,
0xDF, 0xFF, 0xDF, 0xFF, 0xEF, 0xFF, 0xE1, 0x03, 0xE0};
const GFXglyph Antonio_SemiBold20pt7bGlyphs[] PROGMEM = { const GFXglyph Antonio_SemiBold20pt7bGlyphs[] PROGMEM = {
{0, 1, 1, 8, 0, 0}, // 0x20 ' ' {0, 1, 1, 8, 0, 0}, // 0x20 ' '
@ -477,8 +284,13 @@ const GFXglyph Antonio_SemiBold20pt7bGlyphs[] PROGMEM = {
{4461, 10, 37, 14, 2, -33}, // 0x7D '}' {4461, 10, 37, 14, 2, -33}, // 0x7D '}'
{4508, 17, 6, 21, 2, -21}}; // 0x7E '~' {4508, 17, 6, 21, 2, -21}}; // 0x7E '~'
const GFXfont Antonio_SemiBold20pt7b PROGMEM = { // Font properties
(uint8_t *)Antonio_SemiBold20pt7bBitmaps, static constexpr FontData Antonio_SemiBold20pt7b_Properties = {
(GFXglyph *)Antonio_SemiBold20pt7bGlyphs, 0x20, 0x7E, 51}; Antonio_SemiBold20pt7bBitmaps_Gzip,
Antonio_SemiBold20pt7bGlyphs,
// Approx. 5193 bytes sizeof(Antonio_SemiBold20pt7bBitmaps_Gzip),
4521, // Original size
0x20, // First char
0x7E, // Last char
51 // yAdvance
};

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,97 @@
#pragma once #pragma once
#include "antonio-semibold20.h" #include <Adafruit_GFX.h>
//#include "antonio-semibold30.h" #include <Arduino.h>
#include "antonio-semibold40.h" #include <rom/miniz.h>
#include "antonio-semibold90.h"
#include "sats-symbol.h"
//#include "icons.h"
// #include "oswald-20.h" // Font metadata structure
// #include "oswald-30.h" struct FontData {
// #include "oswald-90.h" const uint8_t* compressedData;
// #include "ubuntu-italic40.h" const GFXglyph* glyphs;
// #include "ubuntu-italic60.h" const size_t compressedSize;
// #include "ubuntu-italic70.h" const size_t originalSize;
const uint16_t first;
const uint16_t last;
const uint8_t yAdvance;
};
// Font name constants
namespace FontNames {
static const String ANTONIO = "antonio";
static const String OSWALD = "oswald";
static const std::array<String, 2> AVAILABLE_FONTS = {
ANTONIO,
OSWALD
};
static const std::array<String, 2>& getAvailableFonts() {
return AVAILABLE_FONTS;
}
}
class FontLoader {
public:
static GFXfont* loadCompressedFont(const FontData& fontData) {
return loadCompressedFont(
fontData.compressedData,
fontData.glyphs,
fontData.compressedSize,
fontData.originalSize,
fontData.first,
fontData.last,
fontData.yAdvance
);
}
static GFXfont* loadCompressedFont(
const uint8_t* compressedData,
const GFXglyph* glyphs,
const size_t compressedSize,
const size_t originalSize,
const uint16_t first,
const uint16_t last,
const uint8_t yAdvance)
{
uint8_t* decompressedData = (uint8_t*)malloc(originalSize);
if (!decompressedData) {
Serial.println(F("Failed to allocate memory for font decompression"));
return nullptr;
}
size_t decompressedSize = originalSize;
if (GzipDecompressor::decompressData(compressedData,
compressedSize,
decompressedData,
&decompressedSize))
{
GFXfont* font = (GFXfont*)malloc(sizeof(GFXfont));
if (!font) {
free(decompressedData);
Serial.println(F("Failed to allocate memory for font structure"));
return nullptr;
}
font->bitmap = decompressedData;
font->glyph = (GFXglyph*)glyphs;
font->first = first;
font->last = last;
font->yAdvance = yAdvance;
return font;
}
Serial.println(F("Font decompression failed"));
free(decompressedData);
return nullptr;
}
static void unloadFont(GFXfont* font) {
if (font) {
if (font->bitmap) {
free((void*)font->bitmap);
}
free(font);
}
}
};

323
src/fonts/oswald-medium20.h Normal file
View file

@ -0,0 +1,323 @@
#pragma once
#include <Adafruit_GFX.h>
#include <Arduino.h>
#include "fonts.hpp"
const uint8_t Oswald_Medium20pt7bBitmaps_Gzip[] = {
0x1f,0x8b,0x08,0x00,0xf7,0xa4,0x71,0x67,0x02,0xff,0xad,0x58,
0xcf,0x8e,0xdb,0xb8,0x19,0xa7,0xa0,0xa2,0xbc,0x04,0xe1,0xb5,
0x87,0x81,0x98,0x37,0xe8,0x1e,0xb3,0x80,0x22,0xf6,0x51,0xda,
0x37,0x48,0xb1,0x87,0x3a,0x18,0x45,0xd4,0xc0,0x07,0xdf,0x56,
0x2f,0xb0,0x88,0x5f,0x63,0x81,0xa6,0x19,0x1a,0x2e,0xe0,0x4b,
0xb1,0x7e,0x81,0x36,0xa6,0xa1,0x83,0x6f,0x2b,0x1a,0x3e,0x98,
0x86,0x39,0x64,0x7f,0x94,0xec,0x19,0x4f,0x32,0x49,0x16,0x45,
0xc5,0xb1,0xf4,0xf1,0xff,0xc7,0xef,0xef,0x8f,0x43,0x42,0x7c,
0x8e,0xff,0xde,0x7c,0xff,0xcb,0x0f,0x3f,0x6d,0xbe,0xff,0xd7,
0x8b,0x24,0x56,0xbd,0x5c,0xbe,0xe9,0x5e,0x6d,0x7e,0xde,0x67,
0xed,0x4f,0x3f,0xfc,0x48,0x58,0x43,0x27,0xe3,0xc5,0xac,0x55,
0x5b,0x3d,0x32,0xf9,0xa8,0xc8,0xb3,0x8c,0x31,0xd1,0xcf,0x34,
0x5b,0x6d,0xcd,0x68,0x94,0xe7,0x32,0xdc,0x86,0x55,0xe8,0xc2,
0xae,0x9d,0xad,0xb5,0x31,0x23,0x9b,0x8f,0xb2,0x9c,0x65,0xb4,
0xa1,0x8b,0xf1,0x7c,0xd6,0x6a,0x52,0x93,0x3f,0x91,0x17,0xc4,
0x27,0x61,0x16,0xb6,0xc1,0xba,0xca,0xf1,0x8a,0xdd,0xd2,0xd5,
0xb8,0x53,0xa9,0x49,0x1c,0x09,0x44,0x28,0x66,0xd2,0x33,0x81,
0x96,0x8a,0x88,0x9c,0x79,0x1a,0xc6,0x61,0x76,0xd4,0x77,0xd6,
0x49,0x2f,0x3c,0x0b,0xa9,0x27,0x7f,0x20,0xcf,0xc8,0xef,0x49,
0x4a,0x58,0x9d,0x11,0x66,0x69,0x4d,0x43,0xa2,0xd2,0xa0,0x5f,
0x13,0x6b,0x73,0x92,0x17,0x8c,0x30,0x3a,0xae,0x53,0xb0,0x41,
0xc0,0x19,0xc9,0xb3,0x2b,0x34,0x34,0x24,0x05,0xff,0xc4,0x58,
0x4d,0x8a,0xe2,0x25,0x61,0x21,0x23,0x49,0x58,0x4c,0xac,0x58,
0xcf,0x43,0xaa,0xb6,0x41,0x93,0x7c,0x64,0xc9,0xf3,0x22,0x23,
0x69,0x33,0x51,0x49,0xbb,0x36,0x64,0x64,0x4b,0x72,0x55,0x70,
0xc2,0xd8,0x44,0xa5,0x73,0x34,0x68,0x3b,0x22,0x23,0x8c,0xc8,
0x68,0xa8,0xe9,0x4d,0x50,0x89,0x12,0x86,0x18,0x6a,0xa8,0x4e,
0x03,0x09,0x86,0x7b,0xda,0x6a,0x5b,0x72,0x36,0x5e,0x9b,0xb2,
0x60,0x93,0x7a,0x6b,0x78,0x9e,0x74,0x44,0xe8,0xd4,0xe2,0x30,
0xac,0x4e,0x6d,0x1e,0x26,0x1f,0xb6,0xfb,0x95,0xd8,0x6e,0x3e,
0x14,0xfb,0xb9,0xb7,0x72,0x4a,0x77,0xba,0x2c,0xf9,0x26,0xf8,
0x10,0x96,0xce,0x06,0x06,0x91,0xfe,0xfa,0xab,0xa6,0x8c,0x8b,
0xaa,0x2c,0xed,0x97,0x9e,0xb2,0x2c,0x85,0xe0,0x54,0x97,0x82,
0xcf,0x35,0x36,0xc3,0x9e,0x33,0x63,0xe3,0x77,0x02,0x46,0xef,
0x89,0x81,0x62,0xcd,0x72,0x31,0x57,0xac,0x7e,0x99,0xa8,0x1f,
0xff,0xf8,0x37,0x6c,0xd0,0x5a,0x56,0x7b,0x36,0x3a,0xb6,0x3f,
0x3e,0xfb,0x73,0x5a,0x53,0xf2,0x9c,0x5c,0x91,0x97,0xe4,0x75,
0xaf,0x50,0x7f,0x5f,0x25,0x3a,0x51,0x68,0xf8,0xe9,0xd7,0x3d,
0xc1,0xc7,0xe1,0x57,0x93,0x51,0xaa,0xae,0x88,0x66,0xf8,0xd6,
0x79,0xa2,0x9f,0x93,0xd7,0x14,0x5f,0x95,0x41,0x08,0xe4,0x65,
0x8a,0xef,0xd0,0x75,0x95,0xe0,0x7b,0xee,0xa2,0x86,0x41,0x6b,
0x4d,0x58,0x84,0xdd,0xfa,0x68,0xde,0x5a,0xe1,0x38,0xea,0xbd,
0x56,0x83,0x0e,0x46,0x7e,0xa1,0x61,0x45,0x97,0x8b,0x0d,0x0c,
0xc5,0x48,0xc3,0x4d,0x3a,0xdb,0xde,0x45,0xe6,0x2a,0x4e,0x67,
0xa6,0xfc,0xca,0xcb,0x70,0x27,0xbc,0xf4,0x52,0x3a,0x61,0xf9,
0xa9,0x08,0x22,0x48,0x01,0xf9,0x3b,0xe2,0x12,0x9b,0x9a,0x14,
0xea,0xa2,0x8a,0x29,0x5e,0xf3,0x5a,0xa0,0x39,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bc,0xaf,0xfe,0xfa,0xee,0x35,0x79,0xf1,0x8c,0x8e,0xb7,
0x90,0xc0,0x42,0x1b,0x9e,0x3a,0xd1,0x7a,0xae,0x2c,0x25,0x2f,
0x86,0xf3,0x9a,0x61,0x70,0xef,0x0a,0xf5,0x33,0x82,0xf3,0x06,
0x0a,0xcd,0x4a,0x62,0x04,0xdb,0xf9,0xd0,0x68,0xfb,0x1c,0x91,
0x8c,0x69,0xb9,0x0d,0x7b,0x44,0xbb,0x00,0x41,0xe3,0x58,0x42,
0x95,0xc4,0x26,0x91,0x77,0xd8,0x94,0x83,0x18,0x20,0x99,0x92,
0x98,0x44,0xa7,0x8a,0xd6,0xc3,0x8a,0xbd,0xf1,0x51,0xcd,0x14,
0x41,0x68,0x43,0xfc,0x51,0x84,0x07,0x8b,0x1f,0x4c,0x06,0xb6,
0x28,0xa0,0x77,0x4e,0x08,0xcc,0x8d,0xe4,0x3c,0xd9,0x34,0x2c,
0x39,0x2e,0x9a,0x71,0x68,0x17,0x37,0xc1,0xec,0x67,0xd6,0x5c,
0xcf,0xec,0xe8,0x95,0xb6,0x79,0x66,0x6c,0xc1,0x46,0xb0,0x74,
0x57,0xb0,0xb1,0xcf,0xe8,0xcc,0xb3,0x54,0x75,0xf4,0x46,0xef,
0xc7,0xca,0x5c,0xc3,0xf5,0xdf,0x18,0xeb,0x72,0x2b,0x7d,0x9e,
0xf3,0xce,0x65,0x74,0xef,0xd8,0x8d,0xb1,0xa9,0x22,0x24,0x89,
0x27,0x2b,0xa3,0x1c,0xf0,0x63,0x08,0xc7,0x69,0x98,0x2a,0x9c,
0x53,0x83,0x07,0x83,0x58,0xa8,0x48,0x6a,0x88,0x44,0x0f,0x42,
0xb0,0x84,0x16,0x13,0xc4,0x61,0xcd,0x5c,0xb2,0xaf,0x0b,0x43,
0x57,0xe4,0xa8,0x8b,0x92,0x2e,0x6b,0x6b,0x38,0x4f,0x5b,0xed,
0x86,0x28,0x27,0x11,0xaf,0xda,0xe0,0x64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bc,0xcd,0xb5,0xeb,0xa7,0x68,
0x04,0x95,0xae,0x3e,0x18,0xa8,0x75,0x40,0xcc,0x73,0xdd,0x2f,
0x8c,0x83,0x5a,0xe4,0x9a,0xa0,0x99,0xed,0xd3,0x4f,0xbf,0x16,
0x8b,0xc8,0x88,0x13,0xe0,0xa2,0x12,0xf0,0x28,0x89,0x06,0x45,
0xd5,0x65,0x93,0xf4,0xe1,0x0e,0x76,0x03,0x38,0x12,0xb3,0x6f,
0x89,0x3c,0xab,0x23,0x59,0x0c,0x24,0xeb,0x49,0x77,0x22,0x49,
0x24,0xa1,0x43,0x76,0x11,0xc3,0x1e,0x63,0xe6,0x2f,0x11,0xc1,
0x9b,0x14,0xf7,0x0d,0xbc,0xae,0x00,0x77,0xcf,0x2f,0x7d,0x7a,
0xe5,0xe7,0x17,0x01,0x2e,0x3e,0xbd,0x5e,0x26,0xfd,0x36,0xda,
0x8c,0xf2,0x0c,0x37,0x92,0xd9,0x57,0x09,0x19,0x3c,0xb0,0x82,
0x06,0x40,0x30,0x11,0x41,0x65,0xa3,0x6c,0x54,0x94,0x79,0x0e,
0xdc,0x54,0xd8,0x73,0xe4,0x05,0xec,0xcf,0x8b,0xec,0x39,0x83,
0xf1,0x6b,0x44,0x97,0xcd,0x72,0xc5,0x3e,0xf0,0x12,0xe7,0x4c,
0x23,0xee,0x69,0xf7,0xcb,0xe6,0x1d,0xaa,0xf6,0xad,0x39,0xb6,
0x11,0x9b,0x2c,0x37,0x4d,0x53,0x7f,0x66,0xc0,0xdb,0xb6,0xdb,
0xa0,0x73,0x75,0x02,0x2e,0x46,0x6a,0x58,0xe3,0x38,0xd0,0x87,
0xea,0x3c,0x74,0xab,0xf0,0xc1,0x97,0x30,0x01,0xa4,0x96,0x5b,
0x6f,0x11,0xb0,0x26,0x9e,0x5b,0x19,0x91,0x5e,0x0f,0xf8,0xfa,
0x1a,0x1a,0x43,0x21,0x6d,0x98,0x79,0x12,0x41,0xf4,0x19,0xde,
0xf4,0xa8,0x3a,0x8f,0x0a,0xc1,0xd3,0x78,0x78,0x9d,0x95,0x06,
0x2b,0xcc,0x31,0x9c,0x5d,0x56,0x97,0x01,0xf7,0xc5,0xe9,0xed,
0x79,0x93,0xe3,0x69,0x93,0xe1,0xa4,0x3d,0xaa,0x3c,0x6d,0xe2,
0x87,0x4d,0xe8,0xda,0xc9,0x29,0xb2,0x05,0x00,0x4d,0x3f,0x06,
0x17,0x27,0x90,0x05,0x55,0x36,0xda,0xe6,0x25,0x09,0xc4,0x75,
0x63,0xff,0x12,0xde,0x07,0x5f,0x54,0x9f,0xeb,0xb2,0x77,0x48,
0x84,0x5c,0x8d,0xbb,0x49,0x0d,0x07,0x94,0x08,0xd7,0xb3,0x60,
0xb4,0x7b,0xcd,0xde,0x03,0xac,0xc7,0x00,0x84,0x38,0x3d,0x0e,
0x4f,0x88,0x6e,0xb7,0xe9,0x31,0x5f,0x3c,0xd5,0xd3,0xa2,0xbb,
0xaf,0x0e,0xb8,0xf3,0xb3,0x74,0xa9,0x78,0x13,0x03,0x1b,0x10,
0xd8,0x40,0xb8,0x4a,0x3c,0x41,0x40,0x30,0x9d,0xbe,0x44,0xfe,
0xa7,0x12,0x91,0x6e,0x85,0xe2,0xac,0x3d,0xd8,0xa3,0x39,0x02,
0xd5,0x44,0xf4,0x1e,0x8c,0x3b,0xdd,0x0a,0x51,0x62,0x3c,0xec,
0x23,0x62,0xf8,0xc2,0x83,0x61,0x47,0xe7,0x4f,0x30,0xa6,0xe2,
0xf0,0xe4,0xff,0xe5,0xef,0xb0,0x3b,0x02,0xb8,0x40,0x73,0xec,
0x2b,0x1a,0xee,0xab,0xf5,0xa7,0x56,0xf4,0xd9,0x27,0x88,0x41,
0xc1,0x76,0xbb,0xdf,0x45,0x50,0x3d,0x79,0x52,0xa2,0xb1,0xba,
0x0e,0x7b,0x58,0xae,0x2c,0xca,0x47,0x81,0x99,0x64,0x95,0xec,
0xaf,0x87,0x5f,0xe3,0x66,0x13,0xa2,0x47,0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c,0x41,0xde,0x10,0x8f,0xdb,0xf0,0x72,0x7c,0x61,0x5c,0xf2,
0x94,0x85,0x0b,0xd6,0xe2,0x37,0x07,0x72,0x3c,0xbf,0x00,0x45,
0x31,0x9e,0x2d,0xb6,0x26,0x26,0x9b,0x8b,0x0e,0xe0,0xb9,0x66,
0x4e,0xf8,0xef,0xc4,0x2f,0x21,0x48,0xff,0xc2,0x91,0xef,0xfe,
0x0b,0x06,0x62,0xc2,0xe3,0x11,0x13,0x00,0x00,
};
const GFXglyph Oswald_Medium20pt7bGlyphs[] PROGMEM = {
{ 0, 1, 1, 10, 0, 0 }, // 0x20 ' '
{ 1, 5, 32, 9, 2, -31 }, // 0x21 '!'
{ 21, 11, 11, 12, 1, -31 }, // 0x22 '"'
{ 37, 17, 32, 20, 2, -31 }, // 0x23 '#'
{ 105, 17, 39, 19, 1, -34 }, // 0x24 '$'
{ 188, 34, 32, 37, 2, -31 }, // 0x25 '%'
{ 324, 19, 32, 23, 2, -31 }, // 0x26 '&'
{ 400, 4, 11, 6, 1, -31 }, // 0x27 '''
{ 406, 8, 39, 13, 3, -31 }, // 0x28 '('
{ 445, 9, 39, 12, 1, -31 }, // 0x29 ')'
{ 489, 13, 14, 16, 2, -31 }, // 0x2A '*'
{ 512, 15, 16, 17, 1, -23 }, // 0x2B '+'
{ 542, 5, 10, 8, 2, -4 }, // 0x2C ','
{ 549, 10, 3, 12, 1, -12 }, // 0x2D '-'
{ 553, 5, 5, 9, 2, -4 }, // 0x2E '.'
{ 557, 13, 32, 16, 1, -31 }, // 0x2F '/'
{ 609, 17, 32, 21, 2, -31 }, // 0x30 '0'
{ 677, 10, 32, 15, 1, -31 }, // 0x31 '1'
{ 717, 16, 32, 19, 2, -31 }, // 0x32 '2'
{ 781, 16, 32, 19, 2, -31 }, // 0x33 '3'
{ 845, 18, 32, 20, 1, -31 }, // 0x34 '4'
{ 917, 16, 32, 19, 2, -31 }, // 0x35 '5'
{ 981, 17, 32, 20, 2, -31 }, // 0x36 '6'
{ 1049, 14, 32, 16, 1, -31 }, // 0x37 '7'
{ 1105, 16, 32, 20, 2, -31 }, // 0x38 '8'
{ 1169, 16, 32, 20, 2, -31 }, // 0x39 '9'
{ 1233, 6, 18, 9, 2, -20 }, // 0x3A ':'
{ 1247, 6, 25, 10, 2, -21 }, // 0x3B ';'
{ 1266, 11, 17, 15, 2, -24 }, // 0x3C '<'
{ 1290, 13, 11, 17, 2, -21 }, // 0x3D '='
{ 1308, 12, 17, 15, 2, -24 }, // 0x3E '>'
{ 1334, 15, 32, 19, 2, -31 }, // 0x3F '?'
{ 1394, 33, 37, 36, 2, -31 }, // 0x40 '@'
{ 1547, 19, 32, 20, 1, -31 }, // 0x41 'A'
{ 1623, 18, 32, 22, 2, -31 }, // 0x42 'B'
{ 1695, 18, 32, 21, 2, -31 }, // 0x43 'C'
{ 1767, 18, 32, 22, 2, -31 }, // 0x44 'D'
{ 1839, 14, 32, 17, 2, -31 }, // 0x45 'E'
{ 1895, 13, 32, 16, 2, -31 }, // 0x46 'F'
{ 1947, 18, 32, 22, 2, -31 }, // 0x47 'G'
{ 2019, 18, 32, 23, 2, -31 }, // 0x48 'H'
{ 2091, 5, 32, 11, 3, -31 }, // 0x49 'I'
{ 2111, 10, 33, 13, 0, -31 }, // 0x4A 'J'
{ 2153, 19, 32, 21, 2, -31 }, // 0x4B 'K'
{ 2229, 14, 32, 16, 2, -31 }, // 0x4C 'L'
{ 2285, 22, 32, 27, 2, -31 }, // 0x4D 'M'
{ 2373, 17, 32, 21, 2, -31 }, // 0x4E 'N'
{ 2441, 18, 32, 22, 2, -31 }, // 0x4F 'O'
{ 2513, 18, 32, 21, 2, -31 }, // 0x50 'P'
{ 2585, 18, 38, 22, 2, -31 }, // 0x51 'Q'
{ 2671, 18, 32, 22, 2, -31 }, // 0x52 'R'
{ 2743, 16, 32, 19, 2, -31 }, // 0x53 'S'
{ 2807, 15, 32, 17, 1, -31 }, // 0x54 'T'
{ 2867, 18, 32, 22, 2, -31 }, // 0x55 'U'
{ 2939, 18, 32, 20, 1, -31 }, // 0x56 'V'
{ 3011, 26, 32, 28, 1, -31 }, // 0x57 'W'
{ 3115, 19, 32, 20, 0, -31 }, // 0x58 'X'
{ 3191, 19, 32, 19, 0, -31 }, // 0x59 'Y'
{ 3267, 15, 32, 17, 1, -31 }, // 0x5A 'Z'
{ 3327, 9, 39, 13, 2, -31 }, // 0x5B '['
{ 3371, 13, 32, 16, 1, -31 }, // 0x5C '\'
{ 3423, 9, 39, 12, 1, -31 }, // 0x5D ']'
{ 3467, 16, 13, 18, 1, -31 }, // 0x5E '^'
{ 3493, 14, 4, 14, 0, 3 }, // 0x5F '_'
{ 3500, 8, 8, 11, 2, -31 }, // 0x60 '`'
{ 3508, 15, 23, 17, 1, -22 }, // 0x61 'a'
{ 3552, 15, 32, 19, 2, -31 }, // 0x62 'b'
{ 3612, 14, 23, 17, 2, -22 }, // 0x63 'c'
{ 3653, 15, 32, 19, 2, -31 }, // 0x64 'd'
{ 3713, 14, 23, 17, 2, -22 }, // 0x65 'e'
{ 3754, 11, 31, 12, 1, -30 }, // 0x66 'f'
{ 3797, 18, 31, 18, 1, -23 }, // 0x67 'g'
{ 3867, 15, 32, 19, 2, -31 }, // 0x68 'h'
{ 3927, 6, 31, 10, 2, -30 }, // 0x69 'i'
{ 3951, 9, 37, 10, -1, -30 }, // 0x6A 'j'
{ 3993, 16, 32, 18, 2, -31 }, // 0x6B 'k'
{ 4057, 6, 32, 10, 2, -31 }, // 0x6C 'l'
{ 4081, 24, 23, 28, 2, -22 }, // 0x6D 'm'
{ 4150, 15, 23, 19, 2, -22 }, // 0x6E 'n'
{ 4194, 14, 23, 18, 2, -22 }, // 0x6F 'o'
{ 4235, 15, 30, 19, 2, -22 }, // 0x70 'p'
{ 4292, 15, 30, 19, 2, -22 }, // 0x71 'q'
{ 4349, 11, 23, 14, 2, -22 }, // 0x72 'r'
{ 4381, 14, 23, 16, 1, -22 }, // 0x73 's'
{ 4422, 11, 29, 13, 1, -28 }, // 0x74 't'
{ 4462, 14, 23, 19, 2, -22 }, // 0x75 'u'
{ 4503, 15, 23, 16, 0, -22 }, // 0x76 'v'
{ 4547, 21, 23, 23, 1, -22 }, // 0x77 'w'
{ 4608, 16, 23, 16, 0, -22 }, // 0x78 'x'
{ 4654, 16, 29, 16, 0, -22 }, // 0x79 'y'
{ 4712, 13, 23, 15, 1, -22 }, // 0x7A 'z'
{ 4750, 10, 40, 13, 2, -31 }, // 0x7B '{'
{ 4800, 4, 38, 10, 3, -31 }, // 0x7C '|'
{ 4819, 10, 40, 14, 2, -31 }, // 0x7D '}'
{ 4869, 16, 6, 18, 1, -18 } }; // 0x7E '~'
// const GFXfont Oswald_Medium20pt7b PROGMEM = {
// (uint8_t *)Oswald_Medium20pt7bBitmaps,
// (GFXglyph *)Oswald_Medium20pt7bGlyphs,
// 0x20, 0x7E, 58 };
// // Approx. 5553 bytes
// Font properties
static constexpr FontData Oswald_Medium20pt7b_Properties = {
Oswald_Medium20pt7bBitmaps_Gzip,
Oswald_Medium20pt7bGlyphs,
sizeof(Oswald_Medium20pt7bBitmaps_Gzip),
5553, // Original size
0x20, // First char
0x7E, // Last char
58 // yAdvance
};

497
src/fonts/oswald-medium30.h Normal file
View file

@ -0,0 +1,497 @@
#pragma once
#include <Adafruit_GFX.h>
#include <Arduino.h>
#include "fonts.hpp"
const uint8_t Oswald_Medium30pt7bBitmaps_Gzip[] = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xcd, 0x5a,
0xbb, 0x72, 0x23, 0x3b, 0x92, 0x05, 0xb7, 0x8c, 0x72, 0x26, 0x1a, 0x63,
0x5e, 0x63, 0xe2, 0x62, 0x3f, 0x61, 0xcc, 0x36, 0xee, 0x08, 0xf7, 0x53,
0xf6, 0x13, 0xc6, 0x6c, 0x43, 0x4b, 0x94, 0x82, 0x86, 0xbc, 0xd1, 0x27,
0xf0, 0x53, 0x04, 0x86, 0x0c, 0x99, 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0x29, 0xba, 0xa6, 0xf4, 0x4b, 0xbf,
0xf5, 0xf4, 0xb4, 0x2a, 0xd6, 0x9c, 0x43, 0x6d, 0x68, 0x52, 0x46, 0x68,
0xd7, 0x32, 0x70, 0x01, 0x63, 0x48, 0x33, 0xa5, 0x11, 0xc2, 0x56, 0xc3,
0x37, 0x35, 0x72, 0xa2, 0xc4, 0x8e, 0x5f, 0x9f, 0xea, 0x97, 0x4d, 0x40,
0x48, 0x24, 0x8d, 0x40, 0x27, 0x4d, 0xfd, 0x18, 0x53, 0xbb, 0x4f, 0xe6,
0xbd, 0x24, 0x04, 0x99, 0xb3, 0xf4, 0x41, 0xe1, 0x57, 0xc9, 0xf3, 0xab,
0xc6, 0xf3, 0x64, 0x34, 0x36, 0xb9, 0x8f, 0x25, 0x45, 0x0d, 0x01, 0xd4,
0x68, 0xc6, 0xa0, 0xd1, 0x23, 0xc6, 0x20, 0xa1, 0x40, 0x35, 0x6c, 0xa4,
0x1f, 0x66, 0x6a, 0xbc, 0xa8, 0xdd, 0xd6, 0x78, 0xd1, 0x0b, 0xa4, 0xb4,
0x88, 0x23, 0x39, 0x0f, 0x14, 0x1d, 0x23, 0x44, 0xf0, 0xc8, 0x35, 0xd2,
0xd5, 0x9f, 0x9c, 0x9a, 0xb3, 0xe0, 0xea, 0x47, 0xcf, 0x8e, 0xa7, 0xff,
0x05, 0xbc, 0x47, 0xa4, 0x19, 0x06, 0x2d, 0x00, 0x00
};
const GFXglyph Oswald_Medium30pt7bGlyphs[] PROGMEM = {
{ 0, 1, 1, 14, 0, 0 }, // 0x20 ' '
{ 1, 8, 48, 14, 3, -47 }, // 0x21 '!'
{ 49, 17, 17, 19, 1, -47 }, // 0x22 '"'
{ 86, 26, 48, 30, 2, -47 }, // 0x23 '#'
{ 242, 25, 59, 29, 2, -52 }, // 0x24 '$'
{ 427, 51, 48, 56, 2, -47 }, // 0x25 '%'
{ 733, 29, 49, 34, 3, -47 }, // 0x26 '&'
{ 911, 7, 17, 9, 1, -47 }, // 0x27 '''
{ 926, 13, 59, 19, 4, -47 }, // 0x28 '('
{ 1022, 13, 59, 17, 2, -47 }, // 0x29 ')'
{ 1118, 21, 21, 24, 2, -47 }, // 0x2A '*'
{ 1174, 22, 24, 25, 2, -35 }, // 0x2B '+'
{ 1240, 8, 16, 13, 2, -7 }, // 0x2C ','
{ 1256, 14, 6, 18, 2, -19 }, // 0x2D '-'
{ 1267, 8, 8, 13, 3, -7 }, // 0x2E '.'
{ 1275, 19, 48, 23, 2, -47 }, // 0x2F '/'
{ 1389, 25, 49, 31, 3, -47 }, // 0x30 '0'
{ 1543, 15, 48, 22, 2, -47 }, // 0x31 '1'
{ 1633, 25, 48, 29, 2, -47 }, // 0x32 '2'
{ 1783, 25, 49, 29, 2, -47 }, // 0x33 '3'
{ 1937, 27, 48, 30, 2, -47 }, // 0x34 '4'
{ 2099, 24, 49, 29, 3, -47 }, // 0x35 '5'
{ 2246, 25, 49, 31, 3, -47 }, // 0x36 '6'
{ 2400, 21, 48, 24, 1, -47 }, // 0x37 '7'
{ 2526, 24, 49, 30, 3, -47 }, // 0x38 '8'
{ 2673, 25, 49, 31, 2, -47 }, // 0x39 '9'
{ 2827, 7, 28, 14, 4, -31 }, // 0x3A ':'
{ 2852, 8, 38, 15, 4, -32 }, // 0x3B ';'
{ 2890, 18, 25, 23, 2, -36 }, // 0x3C '<'
{ 2947, 19, 16, 25, 3, -31 }, // 0x3D '='
{ 2985, 18, 25, 23, 3, -36 }, // 0x3E '>'
{ 3042, 24, 48, 28, 2, -47 }, // 0x3F '?'
{ 3186, 50, 56, 55, 3, -47 }, // 0x40 '@'
{ 3536, 29, 48, 31, 1, -47 }, // 0x41 'A'
{ 3710, 27, 48, 33, 4, -47 }, // 0x42 'B'
{ 3872, 26, 49, 32, 3, -47 }, // 0x43 'C'
{ 4032, 26, 48, 33, 4, -47 }, // 0x44 'D'
{ 4188, 20, 48, 25, 4, -47 }, // 0x45 'E'
{ 4308, 19, 48, 24, 4, -47 }, // 0x46 'F'
{ 4422, 27, 49, 33, 3, -47 }, // 0x47 'G'
{ 4588, 27, 48, 34, 4, -47 }, // 0x48 'H'
{ 4750, 8, 48, 16, 4, -47 }, // 0x49 'I'
{ 4798, 15, 49, 19, 1, -47 }, // 0x4A 'J'
{ 4890, 27, 48, 31, 4, -47 }, // 0x4B 'K'
{ 5052, 20, 48, 25, 4, -47 }, // 0x4C 'L'
{ 5172, 34, 48, 40, 3, -47 }, // 0x4D 'M'
{ 5376, 24, 48, 32, 4, -47 }, // 0x4E 'N'
{ 5520, 27, 49, 33, 3, -47 }, // 0x4F 'O'
{ 5686, 26, 48, 31, 4, -47 }, // 0x50 'P'
{ 5842, 27, 57, 33, 3, -47 }, // 0x51 'Q'
{ 6035, 27, 48, 33, 4, -47 }, // 0x52 'R'
{ 6197, 26, 49, 29, 2, -47 }, // 0x53 'S'
{ 6357, 24, 48, 25, 1, -47 }, // 0x54 'T'
{ 6501, 27, 49, 33, 3, -47 }, // 0x55 'U'
{ 6667, 28, 48, 30, 1, -47 }, // 0x56 'V'
{ 6835, 38, 48, 42, 2, -47 }, // 0x57 'W'
{ 7063, 28, 48, 29, 1, -47 }, // 0x58 'X'
{ 7231, 27, 48, 29, 1, -47 }, // 0x59 'Y'
{ 7393, 22, 48, 25, 2, -47 }, // 0x5A 'Z'
// Euro sign ([) - ASCII code 91
{ 11030, 30, 49, 31, 0, -47 }, // 0x5B '['
// Backslash placeholder - ASCII code 92
{ 0, 0, 0, 0, 0, 0 }, // 0x5C '\'
// Pound sign (]) - ASCII code 93
{ 11214, 24, 48, 26, 1, -47 }, // 0x5D ']'
// Yen sign (^) - ASCII code 94
{ 11358, 28, 48, 27, 0, -47 }, // 0x5E '^'
{ 7905, 21, 6, 21, 0, 4 }, // 0x5F '_'
{ 7921, 11, 12, 17, 3, -47 }, // 0x60 '`'
{ 7938, 22, 35, 26, 1, -33 }, // 0x61 'a'
{ 8035, 23, 49, 28, 3, -47 }, // 0x62 'b'
{ 8176, 22, 35, 26, 2, -33 }, // 0x63 'c'
{ 8273, 23, 49, 28, 2, -47 }, // 0x64 'd'
{ 8414, 22, 35, 26, 2, -33 }, // 0x65 'e'
{ 8511, 16, 46, 18, 1, -45 }, // 0x66 'f'
{ 8603, 28, 46, 28, 1, -34 }, // 0x67 'g'
{ 8764, 22, 48, 28, 3, -47 }, // 0x68 'h'
{ 8896, 8, 46, 15, 3, -45 }, // 0x69 'i'
{ 8942, 13, 56, 15, -1, -45 }, // 0x6A 'j'
{ 9033, 25, 48, 28, 3, -47 }, // 0x6B 'k'
{ 9183, 8, 48, 15, 4, -47 }, // 0x6C 'l'
{ 9231, 36, 35, 42, 3, -34 }, // 0x6D 'm'
{ 9389, 22, 34, 28, 3, -33 }, // 0x6E 'n'
{ 9483, 22, 35, 27, 2, -33 }, // 0x6F 'o'
{ 9580, 23, 45, 28, 3, -33 }, // 0x70 'p'
{ 9710, 22, 45, 28, 3, -33 }, // 0x71 'q'
{ 9834, 17, 34, 21, 3, -33 }, // 0x72 'r'
{ 9907, 21, 35, 24, 1, -33 }, // 0x73 's'
{ 9999, 17, 44, 19, 1, -43 }, // 0x74 't'
{ 10093, 22, 35, 28, 3, -33 }, // 0x75 'u'
{ 10190, 22, 34, 24, 1, -33 }, // 0x76 'v'
{ 10284, 32, 34, 35, 1, -33 }, // 0x77 'w'
{ 10420, 23, 34, 24, 1, -33 }, // 0x78 'x'
{ 10518, 24, 43, 25, 0, -33 }, // 0x79 'y'
{ 10647, 18, 34, 22, 2, -33 }, // 0x7A 'z'
{ 10724, 15, 59, 20, 3, -47 }, // 0x7B '{'
{ 10835, 7, 58, 15, 4, -47 }, // 0x7C '|'
{ 10886, 16, 59, 21, 2, -47 }, // 0x7D '}'
{ 11004, 23, 9, 27, 2, -28 } }; // 0x7E '~'
// const GFXfont Oswald_Medium30pt7b PROGMEM = {
// (uint8_t *)Oswald_Medium30pt7bBitmaps,
// (GFXglyph *)Oswald_Medium30pt7bGlyphs,
// 0x20, 0x7E, 87 };
// Approx. 11702 bytes
// Font properties
static constexpr FontData Oswald_Medium30pt7b_Properties = {
Oswald_Medium30pt7bBitmaps_Gzip,
Oswald_Medium30pt7bGlyphs,
sizeof(Oswald_Medium30pt7bBitmaps_Gzip),
11526, // Original size
0x20, // First char
0x7E, // Last char
87 // yAdvance
};

1083
src/fonts/oswald-medium80.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,201 +1,235 @@
const uint8_t Satoshi_Symbol90pt7bBitmaps[] PROGMEM = { #pragma once
0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, #include <Adafruit_GFX.h>
0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, #include <Arduino.h>
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, #include "fonts.hpp"
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, const uint8_t Satoshi_Symbol90pt7bBitmaps_Gzip[] = {
0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x63, 0x60,
0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0xe0, 0xff, 0xc7, 0x00, 0x05, 0xcc, 0xff, 0x1b, 0x60, 0xcc,
0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xff, 0x0f, 0x60, 0x2c, 0xfb, 0x1f, 0x30, 0xd6, 0x60, 0x53, 0x38, 0x28,
0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x81, 0xfd, 0x7f, 0x3a, 0x83, 0x81, 0xf6, 0x30, 0x1a, 0xe0, 0xa7, 0xb7,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x0c, 0xb4, 0x8f, 0x51, 0x01, 0x33, 0xbd, 0xfd, 0xff, 0x61,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x7d, 0x8c, 0x17, 0x0c, 0x8e, 0x92, 0x82, 0x44, 0x85, 0x54, 0x8f,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x88, 0xe1, 0xec, 0xff, 0xa1, 0x56, 0xf2, 0xff, 0xff, 0x03, 0x61,
0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0x87, 0x3a, 0xc7, 0x1e, 0x16, 0x8d, 0xf5, 0x30, 0xa7, 0xc2,
0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x12, 0x36, 0xe3, 0x7f, 0xa8, 0xeb, 0x98, 0x47, 0x8d, 0x19, 0x35, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1b, 0x43, 0x65, 0xf0, 0x00, 0x00, 0xc7, 0x63, 0x9f, 0x4b, 0xde,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // unsigned int satoshi_bin_gz_len = 123;
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // const uint8_t Satoshi_Symbol90pt7bBitmaps[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,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FF, 0xC0, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xF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00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, // 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, // 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, // 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00,
0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, // 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, // 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00,
0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, // 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x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, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE,
0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, // 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, // 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00,
0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, // 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00,
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF,
0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, // 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF,
0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, // 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF,
0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, // 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0,
0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, // 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00,
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, // 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00,
0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, // 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF,
0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, // 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, // 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, // 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8,
0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, // 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80,
0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F,
0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, // 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00,
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0xFF, 0xE0 }; // 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x07, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFC,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,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yphs[] PROGMEM = { const GFXglyph Satoshi_Symbol90pt7bGlyphs[] PROGMEM = {
{ 0, 82, 127, 99, 8, -126 }, { 1302, 71, 109, 93, 0, -117 } }; // 0x53 'S' { 0, 82, 127, 99, 8, -126 }, { 1302, 71, 109, 93, 0, -117 } }; // 0x53 'S'
const GFXfont Satoshi_Symbol90pt7b PROGMEM = { // const GFXfont Satoshi_Symbol90pt7b PROGMEM = {
(uint8_t *)Satoshi_Symbol90pt7bBitmaps, // (uint8_t *)Satoshi_Symbol90pt7bBitmaps,
(GFXglyph *)Satoshi_Symbol90pt7bGlyphs, // (GFXglyph *)Satoshi_Symbol90pt7bGlyphs,
0x53, 0x53, 192 }; // 0x53, 0x53, 192 };
// Font properties
static constexpr FontData Satoshi_Symbol90pt7b_Properties = {
Satoshi_Symbol90pt7bBitmaps_Gzip,
Satoshi_Symbol90pt7bGlyphs,
sizeof(Satoshi_Symbol90pt7bBitmaps_Gzip),
2270, // Original size
0x53, // First char
0x53, // Last char
192 // yAdvance
};
// Approx. 2284 bytes // Approx. 2284 bytes

View file

@ -1,24 +1,19 @@
#include "bitaxe_fetch.hpp" #include "bitaxe_fetch.hpp"
TaskHandle_t bitaxeFetchTaskHandle; void BitAxeFetch::taskWrapper(void* pvParameters) {
BitAxeFetch::getInstance().task();
std::string bitaxeHashrate;
std::string bitaxeBestDiff;
std::string getBitAxeHashRate()
{
return bitaxeHashrate;
} }
std::string getBitaxeBestDiff() uint64_t BitAxeFetch::getHashRate() const {
{ return hashrate;
return bitaxeBestDiff;
} }
void taskBitaxeFetch(void *pvParameters) uint64_t BitAxeFetch::getBestDiff() const {
{ return bestDiff;
for (;;) }
{
void BitAxeFetch::task() {
for (;;) {
ulTaskNotifyTake(pdTRUE, portMAX_DELAY); ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
HTTPClient http; HTTPClient http;
@ -28,34 +23,38 @@ void taskBitaxeFetch(void *pvParameters)
int httpCode = http.GET(); int httpCode = http.GET();
if (httpCode == 200) if (httpCode == 200) {
{
String payload = http.getString(); String payload = http.getString();
JsonDocument doc; JsonDocument doc;
deserializeJson(doc, payload); deserializeJson(doc, payload);
bitaxeHashrate = std::to_string(static_cast<int>(std::round(doc["hashRate"].as<float>())));
bitaxeBestDiff = doc["bestDiff"].as<std::string>(); // Convert GH/s to H/s (multiply by 10^9)
float hashRateGH = doc["hashRate"].as<float>();
hashrate = static_cast<uint64_t>(std::round(hashRateGH * std::pow(10, getHashrateMultiplier('G'))));
// Parse difficulty string and convert to uint64_t
std::string diffStr = doc["bestDiff"].as<std::string>();
char diffUnit = diffStr[diffStr.length() - 1];
if (std::isalpha(diffUnit)) {
float diffValue = std::stof(diffStr.substr(0, diffStr.length() - 1));
bestDiff = static_cast<uint64_t>(std::round(diffValue * std::pow(10, getDifficultyMultiplier(diffUnit))));
} else {
bestDiff = std::stoull(diffStr);
}
if (workQueue != nullptr && (ScreenHandler::getCurrentScreen() == SCREEN_BITAXE_HASHRATE || ScreenHandler::getCurrentScreen() == SCREEN_BITAXE_BESTDIFF)) if (workQueue != nullptr && (ScreenHandler::getCurrentScreen() == SCREEN_BITAXE_HASHRATE || ScreenHandler::getCurrentScreen() == SCREEN_BITAXE_BESTDIFF)) {
{
WorkItem priceUpdate = {TASK_BITAXE_UPDATE, 0}; WorkItem priceUpdate = {TASK_BITAXE_UPDATE, 0};
xQueueSend(workQueue, &priceUpdate, portMAX_DELAY); xQueueSend(workQueue, &priceUpdate, portMAX_DELAY);
} }
} } else {
else Serial.print(F("Error retrieving BitAxe data. HTTP status code: "));
{
Serial.print(
F("Error retrieving BitAxe data. HTTP status code: "));
Serial.println(httpCode); Serial.println(httpCode);
Serial.println(bitaxeApiUrl); Serial.println(bitaxeApiUrl);
} }
} }
} }
void setupBitaxeFetchTask() void BitAxeFetch::setup() {
{ xTaskCreate(taskWrapper, "bitaxeFetch", (3 * 1024), NULL, tskIDLE_PRIORITY, &taskHandle);
xTaskCreate(taskBitaxeFetch, "bitaxeFetch", (3 * 1024), NULL, tskIDLE_PRIORITY, xTaskNotifyGive(taskHandle);
&bitaxeFetchTaskHandle);
xTaskNotifyGive(bitaxeFetchTaskHandle);
} }

View file

@ -2,14 +2,33 @@
#include <Arduino.h> #include <Arduino.h>
#include <HTTPClient.h> #include <HTTPClient.h>
#include <utils.hpp>
#include "lib/config.hpp" #include "lib/config.hpp"
#include "lib/shared.hpp" #include "lib/shared.hpp"
extern TaskHandle_t bitaxeFetchTaskHandle; class BitAxeFetch {
public:
static BitAxeFetch& getInstance() {
static BitAxeFetch instance;
return instance;
}
void setupBitaxeFetchTask(); void setup();
void taskBitaxeFetch(void *pvParameters); uint64_t getHashRate() const;
uint64_t getBestDiff() const;
static void taskWrapper(void* pvParameters);
TaskHandle_t getTaskHandle() const { return taskHandle; }
std::string getBitAxeHashRate(); private:
std::string getBitaxeBestDiff(); BitAxeFetch() = default;
~BitAxeFetch() = default;
BitAxeFetch(const BitAxeFetch&) = delete;
BitAxeFetch& operator=(const BitAxeFetch&) = delete;
void task();
TaskHandle_t taskHandle = nullptr;
uint64_t hashrate = 0;
uint64_t bestDiff = 0;
};

View file

@ -1,13 +1,14 @@
#include "block_notify.hpp" #include "block_notify.hpp"
char *wsServer; // Initialize static members
esp_websocket_client_handle_t blockNotifyClient = NULL; esp_websocket_client_handle_t BlockNotify::wsClient = nullptr;
uint currentBlockHeight = 873400; uint32_t BlockNotify::currentBlockHeight = 878000;
uint blockMedianFee = 1; uint16_t BlockNotify::blockMedianFee = 1;
bool blockNotifyInit = false; bool BlockNotify::notifyInit = false;
unsigned long int lastBlockUpdate; unsigned long int BlockNotify::lastBlockUpdate = 0;
TaskHandle_t BlockNotify::taskHandle = nullptr;
const char *mempoolWsCert = R"EOF( const char* BlockNotify::mempoolWsCert = R"EOF(
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB MIIF3jCCA8agAwIBAgIQAf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QVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE-----
)EOF"; )EOF";
void setupBlockNotify() void BlockNotify::onWebsocketEvent(void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data) {
{ esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
IPAddress result; BlockNotify& instance = BlockNotify::getInstance();
int dnsErr = -1; switch (event_id) {
String mempoolInstance = case WEBSOCKET_EVENT_CONNECTED:
preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE); {
notifyInit = true;
Serial.print(F("Connected to "));
Serial.println(preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE));
while (dnsErr != 1 && !strchr(mempoolInstance.c_str(), ':')) JsonDocument doc;
{ doc["action"] = "want";
dnsErr = WiFi.hostByName(mempoolInstance.c_str(), result); JsonArray dataArray = doc.createNestedArray("data");
dataArray.add("blocks");
dataArray.add("mempool-blocks");
String sub;
serializeJson(doc, sub);
esp_websocket_client_send_text(wsClient, sub.c_str(), sub.length(), portMAX_DELAY);
break;
}
case WEBSOCKET_EVENT_DATA:
instance.onWebsocketMessage(data);
break;
if (dnsErr != 1) case WEBSOCKET_EVENT_DISCONNECTED:
Serial.println(F("Mempool.space WS Connection Closed"));
break;
case WEBSOCKET_EVENT_ERROR:
Serial.println(F("Mempool.space WS Connection Error"));
break;
}
}
void BlockNotify::onWebsocketMessage(esp_websocket_event_data_t *data) {
JsonDocument doc;
JsonDocument filter;
filter["block"]["height"] = true;
filter["mempool-blocks"][0]["medianFee"] = true;
deserializeJson(doc, (char*)data->data_ptr, DeserializationOption::Filter(filter));
if (doc["block"].is<JsonObject>()) {
JsonObject block = doc["block"];
if (block["height"].as<uint>() != currentBlockHeight) {
processNewBlock(block["height"].as<uint>());
}
}
else if (doc["mempool-blocks"].is<JsonArray>()) {
JsonArray blockInfo = doc["mempool-blocks"].as<JsonArray>();
uint medianFee = (uint)round(blockInfo[0]["medianFee"].as<double>());
processNewBlockFee(medianFee);
}
}
void BlockNotify::setup() {
IPAddress result;
int dnsErr = -1;
String mempoolInstance = preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE);
while (dnsErr != 1 && !strchr(mempoolInstance.c_str(), ':')) {
dnsErr = WiFi.hostByName(mempoolInstance.c_str(), result);
if (dnsErr != 1) {
Serial.print(mempoolInstance);
Serial.println(F("mempool DNS could not be resolved"));
WiFi.reconnect();
vTaskDelay(pdMS_TO_TICKS(1000));
}
}
// Get current block height through regular API
int blockFetch = fetchLatestBlock();
if (blockFetch > currentBlockHeight)
currentBlockHeight = blockFetch;
if (currentBlockHeight != -1) {
lastBlockUpdate = esp_timer_get_time() / 1000000;
}
if (workQueue != nullptr) {
WorkItem blockUpdate = {TASK_BLOCK_UPDATE, 0};
xQueueSend(workQueue, &blockUpdate, portMAX_DELAY);
}
const bool useSSL = preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE);
const String protocol = useSSL ? "wss" : "ws";
String wsUri = protocol + "://" + mempoolInstance + "/api/v1/ws";
esp_websocket_client_config_t config = {
.task_stack = (6*1024),
.user_agent = USER_AGENT
};
if (useSSL) {
config.cert_pem = mempoolWsCert;
}
config.uri = wsUri.c_str();
Serial.printf("Connecting to %s\r\n", mempoolInstance.c_str());
wsClient = esp_websocket_client_init(&config);
esp_websocket_register_events(wsClient, WEBSOCKET_EVENT_ANY, onWebsocketEvent, wsClient);
esp_websocket_client_start(wsClient);
}
void BlockNotify::processNewBlock(uint32_t newBlockHeight) {
if (newBlockHeight <= currentBlockHeight)
{ {
Serial.print(mempoolInstance); return;
Serial.println(F("mempool DNS could not be resolved"));
WiFi.reconnect();
vTaskDelay(pdMS_TO_TICKS(1000));
}
}
// Get current block height through regular API
int blockFetch = getBlockFetch();
if (blockFetch > currentBlockHeight)
currentBlockHeight = blockFetch;
if (currentBlockHeight != -1)
{
lastBlockUpdate = esp_timer_get_time() / 1000000;
}
if (workQueue != nullptr)
{
WorkItem blockUpdate = {TASK_BLOCK_UPDATE, 0};
xQueueSend(workQueue, &blockUpdate, portMAX_DELAY);
}
// std::strcpy(wsServer, String("wss://" + mempoolInstance +
// "/api/v1/ws").c_str());
const String protocol = preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE) ? "wss" : "ws";
String mempoolUri = protocol + "://" + preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE) + "/api/v1/ws";
esp_websocket_client_config_t config = {
// .uri = "wss://mempool.space/api/v1/ws",
.task_stack = (6*1024),
.user_agent = USER_AGENT
};
if (preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE)) {
config.cert_pem = mempoolWsCert;
}
config.uri = mempoolUri.c_str();
Serial.printf("Connecting to %s\r\n", preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE));
blockNotifyClient = esp_websocket_client_init(&config);
esp_websocket_register_events(blockNotifyClient, WEBSOCKET_EVENT_ANY,
onWebsocketBlockEvent, blockNotifyClient);
esp_websocket_client_start(blockNotifyClient);
}
void onWebsocketBlockEvent(void *handler_args, esp_event_base_t base,
int32_t event_id, void *event_data)
{
esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
const String sub = "{\"action\": \"want\", \"data\":[\"blocks\", \"mempool-blocks\"]}";
switch (event_id)
{
case WEBSOCKET_EVENT_CONNECTED:
blockNotifyInit = true;
Serial.println(F("Connected to Mempool.space WebSocket"));
Serial.println(sub);
if (esp_websocket_client_send_text(blockNotifyClient, sub.c_str(),
sub.length(), portMAX_DELAY) == -1)
{
Serial.println(F("Mempool.space WS Block Subscribe Error"));
} }
break; currentBlockHeight = newBlockHeight;
case WEBSOCKET_EVENT_DATA:
onWebsocketBlockMessage(data);
break;
case WEBSOCKET_EVENT_ERROR:
Serial.println(F("Mempool.space WS Connnection error"));
break;
case WEBSOCKET_EVENT_DISCONNECTED:
Serial.println(F("Mempool.space WS Connnection Closed"));
break;
}
}
void onWebsocketBlockMessage(esp_websocket_event_data_t *event_data)
{
JsonDocument doc;
JsonDocument filter;
filter["block"]["height"] = true;
filter["mempool-blocks"][0]["medianFee"] = true;
deserializeJson(doc, (char *)event_data->data_ptr, DeserializationOption::Filter(filter));
// if (error) {
// Serial.print("deserializeJson() failed: ");
// Serial.println(error.c_str());
// return;
// }
if (doc.containsKey("block"))
{
JsonObject block = doc["block"];
if (block["height"].as<uint>() == currentBlockHeight) {
return;
}
processNewBlock(block["height"].as<uint>());
}
else if (doc.containsKey("mempool-blocks"))
{
JsonArray blockInfo = doc["mempool-blocks"].as<JsonArray>();
uint medianFee = (uint)round(blockInfo[0]["medianFee"].as<double>());
processNewBlockFee(medianFee);
}
doc.clear();
}
void processNewBlock(uint newBlockHeight) {
if (newBlockHeight < currentBlockHeight)
return;
currentBlockHeight = newBlockHeight;
// Serial.printf("New block found: %d\r\n", block["height"].as<uint>());
preferences.putUInt("blockHeight", currentBlockHeight);
lastBlockUpdate = esp_timer_get_time() / 1000000; lastBlockUpdate = esp_timer_get_time() / 1000000;
if (workQueue != nullptr) if (workQueue != nullptr)
{ {
WorkItem blockUpdate = {TASK_BLOCK_UPDATE, 0}; WorkItem blockUpdate = {TASK_BLOCK_UPDATE, 0};
xQueueSend(workQueue, &blockUpdate, portMAX_DELAY); xQueueSend(workQueue, &blockUpdate, portMAX_DELAY);
// xTaskNotifyGive(blockUpdateTaskHandle); }
if (ScreenHandler::getCurrentScreen() != SCREEN_BLOCK_HEIGHT && if (ScreenHandler::getCurrentScreen() != SCREEN_BLOCK_HEIGHT &&
preferences.getBool("stealFocus", DEFAULT_STEAL_FOCUS)) preferences.getBool("stealFocus", DEFAULT_STEAL_FOCUS))
{ {
uint64_t timerPeriod = 0; uint64_t timerPeriod = 0;
if (isTimerActive()) if (isTimerActive())
{ {
// store timer periode before making inactive to prevent artifacts timerPeriod = getTimerSeconds();
timerPeriod = getTimerSeconds(); esp_timer_stop(screenRotateTimer);
esp_timer_stop(screenRotateTimer);
} }
ScreenHandler::setCurrentScreen(SCREEN_BLOCK_HEIGHT); ScreenHandler::setCurrentScreen(SCREEN_BLOCK_HEIGHT);
if (timerPeriod > 0) if (timerPeriod > 0)
{ {
esp_timer_start_periodic(screenRotateTimer, esp_timer_start_periodic(screenRotateTimer,
timerPeriod * usPerSecond); timerPeriod * usPerSecond);
} }
vTaskDelay(pdMS_TO_TICKS(315*NUM_SCREENS)); // Extra delay because of screen switching vTaskDelay(pdMS_TO_TICKS(315*NUM_SCREENS)); // Extra delay because of screen switching
} }
if (preferences.getBool("ledFlashOnUpd", DEFAULT_LED_FLASH_ON_UPD)) if (preferences.getBool("ledFlashOnUpd", DEFAULT_LED_FLASH_ON_UPD))
{ {
vTaskDelay(pdMS_TO_TICKS(250)); // Wait until screens are updated vTaskDelay(pdMS_TO_TICKS(250)); // Wait until screens are updated
queueLedEffect(LED_FLASH_BLOCK_NOTIFY); getLedHandler().queueEffect(LED_FLASH_BLOCK_NOTIFY);
}
} }
} }
void processNewBlockFee(uint newBlockFee) { void BlockNotify::processNewBlockFee(uint16_t newBlockFee) {
if (blockMedianFee == newBlockFee) if (blockMedianFee == newBlockFee)
{ {
return; return;
} }
// Serial.printf("New median fee: %d\r\n", medianFee);
blockMedianFee = newBlockFee; blockMedianFee = newBlockFee;
if (workQueue != nullptr) if (workQueue != nullptr)
{ {
WorkItem blockUpdate = {TASK_FEE_UPDATE, 0}; WorkItem blockUpdate = {TASK_FEE_UPDATE, 0};
xQueueSend(workQueue, &blockUpdate, portMAX_DELAY); xQueueSend(workQueue, &blockUpdate, portMAX_DELAY);
} }
} }
uint getBlockHeight() { return currentBlockHeight; } uint32_t BlockNotify::getBlockHeight() const {
return currentBlockHeight;
void setBlockHeight(uint newBlockHeight)
{
currentBlockHeight = newBlockHeight;
} }
uint getBlockMedianFee() { return blockMedianFee; } void BlockNotify::setBlockHeight(uint32_t newBlockHeight)
void setBlockMedianFee(uint newBlockMedianFee)
{ {
blockMedianFee = newBlockMedianFee; currentBlockHeight = newBlockHeight;
} }
bool isBlockNotifyConnected() uint16_t BlockNotify::getBlockMedianFee() const {
{ return blockMedianFee;
if (blockNotifyClient == NULL)
return false;
return esp_websocket_client_is_connected(blockNotifyClient);
} }
bool getBlockNotifyInit() void BlockNotify::setBlockMedianFee(uint16_t newBlockMedianFee)
{ {
return blockNotifyInit; blockMedianFee = newBlockMedianFee;
} }
void stopBlockNotify() bool BlockNotify::isConnected() const
{ {
if (blockNotifyClient == NULL) if (wsClient == NULL)
return; return false;
return esp_websocket_client_is_connected(wsClient);
esp_websocket_client_close(blockNotifyClient, pdMS_TO_TICKS(5000));
esp_websocket_client_stop(blockNotifyClient);
esp_websocket_client_destroy(blockNotifyClient);
blockNotifyClient = NULL;
} }
void restartBlockNotify() bool BlockNotify::isInitialized() const
{ {
stopBlockNotify(); return notifyInit;
if (blockNotifyClient == NULL) {
setupBlockNotify();
return;
}
// esp_websocket_client_close(blockNotifyClient, pdMS_TO_TICKS(5000));
// esp_websocket_client_stop(blockNotifyClient);
// esp_websocket_client_start(blockNotifyClient);
} }
void BlockNotify::stop()
{
if (wsClient == NULL)
return;
int getBlockFetch() { esp_websocket_client_close(wsClient, portMAX_DELAY);
esp_websocket_client_stop(wsClient);
esp_websocket_client_destroy(wsClient);
wsClient = NULL;
}
void BlockNotify::restart()
{
stop();
setup();
}
int BlockNotify::fetchLatestBlock() {
try { try {
String mempoolInstance = preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE); String mempoolInstance = preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE);
const String protocol = preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE) ? "https" : "http"; const String protocol = preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE) ? "https" : "http";
@ -314,12 +314,12 @@ int getBlockFetch() {
return 2203; // B-T-C return 2203; // B-T-C
} }
uint getLastBlockUpdate() uint BlockNotify::getLastBlockUpdate() const
{ {
return lastBlockUpdate; return lastBlockUpdate;
} }
void setLastBlockUpdate(uint lastUpdate) void BlockNotify::setLastBlockUpdate(uint lastUpdate)
{ {
lastBlockUpdate = lastUpdate; lastBlockUpdate = lastUpdate;
} }

View file

@ -5,7 +5,6 @@
#include <HTTPClient.h> #include <HTTPClient.h>
#include <esp_timer.h> #include <esp_timer.h>
#include <esp_websocket_client.h> #include <esp_websocket_client.h>
#include <cstring> #include <cstring>
#include <string> #include <string>
@ -14,28 +13,53 @@
#include "lib/timers.hpp" #include "lib/timers.hpp"
#include "lib/shared.hpp" #include "lib/shared.hpp"
// using namespace websockets; class BlockNotify {
public:
static BlockNotify& getInstance() {
static BlockNotify instance;
return instance;
}
void setupBlockNotify(); // Delete copy constructor and assignment operator
BlockNotify(const BlockNotify&) = delete;
void operator=(const BlockNotify&) = delete;
void onWebsocketBlockEvent(void *handler_args, esp_event_base_t base, // Block notification setup and control
int32_t event_id, void *event_data); void setup();
void onWebsocketBlockMessage(esp_websocket_event_data_t *event_data); void stop();
void restart();
bool isConnected() const;
bool isInitialized() const;
void setBlockHeight(uint newBlockHeight); // Block height management
uint getBlockHeight(); void setBlockHeight(uint32_t newBlockHeight);
uint32_t getBlockHeight() const;
void setBlockMedianFee(uint blockMedianFee); // Block fee management
uint getBlockMedianFee(); void setBlockMedianFee(uint16_t blockMedianFee);
uint16_t getBlockMedianFee() const;
bool isBlockNotifyConnected(); // Block processing
void stopBlockNotify(); void processNewBlock(uint32_t newBlockHeight);
void restartBlockNotify(); void processNewBlockFee(uint16_t newBlockFee);
void processNewBlock(uint newBlockHeight); // Block fetch and update tracking
void processNewBlockFee(uint newBlockFee); int fetchLatestBlock();
uint getLastBlockUpdate() const;
void setLastBlockUpdate(uint lastUpdate);
bool getBlockNotifyInit(); private:
uint getLastBlockUpdate(); BlockNotify() = default; // Private constructor for singleton
int getBlockFetch();
void setLastBlockUpdate(uint lastUpdate); void setupTask();
static void onWebsocketEvent(void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data);
void onWebsocketMessage(esp_websocket_event_data_t *data);
static const char* mempoolWsCert;
static esp_websocket_client_handle_t wsClient;
static uint32_t currentBlockHeight;
static uint16_t blockMedianFee;
static bool notifyInit;
static unsigned long int lastBlockUpdate;
static TaskHandle_t taskHandle;
};

View file

@ -1,4 +1,5 @@
#include "config.hpp" #include "config.hpp"
#include "led_handler.hpp"
#define MAX_ATTEMPTS_WIFI_CONNECTION 20 #define MAX_ATTEMPTS_WIFI_CONNECTION 20
@ -47,10 +48,11 @@ void setup()
setupPreferences(); setupPreferences();
setupHardware(); setupHardware();
setupDisplays(); EPDManager::getInstance().initialize();
if (preferences.getBool("ledTestOnPower", DEFAULT_LED_TEST_ON_POWER)) if (preferences.getBool("ledTestOnPower", DEFAULT_LED_TEST_ON_POWER))
{ {
queueLedEffect(LED_POWER_TEST); auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_POWER_TEST);
} }
{ {
std::lock_guard<std::mutex> lockMcp(mcpMutex); std::lock_guard<std::mutex> lockMcp(mcpMutex);
@ -60,7 +62,8 @@ void setup()
preferences.remove("txPower"); preferences.remove("txPower");
WiFi.eraseAP(); WiFi.eraseAP();
queueLedEffect(LED_EFFECT_WIFI_ERASE_SETTINGS); auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_EFFECT_WIFI_ERASE_SETTINGS);
} }
} }
@ -76,7 +79,8 @@ void setup()
else if (mcp1.read1(1) == LOW) else if (mcp1.read1(1) == LOW)
{ {
preferences.clear(); preferences.clear();
queueLedEffect(LED_EFFECT_WIFI_ERASE_SETTINGS); auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_EFFECT_WIFI_ERASE_SETTINGS);
nvs_flash_erase(); nvs_flash_erase();
delay(1000); delay(1000);
@ -100,37 +104,53 @@ void setup()
if (preferences.getBool("bitaxeEnabled", DEFAULT_BITAXE_ENABLED)) if (preferences.getBool("bitaxeEnabled", DEFAULT_BITAXE_ENABLED))
{ {
setupBitaxeFetchTask(); BitAxeFetch::getInstance().setup();
} }
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED)) if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED))
{ {
setupMiningPoolStatsFetchTask(); MiningPoolStatsFetch::getInstance().setup();
} }
ButtonHandler::setup(); ButtonHandler::setup();
setupOTA(); setupOTA();
waitUntilNoneBusy(); EPDManager::getInstance().waitUntilNoneBusy();
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
if (!preferences.getBool("flAlwaysOn", DEFAULT_FL_ALWAYS_ON)) if (!preferences.getBool("flAlwaysOn", DEFAULT_FL_ALWAYS_ON))
{ {
frontlightFadeOutAll(preferences.getUInt("flEffectDelay"), true); auto& ledHandler = getLedHandler();
ledHandler.frontlightFadeOutAll(preferences.getUInt("flEffectDelay"), true);
flArray.allOFF(); flArray.allOFF();
} }
#endif #endif
forceFullRefresh(); EPDManager::getInstance().forceFullRefresh();
} }
void setupWifi() void setupWifi()
{ {
WiFi.onEvent(WiFiEvent); WiFi.onEvent(WiFiEvent);
// wifi_country_t country = {
// .cc = "NL",
// .schan = 1,
// .nchan = 13,
// .policy = WIFI_COUNTRY_POLICY_MANUAL
// };
// esp_err_t err = esp_wifi_set_country(&country);
// if (err != ESP_OK) {
// Serial.printf("Failed to set country: %d\n", err);
// }
WiFi.setAutoConnect(true); WiFi.setAutoConnect(true);
WiFi.setAutoReconnect(true); WiFi.setAutoReconnect(true);
WiFi.begin(); WiFi.begin();
if (preferences.getInt("txPower", DEFAULT_TX_POWER)) if (preferences.getInt("txPower", DEFAULT_TX_POWER))
{ {
if (WiFi.setTxPower( if (WiFi.setTxPower(
@ -144,7 +164,8 @@ void setupWifi()
// if (!preferences.getBool("wifiConfigured", DEFAULT_WIFI_CONFIGURED) // if (!preferences.getBool("wifiConfigured", DEFAULT_WIFI_CONFIGURED)
{ {
queueLedEffect(LED_EFFECT_WIFI_WAIT_FOR_CONFIG); auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_EFFECT_WIFI_WAIT_FOR_CONFIG);
bool buttonPress = false; bool buttonPress = false;
{ {
@ -157,8 +178,7 @@ void setupWifi()
byte mac[6]; byte mac[6];
WiFi.macAddress(mac); WiFi.macAddress(mac);
String softAP_SSID = String softAP_SSID = getMyHostname();
String("BTClock" + String(mac[5], 16) + String(mac[1], 16));
WiFi.setHostname(softAP_SSID.c_str()); WiFi.setHostname(softAP_SSID.c_str());
String softAP_password = replaceAmbiguousChars( String softAP_password = replaceAmbiguousChars(
base64::encode(String(mac[2], 16) + String(mac[4], 16) + base64::encode(String(mac[2], 16) + String(mac[4], 16) +
@ -168,6 +188,7 @@ void setupWifi()
wm.setConfigPortalTimeout(preferences.getUInt("wpTimeout", DEFAULT_WP_TIMEOUT)); wm.setConfigPortalTimeout(preferences.getUInt("wpTimeout", DEFAULT_WP_TIMEOUT));
wm.setWiFiAutoReconnect(false); wm.setWiFiAutoReconnect(false);
wm.setDebugOutput(false); wm.setDebugOutput(false);
wm.setCountry("NL");
wm.setConfigPortalBlocking(true); wm.setConfigPortalBlocking(true);
wm.setAPCallback([&](WiFiManager *wifiManager) wm.setAPCallback([&](WiFiManager *wifiManager)
@ -177,13 +198,14 @@ void setupWifi()
wifiManager->getConfigPortalSSID().c_str(), wifiManager->getConfigPortalSSID().c_str(),
softAP_password.c_str()); softAP_password.c_str());
// delay(6000); // delay(6000);
setFgColor(GxEPD_BLACK); EPDManager::getInstance().setForegroundColor(GxEPD_BLACK);
setBgColor(GxEPD_WHITE); EPDManager::getInstance().setBackgroundColor(GxEPD_WHITE);
const String qrText = "qrWIFI:S:" + wifiManager->getConfigPortalSSID() + const String qrText = "qrWIFI:S:" + wifiManager->getConfigPortalSSID() +
";T:WPA;P:" + softAP_password.c_str() + ";;"; ";T:WPA;P:" + softAP_password.c_str() + ";;";
const String explainText = "*SSID: *\r\n" + const String explainText = "*SSID: *\r\n" +
wifiManager->getConfigPortalSSID() + wifiManager->getConfigPortalSSID() +
"\r\n\r\n*Password:*\r\n" + softAP_password; "\r\n\r\n*Password:*\r\n" + softAP_password +
"\r\n\r\n*Hostname*:\r\n" + getMyHostname();
// Set the UNIX timestamp // Set the UNIX timestamp
time_t timestamp = LAST_BUILD_TIME; // Example timestamp: March 7, 2021 00:00:00 UTC time_t timestamp = LAST_BUILD_TIME; // Example timestamp: March 7, 2021 00:00:00 UTC
@ -193,67 +215,36 @@ void setupWifi()
// Format the date // Format the date
char formattedDate[20]; char formattedDate[20];
strftime(formattedDate, sizeof(formattedDate), "%y-%m-%d\r\n%H:%M:%S", timeinfo); strftime(formattedDate, sizeof(formattedDate), "%y-%m-%d\r\n%H:%M:%S", timeinfo);
String hwStr = String(HW_REV);
hwStr.replace("_EPD_", "\r\nEPD_");
std::array<String, NUM_SCREENS> epdContent = { std::array<String, NUM_SCREENS> epdContent = {
"Welcome!", "Welcome!",
"Bienvenidos!", "Bienvenidos!",
"To setup\r\nscan QR or\r\nconnect\r\nmanually", "To setup\r\nscan QR or\r\nconnect\r\nmanually",
"Para\r\nconfigurar\r\nescanear QR\r\no conectar\r\nmanualmente", "Para\r\nconfigurar\r\nescanear QR\r\no conectar\r\nmanualmente",
explainText, explainText,
"*Hostname*:\r\n" + getMyHostname() + "\r\n\r\n" + "*FW build date:*\r\n" + formattedDate, "*HW version:*\r\n" + hwStr +
#ifdef GIT_TAG
"\r\n\r\n*SW Version:*\r\n" + GIT_TAG +
#endif
"\r\n\r\n*FW build date:*\r\n" + formattedDate,
qrText}; qrText};
setEpdContent(epdContent); });
EPDManager::getInstance().setContent(epdContent); });
wm.setSaveConfigCallback([]() wm.setSaveConfigCallback([]()
{ {
preferences.putBool("wifiConfigured", true); preferences.putBool("wifiConfigured", true);
delay(1000); delay(1000);
// just restart after succes // just restart after success
ESP.restart(); }); ESP.restart(); });
bool ac = wm.autoConnect(softAP_SSID.c_str(), softAP_password.c_str()); bool ac = wm.autoConnect(softAP_SSID.c_str(), softAP_password.c_str());
// waitUntilNoneBusy();
// std::array<String, NUM_SCREENS> epdContent = {"Welcome!",
// "Bienvenidos!", "Use\r\nweb-interface\r\nto configure", "Use\r\nla
// interfaz web\r\npara configurar", "Or
// restart\r\nwhile\r\nholding\r\n2nd button\r\r\nto start\r\n QR-config",
// "O reinicie\r\nmientras\r\n mantiene presionado\r\nel segundo
// botón\r\r\npara iniciar\r\nQR-config", ""}; setEpdContent(epdContent);
// esp_task_wdt_init(30, false);
// uint count = 0;
// while (WiFi.status() != WL_CONNECTED)
// {
// if (Serial.available() > 0)
// {
// uint8_t b = Serial.read();
// if (parse_improv_serial_byte(x_position, b, x_buffer,
// onImprovCommandCallback, onImprovErrorCallback))
// {
// x_buffer[x_position++] = b;
// }
// else
// {
// x_position = 0;
// }
// }
// count++;
// if (count > 2000000) {
// queueLedEffect(LED_EFFECT_HEARTBEAT);
// count = 0;
// }
// }
// esp_task_wdt_deinit();
// esp_task_wdt_reset();
} }
EPDManager::getInstance().setForegroundColor(preferences.getUInt("fgColor", isWhiteVersion() ? GxEPD_BLACK : GxEPD_WHITE));
EPDManager::getInstance().setBackgroundColor(preferences.getUInt("bgColor", isWhiteVersion() ? GxEPD_WHITE : GxEPD_BLACK));
setFgColor(preferences.getUInt("fgColor", isWhiteVersion() ? GxEPD_BLACK : GxEPD_WHITE));
setBgColor(preferences.getUInt("bgColor", isWhiteVersion() ? GxEPD_WHITE : GxEPD_BLACK));
} }
// else // else
// { // {
@ -274,6 +265,8 @@ void syncTime()
while (!getLocalTime(&timeinfo)) while (!getLocalTime(&timeinfo))
{ {
auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_EFFECT_CONFIGURING);
configTime(preferences.getInt("gmtOffset", DEFAULT_TIME_OFFSET_SECONDS), 0, configTime(preferences.getInt("gmtOffset", DEFAULT_TIME_OFFSET_SECONDS), 0,
NTP_SERVER); NTP_SERVER);
delay(500); delay(500);
@ -287,9 +280,9 @@ void setupPreferences()
{ {
preferences.begin("btclock", false); preferences.begin("btclock", false);
setFgColor(preferences.getUInt("fgColor", DEFAULT_FG_COLOR)); EPDManager::getInstance().setForegroundColor(preferences.getUInt("fgColor", DEFAULT_FG_COLOR));
setBgColor(preferences.getUInt("bgColor", DEFAULT_BG_COLOR)); EPDManager::getInstance().setBackgroundColor(preferences.getUInt("bgColor", DEFAULT_BG_COLOR));
setBlockHeight(preferences.getUInt("blockHeight", INITIAL_BLOCK_HEIGHT)); BlockNotify::getInstance().setBlockHeight(preferences.getUInt("blockHeight", INITIAL_BLOCK_HEIGHT));
setPrice(preferences.getUInt("lastPrice", INITIAL_LAST_PRICE), CURRENCY_USD); setPrice(preferences.getUInt("lastPrice", INITIAL_LAST_PRICE), CURRENCY_USD);
if (!preferences.isKey("enableDebugLog")) { if (!preferences.isKey("enableDebugLog")) {
@ -368,7 +361,7 @@ void setupPreferences()
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED)) if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED))
{ {
addScreenMapping(SCREEN_MINING_POOL_STATS_HASHRATE, "Mining Pool Hashrate"); addScreenMapping(SCREEN_MINING_POOL_STATS_HASHRATE, "Mining Pool Hashrate");
if (getMiningPool()->supportsDailyEarnings()) { if (MiningPoolStatsFetch::getInstance().getPool()->supportsDailyEarnings()) {
addScreenMapping(SCREEN_MINING_POOL_STATS_EARNINGS, "Mining Pool Earnings"); addScreenMapping(SCREEN_MINING_POOL_STATS_EARNINGS, "Mining Pool Earnings");
} }
} }
@ -397,7 +390,7 @@ void setupWebsocketClients(void *pvParameters)
} }
else if (dataSource == THIRD_PARTY_SOURCE) else if (dataSource == THIRD_PARTY_SOURCE)
{ {
setupBlockNotify(); BlockNotify::getInstance().setup();
setupPriceNotify(); setupPriceNotify();
} }
@ -414,13 +407,14 @@ void setupTimers()
void finishSetup() void finishSetup()
{ {
auto& ledHandler = getLedHandler();
if (preferences.getBool("ledStatus", DEFAULT_LED_STATUS)) if (preferences.getBool("ledStatus", DEFAULT_LED_STATUS))
{ {
restoreLedState(); ledHandler.restoreLedState();
} }
else else
{ {
clearLeds(); ledHandler.clear();
} }
} }
@ -469,22 +463,9 @@ void setupHardware()
Serial.println(F("Error loading WebUI")); Serial.println(F("Error loading WebUI"));
} }
// { // Initialize LED handler
// File f = LittleFS.open("/qr.txt", "w"); auto& ledHandler = getLedHandler();
ledHandler.setup();
// if(f) {
// if (f.print("Hello")) {
// Serial.println(F("Written QR to FS"));
// Serial.printf("\nLittleFS free: %zu\n", LittleFS.totalBytes() - LittleFS.usedBytes());
// }
// } else {
// Serial.println(F("Can't write QR to FS"));
// }
// f.close();
// }
setupLeds();
WiFi.setHostname(getMyHostname().c_str()); WiFi.setHostname(getMyHostname().c_str());
if (!psramInit()) if (!psramInit())
@ -542,7 +523,8 @@ void setupHardware()
#endif #endif
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
setupFrontlight(); // Initialize frontlight through LedHandler
ledHandler.initializeFrontlight();
Wire.beginTransmission(0x5C); Wire.beginTransmission(0x5C);
byte error = Wire.endTransmission(); byte error = Wire.endTransmission();
@ -564,6 +546,7 @@ void setupHardware()
void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info)
{ {
static bool first_connect = true; static bool first_connect = true;
auto& ledHandler = getLedHandler(); // Get ledHandler reference once at the start
Serial.printf("[WiFi-event] event: %d\n", event); Serial.printf("[WiFi-event] event: %d\n", event);
@ -589,7 +572,7 @@ void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info)
if (!first_connect) if (!first_connect)
{ {
Serial.println(F("Disconnected from WiFi access point")); Serial.println(F("Disconnected from WiFi access point"));
queueLedEffect(LED_EFFECT_WIFI_CONNECT_ERROR); ledHandler.queueEffect(LED_EFFECT_WIFI_CONNECT_ERROR);
uint8_t reason = info.wifi_sta_disconnected.reason; uint8_t reason = info.wifi_sta_disconnected.reason;
if (reason) if (reason)
Serial.printf("Disconnect reason: %s, ", Serial.printf("Disconnect reason: %s, ",
@ -605,13 +588,13 @@ void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info)
Serial.print("Obtained IP address: "); Serial.print("Obtained IP address: ");
Serial.println(WiFi.localIP()); Serial.println(WiFi.localIP());
if (!first_connect) if (!first_connect)
queueLedEffect(LED_EFFECT_WIFI_CONNECT_SUCCESS); ledHandler.queueEffect(LED_EFFECT_WIFI_CONNECT_SUCCESS);
first_connect = false; first_connect = false;
break; break;
} }
case ARDUINO_EVENT_WIFI_STA_LOST_IP: case ARDUINO_EVENT_WIFI_STA_LOST_IP:
Serial.println(F("Lost IP address and IP address is reset to 0")); Serial.println(F("Lost IP address and IP address is reset to 0"));
queueLedEffect(LED_EFFECT_WIFI_CONNECT_ERROR); ledHandler.queueEffect(LED_EFFECT_WIFI_CONNECT_ERROR);
WiFi.reconnect(); WiFi.reconnect();
break; break;
case ARDUINO_EVENT_WIFI_AP_START: case ARDUINO_EVENT_WIFI_AP_START:
@ -661,29 +644,6 @@ uint getLastTimeSync()
} }
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
void setupFrontlight()
{
if (!flArray.begin(PCA9685_MODE1_AUTOINCR | PCA9685_MODE1_ALLCALL, PCA9685_MODE2_TOTEMPOLE))
{
Serial.println(F("FL driver error"));
return;
}
Serial.println(F("FL driver active"));
if (!preferences.isKey("flMaxBrightness"))
{
preferences.putUInt("flMaxBrightness", DEFAULT_FL_MAX_BRIGHTNESS);
}
if (!preferences.isKey("flEffectDelay"))
{
preferences.putUInt("flEffectDelay", DEFAULT_FL_EFFECT_DELAY);
}
if (!preferences.isKey("flFlashOnUpd"))
{
preferences.putBool("flFlashOnUpd", DEFAULT_FL_FLASH_ON_UPDATE);
}
}
float getLightLevel() float getLightLevel()
{ {

View file

@ -52,10 +52,10 @@ void setupTimers();
void finishSetup(); void finishSetup();
void setupMcp(); void setupMcp();
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
void setupFrontlight(); extern BH1750 bh1750;
extern bool hasLuxSensor;
float getLightLevel(); float getLightLevel();
bool hasLightLevel(); bool hasLightLevel();
extern PCA9685 flArray;
#endif #endif
String getMyHostname(); String getMyHostname();
@ -98,6 +98,10 @@ extern MCP23017 mcp1;
extern MCP23017 mcp2; extern MCP23017 mcp2;
#endif #endif
#ifdef HAS_FRONTLIGHT
extern PCA9685 flArray;
#endif
// Expose DataSourceType enum // Expose DataSourceType enum
extern DataSourceType getDataSource(); extern DataSourceType getDataSource();
extern void setDataSource(DataSourceType source); extern void setDataSource(DataSourceType source);

View file

@ -46,8 +46,8 @@
#define DEFAULT_LUX_LIGHT_TOGGLE 128 #define DEFAULT_LUX_LIGHT_TOGGLE 128
#define DEFAULT_FL_OFF_WHEN_DARK true #define DEFAULT_FL_OFF_WHEN_DARK true
#define DEFAULT_FL_ALWAYS_ON false #define DEFAULT_FL_ALWAYS_ON true
#define DEFAULT_FL_FLASH_ON_UPDATE false #define DEFAULT_FL_FLASH_ON_UPDATE true
#define DEFAULT_LED_STATUS false #define DEFAULT_LED_STATUS false
#define DEFAULT_TIMER_ACTIVE true #define DEFAULT_TIMER_ACTIVE true
@ -60,11 +60,13 @@
#define DEFAULT_MINING_POOL_STATS_ENABLED false #define DEFAULT_MINING_POOL_STATS_ENABLED false
#define DEFAULT_MINING_POOL_NAME "ocean" #define DEFAULT_MINING_POOL_NAME "ocean"
#define DEFAULT_MINING_POOL_USER "38Qkkei3SuF1Eo45BaYmRHUneRD54yyTFy" // Random actual Ocean hasher #define DEFAULT_MINING_POOL_USER "38Qkkei3SuF1Eo45BaYmRHUneRD54yyTFy" // Random actual Ocean hasher
#define DEFAULT_LOCAL_POOL_ENDPOINT "umbrel.local:2019"
#define DEFAULT_ZAP_NOTIFY_ENABLED false #define DEFAULT_ZAP_NOTIFY_ENABLED false
#define DEFAULT_ZAP_NOTIFY_PUBKEY "b5127a08cf33616274800a4387881a9f98e04b9c37116e92de5250498635c422" #define DEFAULT_ZAP_NOTIFY_PUBKEY "b5127a08cf33616274800a4387881a9f98e04b9c37116e92de5250498635c422"
#define DEFAULT_LED_FLASH_ON_ZAP true #define DEFAULT_LED_FLASH_ON_ZAP true
#define DEFAULT_FL_FLASH_ON_ZAP true #define DEFAULT_FL_FLASH_ON_ZAP true
#define DEFAULT_FONT_NAME "antonio"
#define DEFAULT_HTTP_AUTH_ENABLED false #define DEFAULT_HTTP_AUTH_ENABLED false
#define DEFAULT_HTTP_AUTH_USERNAME "btclock" #define DEFAULT_HTTP_AUTH_USERNAME "btclock"
@ -93,3 +95,7 @@ enum DataSourceType {
}; };
#define DEFAULT_DATA_SOURCE BTCLOCK_SOURCE #define DEFAULT_DATA_SOURCE BTCLOCK_SOURCE
#ifndef DEFAULT_BOOT_TEXT
#define DEFAULT_BOOT_TEXT "BTCLOCK"
#endif

File diff suppressed because it is too large Load diff

View file

@ -3,12 +3,14 @@
#include <Fonts/FreeSans9pt7b.h> #include <Fonts/FreeSans9pt7b.h>
#include <Fonts/FreeSansBold9pt7b.h> #include <Fonts/FreeSansBold9pt7b.h>
#include <GxEPD2_BW.h> #include <GxEPD2_BW.h>
#include "gzip_decompressor.hpp"
#include <mcp23x17_pin.hpp> #include <mcp23x17_pin.hpp>
#include <mutex> #include <mutex>
#include <native_pin.hpp> #include <native_pin.hpp>
#include <regex> #include <regex>
#include <array>
#include <memory>
#include "fonts/fonts.hpp" #include "fonts/fonts.hpp"
#include "lib/config.hpp" #include "lib/config.hpp"
@ -16,43 +18,118 @@
#include "icons/icons.h" #include "icons/icons.h"
#include "mining_pool_stats_fetch.hpp" #include "mining_pool_stats_fetch.hpp"
// Font includes
#include "../fonts/antonio-semibold20.h"
#include "../fonts/antonio-semibold40.h"
#include "../fonts/antonio-semibold90.h"
// Oswald fonts
#include "../fonts/oswald-medium20.h"
#include "../fonts/oswald-medium30.h"
#include "../fonts/oswald-medium80.h"
#include "../fonts/sats-symbol.h"
#ifdef USE_QR #ifdef USE_QR
#include "qrcodegen.h" #include "qrcodegen.h"
#endif #endif
// extern TaskHandle_t epdTaskHandle;
typedef struct { struct UpdateDisplayTaskItem {
char dispNum; char dispNum;
} UpdateDisplayTaskItem; };
void forceFullRefresh(); struct FontFamily {
void setupDisplays(); GFXfont* big;
GFXfont* medium;
GFXfont* small;
};
void splitText(const uint dispNum, const String &top, const String &bottom, class EPDManager {
bool partial); public:
static EPDManager& getInstance();
void showDigit(const uint dispNum, char chr, bool partial, const GFXfont *font); // Delete copy constructor and assignment operator
void showChars(const uint dispNum, const String &chars, bool partial, EPDManager(const EPDManager&) = delete;
const GFXfont *font); EPDManager& operator=(const EPDManager&) = delete;
extern "C" void updateDisplay(void *pvParameters) noexcept; void initialize();
void updateDisplayAlt(int epdIndex); void forceFullRefresh();
void prepareDisplayUpdateTask(void *pvParameters); void loadFonts(const String& fontName);
void setContent(const std::array<String, NUM_SCREENS>& newContent, bool forceUpdate = false);
void setContent(const std::array<std::string, NUM_SCREENS>& newContent);
std::array<String, NUM_SCREENS> getCurrentContent() const;
int getBgColor(); int getBackgroundColor() const { return bgColor; }
int getFgColor(); int getForegroundColor() const { return fgColor; }
void setBgColor(int color); void setBackgroundColor(int color) { bgColor = color; }
void setFgColor(int color); void setForegroundColor(int color) { fgColor = color; }
void waitUntilNoneBusy();
bool renderIcon(const uint dispNum, const String &text, bool partial); private:
void renderText(const uint dispNum, const String &text, bool partial); EPDManager(); // Private constructor for singleton
void renderQr(const uint dispNum, const String &text, bool partial); ~EPDManager(); // Private destructor
void setEpdContent(std::array<String, NUM_SCREENS> newEpdContent, void setupDisplay(uint dispNum, const GFXfont* font);
bool forceUpdate); void splitText(uint dispNum, const String& top, const String& bottom, bool partial);
void setEpdContent(std::array<String, NUM_SCREENS> newEpdContent); void showDigit(uint dispNum, char chr, bool partial, const GFXfont* font);
void showChars(uint dispNum, const String& chars, bool partial, const GFXfont* font);
bool renderIcon(uint dispNum, const String& text, bool partial);
void renderText(uint dispNum, const String& text, bool partial);
void renderQr(uint dispNum, const String& text, bool partial);
int16_t calculateDescent(const GFXfont* font);
void setEpdContent(std::array<std::string, NUM_SCREENS> newEpdContent); static void updateDisplayTask(void* pvParameters) noexcept;
static void prepareDisplayUpdateTask(void* pvParameters);
std::array<String, NUM_SCREENS> getCurrentEpdContent(); // Member variables
void waitUntilNoneBusy(); std::array<String, NUM_SCREENS> currentContent;
std::array<String, NUM_SCREENS> content;
std::array<uint32_t, NUM_SCREENS> lastFullRefresh;
std::array<TaskHandle_t, NUM_SCREENS> tasks;
QueueHandle_t updateQueue;
FontFamily antonioFonts;
FontFamily oswaldFonts;
const GFXfont* fontSmall;
const GFXfont* fontBig;
const GFXfont* fontMedium;
const GFXfont* fontSatsymbol;
int bgColor;
int fgColor;
std::mutex updateMutex;
std::array<std::mutex, NUM_SCREENS> displayMutexes;
// Pin configurations based on board version
#ifdef IS_BTCLOCK_REV_B
static Native_Pin EPD_DC;
static std::array<Native_Pin, NUM_SCREENS> EPD_CS;
static std::array<Native_Pin, NUM_SCREENS> EPD_BUSY;
static std::array<MCP23X17_Pin, NUM_SCREENS> EPD_RESET;
#elif defined(IS_BTCLOCK_V8)
static Native_Pin EPD_DC;
static std::array<MCP23X17_Pin, NUM_SCREENS> EPD_BUSY;
static std::array<MCP23X17_Pin, NUM_SCREENS> EPD_CS;
static std::array<MCP23X17_Pin, NUM_SCREENS> EPD_RESET;
#else
static Native_Pin EPD_DC;
static std::array<Native_Pin, NUM_SCREENS> EPD_CS;
static std::array<Native_Pin, NUM_SCREENS> EPD_BUSY;
static std::array<MCP23X17_Pin, NUM_SCREENS> EPD_RESET;
#endif
// Display array
std::array<GxEPD2_BW<EPD_CLASS, EPD_CLASS::HEIGHT>, NUM_SCREENS> displays;
static constexpr size_t UPDATE_QUEUE_SIZE = 14;
static constexpr uint32_t BUSY_TIMEOUT_COUNT = 200;
static constexpr TickType_t BUSY_RETRY_DELAY = pdMS_TO_TICKS(10);
static constexpr size_t EPD_TASK_STACK_SIZE =
#ifdef IS_BTCLOCK_V8
4096
#else
2048
#endif
;
};

View file

@ -0,0 +1,49 @@
#pragma once
#include "rom/miniz.h"
#include <Arduino.h>
class GzipDecompressor {
public:
static bool decompressData(const uint8_t* input, size_t inputSize,
uint8_t* output, size_t* outputSize) {
if (!input || !output || !outputSize || inputSize < 18) { // Minimum gzip size
return false;
}
tinfl_decompressor* decomp = new tinfl_decompressor;
if (!decomp) {
return false;
}
tinfl_init(decomp);
size_t inPos = 10; // Skip gzip header
size_t outPos = 0;
while (inPos < inputSize - 8) { // -8 for footer
size_t inBytes = inputSize - inPos - 8;
size_t outBytes = *outputSize - outPos;
tinfl_status status = tinfl_decompress(decomp,
&input[inPos], &inBytes,
output, &output[outPos], &outBytes,
TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
inPos += inBytes;
outPos += outBytes;
if (status == TINFL_STATUS_DONE) {
*outputSize = outPos;
delete decomp;
return true;
} else if (status < 0) {
delete decomp;
return false;
}
}
delete decomp;
return false;
}
};

File diff suppressed because it is too large Load diff

View file

@ -4,6 +4,7 @@
#include <Arduino.h> #include <Arduino.h>
#include <freertos/FreeRTOS.h> #include <freertos/FreeRTOS.h>
#include <freertos/task.h> #include <freertos/task.h>
#include <memory>
#include "lib/shared.hpp" #include "lib/shared.hpp"
#include "lib/webserver.hpp" #include "lib/webserver.hpp"
@ -15,71 +16,120 @@
#define NEOPIXEL_COUNT 4 #define NEOPIXEL_COUNT 4
#endif #endif
// LED effect constants
const int LED_FLASH_ERROR = 0; const int LED_FLASH_ERROR = 0;
const int LED_FLASH_SUCCESS = 1; const int LED_FLASH_SUCCESS = 1;
const int LED_FLASH_UPDATE = 2; const int LED_FLASH_UPDATE = 2;
const int LED_FLASH_BLOCK_NOTIFY = 3; const int LED_EFFECT_CONFIGURING = 10;
const int LED_EFFECT_START_TIMER = 4; const int LED_FLASH_BLOCK_NOTIFY = 4;
const int LED_EFFECT_PAUSE_TIMER = 5; const int LED_EFFECT_START_TIMER = 5;
const int LED_EFFECT_HEARTBEAT = 6; const int LED_EFFECT_PAUSE_TIMER = 6;
const int LED_EFFECT_HEARTBEAT = 7;
const int LED_EFFECT_WIFI_WAIT_FOR_CONFIG = 100; const int LED_EFFECT_WIFI_WAIT_FOR_CONFIG = 100;
const int LED_EFFECT_WIFI_CONNECTING = 101; const int LED_EFFECT_WIFI_CONNECTING = 101;
const int LED_EFFECT_WIFI_CONNECT_ERROR = 102; const int LED_EFFECT_WIFI_CONNECT_ERROR = 102;
const int LED_EFFECT_WIFI_CONNECT_SUCCESS = 103; const int LED_EFFECT_WIFI_CONNECT_SUCCESS = 103;
const int LED_EFFECT_WIFI_ERASE_SETTINGS = 104; const int LED_EFFECT_WIFI_ERASE_SETTINGS = 104;
const int LED_PROGRESS_25 = 200; const int LED_PROGRESS_25 = 200;
const int LED_PROGRESS_50 = 201; const int LED_PROGRESS_50 = 201;
const int LED_PROGRESS_75 = 202; const int LED_PROGRESS_75 = 202;
const int LED_PROGRESS_100 = 203; const int LED_PROGRESS_100 = 203;
const int LED_DATA_PRICE_ERROR = 300; const int LED_DATA_PRICE_ERROR = 300;
const int LED_DATA_BLOCK_ERROR = 301; const int LED_DATA_BLOCK_ERROR = 301;
const int LED_EFFECT_NOSTR_ZAP = 400; const int LED_EFFECT_NOSTR_ZAP = 400;
const int LED_FLASH_IDENTIFY = 990; const int LED_FLASH_IDENTIFY = 990;
const int LED_POWER_TEST = 999; const int LED_POWER_TEST = 999;
extern TaskHandle_t ledTaskHandle;
extern Adafruit_NeoPixel pixels;
void ledTask(void *pvParameters); // Do Not Disturb mode settings
void setupLeds(); struct DNDTimeRange {
void setupLedTask(); uint8_t startHour;
void blinkDelay(int d, int times); uint8_t startMinute;
void blinkDelayColor(int d, int times, uint r, uint g, uint b); uint8_t endHour;
void blinkDelayTwoColor(int d, int times, const uint32_t& c1, const uint32_t& c2); uint8_t endMinute;
void clearLeds(); };
void saveLedState();
void restoreLedState(); class LedHandler {
QueueHandle_t getLedTaskQueue(); public:
bool queueLedEffect(uint effect); static LedHandler& getInstance();
void setLights(int r, int g, int b);
void setLights(uint32_t color); // Delete copy constructor and assignment operator
void ledRainbow(int wait); LedHandler(const LedHandler&) = delete;
void ledTheaterChaseRainbow(int wait); LedHandler& operator=(const LedHandler&) = delete;
void ledTheaterChase(uint32_t color, int wait);
Adafruit_NeoPixel getPixels(); void setup();
void lightningStrike(); void setupTask();
bool queueEffect(uint effect);
void clear();
void setLights(int r, int g, int b);
void setLights(uint32_t color);
void saveLedState();
void restoreLedState();
QueueHandle_t getTaskQueue() const { return ledTaskQueue; }
Adafruit_NeoPixel& getPixels() { return pixels; }
// DND methods
void setDNDEnabled(bool enabled);
void setDNDTimeBasedEnabled(bool enabled);
void setDNDTimeRange(uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute);
bool isDNDActive() const;
bool isTimeInDNDRange(uint8_t hour, uint8_t minute) const;
// DND getters
bool isDNDEnabled() const { return dndEnabled; }
bool isDNDTimeBasedEnabled() const { return dndTimeBasedEnabled; }
uint8_t getDNDStartHour() const { return dndTimeRange.startHour; }
uint8_t getDNDStartMinute() const { return dndTimeRange.startMinute; }
uint8_t getDNDEndHour() const { return dndTimeRange.endHour; }
uint8_t getDNDEndMinute() const { return dndTimeRange.endMinute; }
// Effect methods
void rainbow(int wait);
void theaterChase(uint32_t color, int wait);
void theaterChaseRainbow(int wait);
void lightningStrike();
void blinkDelay(int d, int times);
void blinkDelayColor(int d, int times, uint r, uint g, uint b);
void blinkDelayTwoColor(int d, int times, const uint32_t& c1, const uint32_t& c2);
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
void frontlightFlash(int flDelayTime); void frontlightFlash(int flDelayTime);
void frontlightFadeInAll(); void frontlightFadeInAll();
void frontlightFadeOutAll(); void frontlightFadeOutAll();
void frontlightFadeIn(uint num); void frontlightFadeIn(uint num);
void frontlightFadeOut(uint num); void frontlightFadeOut(uint num);
std::vector<uint16_t> frontlightGetStatus();
void frontlightSetBrightness(uint brightness);
bool frontlightIsOn() const { return frontlightOn; }
void frontlightFadeInAll(int flDelayTime, bool staggered = false);
void frontlightFadeOutAll(int flDelayTime, bool staggered = false);
void frontlightFadeIn(uint num, int flDelayTime);
void frontlightFadeOut(uint num, int flDelayTime);
void initializeFrontlight();
#endif
std::vector<uint16_t> frontlightGetStatus(); private:
LedHandler(); // Private constructor for singleton
void loadDNDSettings();
static void ledTask(void* pvParameters);
void frontlightSetBrightness(uint brightness); Adafruit_NeoPixel pixels;
bool frontlightIsOn(); TaskHandle_t ledTaskHandle;
QueueHandle_t ledTaskQueue;
uint ledTaskParams;
void frontlightFadeInAll(int flDelayTime); // DND members
void frontlightFadeInAll(int flDelayTime, bool staggered); bool dndEnabled;
void frontlightFadeOutAll(int flDelayTime); bool dndTimeBasedEnabled;
void frontlightFadeOutAll(int flDelayTime, bool staggered); DNDTimeRange dndTimeRange;
void frontlightFadeIn(uint num, int flDelayTime); #ifdef HAS_FRONTLIGHT
void frontlightFadeOut(uint num, int flDelayTime); static constexpr uint16_t FL_FADE_STEP = 25;
#endif bool frontlightOn;
bool flInTransition;
#endif
};
// Global accessor function
inline LedHandler& getLedHandler() {
return LedHandler::getInstance();
}

View file

@ -5,6 +5,7 @@ const char* PoolFactory::MINING_POOL_NAME_NODERUNNERS = "noderunners";
const char* PoolFactory::MINING_POOL_NAME_BRAIINS = "braiins"; const char* PoolFactory::MINING_POOL_NAME_BRAIINS = "braiins";
const char* PoolFactory::MINING_POOL_NAME_SATOSHI_RADIO = "satoshi_radio"; const char* PoolFactory::MINING_POOL_NAME_SATOSHI_RADIO = "satoshi_radio";
const char* PoolFactory::MINING_POOL_NAME_PUBLIC_POOL = "public_pool"; const char* PoolFactory::MINING_POOL_NAME_PUBLIC_POOL = "public_pool";
const char* PoolFactory::MINING_POOL_NAME_LOCAL_PUBLIC_POOL = "local_public_pool";
const char* PoolFactory::MINING_POOL_NAME_GOBRRR_POOL = "gobrrr_pool"; const char* PoolFactory::MINING_POOL_NAME_GOBRRR_POOL = "gobrrr_pool";
const char* PoolFactory::MINING_POOL_NAME_CKPOOL = "ckpool"; const char* PoolFactory::MINING_POOL_NAME_CKPOOL = "ckpool";
const char* PoolFactory::MINING_POOL_NAME_EU_CKPOOL = "eu_ckpool"; const char* PoolFactory::MINING_POOL_NAME_EU_CKPOOL = "eu_ckpool";
@ -17,6 +18,7 @@ std::unique_ptr<MiningPoolInterface> PoolFactory::createPool(const std::string&
{MINING_POOL_NAME_BRAIINS, []() { return std::make_unique<BraiinsPool>(); }}, {MINING_POOL_NAME_BRAIINS, []() { return std::make_unique<BraiinsPool>(); }},
{MINING_POOL_NAME_SATOSHI_RADIO, []() { return std::make_unique<SatoshiRadioPool>(); }}, {MINING_POOL_NAME_SATOSHI_RADIO, []() { return std::make_unique<SatoshiRadioPool>(); }},
{MINING_POOL_NAME_PUBLIC_POOL, []() { return std::make_unique<PublicPool>(); }}, {MINING_POOL_NAME_PUBLIC_POOL, []() { return std::make_unique<PublicPool>(); }},
{MINING_POOL_NAME_LOCAL_PUBLIC_POOL, []() { return std::make_unique<LocalPublicPool>(); }},
{MINING_POOL_NAME_GOBRRR_POOL, []() { return std::make_unique<GoBrrrPool>(); }}, {MINING_POOL_NAME_GOBRRR_POOL, []() { return std::make_unique<GoBrrrPool>(); }},
{MINING_POOL_NAME_CKPOOL, []() { return std::make_unique<CKPool>(); }}, {MINING_POOL_NAME_CKPOOL, []() { return std::make_unique<CKPool>(); }},
{MINING_POOL_NAME_EU_CKPOOL, []() { return std::make_unique<EUCKPool>(); }} {MINING_POOL_NAME_EU_CKPOOL, []() { return std::make_unique<EUCKPool>(); }}

View file

@ -10,6 +10,7 @@
#include "ocean/ocean_pool.hpp" #include "ocean/ocean_pool.hpp"
#include "satoshi_radio/satoshi_radio_pool.hpp" #include "satoshi_radio/satoshi_radio_pool.hpp"
#include "public_pool/public_pool.hpp" #include "public_pool/public_pool.hpp"
#include "public_pool/local_public_pool.hpp"
#include "gobrrr_pool/gobrrr_pool.hpp" #include "gobrrr_pool/gobrrr_pool.hpp"
#include "ckpool/ckpool.hpp" #include "ckpool/ckpool.hpp"
#include "ckpool/eu_ckpool.hpp" #include "ckpool/eu_ckpool.hpp"
@ -28,6 +29,7 @@ class PoolFactory {
MINING_POOL_NAME_SATOSHI_RADIO, MINING_POOL_NAME_SATOSHI_RADIO,
MINING_POOL_NAME_BRAIINS, MINING_POOL_NAME_BRAIINS,
MINING_POOL_NAME_PUBLIC_POOL, MINING_POOL_NAME_PUBLIC_POOL,
MINING_POOL_NAME_LOCAL_PUBLIC_POOL,
MINING_POOL_NAME_GOBRRR_POOL, MINING_POOL_NAME_GOBRRR_POOL,
MINING_POOL_NAME_CKPOOL, MINING_POOL_NAME_CKPOOL,
MINING_POOL_NAME_EU_CKPOOL MINING_POOL_NAME_EU_CKPOOL
@ -55,6 +57,7 @@ class PoolFactory {
static const char* MINING_POOL_NAME_BRAIINS; static const char* MINING_POOL_NAME_BRAIINS;
static const char* MINING_POOL_NAME_SATOSHI_RADIO; static const char* MINING_POOL_NAME_SATOSHI_RADIO;
static const char* MINING_POOL_NAME_PUBLIC_POOL; static const char* MINING_POOL_NAME_PUBLIC_POOL;
static const char* MINING_POOL_NAME_LOCAL_PUBLIC_POOL;
static const char* MINING_POOL_NAME_GOBRRR_POOL; static const char* MINING_POOL_NAME_GOBRRR_POOL;
static const char* MINING_POOL_NAME_CKPOOL; static const char* MINING_POOL_NAME_CKPOOL;
static const char* MINING_POOL_NAME_EU_CKPOOL; static const char* MINING_POOL_NAME_EU_CKPOOL;

View file

@ -0,0 +1,11 @@
#include "local_public_pool.hpp"
#include "lib/shared.hpp"
#include "lib/defaults.hpp"
std::string LocalPublicPool::getEndpoint() const {
return preferences.getString("localPoolEndpoint", DEFAULT_LOCAL_POOL_ENDPOINT).c_str();
}
std::string LocalPublicPool::getApiUrl() const {
return "http://" + getEndpoint() + "/api/client/" + poolUser;
}

View file

@ -0,0 +1,11 @@
#pragma once
#include "public_pool.hpp"
class LocalPublicPool : public PublicPool {
public:
std::string getApiUrl() const override;
std::string getDisplayLabel() const override { return "LOCAL/POOL"; }
private:
std::string getEndpoint() const;
};

View file

@ -1,95 +1,98 @@
#include "mining_pool_stats_fetch.hpp" #include "mining_pool_stats_fetch.hpp"
TaskHandle_t miningPoolStatsFetchTaskHandle; void MiningPoolStatsFetch::taskWrapper(void* pvParameters) {
MiningPoolStatsFetch::getInstance().task();
std::string miningPoolName;
std::string miningPoolStatsHashrate;
int miningPoolStatsDailyEarnings;
std::string getMiningPoolStatsHashRate()
{
return miningPoolStatsHashrate;
} }
int getMiningPoolStatsDailyEarnings() void MiningPoolStatsFetch::downloadLogoTaskWrapper(void* pvParameters) {
{ MiningPoolStatsFetch::getInstance().downloadLogoTask();
return miningPoolStatsDailyEarnings;
} }
void taskMiningPoolStatsFetch(void *pvParameters) std::string MiningPoolStatsFetch::getHashRate() const {
{ return hashrate;
}
int MiningPoolStatsFetch::getDailyEarnings() const {
return dailyEarnings;
}
MiningPoolInterface* MiningPoolStatsFetch::getPool() {
if (!currentPool) {
std::string poolName = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME).c_str();
currentPool = PoolFactory::createPool(poolName);
}
return currentPool.get();
}
const MiningPoolInterface* MiningPoolStatsFetch::getPool() const {
return currentPool.get();
}
LogoData MiningPoolStatsFetch::getLogo() const {
if (const auto* pool = getPool()) {
return pool->getLogo();
}
return LogoData{};
}
void MiningPoolStatsFetch::task() {
std::string poolName = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME).c_str(); std::string poolName = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME).c_str();
auto poolInterface = PoolFactory::createPool(poolName); auto* poolInterface = getPool();
if (!poolInterface) return;
std::string poolUser = preferences.getString("miningPoolUser", DEFAULT_MINING_POOL_USER).c_str(); std::string poolUser = preferences.getString("miningPoolUser", DEFAULT_MINING_POOL_USER).c_str();
// Main stats fetching loop // Main stats fetching loop
for (;;) for (;;) {
{
ulTaskNotifyTake(pdTRUE, portMAX_DELAY); ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
HTTPClient http; HTTPClient http;
http.setUserAgent(USER_AGENT); http.setUserAgent(USER_AGENT);
poolInterface->setPoolUser(poolUser); poolInterface->setPoolUser(poolUser);
std::string apiUrl = poolInterface->getApiUrl(); std::string apiUrl = poolInterface->getApiUrl();
http.begin(apiUrl.c_str()); http.begin(apiUrl.c_str());
if (debugLogEnabled()) if (debugLogEnabled()) {
{
Serial.printf("Fetching mining pool stats from %s\r\n", apiUrl.c_str()); Serial.printf("Fetching mining pool stats from %s\r\n", apiUrl.c_str());
} }
poolInterface->prepareRequest(http); poolInterface->prepareRequest(http);
int httpCode = http.GET(); int httpCode = http.GET();
if (httpCode == 200) if (httpCode == 200) {
{
String payload = http.getString(); String payload = http.getString();
JsonDocument doc; JsonDocument doc;
deserializeJson(doc, payload); deserializeJson(doc, payload);
if (debugLogEnabled()) if (debugLogEnabled()) {
{
Serial.printf("Mining pool stats response: %s\r\n", payload.c_str()); Serial.printf("Mining pool stats response: %s\r\n", payload.c_str());
} }
PoolStats stats = poolInterface->parseResponse(doc); PoolStats stats = poolInterface->parseResponse(doc);
hashrate = stats.hashrate;
miningPoolStatsHashrate = stats.hashrate; if (debugLogEnabled()) {
if (debugLogEnabled())
{
Serial.printf("Mining pool stats parsed hashrate: %s\r\n", stats.hashrate.c_str()); Serial.printf("Mining pool stats parsed hashrate: %s\r\n", stats.hashrate.c_str());
} }
if (stats.dailyEarnings) dailyEarnings = stats.dailyEarnings ? *stats.dailyEarnings : 0;
{
miningPoolStatsDailyEarnings = *stats.dailyEarnings;
}
else
{
miningPoolStatsDailyEarnings = 0; // or any other default value
}
if (workQueue != nullptr && (ScreenHandler::getCurrentScreen() == SCREEN_MINING_POOL_STATS_HASHRATE || ScreenHandler::getCurrentScreen() == SCREEN_MINING_POOL_STATS_EARNINGS)) if (workQueue != nullptr && (ScreenHandler::getCurrentScreen() == SCREEN_MINING_POOL_STATS_HASHRATE ||
{ ScreenHandler::getCurrentScreen() == SCREEN_MINING_POOL_STATS_EARNINGS)) {
WorkItem priceUpdate = {TASK_MINING_POOL_STATS_UPDATE, 0}; WorkItem priceUpdate = {TASK_MINING_POOL_STATS_UPDATE, 0};
xQueueSend(workQueue, &priceUpdate, portMAX_DELAY); xQueueSend(workQueue, &priceUpdate, portMAX_DELAY);
} }
} } else {
else Serial.print(F("Error retrieving mining pool data. HTTP status code: "));
{
Serial.print(
F("Error retrieving mining pool data. HTTP status code: "));
Serial.println(httpCode); Serial.println(httpCode);
} }
} }
} }
void downloadMiningPoolLogoTask(void *pvParameters) { void MiningPoolStatsFetch::downloadLogoTask() {
std::string poolName = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME).c_str(); std::string poolName = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME).c_str();
auto poolInterface = PoolFactory::createPool(poolName); auto* poolInterface = getPool();
PoolFactory::downloadPoolLogo(poolName, poolInterface.get()); if (!poolInterface) return;
PoolFactory::downloadPoolLogo(poolName, poolInterface);
// If we're on the mining pool stats screen, trigger a display update // If we're on the mining pool stats screen, trigger a display update
if (ScreenHandler::getCurrentScreen() == SCREEN_MINING_POOL_STATS_HASHRATE) { if (ScreenHandler::getCurrentScreen() == SCREEN_MINING_POOL_STATS_HASHRATE) {
@ -97,41 +100,22 @@ void downloadMiningPoolLogoTask(void *pvParameters) {
xQueueSend(workQueue, &priceUpdate, portMAX_DELAY); xQueueSend(workQueue, &priceUpdate, portMAX_DELAY);
} }
xTaskNotifyGive(miningPoolStatsFetchTaskHandle); xTaskNotifyGive(taskHandle);
vTaskDelete(NULL); vTaskDelete(NULL);
} }
void setupMiningPoolStatsFetchTask() void MiningPoolStatsFetch::setup() {
{ xTaskCreate(downloadLogoTaskWrapper,
xTaskCreate(downloadMiningPoolLogoTask,
"logoDownload", "logoDownload",
(6 * 1024), (6 * 1024),
NULL, NULL,
tskIDLE_PRIORITY, tskIDLE_PRIORITY,
NULL); NULL);
xTaskCreate(taskMiningPoolStatsFetch, xTaskCreate(taskWrapper,
"miningPoolStatsFetch", "miningPoolStatsFetch",
(6 * 1024), (6 * 1024),
NULL, NULL,
tskIDLE_PRIORITY, tskIDLE_PRIORITY,
&miningPoolStatsFetchTaskHandle); &taskHandle);
}
std::unique_ptr<MiningPoolInterface>& getMiningPool()
{
static std::unique_ptr<MiningPoolInterface> currentMiningPool;
if (!currentMiningPool) {
std::string poolName = preferences.getString("miningPoolName", DEFAULT_MINING_POOL_NAME).c_str();
currentMiningPool = PoolFactory::createPool(poolName);
}
return currentMiningPool;
}
LogoData getMiningPoolLogo()
{
LogoData logo = getMiningPool()->getLogo();
return logo;
} }

View file

@ -2,18 +2,44 @@
#include <Arduino.h> #include <Arduino.h>
#include <HTTPClient.h> #include <HTTPClient.h>
#include "mining_pool/pool_factory.hpp" #include <utils.hpp>
#include <memory>
#include "lib/config.hpp" #include "lib/config.hpp"
#include "lib/shared.hpp" #include "lib/shared.hpp"
#include "lib/mining_pool/mining_pool_interface.hpp"
#include "mining_pool/pool_factory.hpp"
extern TaskHandle_t miningPoolStatsFetchTaskHandle; class MiningPoolStatsFetch {
public:
static MiningPoolStatsFetch& getInstance() {
static MiningPoolStatsFetch instance;
return instance;
}
void setupMiningPoolStatsFetchTask(); void setup();
void taskMiningPoolStatsFetch(void *pvParameters); std::string getHashRate() const;
int getDailyEarnings() const;
TaskHandle_t getTaskHandle() const { return taskHandle; }
static void taskWrapper(void* pvParameters);
static void downloadLogoTaskWrapper(void* pvParameters);
// Pool interface methods
MiningPoolInterface* getPool();
const MiningPoolInterface* getPool() const;
LogoData getLogo() const;
std::string getMiningPoolStatsHashRate(); private:
int getMiningPoolStatsDailyEarnings(); MiningPoolStatsFetch() = default;
~MiningPoolStatsFetch() = default;
MiningPoolStatsFetch(const MiningPoolStatsFetch&) = delete;
MiningPoolStatsFetch& operator=(const MiningPoolStatsFetch&) = delete;
std::unique_ptr<MiningPoolInterface>& getMiningPool(); void task();
LogoData getMiningPoolLogo(); void downloadLogoTask();
TaskHandle_t taskHandle = nullptr;
std::string hashrate;
int dailyEarnings = 0;
std::unique_ptr<MiningPoolInterface> currentPool;
};

View file

@ -1,4 +1,5 @@
#include "nostr_notify.hpp" #include "nostr_notify.hpp"
#include "led_handler.hpp"
std::vector<nostr::NostrPool *> pools; std::vector<nostr::NostrPool *> pools;
nostr::Transport *transport; nostr::Transport *transport;
@ -40,7 +41,7 @@ void setupNostrNotify(bool asDatasource, bool zapNotify)
{relay}, {relay},
{// First filter {// First filter
{ {
{"kinds", {"1"}}, {"kinds", {"12203"}},
{"since", {String(getMinutesAgo(60))}}, {"since", {String(getMinutesAgo(60))}},
{"authors", {pubKey}}, {"authors", {pubKey}},
}}, }},
@ -78,8 +79,9 @@ void nostrTask(void *pvParameters)
{ {
DataSourceType dataSource = getDataSource(); DataSourceType dataSource = getDataSource();
if(dataSource == NOSTR_SOURCE) { if(dataSource == NOSTR_SOURCE) {
int blockFetch = getBlockFetch(); auto& blockNotify = BlockNotify::getInstance();
processNewBlock(blockFetch); int blockFetch = blockNotify.fetchLatestBlock();
blockNotify.processNewBlock(blockFetch);
} }
while (1) while (1)
@ -144,6 +146,7 @@ void handleNostrEventCallback(const String &subId, nostr::SignedNostrEvent *even
// Use direct value access instead of multiple comparisons // Use direct value access instead of multiple comparisons
String typeValue; String typeValue;
uint medianFee = 0; uint medianFee = 0;
uint blockHeight = 0;
for (JsonArray tag : tags) { for (JsonArray tag : tags) {
if (tag.size() != 2) continue; if (tag.size() != 2) continue;
@ -164,6 +167,11 @@ void handleNostrEventCallback(const String &subId, nostr::SignedNostrEvent *even
medianFee = tag[1].as<uint>(); medianFee = tag[1].as<uint>();
} }
break; break;
case 'b': // blockHeight
if (strcmp(key, "block") == 0) {
blockHeight = tag[1].as<uint>();
}
break;
} }
} }
@ -171,13 +179,19 @@ void handleNostrEventCallback(const String &subId, nostr::SignedNostrEvent *even
if (!typeValue.isEmpty()) { if (!typeValue.isEmpty()) {
if (typeValue == "priceUsd") { if (typeValue == "priceUsd") {
processNewPrice(obj["content"].as<uint>(), CURRENCY_USD); processNewPrice(obj["content"].as<uint>(), CURRENCY_USD);
if (blockHeight != 0) {
auto& blockNotify = BlockNotify::getInstance();
blockNotify.processNewBlock(blockHeight);
}
} }
else if (typeValue == "blockHeight") { else if (typeValue == "blockHeight") {
processNewBlock(obj["content"].as<uint>()); auto& blockNotify = BlockNotify::getInstance();
blockNotify.processNewBlock(obj["content"].as<uint>());
} }
if (medianFee != 0) { if (medianFee != 0) {
processNewBlockFee(medianFee); auto& blockNotify = BlockNotify::getInstance();
blockNotify.processNewBlockFee(medianFee);
} }
} }
} }
@ -282,15 +296,31 @@ void handleNostrZapCallback(const String &subId, nostr::SignedNostrEvent *event)
} }
ScreenHandler::setCurrentScreen(SCREEN_CUSTOM); ScreenHandler::setCurrentScreen(SCREEN_CUSTOM);
setEpdContent(textEpdContent); EPDManager::getInstance().setContent(textEpdContent);
vTaskDelay(pdMS_TO_TICKS(315 * NUM_SCREENS) + pdMS_TO_TICKS(250)); vTaskDelay(pdMS_TO_TICKS(315 * NUM_SCREENS) + pdMS_TO_TICKS(250));
if (preferences.getBool("ledFlashOnZap", DEFAULT_LED_FLASH_ON_ZAP)) if (preferences.getBool("ledFlashOnZap", DEFAULT_LED_FLASH_ON_ZAP))
{ {
queueLedEffect(LED_EFFECT_NOSTR_ZAP); getLedHandler().queueEffect(LED_EFFECT_NOSTR_ZAP);
} }
if (timerPeriod > 0) if (timerPeriod > 0)
{ {
esp_timer_start_periodic(screenRotateTimer, esp_timer_start_periodic(screenRotateTimer,
timerPeriod * usPerSecond); timerPeriod * usPerSecond);
} }
} }
// void onNostrEvent(const String &subId, const nostr::Event &event) {
// // This is the callback that will be called when a new event is received
// if (event.kind == 9735) {
// // Parse the zap amount from the event
// uint16_t amount = parseZapAmount(event);
// if (amount > 0) {
// std::array<std::string, NUM_SCREENS> zapContent = parseZapNotify(amount, true);
// EPDManager::getInstance().setContent(zapContent);
// if (preferences.getBool("ledFlashOnUpd", DEFAULT_LED_FLASH_ON_UPD)) {
// getLedHandler().queueEffect(LED_FLASH_BLOCK_NOTIFY);
// }
// }
// }
// }

View file

@ -1,4 +1,5 @@
#include "ota.hpp" #include "ota.hpp"
#include "led_handler.hpp"
TaskHandle_t taskOtaHandle = NULL; TaskHandle_t taskOtaHandle = NULL;
bool isOtaUpdating = false; bool isOtaUpdating = false;
@ -31,6 +32,9 @@ void setupOTA()
void onOTAProgress(unsigned int progress, unsigned int total) void onOTAProgress(unsigned int progress, unsigned int total)
{ {
uint percentage = progress / (total / 100); uint percentage = progress / (total / 100);
auto& ledHandler = getLedHandler();
auto& pixels = ledHandler.getPixels();
pixels.fill(pixels.Color(0, 255, 0)); pixels.fill(pixels.Color(0, 255, 0));
if (percentage < 100) if (percentage < 100)
{ {
@ -53,10 +57,10 @@ void onOTAProgress(unsigned int progress, unsigned int total)
void onOTAStart() void onOTAStart()
{ {
forceFullRefresh(); EPDManager::getInstance().forceFullRefresh();
std::array<String, NUM_SCREENS> epdContent = {"U", "P", "D", "A", std::array<String, NUM_SCREENS> epdContent = {"U", "P", "D", "A",
"T", "E", "!"}; "T", "E", "!"};
setEpdContent(epdContent); EPDManager::getInstance().setContent(epdContent);
// Stop all timers // Stop all timers
esp_timer_stop(screenRotateTimer); esp_timer_stop(screenRotateTimer);
esp_timer_stop(minuteTimer); esp_timer_stop(minuteTimer);
@ -70,8 +74,8 @@ void onOTAStart()
ButtonHandler::suspendTask(); ButtonHandler::suspendTask();
// stopWebServer(); // stopWebServer();
stopBlockNotify(); auto& blockNotify = BlockNotify::getInstance();
stopPriceNotify(); blockNotify.stop();
} }
void handleOTATask(void *parameter) void handleOTATask(void *parameter)
@ -84,15 +88,15 @@ void handleOTATask(void *parameter)
{ {
if (msg.updateType == UPDATE_ALL) { if (msg.updateType == UPDATE_ALL) {
isOtaUpdating = true; isOtaUpdating = true;
queueLedEffect(LED_FLASH_UPDATE); getLedHandler().queueEffect(LED_FLASH_UPDATE);
int resultWebUi = downloadUpdateHandler(UPDATE_WEBUI); int resultWebUi = downloadUpdateHandler(UPDATE_WEBUI);
queueLedEffect(LED_FLASH_UPDATE); getLedHandler().queueEffect(LED_FLASH_UPDATE);
int resultFw = downloadUpdateHandler(UPDATE_FIRMWARE); int resultFw = downloadUpdateHandler(UPDATE_FIRMWARE);
if (resultWebUi == 0 && resultFw == 0) { if (resultWebUi == 0 && resultFw == 0) {
ESP.restart(); ESP.restart();
} else { } else {
queueLedEffect(LED_FLASH_ERROR); getLedHandler().queueEffect(LED_FLASH_ERROR);
vTaskDelay(pdMS_TO_TICKS(3000)); vTaskDelay(pdMS_TO_TICKS(3000));
ESP.restart(); ESP.restart();
} }

View file

@ -2,103 +2,64 @@
const char *wsServerPrice = "wss://ws.coincap.io/prices?assets=bitcoin"; const char *wsServerPrice = "wss://ws.coincap.io/prices?assets=bitcoin";
// WebsocketsClient client; WebSocketsClient webSocket;
esp_websocket_client_handle_t clientPrice = NULL;
esp_websocket_client_config_t config;
uint currentPrice = 90000; uint currentPrice = 90000;
unsigned long int lastPriceUpdate; unsigned long int lastPriceUpdate;
bool priceNotifyInit = false; bool priceNotifyInit = false;
std::map<char, std::uint64_t> currencyMap; std::map<char, std::uint64_t> currencyMap;
std::map<char, unsigned long int> lastUpdateMap; std::map<char, unsigned long int> lastUpdateMap;
WebSocketsClient priceNotifyWs; TaskHandle_t priceNotifyTaskHandle;
void onWebsocketPriceEvent(WStype_t type, uint8_t * payload, size_t length);
void setupPriceNotify() void setupPriceNotify()
{ {
config = {.uri = wsServerPrice, webSocket.beginSSL("ws.coincap.io", 443, "/prices?assets=bitcoin");
.user_agent = USER_AGENT}; webSocket.onEvent([](WStype_t type, uint8_t * payload, size_t length) {
config.cert_pem = isrg_root_x1cert; onWebsocketPriceEvent(type, payload, length);
});
webSocket.setReconnectInterval(5000);
webSocket.enableHeartbeat(15000, 3000, 2);
config.task_stack = (6*1024); setupPriceNotifyTask();
clientPrice = esp_websocket_client_init(&config);
esp_websocket_register_events(clientPrice, WEBSOCKET_EVENT_ANY,
onWebsocketPriceEvent, clientPrice);
esp_websocket_client_start(clientPrice);
// priceNotifyWs.beginSSL("ws.coincap.io", 443, "/prices?assets=bitcoin");
// priceNotifyWs.onEvent(onWebsocketPriceEvent);
// priceNotifyWs.setReconnectInterval(5000);
// priceNotifyWs.enableHeartbeat(15000, 3000, 2);
} }
void onWebsocketPriceEvent(WStype_t type, uint8_t * payload, size_t length) {
switch(type) {
case WStype_DISCONNECTED:
Serial.println(F("Price WS Connection Closed"));
break;
case WStype_CONNECTED:
{
Serial.println("Connected to " + String(wsServerPrice));
priceNotifyInit = true;
break;
}
case WStype_TEXT:
{
JsonDocument doc;
deserializeJson(doc, (char *)payload);
// void onWebsocketPriceEvent(WStype_t type, uint8_t * payload, size_t length) { if (doc["bitcoin"].is<JsonObject>())
// switch(type) { {
// case WStype_DISCONNECTED: if (currentPrice != doc["bitcoin"].as<long>())
// Serial.printf("[WSc] Disconnected!\n"); {
// break; processNewPrice(doc["bitcoin"].as<long>(), CURRENCY_USD);
// case WStype_CONNECTED: }
// { }
// Serial.printf("[WSc] Connected to url: %s\n", payload); break;
}
case WStype_BIN:
// break; break;
// } case WStype_ERROR:
// case WStype_TEXT: case WStype_FRAGMENT_TEXT_START:
// String message = String((char*)payload); case WStype_FRAGMENT_BIN_START:
// onWebsocketPriceMessage(message); case WStype_FRAGMENT:
// break; case WStype_PING:
// case WStype_BIN: case WStype_PONG:
// break; case WStype_FRAGMENT_FIN:
// case WStype_ERROR: break;
// case WStype_FRAGMENT_TEXT_START:
// case WStype_FRAGMENT_BIN_START:
// case WStype_FRAGMENT:
// case WStype_PING:
// case WStype_PONG:
// case WStype_FRAGMENT_FIN:
// break;
// }
// }
void onWebsocketPriceEvent(void *handler_args, esp_event_base_t base,
int32_t event_id, void *event_data)
{
esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
switch (event_id)
{
case WEBSOCKET_EVENT_CONNECTED:
Serial.println("Connected to " + String(config.uri) + " WebSocket");
priceNotifyInit = true;
break;
case WEBSOCKET_EVENT_DATA:
onWebsocketPriceMessage(data);
break;
case WEBSOCKET_EVENT_ERROR:
Serial.println(F("Price WS Connnection error"));
break;
case WEBSOCKET_EVENT_DISCONNECTED:
Serial.println(F("Price WS Connnection Closed"));
break;
}
}
void onWebsocketPriceMessage(esp_websocket_event_data_t *event_data)
{
JsonDocument doc;
deserializeJson(doc, (char *)event_data->data_ptr);
if (doc.containsKey("bitcoin"))
{
if (currentPrice != doc["bitcoin"].as<long>())
{
processNewPrice(doc["bitcoin"].as<long>(), CURRENCY_USD);
} }
}
} }
void processNewPrice(uint newPrice, char currency) void processNewPrice(uint newPrice, char currency)
@ -110,15 +71,17 @@ void processNewPrice(uint newPrice, char currency)
if (lastUpdateMap.find(currency) == lastUpdateMap.end() || if (lastUpdateMap.find(currency) == lastUpdateMap.end() ||
(currentTime - lastUpdateMap[currency]) > minSecPriceUpd) (currentTime - lastUpdateMap[currency]) > minSecPriceUpd)
{ {
// const unsigned long oldPrice = currentPrice;
currencyMap[currency] = newPrice; currencyMap[currency] = newPrice;
if (currency == CURRENCY_USD && ( lastUpdateMap[currency] == 0 ||
(currentTime - lastUpdateMap[currency]) > 120)) // Store price in preferences if enough time has passed
if (lastUpdateMap[currency] == 0 || (currentTime - lastUpdateMap[currency]) > 120)
{ {
preferences.putUInt("lastPrice", currentPrice); String prefKey = String("lastPrice_") + getCurrencyCode(currency).c_str();
preferences.putUInt(prefKey.c_str(), newPrice);
} }
lastUpdateMap[currency] = currentTime; lastUpdateMap[currency] = currentTime;
// if (abs((int)(oldPrice-currentPrice)) > round(0.0015*oldPrice)) {
if (workQueue != nullptr && (ScreenHandler::getCurrentScreen() == SCREEN_BTC_TICKER || if (workQueue != nullptr && (ScreenHandler::getCurrentScreen() == SCREEN_BTC_TICKER ||
ScreenHandler::getCurrentScreen() == SCREEN_SATS_PER_CURRENCY || ScreenHandler::getCurrentScreen() == SCREEN_SATS_PER_CURRENCY ||
ScreenHandler::getCurrentScreen() == SCREEN_MARKET_CAP)) ScreenHandler::getCurrentScreen() == SCREEN_MARKET_CAP))
@ -126,7 +89,24 @@ void processNewPrice(uint newPrice, char currency)
WorkItem priceUpdate = {TASK_PRICE_UPDATE, currency}; WorkItem priceUpdate = {TASK_PRICE_UPDATE, currency};
xQueueSend(workQueue, &priceUpdate, portMAX_DELAY); xQueueSend(workQueue, &priceUpdate, portMAX_DELAY);
} }
//} }
}
void loadStoredPrices()
{
// Load prices for all supported currencies
std::vector<std::string> currencies = getAvailableCurrencies();
for (const std::string &currency : currencies) {
// Get first character as the currency identifier
String prefKey = String("lastPrice_") + currency.c_str();
uint storedPrice = preferences.getUInt(prefKey.c_str(), 0);
if (storedPrice > 0) {
currencyMap[getCurrencyChar(currency)] = storedPrice;
// Initialize lastUpdateMap to 0 so next update will store immediately
lastUpdateMap[getCurrencyChar(currency)] = 0;
}
} }
} }
@ -156,9 +136,7 @@ void setPrice(uint newPrice, char currency)
bool isPriceNotifyConnected() bool isPriceNotifyConnected()
{ {
if (clientPrice == NULL) return webSocket.isConnected();
return false;
return esp_websocket_client_is_connected(clientPrice);
} }
bool getPriceNotifyInit() bool getPriceNotifyInit()
@ -168,24 +146,30 @@ bool getPriceNotifyInit()
void stopPriceNotify() void stopPriceNotify()
{ {
if (clientPrice == NULL) webSocket.disconnect();
return; if (priceNotifyTaskHandle != NULL) {
esp_websocket_client_close(clientPrice, pdMS_TO_TICKS(5000)); vTaskDelete(priceNotifyTaskHandle);
esp_websocket_client_stop(clientPrice); priceNotifyTaskHandle = NULL;
esp_websocket_client_destroy(clientPrice); }
clientPrice = NULL;
} }
void restartPriceNotify() void restartPriceNotify()
{ {
stopPriceNotify(); stopPriceNotify();
if (clientPrice == NULL) setupPriceNotify();
}
void taskPriceNotify(void *pvParameters)
{
for (;;)
{ {
setupPriceNotify(); webSocket.loop();
return; vTaskDelay(10 / portTICK_PERIOD_MS);
} }
// esp_websocket_client_close(clientPrice, pdMS_TO_TICKS(5000)); }
// esp_websocket_client_stop(clientPrice);
// esp_websocket_client_start(clientPrice); void setupPriceNotifyTask()
{
xTaskCreate(taskPriceNotify, "priceNotify", (6 * 1024), NULL, tskIDLE_PRIORITY,
&priceNotifyTaskHandle);
} }

View file

@ -2,24 +2,22 @@
#include <Arduino.h> #include <Arduino.h>
#include <ArduinoJson.h> #include <ArduinoJson.h>
#include <esp_websocket_client.h> #include <WebSocketsClient.h>
#include "block_notify.hpp"
#include <string> #include <string>
#include "lib/screen_handler.hpp" #include "lib/screen_handler.hpp"
extern TaskHandle_t priceNotifyTaskHandle;
void setupPriceNotify(); void setupPriceNotify();
void setupPriceNotifyTask();
void taskPriceNotify(void *pvParameters);
void onWebsocketPriceEvent(void *handler_args, esp_event_base_t base, void onWebsocketPriceEvent(WStype_t type, uint8_t * payload, size_t length);
int32_t event_id, void *event_data);
//void onWebsocketPriceEvent(WStype_t type, uint8_t * payload, size_t length);
void onWebsocketPriceMessage(esp_websocket_event_data_t *event_data);
uint getPrice(char currency); uint getPrice(char currency);
void setPrice(uint newPrice, char currency); void setPrice(uint newPrice, char currency);
//void processNewPrice(uint newPrice);
void processNewPrice(uint newPrice, char currency); void processNewPrice(uint newPrice, char currency);
bool isPriceNotifyConnected(); bool isPriceNotifyConnected();
@ -27,4 +25,5 @@ void stopPriceNotify();
void restartPriceNotify(); void restartPriceNotify();
bool getPriceNotifyInit(); bool getPriceNotifyInit();
uint getLastPriceUpdate(char currency); uint getLastPriceUpdate(char currency);
void loadStoredPrices();

View file

@ -108,6 +108,7 @@ bool ScreenHandler::handleCurrencyRotation(bool forward) {
setCurrentScreen(getCurrentScreen()); setCurrentScreen(getCurrentScreen());
return true; return true;
} }
// If we're at the last/first currency of current screen, let nextScreen/previousScreen handle it
return false; return false;
} }
return false; return false;
@ -143,14 +144,38 @@ int ScreenHandler::findNextVisibleScreen(int currentScreen, bool forward) {
void ScreenHandler::nextScreen() { void ScreenHandler::nextScreen() {
if (handleCurrencyRotation(true)) return; if (handleCurrencyRotation(true)) return;
int currentIndex = findScreenIndexByValue(getCurrentScreen()); int currentIndex = findScreenIndexByValue(getCurrentScreen());
setCurrentScreen(findNextVisibleScreen(currentIndex, true)); int nextScreen = findNextVisibleScreen(currentIndex, true);
// If moving from a currency-specific screen to another currency-specific screen
// reset to first currency
if (isCurrencySpecific(getCurrentScreen()) && isCurrencySpecific(nextScreen)) {
std::vector<std::string> ac = getActiveCurrencies();
if (!ac.empty()) {
setCurrentCurrency(getCurrencyChar(ac.front()));
}
}
setCurrentScreen(nextScreen);
} }
void ScreenHandler::previousScreen() { void ScreenHandler::previousScreen() {
if (handleCurrencyRotation(false)) return; if (handleCurrencyRotation(false)) return;
int currentIndex = findScreenIndexByValue(getCurrentScreen()); int currentIndex = findScreenIndexByValue(getCurrentScreen());
setCurrentScreen(findNextVisibleScreen(currentIndex, false)); int prevScreen = findNextVisibleScreen(currentIndex, false);
// If moving from a currency-specific screen to another currency-specific screen
// reset to last currency
if (isCurrencySpecific(getCurrentScreen()) && isCurrencySpecific(prevScreen)) {
std::vector<std::string> ac = getActiveCurrencies();
if (!ac.empty()) {
setCurrentCurrency(getCurrencyChar(ac.back()));
}
}
setCurrentScreen(prevScreen);
} }
void ScreenHandler::showSystemStatusScreen() { void ScreenHandler::showSystemStatusScreen() {
@ -178,7 +203,7 @@ void ScreenHandler::showSystemStatusScreen() {
String((int)round(ESP.getFreeHeap() / 1024)) + "/" + String((int)round(ESP.getFreeHeap() / 1024)) + "/" +
(int)round(ESP.getHeapSize() / 1024); (int)round(ESP.getHeapSize() / 1024);
setCurrentScreen(SCREEN_CUSTOM); setCurrentScreen(SCREEN_CUSTOM);
setEpdContent(sysStatusEpdContent); EPDManager::getInstance().setContent(sysStatusEpdContent);
} }
// Keep these as free functions // Keep these as free functions
@ -195,9 +220,9 @@ void workerTask(void *pvParameters) {
currentScreenValue != SCREEN_BITAXE_BESTDIFF) break; currentScreenValue != SCREEN_BITAXE_BESTDIFF) break;
taskEpdContent = (currentScreenValue == SCREEN_BITAXE_HASHRATE) ? taskEpdContent = (currentScreenValue == SCREEN_BITAXE_HASHRATE) ?
parseBitaxeHashRate(getBitAxeHashRate()) : parseBitaxeHashRate(BitAxeFetch::getInstance().getHashRate()) :
parseBitaxeBestDiff(getBitaxeBestDiff()); parseBitaxeBestDiff(BitAxeFetch::getInstance().getBestDiff());
setEpdContent(taskEpdContent); EPDManager::getInstance().setContent(taskEpdContent);
break; break;
} }
@ -206,10 +231,11 @@ void workerTask(void *pvParameters) {
currentScreenValue != SCREEN_MINING_POOL_STATS_EARNINGS) break; currentScreenValue != SCREEN_MINING_POOL_STATS_EARNINGS) break;
taskEpdContent = (currentScreenValue == SCREEN_MINING_POOL_STATS_HASHRATE) ? taskEpdContent = (currentScreenValue == SCREEN_MINING_POOL_STATS_HASHRATE) ?
parseMiningPoolStatsHashRate(getMiningPoolStatsHashRate(), *getMiningPool()) : parseMiningPoolStatsHashRate(MiningPoolStatsFetch::getInstance().getHashRate(), *MiningPoolStatsFetch::getInstance().getPool()) :
parseMiningPoolStatsDailyEarnings(getMiningPoolStatsDailyEarnings(), parseMiningPoolStatsDailyEarnings(MiningPoolStatsFetch::getInstance().getDailyEarnings(),
getMiningPool()->getDailyEarningsLabel(), *getMiningPool()); MiningPoolStatsFetch::getInstance().getPool()->getDailyEarningsLabel(),
setEpdContent(taskEpdContent); *MiningPoolStatsFetch::getInstance().getPool());
EPDManager::getInstance().setContent(taskEpdContent);
break; break;
} }
@ -225,31 +251,33 @@ void workerTask(void *pvParameters) {
} else if (currentScreenValue == SCREEN_SATS_PER_CURRENCY) { } else if (currentScreenValue == SCREEN_SATS_PER_CURRENCY) {
taskEpdContent = parseSatsPerCurrency(price, currency, preferences.getBool("useSatsSymbol", DEFAULT_USE_SATS_SYMBOL)); taskEpdContent = parseSatsPerCurrency(price, currency, preferences.getBool("useSatsSymbol", DEFAULT_USE_SATS_SYMBOL));
} else { } else {
taskEpdContent = auto& blockNotify = BlockNotify::getInstance();
parseMarketCap(getBlockHeight(), price, currency, taskEpdContent = parseMarketCap(blockNotify.getBlockHeight(), price, currency, preferences.getBool("mcapBigChar", DEFAULT_MCAP_BIG_CHAR));
preferences.getBool("mcapBigChar", DEFAULT_MCAP_BIG_CHAR));
} }
setEpdContent(taskEpdContent); EPDManager::getInstance().setContent(taskEpdContent);
break; break;
} }
case TASK_FEE_UPDATE: { case TASK_FEE_UPDATE: {
if (currentScreenValue == SCREEN_BLOCK_FEE_RATE) { if (currentScreenValue == SCREEN_BLOCK_FEE_RATE) {
taskEpdContent = parseBlockFees(static_cast<std::uint16_t>(getBlockMedianFee())); auto& blockNotify = BlockNotify::getInstance();
setEpdContent(taskEpdContent); taskEpdContent = parseBlockFees(static_cast<std::uint16_t>(blockNotify.getBlockMedianFee()));
EPDManager::getInstance().setContent(taskEpdContent);
} }
break; break;
} }
case TASK_BLOCK_UPDATE: { case TASK_BLOCK_UPDATE: {
if (currentScreenValue != SCREEN_HALVING_COUNTDOWN) { if (currentScreenValue != SCREEN_HALVING_COUNTDOWN) {
taskEpdContent = parseBlockHeight(getBlockHeight()); auto& blockNotify = BlockNotify::getInstance();
taskEpdContent = parseBlockHeight(blockNotify.getBlockHeight());
} else { } else {
taskEpdContent = parseHalvingCountdown(getBlockHeight(), preferences.getBool("useBlkCountdown", DEFAULT_USE_BLOCK_COUNTDOWN)); auto& blockNotify = BlockNotify::getInstance();
taskEpdContent = parseHalvingCountdown(blockNotify.getBlockHeight(), preferences.getBool("useBlkCountdown", DEFAULT_USE_BLOCK_COUNTDOWN));
} }
if (currentScreenValue == SCREEN_HALVING_COUNTDOWN || if (currentScreenValue == SCREEN_HALVING_COUNTDOWN ||
currentScreenValue == SCREEN_BLOCK_HEIGHT) { currentScreenValue == SCREEN_BLOCK_HEIGHT) {
setEpdContent(taskEpdContent); EPDManager::getInstance().setContent(taskEpdContent);
} }
break; break;
} }
@ -276,7 +304,7 @@ void workerTask(void *pvParameters) {
for (uint i = 1; i < NUM_SCREENS; i++) { for (uint i = 1; i < NUM_SCREENS; i++) {
taskEpdContent[i] = timeString[i]; taskEpdContent[i] = timeString[i];
} }
setEpdContent(taskEpdContent); EPDManager::getInstance().setContent(taskEpdContent);
} }
break; break;
@ -296,6 +324,7 @@ void taskScreenRotate(void *pvParameters) {
void setupTasks() { void setupTasks() {
workQueue = xQueueCreate(WORK_QUEUE_SIZE, sizeof(WorkItem)); workQueue = xQueueCreate(WORK_QUEUE_SIZE, sizeof(WorkItem));
loadStoredPrices();
xTaskCreate(workerTask, "workerTask", 4096, NULL, tskIDLE_PRIORITY, xTaskCreate(workerTask, "workerTask", 4096, NULL, tskIDLE_PRIORITY,
&workerTaskHandle); &workerTaskHandle);
@ -303,8 +332,6 @@ void setupTasks() {
xTaskCreate(taskScreenRotate, "rotateScreen", 4096, NULL, tskIDLE_PRIORITY, xTaskCreate(taskScreenRotate, "rotateScreen", 4096, NULL, tskIDLE_PRIORITY,
&taskScreenRotateTaskHandle); &taskScreenRotateTaskHandle);
waitUntilNoneBusy();
if (findScreenIndexByValue(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN)) != -1) if (findScreenIndexByValue(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN)) != -1)
ScreenHandler::setCurrentScreen(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN)); ScreenHandler::setCurrentScreen(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN));
} }

View file

@ -40,39 +40,39 @@
// "MrY=\n" // "MrY=\n"
// "-----END CERTIFICATE-----\n"; // "-----END CERTIFICATE-----\n";
const char* isrg_root_x1cert = R"EOF( // const char* isrg_root_x1cert = R"EOF(
-----BEGIN CERTIFICATE----- // -----BEGIN CERTIFICATE-----
MI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VmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq // oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA // 4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d // mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc= // emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE----- // -----END CERTIFICATE-----
)EOF"; // )EOF";
#ifdef TEST_SCREENS #ifdef TEST_SCREENS
@ -179,4 +179,5 @@ void HttpHelper::end(HTTPClient* http) {
http->end(); http->end();
delete http; delete http;
} }
} }

View file

@ -16,6 +16,8 @@
#include <mutex> #include <mutex>
#include <utils.hpp> #include <utils.hpp>
#include <array>
#include <string>
#include "defaults.hpp" #include "defaults.hpp"
@ -66,7 +68,7 @@ const int usPerSecond = 1000000;
const int usPerMinute = 60 * usPerSecond; const int usPerMinute = 60 * usPerSecond;
// extern const char *github_root_ca; // extern const char *github_root_ca;
extern const char *isrg_root_x1cert; // extern const char *isrg_root_x1cert;
extern const uint8_t rootca_crt_bundle_start[] asm("_binary_x509_crt_bundle_start"); extern const uint8_t rootca_crt_bundle_start[] asm("_binary_x509_crt_bundle_start");
// extern const uint8_t ocean_logo_comp[] asm("_binary_ocean_gz_start"); // extern const uint8_t ocean_logo_comp[] asm("_binary_ocean_gz_start");
@ -97,6 +99,16 @@ namespace ArduinoJson {
array.add(item); array.add(item);
} }
}; };
template <size_t N>
struct Converter<std::array<String, N>> {
static void toJson(const std::array<String, N>& src, JsonVariant dst) {
JsonArray array = dst.to<JsonArray>();
for (const String& item : src) {
array.add(item);
}
}
};
} }
class HttpHelper { class HttpHelper {
@ -108,4 +120,5 @@ private:
static WiFiClientSecure secureClient; static WiFiClientSecure secureClient;
static bool certBundleSet; static bool certBundleSet;
static WiFiClient insecureClient; static WiFiClient insecureClient;
}; };

View file

@ -1,4 +1,5 @@
#include "timers.hpp" #include "timers.hpp"
#include "led_handler.hpp"
esp_timer_handle_t screenRotateTimer; esp_timer_handle_t screenRotateTimer;
esp_timer_handle_t minuteTimer; esp_timer_handle_t minuteTimer;
@ -49,11 +50,11 @@ void setTimerActive(bool status) {
if (status) { if (status) {
esp_timer_start_periodic(screenRotateTimer, esp_timer_start_periodic(screenRotateTimer,
getTimerSeconds() * usPerSecond); getTimerSeconds() * usPerSecond);
queueLedEffect(LED_EFFECT_START_TIMER); getLedHandler().queueEffect(LED_EFFECT_START_TIMER);
preferences.putBool("timerActive", true); preferences.putBool("timerActive", true);
} else { } else {
esp_timer_stop(screenRotateTimer); esp_timer_stop(screenRotateTimer);
queueLedEffect(LED_EFFECT_PAUSE_TIMER); getLedHandler().queueEffect(LED_EFFECT_PAUSE_TIMER);
preferences.putBool("timerActive", false); preferences.putBool("timerActive", false);
} }
@ -68,12 +69,14 @@ void IRAM_ATTR minuteTimerISR(void *arg) {
WorkItem timeUpdate = {TASK_TIME_UPDATE, 0}; WorkItem timeUpdate = {TASK_TIME_UPDATE, 0};
xQueueSendFromISR(workQueue, &timeUpdate, &xHigherPriorityTaskWoken); xQueueSendFromISR(workQueue, &timeUpdate, &xHigherPriorityTaskWoken);
if (bitaxeFetchTaskHandle != NULL) { TaskHandle_t bitaxeHandle = BitAxeFetch::getInstance().getTaskHandle();
vTaskNotifyGiveFromISR(bitaxeFetchTaskHandle, &xHigherPriorityTaskWoken); if (bitaxeHandle != NULL) {
vTaskNotifyGiveFromISR(bitaxeHandle, &xHigherPriorityTaskWoken);
} }
if (miningPoolStatsFetchTaskHandle != NULL) { TaskHandle_t miningPoolHandle = MiningPoolStatsFetch::getInstance().getTaskHandle();
vTaskNotifyGiveFromISR(miningPoolStatsFetchTaskHandle, &xHigherPriorityTaskWoken); if (miningPoolHandle != NULL) {
vTaskNotifyGiveFromISR(miningPoolHandle, &xHigherPriorityTaskWoken);
} }
if (xHigherPriorityTaskWoken == pdTRUE) { if (xHigherPriorityTaskWoken == pdTRUE) {

View file

@ -106,6 +106,11 @@ namespace V2Notify
JsonDocument doc; JsonDocument doc;
DeserializationError error = deserializeMsgPack(doc, payload, length); DeserializationError error = deserializeMsgPack(doc, payload, length);
if (error) {
Serial.println(F("Error deserializing message"));
break;
}
V2Notify::handleV2Message(doc); V2Notify::handleV2Message(doc);
break; break;
} }
@ -122,24 +127,33 @@ namespace V2Notify
void handleV2Message(JsonDocument doc) void handleV2Message(JsonDocument doc)
{ {
if (doc.containsKey("blockheight")) if (doc["blockheight"].is<uint>())
{ {
uint newBlockHeight = doc["blockheight"].as<uint>(); uint newBlockHeight = doc["blockheight"].as<uint>();
if (newBlockHeight == getBlockHeight()) if (newBlockHeight == BlockNotify::getInstance().getBlockHeight())
{ {
return; return;
} }
processNewBlock(newBlockHeight); if (debugLogEnabled()) {
Serial.print(F("processNewBlock "));
Serial.println(newBlockHeight);
}
BlockNotify::getInstance().processNewBlock(newBlockHeight);
} }
else if (doc.containsKey("blockfee")) else if (doc["blockfee"].is<uint>())
{ {
uint medianFee = doc["blockfee"].as<uint>(); uint medianFee = doc["blockfee"].as<uint>();
processNewBlockFee(medianFee); if (debugLogEnabled()) {
Serial.print(F("processNewBlockFee "));
Serial.println(medianFee);
}
BlockNotify::getInstance().processNewBlockFee(medianFee);
} }
else if (doc.containsKey("price")) else if (doc["price"].is<JsonObject>())
{ {
// Iterate through the key-value pairs of the "price" object // Iterate through the key-value pairs of the "price" object
@ -158,7 +172,7 @@ namespace V2Notify
for (;;) for (;;)
{ {
webSocket.loop(); webSocket.loop();
vTaskDelay(10 / portTICK_PERIOD_MS); vTaskDelay(pdMS_TO_TICKS(10));
} }
} }

View file

@ -1,9 +1,11 @@
#include "webserver.hpp" #include "webserver.hpp"
#include "lib/led_handler.hpp"
#include "lib/shared.hpp"
static const char* JSON_CONTENT = "application/json"; static const char* JSON_CONTENT = "application/json";
static const char *const PROGMEM strSettings[] = { static const char *const PROGMEM strSettings[] = {
"hostnamePrefix", "mempoolInstance", "nostrPubKey", "nostrRelay", "bitaxeHostname", "miningPoolName", "miningPoolUser", "nostrZapPubkey", "httpAuthUser", "httpAuthPass", "gitReleaseUrl", "poolLogosUrl", "ceEndpoint"}; "hostnamePrefix", "mempoolInstance", "nostrPubKey", "nostrRelay", "bitaxeHostname", "miningPoolName", "miningPoolUser", "nostrZapPubkey", "httpAuthUser", "httpAuthPass", "gitReleaseUrl", "poolLogosUrl", "ceEndpoint", "fontName", "localPoolEndpoint"};
static const char *const PROGMEM uintSettings[] = {"minSecPriceUpd", "fullRefreshMin", "ledBrightness", "flMaxBrightness", "flEffectDelay", "luxLightToggle", "wpTimeout"}; static const char *const PROGMEM uintSettings[] = {"minSecPriceUpd", "fullRefreshMin", "ledBrightness", "flMaxBrightness", "flEffectDelay", "luxLightToggle", "wpTimeout"};
@ -16,7 +18,7 @@ static const char *const PROGMEM boolSettings[] = {"ledTestOnPower", "ledFlashOn
"mempoolSecure", "bitaxeEnabled", "mempoolSecure", "bitaxeEnabled",
"miningPoolStats", "verticalDesc", "miningPoolStats", "verticalDesc",
"nostrZapNotify", "httpAuthEnabled", "nostrZapNotify", "httpAuthEnabled",
"enableDebugLog", "ceDisableSSL"}; "enableDebugLog", "ceDisableSSL", "dndEnabled", "dndTimeBasedEnabled"};
AsyncWebServer server(80); AsyncWebServer server(80);
AsyncEventSource events("/events"); AsyncEventSource events("/events");
@ -28,7 +30,8 @@ TaskHandle_t eventSourceTaskHandle;
void setupWebserver() void setupWebserver()
{ {
events.onConnect([](AsyncEventSourceClient *client) events.onConnect([](AsyncEventSourceClient *client)
{ client->send("welcome", NULL, millis(), 1000); }); { client->send("welcome", NULL, millis(), 1000);
});
server.addHandler(&events); server.addHandler(&events);
AsyncStaticWebHandler &staticHandler = server.serveStatic("/", LittleFS, "/").setDefaultFile("index.html"); AsyncStaticWebHandler &staticHandler = server.serveStatic("/", LittleFS, "/").setDefaultFile("index.html");
@ -116,6 +119,10 @@ void setupWebserver()
server.addRewrite(new OneParamRewrite("/api/show/number/{number}", server.addRewrite(new OneParamRewrite("/api/show/number/{number}",
"/api/show/text?t={text}")); "/api/show/text?t={text}"));
server.on("/api/dnd/status", HTTP_GET, onApiDNDStatus);
server.on("/api/dnd/enable", HTTP_POST, onApiDNDEnable);
server.on("/api/dnd/disable", HTTP_POST, onApiDNDDisable);
server.onNotFound(onNotFound); server.onNotFound(onNotFound);
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*"); DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
@ -227,6 +234,7 @@ void asyncFirmwareUpdateHandler(AsyncWebServerRequest *request, String filename,
JsonDocument getStatusObject() JsonDocument getStatusObject()
{ {
auto& ledHandler = getLedHandler();
JsonDocument root; JsonDocument root;
root["currentScreen"] = ScreenHandler::getCurrentScreen(); root["currentScreen"] = ScreenHandler::getCurrentScreen();
@ -234,25 +242,22 @@ JsonDocument getStatusObject()
root["timerRunning"] = isTimerActive(); root["timerRunning"] = isTimerActive();
root["isOTAUpdating"] = getIsOTAUpdating(); root["isOTAUpdating"] = getIsOTAUpdating();
root["espUptime"] = esp_timer_get_time() / 1000000; root["espUptime"] = esp_timer_get_time() / 1000000;
// root["currentPrice"] = getPrice();
// root["currentBlockHeight"] = getBlockHeight();
root["espFreeHeap"] = ESP.getFreeHeap(); root["espFreeHeap"] = ESP.getFreeHeap();
root["espHeapSize"] = ESP.getHeapSize(); root["espHeapSize"] = ESP.getHeapSize();
// root["espFreePsram"] = ESP.getFreePsram();
// root["espPsramSize"] = ESP.getPsramSize();
JsonObject conStatus = root["connectionStatus"].to<JsonObject>(); JsonObject conStatus = root["connectionStatus"].to<JsonObject>();
conStatus["price"] = isPriceNotifyConnected(); conStatus["price"] = isPriceNotifyConnected();
conStatus["blocks"] = isBlockNotifyConnected(); auto& blockNotify = BlockNotify::getInstance();
conStatus["blocks"] = blockNotify.isConnected();
conStatus["V2"] = V2Notify::isV2NotifyConnected(); conStatus["V2"] = V2Notify::isV2NotifyConnected();
conStatus["nostr"] = nostrConnected(); conStatus["nostr"] = nostrConnected();
root["rssi"] = WiFi.RSSI(); root["rssi"] = WiFi.RSSI();
root["currency"] = getCurrencyCode(ScreenHandler::getCurrentCurrency()); root["currency"] = getCurrencyCode(ScreenHandler::getCurrentCurrency());
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
std::vector<uint16_t> statuses = frontlightGetStatus(); std::vector<uint16_t> statuses = ledHandler.frontlightGetStatus();
uint16_t arr[NUM_SCREENS]; uint16_t arr[NUM_SCREENS];
std::copy(statuses.begin(), statuses.end(), arr); std::copy(statuses.begin(), statuses.end(), arr);
@ -265,14 +270,25 @@ JsonDocument getStatusObject()
} }
#endif #endif
// Add DND status
root["dnd"]["enabled"] = ledHandler.isDNDEnabled();
root["dnd"]["timeBasedEnabled"] = ledHandler.isDNDTimeBasedEnabled();
root["dnd"]["startTime"] = String(ledHandler.getDNDStartHour()) + ":" +
(ledHandler.getDNDStartMinute() < 10 ? "0" : "") + String(ledHandler.getDNDStartMinute());
root["dnd"]["endTime"] = String(ledHandler.getDNDEndHour()) + ":" +
(ledHandler.getDNDEndMinute() < 10 ? "0" : "") + String(ledHandler.getDNDEndMinute());
root["dnd"]["active"] = ledHandler.isDNDActive();
return root; return root;
} }
JsonDocument getLedStatusObject() JsonDocument getLedStatusObject()
{ {
auto& ledHandler = getLedHandler();
auto& pixels = ledHandler.getPixels();
JsonDocument root; JsonDocument root;
JsonArray colors = root["data"].to<JsonArray>(); JsonArray colors = root["data"].to<JsonArray>();
// Adafruit_NeoPixel pix = getPixels();
for (uint i = 0; i < pixels.numPixels(); i++) for (uint i = 0; i < pixels.numPixels(); i++)
{ {
@ -282,13 +298,7 @@ JsonDocument getLedStatusObject()
uint blue = pixColor & 0xFF; uint blue = pixColor & 0xFF;
char hexColor[8]; char hexColor[8];
snprintf(hexColor, sizeof(hexColor), "#%02X%02X%02X", red, green, blue); snprintf(hexColor, sizeof(hexColor), "#%02X%02X%02X", red, green, blue);
colors.add(hexColor);
JsonObject object = colors.add<JsonObject>();
object["red"] = red;
object["green"] = green;
object["blue"] = blue;
object["hex"] = hexColor;
} }
return root; return root;
@ -297,14 +307,18 @@ JsonDocument getLedStatusObject()
void eventSourceUpdate() { void eventSourceUpdate() {
if (!events.count()) return; if (!events.count()) return;
JsonDocument doc = getStatusObject(); static JsonDocument doc;
doc["leds"] = getLedStatusObject()["data"]; doc.clear();
JsonDocument root = getStatusObject();
root["leds"] = getLedStatusObject()["data"];
// Get current EPD content directly as array // Get current EPD content directly as array
std::array<String, NUM_SCREENS> epdContent = getCurrentEpdContent(); std::array<String, NUM_SCREENS> epdContent = EPDManager::getInstance().getCurrentContent();
// Add EPD content arrays // Add EPD content arrays
JsonArray data = doc["data"].to<JsonArray>(); JsonArray data = root["data"].to<JsonArray>();
// Copy array elements directly // Copy array elements directly
for(const auto& content : epdContent) { for(const auto& content : epdContent) {
@ -312,7 +326,7 @@ void eventSourceUpdate() {
} }
String buffer; String buffer;
serializeJson(doc, buffer); serializeJson(root, buffer);
events.send(buffer.c_str(), "status"); events.send(buffer.c_str(), "status");
} }
@ -328,7 +342,7 @@ void onApiStatus(AsyncWebServerRequest *request)
JsonDocument root = getStatusObject(); JsonDocument root = getStatusObject();
// Get current EPD content directly as array // Get current EPD content directly as array
std::array<String, NUM_SCREENS> epdContent = getCurrentEpdContent(); std::array<String, NUM_SCREENS> epdContent = EPDManager::getInstance().getCurrentContent();
// Add EPD content arrays // Add EPD content arrays
JsonArray data = root["data"].to<JsonArray>(); JsonArray data = root["data"].to<JsonArray>();
@ -370,11 +384,9 @@ void onApiActionTimerRestart(AsyncWebServerRequest *request)
*/ */
void onApiFullRefresh(AsyncWebServerRequest *request) void onApiFullRefresh(AsyncWebServerRequest *request)
{ {
forceFullRefresh(); EPDManager::getInstance().forceFullRefresh();
std::array<String, NUM_SCREENS> newEpdContent = getCurrentEpdContent(); std::array<String, NUM_SCREENS> newEpdContent = EPDManager::getInstance().getCurrentContent();
EPDManager::getInstance().setContent(newEpdContent, true);
setEpdContent(newEpdContent, true);
request->send(HTTP_OK); request->send(HTTP_OK);
} }
@ -421,7 +433,7 @@ void onApiShowText(AsyncWebServerRequest *request)
textEpdContent[i] = t[i]; textEpdContent[i] = t[i];
} }
setEpdContent(textEpdContent); EPDManager::getInstance().setContent(textEpdContent);
} }
ScreenHandler::setCurrentScreen(SCREEN_CUSTOM); ScreenHandler::setCurrentScreen(SCREEN_CUSTOM);
request->send(HTTP_OK); request->send(HTTP_OK);
@ -439,7 +451,7 @@ void onApiShowTextAdvanced(AsyncWebServerRequest *request, JsonVariant &json)
i++; i++;
} }
setEpdContent(epdContent); EPDManager::getInstance().setContent(epdContent);
ScreenHandler::setCurrentScreen(SCREEN_CUSTOM); ScreenHandler::setCurrentScreen(SCREEN_CUSTOM);
request->send(HTTP_OK); request->send(HTTP_OK);
@ -467,13 +479,13 @@ void onApiSettingsPatch(AsyncWebServerRequest *request, JsonVariant &json)
if (inverted) { if (inverted) {
preferences.putUInt("fgColor", GxEPD_WHITE); preferences.putUInt("fgColor", GxEPD_WHITE);
preferences.putUInt("bgColor", GxEPD_BLACK); preferences.putUInt("bgColor", GxEPD_BLACK);
setFgColor(GxEPD_WHITE); EPDManager::getInstance().setForegroundColor(GxEPD_WHITE);
setBgColor(GxEPD_BLACK); EPDManager::getInstance().setBackgroundColor(GxEPD_BLACK);
} else { } else {
preferences.putUInt("fgColor", GxEPD_BLACK); preferences.putUInt("fgColor", GxEPD_BLACK);
preferences.putUInt("bgColor", GxEPD_WHITE); preferences.putUInt("bgColor", GxEPD_WHITE);
setFgColor(GxEPD_BLACK); EPDManager::getInstance().setForegroundColor(GxEPD_BLACK);
setBgColor(GxEPD_WHITE); EPDManager::getInstance().setBackgroundColor(GxEPD_WHITE);
} }
Serial.printf("Setting invertedColor to %d\r\n", inverted); Serial.printf("Setting invertedColor to %d\r\n", inverted);
settingsChanged = true; settingsChanged = true;
@ -605,10 +617,29 @@ void onApiSettingsPatch(AsyncWebServerRequest *request, JsonVariant &json)
settingsChanged = true; settingsChanged = true;
} }
// Handle DND settings
if (settings["dnd"].is<JsonObject>()) {
JsonObject dndObj = settings["dnd"];
auto& ledHandler = getLedHandler();
if (dndObj["timeBasedEnabled"].is<bool>()) {
ledHandler.setDNDTimeBasedEnabled(dndObj["timeBasedEnabled"].as<bool>());
}
if (dndObj["startHour"].is<uint8_t>() && dndObj["startMinute"].is<uint8_t>() &&
dndObj["endHour"].is<uint8_t>() && dndObj["endMinute"].is<uint8_t>()) {
ledHandler.setDNDTimeRange(
dndObj["startHour"].as<uint8_t>(),
dndObj["startMinute"].as<uint8_t>(),
dndObj["endHour"].as<uint8_t>(),
dndObj["endMinute"].as<uint8_t>());
}
}
request->send(HTTP_OK); request->send(HTTP_OK);
if (settingsChanged) if (settingsChanged)
{ {
queueLedEffect(LED_FLASH_SUCCESS); auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_FLASH_SUCCESS);
} }
} }
@ -629,7 +660,8 @@ void onApiRestart(AsyncWebServerRequest *request)
void onApiIdentify(AsyncWebServerRequest *request) void onApiIdentify(AsyncWebServerRequest *request)
{ {
queueLedEffect(LED_FLASH_IDENTIFY); auto& ledHandler = getLedHandler();
ledHandler.queueEffect(LED_FLASH_IDENTIFY);
request->send(HTTP_OK); request->send(HTTP_OK);
} }
@ -652,7 +684,7 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
JsonDocument root; JsonDocument root;
root["numScreens"] = NUM_SCREENS; root["numScreens"] = NUM_SCREENS;
root["invertedColor"] = preferences.getBool("invertedColor", getFgColor() == GxEPD_WHITE); root["invertedColor"] = preferences.getBool("invertedColor", EPDManager::getInstance().getForegroundColor() == GxEPD_WHITE);
root["timerSeconds"] = getTimerSeconds(); root["timerSeconds"] = getTimerSeconds();
root["timerRunning"] = isTimerActive(); root["timerRunning"] = isTimerActive();
root["minSecPriceUpd"] = preferences.getUInt( root["minSecPriceUpd"] = preferences.getUInt(
@ -669,13 +701,17 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
root["mempoolInstance"] = preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE); root["mempoolInstance"] = preferences.getString("mempoolInstance", DEFAULT_MEMPOOL_INSTANCE);
root["mempoolSecure"] = preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE); root["mempoolSecure"] = preferences.getBool("mempoolSecure", DEFAULT_MEMPOOL_SECURE);
// Local pool settings
root["localPoolEndpoint"] = preferences.getString("localPoolEndpoint", DEFAULT_LOCAL_POOL_ENDPOINT);
// Nostr settings (used for NOSTR_SOURCE or when zapNotify is enabled) // Nostr settings (used for NOSTR_SOURCE or when zapNotify is enabled)
root["nostrPubKey"] = preferences.getString("nostrPubKey", DEFAULT_NOSTR_NPUB); root["nostrPubKey"] = preferences.getString("nostrPubKey", DEFAULT_NOSTR_NPUB);
root["nostrRelay"] = preferences.getString("nostrRelay", DEFAULT_NOSTR_RELAY); root["nostrRelay"] = preferences.getString("nostrRelay", DEFAULT_NOSTR_RELAY);
root["nostrZapNotify"] = preferences.getBool("nostrZapNotify", DEFAULT_ZAP_NOTIFY_ENABLED); root["nostrZapNotify"] = preferences.getBool("nostrZapNotify", DEFAULT_ZAP_NOTIFY_ENABLED);
root["nostrZapPubkey"] = preferences.getString("nostrZapPubkey", DEFAULT_ZAP_NOTIFY_PUBKEY); root["nostrZapPubkey"] = preferences.getString("nostrZapPubkey", DEFAULT_ZAP_NOTIFY_PUBKEY);
root["ledFlashOnZap"] = preferences.getBool("ledFlashOnZap", DEFAULT_LED_FLASH_ON_ZAP); root["ledFlashOnZap"] = preferences.getBool("ledFlashOnZap", DEFAULT_LED_FLASH_ON_ZAP);
root["fontName"] = preferences.getString("fontName", DEFAULT_FONT_NAME);
root["availableFonts"] = FontNames::getAvailableFonts();
// Custom endpoint settings (only used for CUSTOM_SOURCE) // Custom endpoint settings (only used for CUSTOM_SOURCE)
root["customEndpoint"] = preferences.getString("customEndpoint", DEFAULT_CUSTOM_ENDPOINT); root["customEndpoint"] = preferences.getString("customEndpoint", DEFAULT_CUSTOM_ENDPOINT);
root["customEndpointDisableSSL"] = preferences.getBool("customEndpointDisableSSL", DEFAULT_CUSTOM_ENDPOINT_DISABLE_SSL); root["customEndpointDisableSSL"] = preferences.getBool("customEndpointDisableSSL", DEFAULT_CUSTOM_ENDPOINT_DISABLE_SSL);
@ -765,6 +801,15 @@ void onApiSettingsGet(AsyncWebServerRequest *request)
root["ceEndpoint"] = preferences.getString("ceEndpoint", DEFAULT_CUSTOM_ENDPOINT); root["ceEndpoint"] = preferences.getString("ceEndpoint", DEFAULT_CUSTOM_ENDPOINT);
root["ceDisableSSL"] = preferences.getBool("ceDisableSSL", DEFAULT_CUSTOM_ENDPOINT_DISABLE_SSL); root["ceDisableSSL"] = preferences.getBool("ceDisableSSL", DEFAULT_CUSTOM_ENDPOINT_DISABLE_SSL);
// Add DND settings
auto& ledHandler = getLedHandler();
root["dnd"]["enabled"] = ledHandler.isDNDEnabled();
root["dnd"]["timeBasedEnabled"] = ledHandler.isDNDTimeBasedEnabled();
root["dnd"]["startHour"] = ledHandler.getDNDStartHour();
root["dnd"]["startMinute"] = ledHandler.getDNDStartMinute();
root["dnd"]["endHour"] = ledHandler.getDNDEndHour();
root["dnd"]["endMinute"] = ledHandler.getDNDEndMinute();
AsyncResponseStream *response = AsyncResponseStream *response =
request->beginResponseStream(JSON_CONTENT); request->beginResponseStream(JSON_CONTENT);
serializeJson(root, *response); serializeJson(root, *response);
@ -780,7 +825,7 @@ bool processEpdColorSettings(AsyncWebServerRequest *request)
const AsyncWebParameter *fgColor = request->getParam("fgColor", true); const AsyncWebParameter *fgColor = request->getParam("fgColor", true);
uint32_t color = strtol(fgColor->value().c_str(), NULL, 16); uint32_t color = strtol(fgColor->value().c_str(), NULL, 16);
preferences.putUInt("fgColor", color); preferences.putUInt("fgColor", color);
setFgColor(color); EPDManager::getInstance().setForegroundColor(color);
// Serial.print(F("Setting foreground color to ")); // Serial.print(F("Setting foreground color to "));
// Serial.println(fgColor->value().c_str()); // Serial.println(fgColor->value().c_str());
settingsChanged = true; settingsChanged = true;
@ -791,7 +836,7 @@ bool processEpdColorSettings(AsyncWebServerRequest *request)
uint32_t color = strtol(bgColor->value().c_str(), NULL, 16); uint32_t color = strtol(bgColor->value().c_str(), NULL, 16);
preferences.putUInt("bgColor", color); preferences.putUInt("bgColor", color);
setBgColor(color); EPDManager::getInstance().setBackgroundColor(color);
// Serial.print(F("Setting background color to ")); // Serial.print(F("Setting background color to "));
// Serial.println(bgColor->value().c_str()); // Serial.println(bgColor->value().c_str());
settingsChanged = true; settingsChanged = true;
@ -870,7 +915,7 @@ void onApiStopDataSources(AsyncWebServerRequest *request)
request->beginResponseStream(JSON_CONTENT); request->beginResponseStream(JSON_CONTENT);
stopPriceNotify(); stopPriceNotify();
stopBlockNotify(); BlockNotify::getInstance().stop();
request->send(response); request->send(response);
} }
@ -881,16 +926,15 @@ void onApiRestartDataSources(AsyncWebServerRequest *request)
request->beginResponseStream(JSON_CONTENT); request->beginResponseStream(JSON_CONTENT);
restartPriceNotify(); restartPriceNotify();
restartBlockNotify(); BlockNotify::getInstance().restart();
// setupPriceNotify();
// setupBlockNotify();
request->send(response); request->send(response);
} }
void onApiLightsOff(AsyncWebServerRequest *request) void onApiLightsOff(AsyncWebServerRequest *request)
{ {
setLights(0, 0, 0); auto& ledHandler = getLedHandler();
ledHandler.setLights(0, 0, 0);
request->send(HTTP_OK); request->send(HTTP_OK);
} }
@ -905,13 +949,15 @@ void onApiLightsSetColor(AsyncWebServerRequest *request)
if (rgbColor.compareTo("off") == 0) if (rgbColor.compareTo("off") == 0)
{ {
setLights(0, 0, 0); auto& ledHandler = getLedHandler();
ledHandler.setLights(0, 0, 0);
} }
else else
{ {
uint r, g, b; uint r, g, b;
sscanf(rgbColor.c_str(), "%02x%02x%02x", &r, &g, &b); sscanf(rgbColor.c_str(), "%02x%02x%02x", &r, &g, &b);
setLights(r, g, b); auto& ledHandler = getLedHandler();
ledHandler.setLights(r, g, b);
} }
JsonDocument doc; JsonDocument doc;
@ -929,6 +975,9 @@ void onApiLightsSetColor(AsyncWebServerRequest *request)
void onApiLightsSetJson(AsyncWebServerRequest *request, JsonVariant &json) void onApiLightsSetJson(AsyncWebServerRequest *request, JsonVariant &json)
{ {
auto& ledHandler = getLedHandler();
auto& pixels = ledHandler.getPixels();
JsonArray lights = json.as<JsonArray>(); JsonArray lights = json.as<JsonArray>();
if (lights.size() != pixels.numPixels()) if (lights.size() != pixels.numPixels())
@ -977,7 +1026,7 @@ void onApiLightsSetJson(AsyncWebServerRequest *request, JsonVariant &json)
} }
pixels.show(); pixels.show();
saveLedState(); ledHandler.saveLedState();
request->send(HTTP_OK); request->send(HTTP_OK);
} }
@ -1041,19 +1090,21 @@ void onApiShowCurrency(AsyncWebServerRequest *request)
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
void onApiFrontlightOn(AsyncWebServerRequest *request) void onApiFrontlightOn(AsyncWebServerRequest *request)
{ {
frontlightFadeInAll(); auto& ledHandler = getLedHandler();
ledHandler.frontlightFadeInAll();
request->send(HTTP_OK); request->send(HTTP_OK);
} }
void onApiFrontlightStatus(AsyncWebServerRequest *request) void onApiFrontlightStatus(AsyncWebServerRequest *request)
{ {
auto& ledHandler = getLedHandler();
AsyncResponseStream *response = AsyncResponseStream *response =
request->beginResponseStream(JSON_CONTENT); request->beginResponseStream(JSON_CONTENT);
JsonDocument root; JsonDocument root;
std::vector<uint16_t> statuses = frontlightGetStatus(); std::vector<uint16_t> statuses = ledHandler.frontlightGetStatus();
uint16_t arr[NUM_SCREENS]; uint16_t arr[NUM_SCREENS];
std::copy(statuses.begin(), statuses.end(), arr); std::copy(statuses.begin(), statuses.end(), arr);
@ -1066,7 +1117,8 @@ void onApiFrontlightStatus(AsyncWebServerRequest *request)
void onApiFrontlightFlash(AsyncWebServerRequest *request) void onApiFrontlightFlash(AsyncWebServerRequest *request)
{ {
frontlightFlash(preferences.getUInt("flEffectDelay")); auto& ledHandler = getLedHandler();
ledHandler.frontlightFlash(preferences.getUInt("flEffectDelay"));
request->send(HTTP_OK); request->send(HTTP_OK);
} }
@ -1075,7 +1127,8 @@ void onApiFrontlightSetBrightness(AsyncWebServerRequest *request)
{ {
if (request->hasParam("b")) if (request->hasParam("b"))
{ {
frontlightSetBrightness(request->getParam("b")->value().toInt()); auto& ledHandler = getLedHandler();
ledHandler.frontlightSetBrightness(request->getParam("b")->value().toInt());
request->send(HTTP_OK); request->send(HTTP_OK);
} }
else else
@ -1086,8 +1139,123 @@ void onApiFrontlightSetBrightness(AsyncWebServerRequest *request)
void onApiFrontlightOff(AsyncWebServerRequest *request) void onApiFrontlightOff(AsyncWebServerRequest *request)
{ {
frontlightFadeOutAll(); auto& ledHandler = getLedHandler();
ledHandler.frontlightFadeOutAll();
request->send(HTTP_OK); request->send(HTTP_OK);
} }
#endif #endif
void onApiDNDTimeBasedEnable(AsyncWebServerRequest *request) {
auto& ledHandler = getLedHandler();
ledHandler.setDNDTimeBasedEnabled(true);
request->send(200);
}
void onApiDNDTimeBasedDisable(AsyncWebServerRequest *request) {
auto& ledHandler = getLedHandler();
ledHandler.setDNDTimeBasedEnabled(false);
request->send(200);
}
void onApiDNDSetTimeRange(AsyncWebServerRequest *request) {
if (request->hasParam("startHour") && request->hasParam("startMinute") &&
request->hasParam("endHour") && request->hasParam("endMinute")) {
auto& ledHandler = getLedHandler();
uint8_t startHour = request->getParam("startHour")->value().toInt();
uint8_t startMinute = request->getParam("startMinute")->value().toInt();
uint8_t endHour = request->getParam("endHour")->value().toInt();
uint8_t endMinute = request->getParam("endMinute")->value().toInt();
ledHandler.setDNDTimeRange(startHour, startMinute, endHour, endMinute);
request->send(200);
} else {
request->send(400);
}
}
void onApiDNDStatus(AsyncWebServerRequest *request) {
auto& ledHandler = getLedHandler();
JsonDocument doc;
doc["enabled"] = ledHandler.isDNDEnabled();
doc["timeBasedEnabled"] = ledHandler.isDNDTimeBasedEnabled();
doc["startTime"] = String(ledHandler.getDNDStartHour()) + ":" +
(ledHandler.getDNDStartMinute() < 10 ? "0" : "") + String(ledHandler.getDNDStartMinute());
doc["endTime"] = String(ledHandler.getDNDEndHour()) + ":" +
(ledHandler.getDNDEndMinute() < 10 ? "0" : "") + String(ledHandler.getDNDEndMinute());
doc["active"] = ledHandler.isDNDActive();
String response;
serializeJson(doc, response);
request->send(200, "application/json", response);
}
void onApiDNDEnable(AsyncWebServerRequest *request) {
auto& ledHandler = getLedHandler();
ledHandler.setDNDEnabled(true);
request->send(200);
}
void onApiDNDDisable(AsyncWebServerRequest *request) {
auto& ledHandler = getLedHandler();
ledHandler.setDNDEnabled(false);
request->send(200);
}
void onApiLightsGet(AsyncWebServerRequest *request)
{
auto& ledHandler = getLedHandler();
auto& pixels = ledHandler.getPixels();
JsonDocument doc;
JsonArray lights = doc.createNestedArray("lights");
for (uint i = 0; i < pixels.numPixels(); i++)
{
uint32_t pixColor = pixels.getPixelColor(pixels.numPixels() - i - 1);
JsonObject light = lights.createNestedObject();
light["r"] = (uint8_t)(pixColor >> 16);
light["g"] = (uint8_t)(pixColor >> 8);
light["b"] = (uint8_t)pixColor;
}
String output;
serializeJson(doc, output);
request->send(200, "application/json", output);
}
void onApiLightsPost(AsyncWebServerRequest *request, uint8_t *data, size_t len,
size_t index, size_t total)
{
auto& ledHandler = getLedHandler();
auto& pixels = ledHandler.getPixels();
JsonDocument doc;
DeserializationError error = deserializeJson(doc, data);
if (error)
{
request->send(400);
return;
}
JsonArray lights = doc["lights"];
if (lights.size() != pixels.numPixels())
{
request->send(400);
return;
}
for (uint i = 0; i < pixels.numPixels(); i++)
{
JsonObject light = lights[i];
uint8_t red = light["r"];
uint8_t green = light["g"];
uint8_t blue = light["b"];
pixels.setPixelColor((pixels.numPixels() - i - 1),
pixels.Color(red, green, blue));
}
pixels.show();
request->send(200);
}

View file

@ -67,6 +67,10 @@ void eventSourceTask(void *pvParameters);
void onApiStopDataSources(AsyncWebServerRequest *request); void onApiStopDataSources(AsyncWebServerRequest *request);
void onApiRestartDataSources(AsyncWebServerRequest *request); void onApiRestartDataSources(AsyncWebServerRequest *request);
void onApiDNDStatus(AsyncWebServerRequest *request);
void onApiDNDEnable(AsyncWebServerRequest *request);
void onApiDNDDisable(AsyncWebServerRequest *request);
#ifdef HAS_FRONTLIGHT #ifdef HAS_FRONTLIGHT
void onApiFrontlightOn(AsyncWebServerRequest *request); void onApiFrontlightOn(AsyncWebServerRequest *request);
void onApiFrontlightFlash(AsyncWebServerRequest *request); void onApiFrontlightFlash(AsyncWebServerRequest *request);

View file

@ -18,6 +18,8 @@
#define WEBSERVER_H #define WEBSERVER_H
#include "ESPAsyncWebServer.h" #include "ESPAsyncWebServer.h"
#include "lib/config.hpp" #include "lib/config.hpp"
#include "lib/led_handler.hpp"
#include "lib/block_notify.hpp"
uint wifiLostConnection; uint wifiLostConnection;
uint priceNotifyLostConnection = 0; uint priceNotifyLostConnection = 0;
@ -48,7 +50,8 @@ void handleBlockNotifyDisconnection() {
if ((getUptime() - blockNotifyLostConnection) > 300) { // 5 minutes timeout if ((getUptime() - blockNotifyLostConnection) > 300) { // 5 minutes timeout
Serial.println(F("Block notification connection lost for 5 minutes, restarting handler...")); Serial.println(F("Block notification connection lost for 5 minutes, restarting handler..."));
restartBlockNotify(); auto& blockNotify = BlockNotify::getInstance();
blockNotify.restart();
blockNotifyLostConnection = 0; blockNotifyLostConnection = 0;
} }
} }
@ -58,13 +61,14 @@ void handleFrontlight() {
if (hasLightLevel() && preferences.getUInt("luxLightToggle", DEFAULT_LUX_LIGHT_TOGGLE) != 0) { if (hasLightLevel() && preferences.getUInt("luxLightToggle", DEFAULT_LUX_LIGHT_TOGGLE) != 0) {
uint lightLevel = getLightLevel(); uint lightLevel = getLightLevel();
uint luxThreshold = preferences.getUInt("luxLightToggle", DEFAULT_LUX_LIGHT_TOGGLE); uint luxThreshold = preferences.getUInt("luxLightToggle", DEFAULT_LUX_LIGHT_TOGGLE);
auto& ledHandler = getLedHandler();
if (lightLevel <= 1 && preferences.getBool("flOffWhenDark", DEFAULT_FL_OFF_WHEN_DARK)) { if (lightLevel <= 1 && preferences.getBool("flOffWhenDark", DEFAULT_FL_OFF_WHEN_DARK)) {
if (frontlightIsOn()) frontlightFadeOutAll(); if (ledHandler.frontlightIsOn()) ledHandler.frontlightFadeOutAll();
} else if (lightLevel < luxThreshold && !frontlightIsOn()) { } else if (lightLevel < luxThreshold && !ledHandler.frontlightIsOn()) {
frontlightFadeInAll(); ledHandler.frontlightFadeInAll();
} else if (frontlightIsOn() && lightLevel > luxThreshold) { } else if (ledHandler.frontlightIsOn() && lightLevel > luxThreshold) {
frontlightFadeOutAll(); ledHandler.frontlightFadeOutAll();
} }
} }
#endif #endif
@ -90,19 +94,18 @@ void checkWiFiConnection() {
void checkMissedBlocks() { void checkMissedBlocks() {
Serial.println(F("Long time (45 min) since last block, checking if I missed anything...")); Serial.println(F("Long time (45 min) since last block, checking if I missed anything..."));
int currentBlock = getBlockFetch(); auto& blockNotify = BlockNotify::getInstance();
int currentBlock = blockNotify.fetchLatestBlock();
if (currentBlock != -1) { if (currentBlock != -1) {
if (currentBlock != getBlockHeight()) { if (currentBlock != blockNotify.getBlockHeight()) {
Serial.println(F("Detected stuck block height... restarting block handler.")); Serial.println(F("Detected stuck block height... restarting block handler."));
restartBlockNotify(); blockNotify.restart();
} }
setLastBlockUpdate(getUptime()); blockNotify.setLastBlockUpdate(getUptime());
} }
} }
void monitorDataConnections() { void monitorDataConnections() {
// Price notification monitoring // Price notification monitoring
if (getPriceNotifyInit() && !preferences.getBool("fetchEurPrice", DEFAULT_FETCH_EUR_PRICE) && !isPriceNotifyConnected()) { if (getPriceNotifyInit() && !preferences.getBool("fetchEurPrice", DEFAULT_FETCH_EUR_PRICE) && !isPriceNotifyConnected()) {
handlePriceNotifyDisconnection(); handlePriceNotifyDisconnection();
@ -111,9 +114,10 @@ void monitorDataConnections() {
} }
// Block notification monitoring // Block notification monitoring
if (getBlockNotifyInit() && !isBlockNotifyConnected()) { auto& blockNotify = BlockNotify::getInstance();
if (blockNotify.isInitialized() && !blockNotify.isConnected()) {
handleBlockNotifyDisconnection(); handleBlockNotifyDisconnection();
} else if (blockNotifyLostConnection > 0 && isBlockNotifyConnected()) { } else if (blockNotifyLostConnection > 0 && blockNotify.isConnected()) {
blockNotifyLostConnection = 0; blockNotifyLostConnection = 0;
} }
@ -125,7 +129,7 @@ void monitorDataConnections() {
} }
// Check for missed blocks // Check for missed blocks
if ((getLastBlockUpdate() - getUptime()) > 45 * 60) { if ((blockNotify.getLastBlockUpdate() - getUptime()) > 45 * 60) {
checkMissedBlocks(); checkMissedBlocks();
} }
} }
@ -137,7 +141,6 @@ extern "C" void app_main() {
bool thirdPartySource = getDataSource() == THIRD_PARTY_SOURCE; bool thirdPartySource = getDataSource() == THIRD_PARTY_SOURCE;
while (true) { while (true) {
if (eventSourceTaskHandle != NULL) { if (eventSourceTaskHandle != NULL) {
xTaskNotifyGive(eventSourceTaskHandle); xTaskNotifyGive(eventSourceTaskHandle);

View file

@ -0,0 +1,75 @@
#include <bitaxe_handler.hpp>
#include <unity.h>
template<size_t N>
std::string joinArrayWithBrackets(const std::array<std::string, N>& arr, const std::string& separator = " ") {
std::ostringstream result;
for (size_t i = 0; i < N; ++i) {
if (i > 0) {
result << separator;
}
result << '[' << arr[i] << ']';
}
return result.str();
}
void setUp(void)
{
// set stuff up here
}
void tearDown(void)
{
// clean stuff up here
}
void test_BitaxeParseHashrate(void)
{
std::array<std::string, NUM_SCREENS> output = parseBitaxeHashRate(656130000000);
std::string joined = joinArrayWithBrackets(output);
TEST_ASSERT_EQUAL_STRING_MESSAGE("mdi:bitaxe", output[0].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("6", output[NUM_SCREENS - 4].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("5", output[NUM_SCREENS - 3].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("6", output[NUM_SCREENS - 2].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("GH/S", output[NUM_SCREENS - 1].c_str(), joined.c_str());
}
void test_BitaxeParseBestDiff(void)
{
std::array<std::string, NUM_SCREENS> output = parseBitaxeBestDiff(15800000000);
std::string joined = joinArrayWithBrackets(output);
TEST_ASSERT_EQUAL_STRING_MESSAGE("mdi:bitaxe", output[0].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("1", output[NUM_SCREENS - 5].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("5", output[NUM_SCREENS - 4].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE(".", output[NUM_SCREENS - 3].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("8", output[NUM_SCREENS - 2].c_str(), joined.c_str());
TEST_ASSERT_EQUAL_STRING_MESSAGE("G", output[NUM_SCREENS - 1].c_str(), joined.c_str());
}
// not needed when using generate_test_runner.rb
int runUnityTests(void)
{
UNITY_BEGIN();
RUN_TEST(test_BitaxeParseHashrate);
RUN_TEST(test_BitaxeParseBestDiff);
return UNITY_END();
}
int main(void)
{
return runUnityTests();
}
extern "C" void app_main()
{
runUnityTests();
}