I have a class named timeOut
dealing with timeout tasks.
I'm to write a sketch, common for Sonoff basic and Sonoff Dual, meaning that I may have 1 task for Basic and 2 tasks for Dual.
Declaring instances looks like:
timeOUT timeOut_SW0("SW0",TIMEOUT_SW0);
timeOUT timeOut_SW0("SW1",TIMEOUT_SW1);
for code simplicity I'd rather create an array of references and call it using a for
loop:
timeOUT TO[]={timeOut_SW0,timeOut_SW1};
is it the right way to call it as a reference ?