Skip to content

Commit

Permalink
Moved to core 1 mining thread
Browse files Browse the repository at this point in the history
  • Loading branch information
BitMaker-hub committed Jun 8, 2023
1 parent 07631f8 commit 2396e9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file not shown.
8 changes: 4 additions & 4 deletions src/NerdMinerV2.ino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,0);
BaseType_t res1 = xTaskCreatePinnedToCore(runMonitor, "Monitor", 5000, (void*)name, 4, NULL,1);

/******** CREATE STRATUM TASK *****/
sprintf(name, "(%s)", "Stratum");
BaseType_t res2 = xTaskCreatePinnedToCore(runStratumWorker, "Stratum", 20000, (void*)name, 3, NULL,0);
BaseType_t res2 = xTaskCreatePinnedToCore(runStratumWorker, "Stratum", 20000, (void*)name, 3, NULL,1);


/******** CREATE MINER TASKS *****/
Expand All @@ -126,7 +126,7 @@ 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, 1);
BaseType_t res3 = xTaskCreatePinnedToCore(runMiner, "0", 10000, (void*)name, 1,NULL, 0);
//sprintf(name, "(%s)", "Miner1");
//BaseType_t res4 = xTaskCreatePinnedToCore(runMiner, "1", 10000, (void*)name, 1,NULL, 0);
//Serial.printf("Starting %s %s!\n", "1", res3 == pdPASS? "successful":"failed");
Expand Down Expand Up @@ -155,5 +155,5 @@ void loop() {

wifiManagerProcess(); // avoid delays() in loop when non-blocking and other long running code

vTaskDelay(100 / portTICK_PERIOD_MS);
vTaskDelay(50 / portTICK_PERIOD_MS);
}

0 comments on commit 2396e9a

Please sign in to comment.