Maybe you all can pare it down some.
Code: Select all
////// Place your custom code below here
// Read memory for RF Wave Settings and use for Tunze/Jaebo
int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();
// Change this to what you want your min/max based on vortech speed
// This is for those functions that take both, but only one memory slot.
int minOffset=5;
int maxOffset=10;
int min=speed-minOffset;
int max=speed+maxOffset;
switch (mode) {
case Constant:
//constant
ReefAngel.PWM.SetDaylight( speed );
ReefAngel.PWM.SetActinic( speed );
break;
case Lagoon:
//lagoon
ReefAngel.PWM.SetDaylight( SineMode(min,max,duration,true) );
ReefAngel.PWM.SetActinic( SineMode(min,max,duration,false) );
break;
case ReefCrest:
//reefcrest
ReefAngel.PWM.SetDaylight( ReefCrestMode(speed,duration,true) );
ReefAngel.PWM.SetActinic( ReefCrestMode(speed,duration,false) );
break;
case ShortPulse:
//short pulse
ReefAngel.PWM.SetDaylight( ShortPulseMode(min,max,duration,true) );
ReefAngel.PWM.SetActinic( ShortPulseMode(min,max,duration,false) );
break;
case LongPulse:
//long pulse
ReefAngel.PWM.SetDaylight( LongPulseMode(min,max,duration,true) );
ReefAngel.PWM.SetActinic( LongPulseMode(min,max,duration,false) );
break;
case TidalSwell:
//tidal swell
ReefAngel.PWM.SetDaylight( TidalSwellMode(speed,true) );
ReefAngel.PWM.SetDaylight( TidalSwellMode(speed,false) );
break;
case NutrientTransport:
//nutrient transport
ReefAngel.PWM.SetDaylight( NutrientTransportMode(min,max,duration,true) );
ReefAngel.PWM.SetActinic( NutrientTransportMode(min,max,duration,false) );
break;
default:
// if nothing else matches, do the default
// default is optional
ReefAngel.PWM.SetDaylight( TideMode(speed,minOffset,maxOffset) );
ReefAngel.PWM.SetActinic( TideMode(speed,minOffset,maxOffset) );
}
////// Place your custom code above here