Why my wave str is -1 when assigned?
Posted: Mon Oct 20, 2014 5:02 am
'lo all..
Something stupid - not a huge deal.
Can anyone advise why my wave strength is 1 less than assigned during feeding mode? In the code below I assigned it to 28% yet when in feeding mode it is at 27%
Something stupid - not a huge deal.
Can anyone advise why my wave strength is 1 less than assigned during feeding mode? In the code below I assigned it to 28% yet when in feeding mode it is at 27%
Code: Select all
// Custom Wave Routine
// set the wpMode based on what time it is
if ( (hour() >= 2) && (hour() < 5) ) wpMode=1; // from 2am - 5am
if ( (hour() >= 5) && (hour() < 8) ) wpMode=2; // from 5am - 8am
if ( (hour() >= 8) && (hour() < 11) ) wpMode=4; // from 8am - 11am Nutrient Transport
if ( (hour() >= 11) && (hour() < 14) ) wpMode=2; // from 11a - 2pm
if ( (hour() >= 14) && (hour() < 17) ) wpMode=1; // from 2pm - 5pm
if ( (hour() >= 17) && (hour() < 20) ) wpMode=2; // from 5pm - 8pm
if ( (hour() >= 20) && (hour() < 23) ) wpMode=3; // from 8pm - 11p
if (hour() >= 23) wpMode=2; // from 11pm - midnight
if (hour() < 2) wpMode=1; // from midnight - 2am
if (ReefAngel.DisplayedMenu==FEEDING_MODE) wpMode=5; // Feeding Mode
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE) wpMode=6; //Water Change Mode
switch (wpMode)
{
case 1: wpWavStr=29; wpWavOff=3; break;
case 2: wpWavStr=31; wpWavOff=5; break;
case 3: wpWavStr=33; wpWavOff=7; break;
case 4: wpWavStr=40; wpWavOff=50; break;
[b]case 5: wpWavStr=28; wpWavOff=0; break; // Feeding mode[/b]
case 6: wpWavStr=0; wpWavOff=0; break; // Waterchange Mode
default: wpWavStr=34; wpWavOff=2;
}
//If 8am - 11am, Nutrient Transport
if (wpMode==4)
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(wpWavStr,wpWavOff,7000,true) );
ReefAngel.PWM.SetActinic ( NutrientTransportMode(wpWavStr,wpWavOff,7000,false) );
}
else
{
[b] if (wpMode==5)
{
ReefAngel.PWM.SetDaylight(wpWavStr);
ReefAngel.PWM.SetActinic(wpWavStr); //// Right wavemaker under feeder
}[/b]
else
{
//Set the wave
ReefAngel.PWM.SetDaylight( ElseMode(wpWavStr,wpWavOff,true) );
ReefAngel.PWM.SetActinic( ElseMode(wpWavStr,wpWavOff,false) );
}}
//end Custom Wave Routine