diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 741899f..ba4c505 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,12 +48,16 @@ jobs: - name: Archive Firmware run: | - declare -A current_board=$(basename $(dirname {})) - find .pio/build -name "firmware.bin" -exec sh -c 'cp "{}" "artifacts/firmware_$(basename $(dirname {})).bin"' \; working-directory: ${{ github.workspace }} + - name: Archive OTA ESP32 + run: | + find .pio/build -name "firmware.bin" -exec sh -c 'cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin "artifacts/0xe000_boot_$(basename $(dirname {})).bin"' \; + + working-directory: ${{ github.workspace }} + - name: Archive Artifacts with Address run: | # Define the mapping of board names to file prefixes diff --git a/CHANGELOG.md b/CHANGELOG.md index e10ae45..1129bf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,6 @@ -# v0.0.14 +# v0.0.15 -- Investigated issue with reboot on ESP8266 -- Add support for disable auto update to WebUI -- Fix WebUI bug for blinking -- Add new build script with address to write the binaries -- Updated readme +- Fix setup.html adding auto update +- Fix configuration dump +- Tweak ESP8266 hash rate print +- Add 0xe000 for esp32 for boot diff --git a/README.md b/README.md index a64a13c..4c8a83a 100644 --- a/README.md +++ b/README.md @@ -57,12 +57,12 @@ _Legend_ | Board | Link | | :------------------------------------------------------- | :----------------------------------------------------------- | -| [ESP8266](https://s.click.aliexpress.com/e/_EuwffHJ) | [0.0.14](https://github.com/matteocrippa/leafminer/releases) | -| [GeekMagic SmartTV]() | [0.0.14](https://github.com/matteocrippa/leafminer/releases) | -| [ESP32](https://s.click.aliexpress.com/e/_Ey6AJnT) | [0.0.14](https://github.com/matteocrippa/leafminer/releases) | -| [ESP32-S2](https://s.click.aliexpress.com/e/_EGJcibR) | [0.0.14](https://github.com/matteocrippa/leafminer/releases) | -| [ESP32-S3](https://s.click.aliexpress.com/e/_EJbAXyl) | [0.0.14](https://github.com/matteocrippa/leafminer/releases) | -| [LILYGO-T-S3](https://s.click.aliexpress.com/e/_ExRWk6H) | [0.0.14](https://github.com/matteocrippa/leafminer/releases) | +| [ESP8266](https://s.click.aliexpress.com/e/_EuwffHJ) | [0.0.15](https://github.com/matteocrippa/leafminer/releases) | +| [GeekMagic SmartTV]() | [0.0.15](https://github.com/matteocrippa/leafminer/releases) | +| [ESP32](https://s.click.aliexpress.com/e/_Ey6AJnT) | [0.0.15](https://github.com/matteocrippa/leafminer/releases) | +| [ESP32-S2](https://s.click.aliexpress.com/e/_EGJcibR) | [0.0.15](https://github.com/matteocrippa/leafminer/releases) | +| [ESP32-S3](https://s.click.aliexpress.com/e/_EJbAXyl) | [0.0.15](https://github.com/matteocrippa/leafminer/releases) | +| [LILYGO-T-S3](https://s.click.aliexpress.com/e/_ExRWk6H) | [0.0.15](https://github.com/matteocrippa/leafminer/releases) | - Browse to [ESPWebtool](https://esp.huhn.me/) using a Chrome based browser and upload the file according to the address in the file name. diff --git a/SECURITY.md b/SECURITY.md index 9ac2f69..292f625 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ The following versions of LeafMiner are currently supported with security updates: -- 0.0.14 +- 0.0.15 ## Reporting a Vulnerability diff --git a/src/html/setup.h b/src/html/setup.h index 1ada3ef..aee2a00 100644 --- a/src/html/setup.h +++ b/src/html/setup.h @@ -6,6 +6,8 @@ #ifndef HTML_SETUP_H #define HTML_SETUP_H -const char html_setup[] = "LeafMiner Setup

LeafMiner







Off On

Off On


Firmware Upgrade

"; +#include + +const std::string html_setup = "LeafMiner Setup

LeafMiner







Off On
Off On

Off On


Firmware Upgrade

"; #endif // HTML_SETUP_H diff --git a/src/leafminer.h b/src/leafminer.h index efe4b14..7107427 100644 --- a/src/leafminer.h +++ b/src/leafminer.h @@ -1,7 +1,7 @@ #ifndef LEAFMINER_H #define LEAFMINER_H -#define _VERSION "0.0.14" +#define _VERSION "0.0.15" #define DIFFICULTY 1e-4 // Mining diff --git a/src/miner/miner.cpp b/src/miner/miner.cpp index c2aa293..b415456 100644 --- a/src/miner/miner.cpp +++ b/src/miner/miner.cpp @@ -39,8 +39,9 @@ void miner(uint32_t core) { break; } - +#if defined(ESP32) current_update_hashrate(); +#endif } #if defined(HAS_LCD) @@ -50,6 +51,10 @@ void miner(uint32_t core) l_info(TAG_MINER, "[%d] > [%s] > 0x%.8x - diff %.12f", core, current_job->job_id.c_str(), winning_nonce, diff_hash); network_send(current_job->job_id, current_job->extranonce2, current_job->ntime, winning_nonce); +#if defined(ESP8266) + current_update_hashrate(); +#endif + current_setHighestDifficulty(diff_hash); if (littleEndianCompare(hash, current_job->target.value, 32) < 0) diff --git a/src/model/configuration.h b/src/model/configuration.h index 5ff9004..c1f6304 100644 --- a/src/model/configuration.h +++ b/src/model/configuration.h @@ -5,6 +5,8 @@ #include #include "utils/log.h" +#define TAG_CONFIGURATION "Configuration" + struct Configuration { std::string wifi_ssid = ""; @@ -21,17 +23,17 @@ struct Configuration void print() { - l_info("wifi_ssid: %s", wifi_ssid.c_str()); - l_info("wifi_password: %s", wifi_password.c_str()); - l_info("wallet_address: %s", wallet_address.c_str()); - l_info("pool_password: %s", pool_password.c_str()); - l_info("pool_url: %s", pool_url.c_str()); - l_info("pool_port: %d", std::to_string(pool_port).c_str()); - l_info("blink_enabled: %s", blink_enabled.c_str()); - l_info("blink_brightness: %s", std::to_string(blink_brightness).c_str()); - l_info("lcd_on_start: %s", lcd_on_start.c_str()); - l_info("miner_type: %s", miner_type.c_str()); - l_info("auto_update: %s", auto_update.c_str()); + l_info(TAG_CONFIGURATION, "wifi_ssid: %s", wifi_ssid.c_str()); + l_info(TAG_CONFIGURATION, "wifi_password: %s", wifi_password.c_str()); + l_info(TAG_CONFIGURATION, "wallet_address: %s", wallet_address.c_str()); + l_info(TAG_CONFIGURATION, "pool_password: %s", pool_password.c_str()); + l_info(TAG_CONFIGURATION, "pool_url: %s", pool_url.c_str()); + l_info(TAG_CONFIGURATION, "pool_port: %d", std::to_string(pool_port).c_str()); + l_info(TAG_CONFIGURATION, "blink_enabled: %s", blink_enabled.c_str()); + l_info(TAG_CONFIGURATION, "blink_brightness: %s", std::to_string(blink_brightness).c_str()); + l_info(TAG_CONFIGURATION, "lcd_on_start: %s", lcd_on_start.c_str()); + l_info(TAG_CONFIGURATION, "miner_type: %s", miner_type.c_str()); + l_info(TAG_CONFIGURATION, "auto_update: %s", auto_update.c_str()); } }; diff --git a/version.json b/version.json index 2ee7f17..bbea812 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "current": "0.0.14", + "current": "0.0.15", "link": "https://github.com/matteocrippa/leafminer/releases/download/v{{version}}/firmware_{{device}}.bin", "devices": [ "esp8266",