Skip to content

Commit

Permalink
Merge pull request #20 from ThomasFarstrike/minor-fixes-and-improvements
Browse files Browse the repository at this point in the history
Minor fixes and improvements
  • Loading branch information
blackcoffeexbt authored Dec 3, 2024
2 parents ed29306 + 51f5d9f commit a9b195c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lnpos/100_config.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions lnpos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
0.1.4
======
- 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 (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)
20 changes: 12 additions & 8 deletions lnpos/lnpos.ino
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#include <WiFi.h>
#include <WebServer.h>
#include <FS.h>
#include <SPIFFS.h>
#include <math.h>
using WebServerClass = WebServer;
fs::SPIFFSFS &FlashFS = SPIFFS;
#define FORMAT_ON_FAIL true
#include <Keypad.h>
#include <SPI.h>
#include <TFT_eSPI.h>
#include <Hash.h>
#include <ArduinoJson.h>
#include <stdio.h>
#include "qrcoded.h"
#include "Bitcoin.h"
#include <WiFiClientSecure.h>

// 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 <Hash.h>
#include <Bitcoin.h>
#include <Keypad.h>
#include <ArduinoJson.h>

#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
Expand Down Expand Up @@ -1121,6 +1123,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");
}
Expand All @@ -1142,7 +1145,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
Expand Down Expand Up @@ -1289,13 +1292,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++;
}
Expand Down

0 comments on commit a9b195c

Please sign in to comment.