Override Feeding Mode Speed...

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Issues I've seen in the current Dev Library.

Post by cosmith71 »

Is there a way to exclude the DCPumps from feeding mode? I.e., ignore ReefAngel.DCPump.FeedingSpeed when in feeding mode?

Thanks,

--Colin
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Override Feeding Mode Speed...

Post by cosmith71 »

lnevo wrote:
cosmith71 wrote:Is there a way to exclude the DCPumps from feeding mode? I.e., ignore ReefAngel.DCPump.FeedingSpeed when in feeding mode?

Thanks,

--Colin
Put this in your loop:

ReefAngel.DCPump.FeedingSpeed=InternalMemory.DCPumpSpeed_read();

I dont know if i have the function name right but essentially you can set the feeding mode speed to what you've set in memory.

Maybe roberto has a better suggestion.

You could also do math on it, lets say you want it 50% of the usual, you can add /2
That sets it to the portal speed value.

What I'd really like is to override it with a pump mode.

--Colin
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Issues I've seen in the current Dev Library.

Post by lnevo »

The mode doesn't change, just the speed when you go into feeding mode.

If you want to change the mode during feeding mode, just put an if (DISPLAYED_MENU==FEEDING_MODE)...

I thought you were trying to eliminate the spin-down during feeding mode...
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Override Feeding Mode Speed...

Post by cosmith71 »

Let me play with it some more. I was thinking it went to a constant speed of whatever was set when I tried it. I'll report back.

--Colin
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Override Feeding Mode Speed...

Post by cosmith71 »

Verified. Feeding mode sets the pumps to a constant speed of whatever is set.

I tried the displayed menu==feeding mode thing, it was ignored too.

--Colin
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Override Feeding Mode Speed...

Post by lnevo »

Ok i'll take a look closer at the libraries and see how we can ignore that.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Override Feeding Mode Speed...

Post by lnevo »

Ok, I see the issue. Regardless of setting and everything we were just setting the channels to the FeedingSpeed and WaterChangeSpeed.

I've added a check that will now only do this if the value is less than 100. So if you want to override just set it to 101 or 255, just like we do with the PWM overrides.

You can test the patch from this branch. If it works for you, open an issue and I'll put a pull request through.

https://github.com/lnevo/Libraries/tree/modespeedfix
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Override Feeding Mode Speed...

Post by cosmith71 »

Thanks! I'll give it a try this weekend.

--Colin
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Override Feeding Mode Speed...

Post by lnevo »

Created the pull requests. It's simple enough and should be there...
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Override Feeding Mode Speed...

Post by cosmith71 »

Appears to be working as intended now. I set the feeding speed to 255 and the pumps kept on doing what they were doing during feeding mode. Just like I wanted. :D

--Colin
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Override Feeding Mode Speed...

Post by lnevo »

Awesome
Post Reply