From 975a74e3e70bfc289a06a915502afa51e1b8460a Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:08:37 +0100 Subject: [PATCH 01/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc5b6e8..943c379 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ LNPoS ## Free and open-source bitcoin point-of-sale -## Easy setup using browser https://lnbits.github.io/lnpos/installer/ +## Easy setup using browser https://lnpos.lnbits.com LNPoS includes: From 777c05fd2cdf460a7b32427b4271fc796c0d4791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 30 Jul 2024 16:41:32 +0200 Subject: [PATCH 02/20] feat: add decimal places --- build-webinstaller.sh | 2 +- config.js | 4 +- installer/config.js | 94 ------------------------------------------- lnpos/100_config.ino | 2 +- versions.json | 1 - 5 files changed, 4 insertions(+), 99 deletions(-) delete mode 100644 installer/config.js diff --git a/build-webinstaller.sh b/build-webinstaller.sh index bc23a5b..f47ca6f 100644 --- a/build-webinstaller.sh +++ b/build-webinstaller.sh @@ -7,7 +7,7 @@ git clone https://github.com/lnbits/hardware-installer cp INSTALLER.md ./hardware-installer/public/INSTALLER.md cp versions.json ./hardware-installer/src/versions.json -cp installer/config.js ./hardware-installer/src/config.js +cp config.js ./hardware-installer/src/config.js sed -i "s/%title%/$PROJECT_NAME/g" ./hardware-installer/index.html diff --git a/config.js b/config.js index 82ba52c..3e079ca 100644 --- a/config.js +++ b/config.js @@ -75,7 +75,7 @@ export const elements = [ }, { name: "config_decimalplaces", - value: "", + value: 2, label: "FIAT Decimal Places", type: "text", }, @@ -91,4 +91,4 @@ export const elements = [ label: "WiFi Password", type: "text", }, -]; \ No newline at end of file +]; diff --git a/installer/config.js b/installer/config.js deleted file mode 100644 index 82ba52c..0000000 --- a/installer/config.js +++ /dev/null @@ -1,94 +0,0 @@ -export const addressesAndFiles = [ - { - address: "0x1000", - fileName: "lnpos.ino.bootloader.bin", - }, - { - address: "0x8000", - fileName: "lnpos.ino.partitions.bin", - }, - { - address: "0xE000", - fileName: "boot_app0.bin", - }, - { - address: "0x10000", - fileName: "lnpos.ino.bin", - }, -]; - -export const configPath = "elements.json"; -export const elements = [ - { - name: "config_lnurlpos", - value: "", - label: "LNURLPoS string from LNURLDevices extension", - type: "text", - }, - { - name: "config_lnurlatm", - value: "", - label: "LNURL ATM", - type: "text", - }, - { - name: "config_password", - value: "", - label: "Device Password", - type: "text", - }, - { - name: "config_masterkey", - value: "", - label: "Onchain Master Public Key", - type: "text", - }, - { - name: "config_server", - value: "", - label: "LNbits Server", - type: "text", - }, - { - name: "config_invoice", - value: "", - label: "Wallet Invoice Key", - type: "text", - }, - { - name: "config_lncurrency", - value: "", - label: "PoS Currency. ie: EUR", - type: "text", - }, - { - name: "config_lnurlatmms", - value: "", - label: "Mempool.space Server", - type: "text", - }, - { - name: "config_lnurlatmpin", - value: "", - label: "LNURLATM pin String", - type: "text", - }, - { - name: "config_decimalplaces", - value: "", - label: "FIAT Decimal Places", - type: "text", - }, - { - name: "config_wifi_ssid", - value: "", - label: "WiFi SSID", - type: "text", - }, - { - name: "config_wifi_password", - value: "", - label: "WiFi Password", - type: "text", - }, -]; \ No newline at end of file diff --git a/lnpos/100_config.ino b/lnpos/100_config.ino index 62eda85..5c6cb51 100644 --- a/lnpos/100_config.ino +++ b/lnpos/100_config.ino @@ -293,4 +293,4 @@ void readFiles() } } paramFile.close(); -} \ No newline at end of file +} diff --git a/versions.json b/versions.json index b9c3125..dd31a32 100644 --- a/versions.json +++ b/versions.json @@ -5,7 +5,6 @@ ], "versions": [ "v0.1.0", - "v0.0.0", "v0.0.0" ] } From 3730bd8961b0155822f173038af4a222c553b86c Mon Sep 17 00:00:00 2001 From: Alan Bits Date: Tue, 30 Jul 2024 14:42:11 +0000 Subject: [PATCH 03/20] [CHORE] update version to v0.1.1 --- versions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/versions.json b/versions.json index dd31a32..4a854f9 100644 --- a/versions.json +++ b/versions.json @@ -4,6 +4,7 @@ "esp32" ], "versions": [ + "v0.1.1", "v0.1.0", "v0.0.0" ] From 9c738d4c463317f34a4d22436078ab4d69ed8c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 30 Jul 2024 23:33:46 +0200 Subject: [PATCH 04/20] fix build --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 83ebb89..45d4d7a 100644 --- a/build.sh +++ b/build.sh @@ -1,9 +1,10 @@ #!/bin/sh command -v arduino-cli >/dev/null 2>&1 || { echo >&2 "arduino-cli not found. Aborting."; exit 1; } -arduino-cli config --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json init +arduino-cli config --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json init --overwrite arduino-cli core update-index -arduino-cli core install esp32:esp32 arduino-cli upgrade +# uBitcoin is broken on esp32 3.x.x +arduino-cli core install esp32:esp32@2.0.17 arduino-cli lib install ArduinoJson Base64 Keypad uBitcoin arduino-cli compile \ --build-property "build.partitions=min_spiffs" \ From b16d85532757b4a6d82e106f9fb4fcf5eb9fcbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 30 Jul 2024 23:36:15 +0200 Subject: [PATCH 05/20] revert version --- versions.json | 1 - 1 file changed, 1 deletion(-) diff --git a/versions.json b/versions.json index 4a854f9..dd31a32 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,6 @@ "esp32" ], "versions": [ - "v0.1.1", "v0.1.0", "v0.0.0" ] From 5040fc5ce8e83119eab16e76cbb5a86337b764a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 30 Jul 2024 23:49:32 +0200 Subject: [PATCH 06/20] lock ci arduino --- .github/workflows/arduino.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arduino.yml b/.github/workflows/arduino.yml index eebc374..b7d498a 100644 --- a/.github/workflows/arduino.yml +++ b/.github/workflows/arduino.yml @@ -17,7 +17,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} fqbn: ${{ matrix.fqbn }} platforms: | - - name: esp32:esp32 + - name: esp32:esp32@2.0.17 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json sketch-paths: | - lnpos/lnpos.ino From efd6fb0ef57030f4c89b02b1e81de42150ff4ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Wed, 28 Aug 2024 14:15:33 +0200 Subject: [PATCH 07/20] fixup version --- versions.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/versions.json b/versions.json index dd31a32..53c103e 100644 --- a/versions.json +++ b/versions.json @@ -4,6 +4,8 @@ "esp32" ], "versions": [ + "v0.1.2", + "v0.1.1", "v0.1.0", "v0.0.0" ] From ed293067c4c3d1cba0edc6b1c8719c0ccc35cd3b Mon Sep 17 00:00:00 2001 From: Alan Bits Date: Wed, 28 Aug 2024 12:12:54 +0000 Subject: [PATCH 08/20] [CHORE] update version to v0.1.3 --- versions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/versions.json b/versions.json index 53c103e..2bf629a 100644 --- a/versions.json +++ b/versions.json @@ -4,6 +4,7 @@ "esp32" ], "versions": [ + "v0.1.3", "v0.1.2", "v0.1.1", "v0.1.0", From 4f5615d3c5ed0922283755955c2009c62319cf67 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:08:30 +0100 Subject: [PATCH 09/20] Fix copy-paste typo --- lnpos/100_config.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnpos/100_config.ino b/lnpos/100_config.ino index 5c6cb51..fc39c60 100644 --- a/lnpos/100_config.ino +++ b/lnpos/100_config.ino @@ -164,7 +164,7 @@ void readFiles() secretATM = getValue(lnurlATM, ',', 1); currencyATM = getValue(lnurlATM, ',', 2); Serial.println(""); - Serial.println("lnurlPoS: " + lnurlPoS); + Serial.println("lnurlATM: " + lnurlATM); if (secretATM != "") { menuItemCheck[3] = 1; From e690f8475d686ef1d30eba05c287f51c504f5a2c Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:11:45 +0100 Subject: [PATCH 10/20] Add CHANGELOG.md --- lnpos/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lnpos/CHANGELOG.md diff --git a/lnpos/CHANGELOG.md b/lnpos/CHANGELOG.md new file mode 100644 index 0000000..c129788 --- /dev/null +++ b/lnpos/CHANGELOG.md @@ -0,0 +1,3 @@ +0.0.14 +====== +- Fix copy-paste typo with logging 'lnurlATM' configuration to serial From 83f9daad6b5e166e46aaddff9dafe02715b009a5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:12:40 +0100 Subject: [PATCH 11/20] Remove unused WebServer --- lnpos/lnpos.ino | 2 -- 1 file changed, 2 deletions(-) diff --git a/lnpos/lnpos.ino b/lnpos/lnpos.ino index 88827ad..aa0d1a2 100644 --- a/lnpos/lnpos.ino +++ b/lnpos/lnpos.ino @@ -1,9 +1,7 @@ #include -#include #include #include #include -using WebServerClass = WebServer; fs::SPIFFSFS &FlashFS = SPIFFS; #define FORMAT_ON_FAIL true #include From 04560b6d7e98e50837460ef25ea21489f54ba992 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:13:29 +0100 Subject: [PATCH 12/20] Update CHANGELOG.md --- lnpos/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lnpos/CHANGELOG.md b/lnpos/CHANGELOG.md index c129788..52adf39 100644 --- a/lnpos/CHANGELOG.md +++ b/lnpos/CHANGELOG.md @@ -1,3 +1,4 @@ 0.0.14 ====== - Fix copy-paste typo with logging 'lnurlATM' configuration to serial +- Remove unused WebServer to reduce build time, file size and installation time From 06244179dc5b7abab091c80fa393744331c3a08f Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:14:41 +0100 Subject: [PATCH 13/20] Clarify how to fix compilation issues Libraries are only checked into the libraries/ folder if specific or adapted versions are necessary. Otherwise, they should be installed from the Arduino Library Manager. But the names of the .h imports don't always correspond to the exact library names, so this commit adds the exact names of the necessary libraries in a comment, right above the line that will fail to compile if the libraries are missing. --- lnpos/lnpos.ino | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lnpos/lnpos.ino b/lnpos/lnpos.ino index aa0d1a2..64d6c17 100644 --- a/lnpos/lnpos.ino +++ b/lnpos/lnpos.ino @@ -4,16 +4,18 @@ #include fs::SPIFFSFS &FlashFS = SPIFFS; #define FORMAT_ON_FAIL true -#include #include #include -#include -#include #include #include "qrcoded.h" -#include "Bitcoin.h" #include +// ArduinoJson, Keypad and uBitcoin should be installed using the Arduino Library manager: +#include +#include +#include +#include + #define PARAM_FILE "/elements.json" #define KEY_FILE "/thekey.txt" #define USB_POWER 1000 // battery percentage sentinel value to indicate USB power From f84b5500faecf9660671da0d077220fe4cf38a07 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:21:00 +0100 Subject: [PATCH 14/20] Show small "arrow" in front of selected menu item Real world "dummy" user inteface testing revealed that, when only 2 menu items are present and they each have a different color (one selected, one not selected), the user doesn't know which item is selected and which one is not. This results in them pressing "#SELECT" on the wrong menu item. Adding a small "arrow" in front of the select menu item fixes this, and it looks nice. --- lnpos/CHANGELOG.md | 1 + lnpos/lnpos.ino | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lnpos/CHANGELOG.md b/lnpos/CHANGELOG.md index 52adf39..42c5b9d 100644 --- a/lnpos/CHANGELOG.md +++ b/lnpos/CHANGELOG.md @@ -2,3 +2,4 @@ ====== - Fix copy-paste typo with logging 'lnurlATM' configuration to serial - Remove unused WebServer to reduce build time, file size and installation time +- Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present diff --git a/lnpos/lnpos.ino b/lnpos/lnpos.ino index 64d6c17..d093871 100644 --- a/lnpos/lnpos.ino +++ b/lnpos/lnpos.ino @@ -1289,13 +1289,14 @@ void menuLoop() { tft.setTextColor(TFT_GREEN, TFT_BLACK); selection = menuItems[i]; + tft.print("-> "); } else { tft.setTextColor(TFT_WHITE, TFT_BLACK); + tft.print(" "); } - tft.print(" "); tft.println(menuItems[i]); menuItemCount++; } From 4b7a041afbf3f59cc6d10d7e3236bf38d89ec93c Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:24:21 +0100 Subject: [PATCH 15/20] Show "USB" indicator in blue This just looks good, and makes it easier to distinguish between battery powered mode (green, yellow, red) vs USB powered mode (blue). --- lnpos/lnpos.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnpos/lnpos.ino b/lnpos/lnpos.ino index d093871..c969c7d 100644 --- a/lnpos/lnpos.ino +++ b/lnpos/lnpos.ino @@ -1142,7 +1142,7 @@ void updateBatteryStatus(bool force = false) String batteryPercentageText = ""; if (batteryPercentage == USB_POWER) { - tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.setTextColor(TFT_BLUE, TFT_BLACK); batteryPercentageText = " USB"; } else From d4c61321372b4f7563387af3af209b4f113ab92b Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:27:35 +0100 Subject: [PATCH 16/20] Update CHANGELOG.md --- lnpos/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lnpos/CHANGELOG.md b/lnpos/CHANGELOG.md index 42c5b9d..43bd0d4 100644 --- a/lnpos/CHANGELOG.md +++ b/lnpos/CHANGELOG.md @@ -3,3 +3,4 @@ - Fix copy-paste typo with logging 'lnurlATM' configuration to serial - Remove unused WebServer to reduce build time, file size and installation time - Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present +- Make "USB" indicator blue so it looks better and is easier to recognize From da7995edd28b787049e8709e503fca179313e23d Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:30:15 +0100 Subject: [PATCH 17/20] Show firmware version at boot To easily check which version the user is running when troubleshooting in the field. --- lnpos/CHANGELOG.md | 3 ++- lnpos/lnpos.ino | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lnpos/CHANGELOG.md b/lnpos/CHANGELOG.md index 43bd0d4..ce041be 100644 --- a/lnpos/CHANGELOG.md +++ b/lnpos/CHANGELOG.md @@ -1,6 +1,7 @@ -0.0.14 +0.1.4 ====== - Fix copy-paste typo with logging 'lnurlATM' configuration to serial - Remove unused WebServer to reduce build time, file size and installation time - Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present - Make "USB" indicator blue so it looks better and is easier to recognize +- Show firmware version at boot to easily check which version the user is running when troubleshooting in the field diff --git a/lnpos/lnpos.ino b/lnpos/lnpos.ino index c969c7d..e16932e 100644 --- a/lnpos/lnpos.ino +++ b/lnpos/lnpos.ino @@ -16,6 +16,7 @@ fs::SPIFFSFS &FlashFS = SPIFFS; #include #include +#define VERSION "0.1.4" #define PARAM_FILE "/elements.json" #define KEY_FILE "/thekey.txt" #define USB_POWER 1000 // battery percentage sentinel value to indicate USB power @@ -1121,6 +1122,7 @@ void logo() tft.print("PoS"); tft.setTextColor(TFT_WHITE, TFT_BLACK); tft.setTextSize(2); + tft.print(VERSION); tft.setCursor(0, 80); tft.print("Powered by LNbits"); } From 6a2381f41e2cfe1a401b4c51d902722f30387451 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 09:39:17 +0100 Subject: [PATCH 18/20] Update CHANGELOG.md --- lnpos/CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lnpos/CHANGELOG.md b/lnpos/CHANGELOG.md index ce041be..c00f84e 100644 --- a/lnpos/CHANGELOG.md +++ b/lnpos/CHANGELOG.md @@ -1,7 +1,7 @@ 0.1.4 ====== -- Fix copy-paste typo with logging 'lnurlATM' configuration to serial +- Fix typo with logging 'lnurlATM' configuration to serial - Remove unused WebServer to reduce build time, file size and installation time -- Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present -- Make "USB" indicator blue so it looks better and is easier to recognize -- Show firmware version at boot to easily check which version the user is running when troubleshooting in the field +- Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present (or when the user is color blind) +- Make "USB" indicator blue so it looks better and is easier to distinguish +- Show firmware version at boot to allow the user to easily check which version is running (handy for troubleshooting) From 51f5d9f0644f4977d25d7196faf3ac0e50a74847 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 09:39:22 +0100 Subject: [PATCH 19/20] Add exact tested library versions to comments In case a developer has a bug with the latest version of one of the libraries, they know which versions are known to work, and can revert to confirm it's a regression. --- lnpos/lnpos.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lnpos/lnpos.ino b/lnpos/lnpos.ino index e16932e..dbdb14f 100644 --- a/lnpos/lnpos.ino +++ b/lnpos/lnpos.ino @@ -10,7 +10,8 @@ fs::SPIFFSFS &FlashFS = SPIFFS; #include "qrcoded.h" #include -// ArduinoJson, Keypad and uBitcoin should be installed using the Arduino Library manager: +// ArduinoJson, Keypad and uBitcoin should be installed using the Arduino Library Manager. +// The latest versions should work, verified with ArduinoJson 7.2.1, Keypad 3.1.1 and uBitcoin 0.2.0 #include #include #include From 892fd10a42a7625aad541713d14dcb054cfce8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 25 Feb 2025 23:58:04 +0100 Subject: [PATCH 20/20] fix: workflows (#23) --- .github/workflows/arduino.yml | 4 ++-- .github/workflows/static.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/arduino.yml b/.github/workflows/arduino.yml index b7d498a..a6c40b6 100644 --- a/.github/workflows/arduino.yml +++ b/.github/workflows/arduino.yml @@ -36,7 +36,7 @@ jobs: - --build-property - upload.maximum_size=1966080 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: sketches-reports path: sketches-reports @@ -49,7 +49,7 @@ jobs: steps: # This step is needed to get the size data produced by the compile jobs - name: Download sketches reports artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: sketches-reports path: sketches-reports diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 322237a..c4b3419 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -46,9 +46,9 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v4 with: path: "hardware-installer/dist" - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4