From 4f5615d3c5ed0922283755955c2009c62319cf67 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 27 Nov 2024 08:08:30 +0100 Subject: [PATCH 01/11] 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 02/11] 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 03/11] 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 04/11] 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 05/11] 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 06/11] 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 07/11] 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 08/11] 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 09/11] 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 10/11] 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 11/11] 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