feedmode delay

Do you have a question on how to do something.
Ask in here.
Post Reply
troylong45
Posts: 203
Joined: Sat Oct 10, 2015 9:17 pm

feedmode delay

Post by troylong45 »

update..fixxed
delay return only after feed mode

Code: Select all

//C First X sec after feeding mode disable return
    static time_t FMTimer=0;
    if (ReefAngel.DisplayedMenu == FEEDING_MODE) FMTimer=now();
    if (now()-FMTimer >= 0 && now()-FMTimer < 300))//300 is secs 
    {ReefAngel.Relay.Off(RETURN);}else{ReefAngel.Relay.On(RETURN);}
//C First X sec after feeding mode disable return
Last edited by troylong45 on Sat Jun 09, 2018 12:54 pm, edited 1 time in total.
Image
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: feedmode delay

Post by binder »

Have you looked at the DelayedOn() function in the libraries? That would be my suggestion on where to start. (I have not read/looked through your code you posted yet. I just wanted to give you a reference place to start first.)
troylong45
Posts: 203
Joined: Sat Oct 10, 2015 9:17 pm

Re: feedmode delay

Post by troylong45 »

i just found a fix i thought i deleated this post oups
Image
Post Reply