Moved to core 1 mining thread

This commit is contained in:
BitMaker 2023-06-08 12:28:18 +02:00
parent 07631f80aa
commit 2396e9a220
2 changed files with 4 additions and 4 deletions

View File

@ -111,11 +111,11 @@ void setup()
Serial.println("Initiating tasks..."); Serial.println("Initiating tasks...");
char *name = (char*) malloc(32); char *name = (char*) malloc(32);
sprintf(name, "(%s)", "Monitor"); 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 *****/ /******** CREATE STRATUM TASK *****/
sprintf(name, "(%s)", "Stratum"); 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 *****/ /******** CREATE MINER TASKS *****/
@ -126,7 +126,7 @@ void setup()
// Start stratum tasks // Start stratum tasks
sprintf(name, "(%s)", "Miner0"); sprintf(name, "(%s)", "Miner0");
//BaseType_t res = xTaskCreatePinnedToCore(runMiner, "0", 10000, (void*)name, 1, NULL, 0); //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"); //sprintf(name, "(%s)", "Miner1");
//BaseType_t res4 = xTaskCreatePinnedToCore(runMiner, "1", 10000, (void*)name, 1,NULL, 0); //BaseType_t res4 = xTaskCreatePinnedToCore(runMiner, "1", 10000, (void*)name, 1,NULL, 0);
//Serial.printf("Starting %s %s!\n", "1", res3 == pdPASS? "successful":"failed"); //Serial.printf("Starting %s %s!\n", "1", res3 == pdPASS? "successful":"failed");
@ -155,5 +155,5 @@ void loop() {
wifiManagerProcess(); // avoid delays() in loop when non-blocking and other long running code wifiManagerProcess(); // avoid delays() in loop when non-blocking and other long running code
vTaskDelay(100 / portTICK_PERIOD_MS); vTaskDelay(50 / portTICK_PERIOD_MS);
} }