CronAlarms icon indicating copy to clipboard operation
CronAlarms copied to clipboard

Cancel All Alarms

Open viamgr opened this issue 4 years ago • 1 comments

Is there any way to free whole alarms by a function? Currently, we should store the ID of that alarm in an extra variable.

viamgr avatar Jan 07 '21 16:01 viamgr

I do this:

Serial.printf("Total Cron ID´s: %d \n",Cron.count());     //Total id´s before
for (byte id = 0; id < 255; id++)  { Cron.free(id);  }    //Cron_IDs are numbered from 0 to 254  
Serial.printf("Total Cron ID´s: %d \n",Cron.count());     //Total id´s after, must be 0

jaggil avatar Jan 29 '21 10:01 jaggil