Formatting, no functional changes

This commit is contained in:
Gordon Bolton 2024-06-25 21:34:47 +01:00
parent 5ab1db583a
commit 38375ea750
15 changed files with 248 additions and 227 deletions

View File

@ -11,7 +11,8 @@
void setup(); void setup();
void loop(); void loop();
void setup() { void setup()
{
Serial.begin(115200); Serial.begin(115200);
// Disable the watchdog timers // Disable the watchdog timers
@ -41,6 +42,7 @@ void setup() {
lcd.clear(); lcd.clear();
} }
void loop() { void loop()
{
startingMenu(); startingMenu();
} }

View File

@ -12,8 +12,7 @@ char keys[ROWS][COLS] = {
{'1', '2', '3', 'U'}, {'1', '2', '3', 'U'},
{'4', '5', '6', 'D'}, {'4', '5', '6', 'D'},
{'7', '8', '9', 'X'}, {'7', '8', '9', 'X'},
{ 'L', '0', 'R', 'E' } {'L', '0', 'R', 'E'}};
};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS); Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
LiquidCrystal_I2C lcd(0x27, LCD_COLUMNS, LCD_ROWS); LiquidCrystal_I2C lcd(0x27, LCD_COLUMNS, LCD_ROWS);
@ -39,5 +38,4 @@ byte thermometer[8] = {
B00100, B00100,
B01110, B01110,
B01110, B01110,
B01110 B01110};
};

View File

@ -1,101 +1,70 @@
#include "devSequence.h" #include "devSequence.h"
struct devSequence devSequences[NUM_DEV_SEQUENCES] = { struct devSequence devSequences[NUM_DEV_SEQUENCES] = {
{ {"C41",
"C41",
7, 7,
{180, 195, 45, 180, 60, 60, 30}, // processTime {180, 195, 45, 180, 60, 60, 30}, // processTime
{"Prewarm", "Developer", "Bleach", "Fix", "Rinse 1", "Rinse 2", "Fin Rinse"}, // processName {"Prewarm", "Developer", "Bleach", "Fix", "Rinse 1", "Rinse 2", "Fin Rinse"}, // processName
{ {
{1, 5.5, 5.5, 5.5, 3.5, 3.5, 1}, // CW rotations processCycle {1, 5.5, 5.5, 5.5, 3.5, 3.5, 1}, // CW rotations processCycle
{ 1, 5, 5, 5, 3, 3, 1 } {1, 5, 5, 5, 3, 3, 1}}, // CCW rotations processCycle
}, //CCW rotations processCycle
{ {
{37.8, 37.8, 32, 32, 32, 32, 32}, // min processTemp {37.8, 37.8, 32, 32, 32, 32, 32}, // min processTemp
{38, 38, 38, 38, 38, 38, 38}, // preferred processTemp {38, 38, 38, 38, 38, 38, 38}, // preferred processTemp
{38.2, 38.2, 38.2, 38.2, 38.2, 38.2, 38.2} // max processTemp {38.2, 38.2, 38.2, 38.2, 38.2, 38.2, 38.2} // max processTemp
} }},
}, {"E6",
{
"E6",
12, 12,
{180, 360, 120, 120, 360, 120, 360, 240, 120, 120, 120, 30}, {180, 360, 120, 120, 360, 120, 360, 240, 120, 120, 120, 30},
{"Preheat", "FirstDev", "Wash 1", "Reversal", "ColorDev", "PreBleach", "Bleach", "Fixer", "Wash 2", "Wash 3", "Wash 4", "Fin Rinse"}, {"Preheat", "FirstDev", "Wash 1", "Reversal", "ColorDev", "PreBleach", "Bleach", "Fixer", "Wash 2", "Wash 3", "Wash 4", "Fin Rinse"},
{ {{1, 5.5, 3.5, 5, 5.5, 5.5, 5.5, 5.5, 3.5, 3.5, 3.5, 3.5},
{1, 5.5, 3.5, 5, 5.5, 5.5, 5.5, 5.5, 3.5, 3.5, 3.5, 3.5}, {1, 5, 3, 5.5, 5, 5.5, 5.5, 5.5, 3, 3, 3, 3}},
{1, 5, 3, 5.5, 5, 5.5, 5.5, 5.5, 3, 3, 3, 3} {{37.5, 37.7, 33.0, 37.7, 37.0, 37, 37.5, 37.5, 33.0, 33.0, 33.0, 19.0},
},
{
{37.5, 37.7, 33.0, 37.7, 37.0, 37, 37.5, 37.5, 33.0, 33.0, 33.0, 19.0},
{38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 20.0}, {38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0, 20.0},
{38.5, 38.3, 38.0, 38.3, 39.0, 38, 38.5, 38.5, 38.5, 38.5, 38.5, 21.0} {38.5, 38.3, 38.0, 38.3, 39.0, 38, 38.5, 38.5, 38.5, 38.5, 38.5, 21.0}}},
} {"ECN-2",
},
{
"ECN-2",
9, 9,
{180, 0, 210, 60, 180, 150, 120, 300, 120}, {180, 0, 210, 60, 180, 150, 120, 300, 120},
{"Prebath", "RemJet", "Developer", "Stop Bath", "Wash", "Bleach", "Fixer", "Wash 2", "Fin Rinse"}, {"Prebath", "RemJet", "Developer", "Stop Bath", "Wash", "Bleach", "Fixer", "Wash 2", "Fin Rinse"},
{ {{1, 0, 5.5, 3.5, 3.5, 5.5, 5.5, 3.5, 1},
{1, 0, 5.5, 3.5, 3.5, 5.5, 5.5, 3.5, 1}, {1, 0, 5, 3, 3, 5, 5, 3, 1}},
{1, 0, 5, 3, 3, 5, 5, 3, 1} {{27.0, 0, 40.8, 27.0, 27.0, 27.0, 27.0, 27.0, 27.0},
},
{
{27.0, 0, 40.8, 27.0, 27.0, 27.0, 27.0, 27.0, 27.0},
{38.0, 0, 41.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0}, {38.0, 0, 41.0, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0},
{38.0, 0, 41.2, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0} {38.0, 0, 41.2, 38.0, 38.0, 38.0, 38.0, 38.0, 38.0}}},
} {"B&W",
},
{
"B&W",
7, 7,
{510, 30, 300, 60, 90, 120, 30}, {510, 30, 300, 60, 90, 120, 30},
{"Developer", "Stop", "Fix", "Rinse 1", "Rinse 2", "Rinse 3", "Fin Rinse"}, {"Developer", "Stop", "Fix", "Rinse 1", "Rinse 2", "Rinse 3", "Fin Rinse"},
{ {{5.5, 3.5, 3.5, 3.5, 3.5, 3.5, 1},
{ 5.5, 3.5, 3.5, 3.5, 3.5, 3.5, 1}, {5, 3, 3, 3, 3, 3, 1}},
{ 5, 3, 3, 3, 3, 3, 1} {{19, 19, 19, 19, 19, 19, 19},
},
{
{19, 19, 19, 19, 19, 19, 19},
{20, 20, 20, 20, 20, 20, 20}, {20, 20, 20, 20, 20, 20, 20},
{21, 21, 21, 21, 21, 21, 21} {21, 21, 21, 21, 21, 21, 21}}},
} {"Custom",
},
{
"Custom",
4, 4,
{10, 10, 10, 10}, {10, 10, 10, 10},
{"Developer", "Stop", "Fix", "Rinse"}, {"Developer", "Stop", "Fix", "Rinse"},
{ {{5.5, 3.5, 3.5, 3.5},
{ 5.5, 3.5, 3.5, 3.5}, {5, 3, 3, 3}},
{ 5, 3, 3, 3} {{19, 19, 19, 19},
},
{
{19, 19, 19, 19},
{20, 20, 20, 20}, {20, 20, 20, 20},
{21, 21, 21, 21} {21, 21, 21, 21}}},
} {"B&WREV",
},
{
"B&WREV",
12, 12,
{720, 300, 300, 60, 120, 60, 120, 360, 60, 300, 60, 60}, {720, 300, 300, 60, 120, 60, 120, 360, 60, 300, 60, 60},
{"FirstDev", "Wash 1", "Bleach", "Wash 2", "Clearing", "Wash 3", "Reversal", "SecondDev", "Wash 4", "Fix", "Wash 5", "Fin Rinse"}, {"FirstDev", "Wash 1", "Bleach", "Wash 2", "Clearing", "Wash 3", "Reversal", "SecondDev", "Wash 4", "Fix", "Wash 5", "Fin Rinse"},
{ {{5.5, 3.5, 5.5, 3.5, 5.5, 3.5, 5.5, 5.5, 3.5, 5.5, 3.5, 3.5},
{5.5, 3.5, 5.5, 3.5, 5.5, 3.5, 5.5, 5.5, 3.5, 5.5, 3.5, 3.5}, {5, 3, 5, 3, 5, 3, 5, 5, 3, 5, 3, 3}},
{5, 3, 5, 3, 5, 3, 5, 5, 3, 5, 3, 3} {{19.5, 15.5, 19.5, 15.5, 19.5, 15.5, 19.5, 19.5, 15.5, 19.5, 15.5, 15.5},
},
{
{19.5, 15.5, 19.5, 15.5, 19.5, 15.5, 19.5, 19.5, 15.5, 19.5, 15.5, 15.5},
{20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0}, {20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0},
{20.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5} {20.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5, 22.5}}}};
}
}
};
struct devSequence* findSequenceByName(const char* processName) { struct devSequence *findSequenceByName(const char *processName)
for (int i = 0; i < NUM_DEV_SEQUENCES; i++) { {
if (strcmp(devSequences[i].processName, processName) == 0) { for (int i = 0; i < NUM_DEV_SEQUENCES; i++)
{
if (strcmp(devSequences[i].processName, processName) == 0)
{
return &devSequences[i]; return &devSequences[i];
} }
} }

View File

@ -3,7 +3,8 @@
#define NUM_DEV_SEQUENCES 6 #define NUM_DEV_SEQUENCES 6
#include <Arduino.h> #include <Arduino.h>
struct devSequence { struct devSequence
{
char processName[7]; char processName[7];
int cycles; int cycles;
unsigned long int processTime[20]; unsigned long int processTime[20];

View File

@ -1,8 +1,8 @@
#include "display.h" #include "display.h"
#include "menu.h" #include "menu.h"
void startingMenu()
void startingMenu() { {
lcd.clear(); lcd.clear();
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print("Select Programme:"); lcd.print("Select Programme:");
@ -19,17 +19,20 @@ void startingMenu() {
lcd.setCursor(10, 3); lcd.setCursor(10, 3);
lcd.print("6. B&W Rev"); lcd.print("6. B&W Rev");
while (devPgm == "") { while (devPgm == "")
{
getMenuInput(); getMenuInput();
} }
lcd.print(devPgm); lcd.print(devPgm);
if (devPgm == "C41" || devPgm == "E6" || devPgm == "B&W" || devPgm == "ECN-2" || devPgm == "Custom" || devPgm == "B&WREV") { if (devPgm == "C41" || devPgm == "E6" || devPgm == "B&W" || devPgm == "ECN-2" || devPgm == "Custom" || devPgm == "B&WREV")
{
startDev(); startDev();
} }
} }
void processHeadings() { void processHeadings()
{
lcd.clear(); lcd.clear();
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print("Step"); lcd.print("Step");
@ -39,11 +42,11 @@ void processHeadings() {
lcd.print("Temp"); lcd.print("Temp");
} }
char *secondsToMinutesSeconds(int seconds)
{
char* secondsToMinutesSeconds(int seconds) {
char *result = (char *)malloc(6 * sizeof(char)); char *result = (char *)malloc(6 * sizeof(char));
if (result == NULL) { if (result == NULL)
{
return NULL; return NULL;
} }

View File

@ -1,9 +1,12 @@
#include "menu.h" #include "menu.h"
void getMenuInput() { void getMenuInput()
{
char key = keypad.getKey(); char key = keypad.getKey();
if (key != NO_KEY) { if (key != NO_KEY)
switch (key) { {
switch (key)
{
case '1': case '1':
devPgm = "C41"; devPgm = "C41";
break; break;
@ -26,41 +29,52 @@ void getMenuInput() {
} }
} }
char getScrollEntEscInput()
char getScrollEntEscInput() { {
while (true) { while (true)
{
char key = keypad.getKey(); char key = keypad.getKey();
if (key != NO_KEY) { if (key != NO_KEY)
if (key == 'U' || key == 'D' || key == 'X' || key == 'E' || key == 'L' || key == 'R') { {
if (key == 'U' || key == 'D' || key == 'X' || key == 'E' || key == 'L' || key == 'R')
{
return key; return key;
} }
} }
if (millis() % 1000 == 0) { if (millis() % 1000 == 0)
{
readTemperature(); readTemperature();
} }
} }
} }
char getEntEscInput() { char getEntEscInput()
while (true) { {
while (true)
{
char key = keypad.getKey(); char key = keypad.getKey();
if (key != NO_KEY) { if (key != NO_KEY)
if (key == 'X' || key == 'E') { {
if (key == 'X' || key == 'E')
{
return key; return key;
} }
} }
if (millis() % 1000 == 0) { if (millis() % 1000 == 0)
{
readTemperature(); readTemperature();
} }
} }
} }
int startProcessing(struct devSequence* sequence, int sequenceStep) { int startProcessing(struct devSequence *sequence, int sequenceStep)
{
run = 1; run = 1;
lcd.clear(); lcd.clear();
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(sequence->processCycleName[sequenceStep]); lcd.print(sequence->processCycleName[sequenceStep]);
for (int x = strlen(sequence->processCycleName[sequenceStep]); x < 10; x++) { for (int x = strlen(sequence->processCycleName[sequenceStep]); x < 10; x++)
{
lcd.print(" "); lcd.print(" ");
} }
@ -73,7 +87,8 @@ int startProcessing(struct devSequence* sequence, int sequenceStep) {
lcd.print("Ent:start Esc:quit"); lcd.print("Ent:start Esc:quit");
char key = getEntEscInput(); char key = getEntEscInput();
if (key == 'X') { if (key == 'X')
{
devPgm = ""; devPgm = "";
run = 0; run = 0;
return 0; return 0;
@ -102,7 +117,8 @@ int startProcessing(struct devSequence* sequence, int sequenceStep) {
&motorTaskHandle, &motorTaskHandle,
0); 0);
while (millis() < processStartTime + processTimeMillis) { while (millis() < processStartTime + processTimeMillis)
{
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd.print("Remaining: " + (String)secondsToMinutesSeconds((processStartTime + processTimeMillis - millis()) / 1000) + " "); lcd.print("Remaining: " + (String)secondsToMinutesSeconds((processStartTime + processTimeMillis - millis()) / 1000) + " ");
delay(410); delay(410);
@ -111,7 +127,8 @@ int startProcessing(struct devSequence* sequence, int sequenceStep) {
Serial.println("after temp read" + (String)millis() + "\n"); Serial.println("after temp read" + (String)millis() + "\n");
} }
if (motorTaskHandle != NULL) { if (motorTaskHandle != NULL)
{
vTaskDelete(motorTaskHandle); vTaskDelete(motorTaskHandle);
motorTaskHandle = NULL; motorTaskHandle = NULL;
} }
@ -121,12 +138,15 @@ int startProcessing(struct devSequence* sequence, int sequenceStep) {
return 1; return 1;
} }
void startDev() { void startDev()
{
const char *searchName = devPgm.c_str(); const char *searchName = devPgm.c_str();
struct devSequence *currentSequence = findSequenceByName(searchName); struct devSequence *currentSequence = findSequenceByName(searchName);
for (int i = 0; i < currentSequence->cycles; i++) { for (int i = 0; i < currentSequence->cycles; i++)
if (run == 1) { {
if (run == 1)
{
run = startProcessing(currentSequence, i); run = startProcessing(currentSequence, i);
continue; continue;
} }
@ -134,7 +154,8 @@ void startDev() {
processHeadings(); processHeadings();
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd.print(currentSequence->processCycleName[i]); lcd.print(currentSequence->processCycleName[i]);
for (int x = strlen(currentSequence->processCycleName[i]); x < 10; x++) { for (int x = strlen(currentSequence->processCycleName[i]); x < 10; x++)
{
lcd.print(" "); lcd.print(" ");
} }
@ -147,29 +168,43 @@ void startDev() {
lcd.print("Scroll / Esc / Ent"); lcd.print("Scroll / Esc / Ent");
char key = getScrollEntEscInput(); char key = getScrollEntEscInput();
if (key == 'U') { if (key == 'U')
if (i > 0) { {
if (i > 0)
{
i--; i--;
} }
i--; i--;
} else if (key == 'D' && i < currentSequence->cycles - 1) { }
else if (key == 'D' && i < currentSequence->cycles - 1)
{
continue; continue;
} else if (key == 'D' && i == currentSequence->cycles - 1) { }
else if (key == 'D' && i == currentSequence->cycles - 1)
{
i--; i--;
continue; continue;
} else if (key == 'X') { }
else if (key == 'X')
{
devPgm = ""; devPgm = "";
run = 0; run = 0;
return; return;
} else if (key == 'E') { }
else if (key == 'E')
{
int run = 1; int run = 1;
startProcessing(currentSequence, i); startProcessing(currentSequence, i);
} else if (key == 'L') { }
else if (key == 'L')
{
currentSequence->processTime[i] -= 5; currentSequence->processTime[i] -= 5;
lcd.setCursor(10, 1); lcd.setCursor(10, 1);
lcd.print(secondsToMinutesSeconds(currentSequence->processTime[i])); lcd.print(secondsToMinutesSeconds(currentSequence->processTime[i]));
i--; i--;
} else if (key == 'R') { }
else if (key == 'R')
{
currentSequence->processTime[i] += 5; currentSequence->processTime[i] += 5;
lcd.setCursor(10, 1); lcd.setCursor(10, 1);
lcd.print(secondsToMinutesSeconds(currentSequence->processTime[i])); lcd.print(secondsToMinutesSeconds(currentSequence->processTime[i]));

View File

@ -1,16 +1,19 @@
#include "motor.h" #include "motor.h"
void runMotorTask(void* parameter) { void runMotorTask(void *parameter)
{
MotorTaskParams *params = (MotorTaskParams *)parameter; MotorTaskParams *params = (MotorTaskParams *)parameter;
// Enable the motor // Enable the motor
digitalWrite(EN_PIN, LOW); digitalWrite(EN_PIN, LOW);
while (true) { while (true)
{
// Rotate clockwise // Rotate clockwise
Serial.println("Rotating CW" + (String)params->cwRotations); Serial.println("Rotating CW" + (String)params->cwRotations);
stepper.setCurrentPosition(0); stepper.setCurrentPosition(0);
stepper.moveTo(STEPS_PER_REV * params->cwRotations); stepper.moveTo(STEPS_PER_REV * params->cwRotations);
while (stepper.distanceToGo() != 0) { while (stepper.distanceToGo() != 0)
{
stepper.run(); stepper.run();
} }
@ -18,7 +21,8 @@ void runMotorTask(void* parameter) {
Serial.println("Rotating CCW" + (String)params->ccwRotations); Serial.println("Rotating CCW" + (String)params->ccwRotations);
stepper.setCurrentPosition(0); stepper.setCurrentPosition(0);
stepper.moveTo(-STEPS_PER_REV * params->ccwRotations); stepper.moveTo(-STEPS_PER_REV * params->ccwRotations);
while (stepper.distanceToGo() != 0) { while (stepper.distanceToGo() != 0)
{
stepper.run(); stepper.run();
} }
} }

View File

@ -4,7 +4,8 @@
#include <AccelStepper.h> #include <AccelStepper.h>
#include "config.h" #include "config.h"
struct MotorTaskParams { struct MotorTaskParams
{
float cwRotations; float cwRotations;
float ccwRotations; float ccwRotations;
unsigned long int processEndTime; unsigned long int processEndTime;

View File

@ -1,15 +1,14 @@
#include "sound.h" #include "sound.h"
int melody[] = { int melody[] = {
262, 294, 330, 349, 392, 440, 494, 523, 587, 659, 698, 784, 880, 988, 1047 262, 294, 330, 349, 392, 440, 494, 523, 587, 659, 698, 784, 880, 988, 1047};
};
int noteDurations[] = { int noteDurations[] = {
250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
};
void playTune() { void playTune()
for (int thisNote = 0; thisNote < 15; thisNote++) { {
for (int thisNote = 0; thisNote < 15; thisNote++)
{
int noteDuration = noteDurations[thisNote]; int noteDuration = noteDurations[thisNote];
tone(beeperPin, melody[thisNote], noteDuration); tone(beeperPin, melody[thisNote], noteDuration);
@ -20,8 +19,10 @@ void playTune() {
} }
} }
void playAlarmTone() { void playAlarmTone()
for (int i = 1; i <= 10; i++) { {
for (int i = 1; i <= 10; i++)
{
tone(beeperPin, 2000); tone(beeperPin, 2000);
delay(500); delay(500);
noTone(beeperPin); noTone(beeperPin);

View File

@ -1,2 +0,0 @@
spec.o: \
C:/Users/gordon/Documents/sloeber-workspace/.metadata/.plugins/org.eclipse.cdt.managedbuilder.core/spec.cpp

View File

@ -1,26 +1,34 @@
#include "temperature.h" #include "temperature.h"
void readTemperature() { void readTemperature()
{
sensors.requestTemperatures(); sensors.requestTemperatures();
float temperatureC = sensors.getTempCByIndex(0); float temperatureC = sensors.getTempCByIndex(0);
lcd.setCursor(13, 3); lcd.setCursor(13, 3);
lcd.write(byte(0)); lcd.write(byte(0));
if (temperatureC == DEVICE_DISCONNECTED_C) { if (temperatureC == DEVICE_DISCONNECTED_C)
{
lcd.print("--"); lcd.print("--");
} else { }
else
{
lcd.print(temperatureC, 1); lcd.print(temperatureC, 1);
lcd.print("C"); lcd.print("C");
} }
} }
void updateTempDisplay(void* parameter) { void updateTempDisplay(void *parameter)
{
sensors.requestTemperatures(); sensors.requestTemperatures();
float temperatureC = sensors.getTempCByIndex(0); float temperatureC = sensors.getTempCByIndex(0);
lcd.setCursor(13, 3); lcd.setCursor(13, 3);
lcd.write(byte(0)); lcd.write(byte(0));
if (temperatureC == DEVICE_DISCONNECTED_C) { if (temperatureC == DEVICE_DISCONNECTED_C)
{
lcd.print("--"); lcd.print("--");
} else { }
else
{
lcd.print(temperatureC, 1); lcd.print(temperatureC, 1);
lcd.print("C"); lcd.print("C");
} }

View File

@ -6,7 +6,8 @@
#include "esp_task_wdt.h" #include "esp_task_wdt.h"
// Disable the watchdog timers // Disable the watchdog timers
void disableWatchdogTimers() { void disableWatchdogTimers()
{
esp_task_wdt_deinit(); esp_task_wdt_deinit();
TaskHandle_t idle_0 = xTaskGetIdleTaskHandleForCPU(0); TaskHandle_t idle_0 = xTaskGetIdleTaskHandleForCPU(0);
TaskHandle_t idle_1 = xTaskGetIdleTaskHandleForCPU(1); TaskHandle_t idle_1 = xTaskGetIdleTaskHandleForCPU(1);