Dimming Offset

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Dimming Offset

Post by lnevo »

Hi,

I was wondering if there was an easy way that I'm missing to use the dimming functions (reading internal memory) to set a real offset. What I mean is that when using the offset argument

ReefAngel.PWM.DaylightPWMParabola();
ReefAngel.PWM.ActinicPWMParabola(30);

The actinic offset will come on 30 minutes before and shutoff 30 minutes after...

What I'm looking to do is have an east/west effect with the lights, so that one fixture comes on 30 minutes before and shuts off 30 minutes before the other (not after).

If there's no straightforward way (not looking to re-read all the memory variables...), then I'm thinking of submitting a patch to the libraries that would maybe have a pre and post argument for offsets..

So it would look more like this...

ReefAngel.PWM.DaylightPWMParabola();
ReefAngel.PWM.ActinicPWMParabola(30,-30);

Thanks in advance.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dimming Offset

Post by rimai »

I don't think there is.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Dimming Offset

Post by lnevo »

Are you ok with the proposed solution? I'll open an issue and create a branch to submit a patch.

Do you think my example was ok? Or should I put it so they are both positive numbers? I put one postive and one negative to kind of show the difference...

So my thinking is this...

ReefAngel.PWM.ActinicPWMParabola(30,30); would be equivalent to ReefAngel.PWM.ActinicPWMParabola(30);

whereas

ReefAngel.PWM.ActinicPWMParabola(30,-30); would be what I was looking to do?

Thoughts?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dimming Offset

Post by rimai »

I think negative should work exactly like you mentioned. Just make sure to not step over Alan's toes. He's been changing those functions too.
I've got one merge from him still pending.
Also, make sure to get the channels for the expansion module too :)
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Dimming Offset

Post by lnevo »

Yeah, I may wait until his patch is in.... anything blocking to merge it :)

For the record, I've been running the DEV version with the high-res changes in it since this weekend. No issues so far.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dimming Offset

Post by rimai »

It's merged on dev branch.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Dimming Offset

Post by lnevo »

Pull request is made :)
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Dimming Offset

Post by lnevo »

Yay, Roberto merged this in today :) Thought I would post a pic of the output. I have channel 0 and 2 defined as daylight with a 30 minute offset between them. I have channel 1 and 3 with the actinic offset applied plus the 30 minute offset between each channel. Here's what it looks like.
pwm_channels.png
pwm_channels.png (53.41 KiB) Viewed 5120 times
Post Reply