Buzzer oddity since 0.9.8

Share you PDE file with our community
Post Reply
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer oddity since 0.9.8

Post by 00Warpig00 »

rimai wrote:You could do that.
A little bit trickier to do though.
Some of the new drivers enter hibernation state when PWM is 0%.
The reason I like to place them into a controlled port is that even on hibernation or minimum draw, it is still drawing some power. Some may say it is negligible compared to when they are on, but still...
You can't easily change the PWM value when you are using PWMSlope or PWMParabola functions.
You would need to come up with a logic to tell the controller that you want to override the PWM function.
By using the app, you are limited to how you can interact with the controller.
The logic I created was to override the functions when a relay was masked on.
Can you think of another logic that would also work?
I'm more than happy to try to implement it :)
This seems exactly what I would like to do. I dont have my LED drivers using a relay box port those are at a premium in my plans already. It only took me until the second day of having my light schedule running that I realized that I need to be able to over ride any/all pwm/analog ports for max flexibility. The PWM settings and that this does not seem to be an easy task. I have not peeked at any of the coding so there may be a reason what I am about to type is utter BS and impossible but couldn't a variable just be set for each analog/pwm channel and when any function (lighting/whatever it shouldnt matter) is running that code just modifies the variable and then that variable value is what is actually used by the hardware? Check if an override flag has been flipped if the flag is flipped then exit the current lighting function and go into the Override function, maybe even get some input from the user (pwm value up/down arrows) as long as the override flag is set stay in the override function but when it is flipped back off go back to the regular lighting function? I envision this like the overrides for the relay boxes but with an up/down arrow to allow manual feedback on what you want until the override is turned off.

Nick
180G FOWLR
20GH QT#1
29G QT#2

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

Re: Buzzer oddity since 0.9.8

Post by rimai »

Hi Nick,
The latest libraries already do that for the standard channels only though.
If you override a port that was assigned to lights, it will override the PWM to whatever is on the internal memory LEDPWMActinic and LEDPWMDaylight.
You could then use any app to change the memory settings to whatever you want. This would give you exactly what you are asking for.
You can even use the Client app sliders to change the setting. Those sliders do exactly that. They change that memory location. Or you can use the Java Status app or even your browser.
If you want to do the same thing for your dimming expansion channels, you will need to a code like this:

Code: Select all

  if ((ReefAngel.Relay.RelayMaskOn & (1<<(Port5-1))) == (1<<(Port5-1))) // If MaskOn, we override PWM to internal memory value
  {
    ReefAngel.PWM.SetChannel(0,InternalMemory.LEDPWMDaylight_read());
    ReefAngel.PWM.SetChannel(1,InternalMemory.LEDPWMDaylight_read());
  }
  else
  {
    ReefAngel.PWM.Channel0PWMSlope(0);
    ReefAngel.PWM.Channel1PWMSlope(0);
  }
Roberto.
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Buzzer oddity since 0.9.8

Post by 00Warpig00 »

does this require masking a "phantom" relay on the relay box? Any way to just manipulate the PWM ports directly?
180G FOWLR
20GH QT#1
29G QT#2

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

Re: Buzzer oddity since 0.9.8

Post by rimai »

Yes, that example was for masking port5, but we can make it so you could use a relay box you don't have.
You could do this:

Code: Select all

if ((ReefAngel.Relay.RelayMaskOnE[1] & (1<<(Port5-1))) == (1<<(Port5-1)))
That will use Port5 on Expansion Box 2
Roberto.
Post Reply