Can an offset be used on a PWM channel?
Posted: Tue Nov 27, 2012 9:17 pm
I'm refering to the actinic offset for "standard lighting," can that be used for actinics that are on a PWM expansion? What about reverse cycle for a refugium?
Community discussion about Reef Angel Controllers and reefing related subjects
https://forum.reefangel.com/
Code: Select all
ReefAngel.PWM.Channel0PWMSlope( InternalMemory.ActinicOffset_read() );
Code: Select all
ReefAngel.PWM.SetChannel( 2, PWMParabola(
InternalMemory.StdLightsOnHour_read(),
InternalMemory.StdLightsOnMinute_read(),
InternalMemory.StdLightsOffHour_read(),
InternalMemory.StdLightsOffMinute_read(),
InternalMemory.PWMSlopeStart3_read(),
InternalMemory.PWMSlopeEnd3_read(),
0));
Code: Select all
int MinuteOffset=InternalMemory.ActinicOffset_read();
int onTime=NumMins(InternalMemory.StdLightsOnHour_read(),InternalMemory.StdLightsOnMinute_read())-MinuteOffset;
int offTime=NumMins(InternalMemory.StdLightsOffHour_read(),InternalMemory.StdLightsOffMinute_read())+MinuteOffset;
ReefAngel.PWM.SetChannel( 2, PWMParabola(
onTime/60,
onTime%60,
offTime/60,
offTime%60,
InternalMemory.PWMSlopeStart3_read(),
InternalMemory.PWMSlopeEnd3_read(),
0));