PCB lives now in its own git repo https://git.la10cy.net/DeltaLima/CanGrow-12V-PCB
22 lines
403 B
C
22 lines
403 B
C
/*
|
|
*
|
|
* include/CanGrow_Core.h - core stuff header file
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
/* Give free grow.light id */
|
|
byte Give_Free_Grow_LightId() {
|
|
byte freeId;
|
|
for(byte i = 0; i < Max_Outputs; i++) {
|
|
if(config.grow.light.configured[i] == true) {
|
|
// here i define that 255 stands for "no more free outputs"
|
|
freeId = 255;
|
|
} else {
|
|
freeId = i;
|
|
break;
|
|
}
|
|
}
|
|
return freeId;
|
|
}
|