diff --git a/bin/0x10000_v1.5_beta_firmware.bin b/bin/0x10000_v1.5_beta_firmware.bin index 8563a88..a707552 100644 Binary files a/bin/0x10000_v1.5_beta_firmware.bin and b/bin/0x10000_v1.5_beta_firmware.bin differ diff --git a/src/NerdMinerV2.ino.cpp b/src/NerdMinerV2.ino.cpp index 9f9be08..20d457c 100644 --- a/src/NerdMinerV2.ino.cpp +++ b/src/NerdMinerV2.ino.cpp @@ -111,11 +111,11 @@ void setup() Serial.println("Initiating tasks..."); char *name = (char*) malloc(32); sprintf(name, "(%s)", "Monitor"); - BaseType_t res1 = xTaskCreatePinnedToCore(runMonitor, "Monitor", 5000, (void*)name, 4, NULL,1); + BaseType_t res1 = xTaskCreatePinnedToCore(runMonitor, "Monitor", 5000, (void*)name, 4, NULL,0); /******** CREATE STRATUM TASK *****/ sprintf(name, "(%s)", "Stratum"); - BaseType_t res2 = xTaskCreatePinnedToCore(runStratumWorker, "Stratum", 20000, (void*)name, 3, NULL,1); + BaseType_t res2 = xTaskCreatePinnedToCore(runStratumWorker, "Stratum", 20000, (void*)name, 3, NULL,0); /******** CREATE MINER TASKS *****/ @@ -126,9 +126,9 @@ void setup() // Start stratum tasks sprintf(name, "(%s)", "Miner0"); //BaseType_t res = xTaskCreatePinnedToCore(runMiner, "0", 10000, (void*)name, 1, NULL, 0); - BaseType_t res3 = xTaskCreatePinnedToCore(runMiner, "0", 10000, (void*)name, 1,NULL, 0); + BaseType_t res3 = xTaskCreatePinnedToCore(runMiner, "0", 10000, (void*)name, 1,NULL, 1); //sprintf(name, "(%s)", "Miner1"); - //BaseType_t res4 = xTaskCreatePinnedToCore(runMiner, "1", 10000, (void*)name, 1,NULL, 1); + //BaseType_t res4 = xTaskCreatePinnedToCore(runMiner, "1", 10000, (void*)name, 1,NULL, 0); //Serial.printf("Starting %s %s!\n", "1", res3 == pdPASS? "successful":"failed"); @@ -155,4 +155,5 @@ void loop() { wifiManagerProcess(); // avoid delays() in loop when non-blocking and other long running code + vTaskDelay(100 / portTICK_PERIOD_MS); } \ No newline at end of file diff --git a/src/mining.cpp b/src/mining.cpp index 3d63978..64fd00f 100644 --- a/src/mining.cpp +++ b/src/mining.cpp @@ -132,8 +132,8 @@ void runStratumWorker(void *name) { //portNumber = 3333; //strcpy(btcString,"Bitmaker.01"); //CKpool - strcpy(poolString, "solo.ckpool.org"); - portNumber = 3333; + //strcpy(poolString, "solo.ckpool.org"); + //portNumber = 3333; //strcpy(btcString,"test"); checkPoolConnection(); @@ -200,7 +200,7 @@ void runStratumWorker(void *name) { } } - vTaskDelay(200 / portTICK_PERIOD_MS); //Small delay + vTaskDelay(500 / portTICK_PERIOD_MS); //Small delay } @@ -320,7 +320,7 @@ void runMonitor(void *name){ Serial.println("[MONITOR] started"); unsigned long mLastCheck = 0; - mMonitor.screen = SCREEN_GLOBAL; + mMonitor.screen = SCREEN_MINING; while(1){ diff --git a/src/mining.h b/src/mining.h index fef0072..742b3e6 100644 --- a/src/mining.h +++ b/src/mining.h @@ -24,6 +24,7 @@ typedef struct{ float poolDifficulty; bool inRun; bool newJob; + bool newJob2; }miner_data;