Firmware 1.6.1
This commit is contained in:
parent
10d01ff2c7
commit
6677f853e2
Binary file not shown.
BIN
bin/bin ESP32-devKit/0x10000_firmware.bin
Normal file
BIN
bin/bin ESP32-devKit/0x10000_firmware.bin
Normal file
Binary file not shown.
BIN
bin/bin ESP32-devKit/0x1000_bootloader.bin
Normal file
BIN
bin/bin ESP32-devKit/0x1000_bootloader.bin
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/bin TTGO TDisplay S3/0x8000_partitions.bin
Normal file
BIN
bin/bin TTGO TDisplay S3/0x8000_partitions.bin
Normal file
Binary file not shown.
BIN
bin/bin TTGO TDisplay S3/0xe000_boot_app0.bin
Normal file
BIN
bin/bin TTGO TDisplay S3/0xe000_boot_app0.bin
Normal file
Binary file not shown.
@ -59,10 +59,7 @@ monitor_speed = 115200
|
||||
upload_speed = 115200
|
||||
|
||||
# 2 x 4.5MB app, 6.875MB SPIFFS
|
||||
;board_build.partitions = large_spiffs_16MB.csv
|
||||
;board_build.partitions = default_8MB.csv
|
||||
board_build.partitions = huge_app.csv
|
||||
;board_build.partitions = default.csv
|
||||
|
||||
build_flags =
|
||||
-D DEVKITV1=1
|
||||
@ -73,7 +70,7 @@ lib_deps =
|
||||
https://github.com/tzapu/WiFiManager.git
|
||||
mathertel/OneButton @ ^2.0.3
|
||||
arduino-libraries/NTPClient
|
||||
;https://github.com/golden-guy/Arduino_wolfssl.git#v5.5.4
|
||||
|
||||
|
||||
[env:TTGO-T-Display]
|
||||
platform = espressif32
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "mining.h"
|
||||
#include "monitor.h"
|
||||
|
||||
#define CURRENT_VERSION "V1.6.0"
|
||||
#define CURRENT_VERSION "V1.6.1"
|
||||
|
||||
//3 seconds WDT
|
||||
#define WDT_TIMEOUT 3
|
||||
@ -27,6 +27,7 @@ OneButton button2(PIN_BUTTON_2);
|
||||
|
||||
|
||||
OpenFontRender render;
|
||||
extern monitor_data mMonitor;
|
||||
|
||||
/**********************⚡ GLOBAL Vars *******************************/
|
||||
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
|
||||
@ -109,9 +110,15 @@ void setup()
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.pushImage(0, 0, initWidth, initHeight, initScreen);
|
||||
tft.setTextColor(TFT_BLACK);
|
||||
tft.drawString(CURRENT_VERSION, 24, 130, FONT2);
|
||||
tft.drawString(CURRENT_VERSION, 24, 147, FONT2);
|
||||
delay(2000);
|
||||
|
||||
/******** SHOW LED INIT STATUS (devices without screen) *****/
|
||||
mMonitor.NerdStatus = NM_waitingConfig;
|
||||
#ifdef DEVKITV1
|
||||
doLedStuff(LED_PIN);
|
||||
#endif
|
||||
|
||||
/******** INIT WIFI ************/
|
||||
init_WifiManager();
|
||||
|
||||
|
@ -123,6 +123,7 @@ void runStratumWorker(void *name) {
|
||||
|
||||
if(WiFi.status() != WL_CONNECTED){
|
||||
// WiFi is disconnected, so reconnect now
|
||||
mMonitor.NerdStatus = NM_Connecting;
|
||||
WiFi.reconnect();
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
continue;
|
||||
@ -248,6 +249,8 @@ void runMiner(void * task_id) {
|
||||
mMiner.newJob2 = false; //Clear newJob flag
|
||||
mMiner.inRun = true; //Set inRun flag
|
||||
|
||||
mMonitor.NerdStatus = NM_hashing;
|
||||
|
||||
//Prepare Premining data
|
||||
nerd_sha256 nerdMidstate;
|
||||
//nerdSHA256_context nerdMidstate; //NerdShaplus
|
||||
|
@ -422,12 +422,28 @@ void show_GlobalHashScreen(unsigned long mElapsed){
|
||||
background.pushSprite(0,0);
|
||||
}
|
||||
|
||||
void doLedStuff(int ledPin){
|
||||
//State 1: Waiting config - on portal mode
|
||||
//State 2: Config ok - but not hashing
|
||||
//State 3: Hashing
|
||||
// Variables para controlar el parpadeo con millis()
|
||||
unsigned long previousMillis = 0;
|
||||
|
||||
//State 1:
|
||||
|
||||
//State 2:
|
||||
void doLedStuff(int ledPin){
|
||||
|
||||
unsigned long currentMillis = millis();
|
||||
|
||||
switch (mMonitor.NerdStatus) {
|
||||
|
||||
case NM_waitingConfig: digitalWrite(ledPin, HIGH); // LED encendido de forma continua
|
||||
break;
|
||||
|
||||
case NM_Connecting: if (currentMillis - previousMillis >= 500) { //0.5sec blink
|
||||
previousMillis = currentMillis;
|
||||
digitalWrite(ledPin, !digitalRead(ledPin)); // Cambia el estado del LED
|
||||
}
|
||||
break;
|
||||
|
||||
case NM_hashing: if (currentMillis - previousMillis >= 100) { //0.1sec blink
|
||||
previousMillis = currentMillis;
|
||||
digitalWrite(ledPin, !digitalRead(ledPin)); // Cambia el estado del LED
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@ -29,9 +29,16 @@
|
||||
#define NEXT_HALVING_EVENT 840000
|
||||
#define HALVING_BLOCKS 210000
|
||||
|
||||
enum NMState {
|
||||
NM_waitingConfig,
|
||||
NM_Connecting,
|
||||
NM_hashing
|
||||
};
|
||||
|
||||
typedef struct{
|
||||
uint8_t screen;
|
||||
bool rotation;
|
||||
NMState NerdStatus;
|
||||
}monitor_data;
|
||||
|
||||
typedef struct{
|
||||
@ -44,6 +51,8 @@ typedef struct{
|
||||
int halfHourFee;
|
||||
}global_data;
|
||||
|
||||
|
||||
|
||||
void setup_monitor(void);
|
||||
void show_MinerScreen(unsigned long mElapsed);
|
||||
void show_ClockScreen(unsigned long mElapsed);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "media/images.h"
|
||||
#include <TFT_eSPI.h> // Graphics and font library
|
||||
#include "wManager.h"
|
||||
#include "monitor.h"
|
||||
|
||||
// JSON configuration file
|
||||
#define JSON_CONFIG_FILE "/config.json"
|
||||
@ -19,7 +20,7 @@
|
||||
bool shouldSaveConfig = false;
|
||||
|
||||
// Variables to hold data from custom textboxes
|
||||
char poolString[80] = "public-pool.airdns.org";
|
||||
char poolString[80] = "public-pool.io";
|
||||
int portNumber = 21496;//3333;
|
||||
char btcString[80] = "yourBtcAddress";
|
||||
int GMTzone = 2; //Currently selected in spain
|
||||
@ -30,6 +31,7 @@ WiFiManager wm;
|
||||
|
||||
|
||||
extern TFT_eSPI tft; // tft variable declared on main
|
||||
extern monitor_data mMonitor;
|
||||
|
||||
void saveConfigFile()
|
||||
// Save Config in JSON format
|
||||
@ -239,6 +241,7 @@ void init_WifiManager()
|
||||
else
|
||||
{
|
||||
//Tratamos de conectar con la configuración inicial ya almacenada
|
||||
mMonitor.NerdStatus = NM_Connecting;
|
||||
wm.setCaptivePortalEnable(false); // disable captive portal redirection
|
||||
if (!wm.autoConnect("NerdMinerAP","MineYourCoins"))
|
||||
{
|
||||
@ -250,6 +253,8 @@ void init_WifiManager()
|
||||
}
|
||||
}
|
||||
|
||||
mMonitor.NerdStatus = NM_Connecting;
|
||||
|
||||
//Conectado a la red Wifi
|
||||
if(WiFi.status() == WL_CONNECTED){
|
||||
//tft.pushImage(0, 0, MinerWidth, MinerHeight, MinerScreen);
|
||||
|
Loading…
Reference in New Issue
Block a user