//*****Begin timing Light mask for auto mask release Additions LightMaskTimerStart=1; //milli value when the lights are masked on or off LightMaskTimerElapsed=1; //milli value elapsed since lights were masked on or off LightMaskTimerRelease=10800000; //if light mask is set and forgotten, clear the mask after 10,800,000 milli (3 Hours) LightMaskTimerPercentageDivider=LightMaskTimerRelease / 100 ;

if ( PreviousLightMask != CurrentLightMask )//Checks if the light mask setting has been changed {

//Checks if light mask value has been set to an invalid value by direct memory access and clears (sets to 0) mask if not valid if ( CurrentLightMask > 2 ) { InternalMemory.write(199, 0); //clears light mask if value is not valid. }

if ( CurrentLightMask != 0 )// Checks if lights are masked on or off { if ( IgnoreMaskDuration == 0 )//Checks if Light mask timer ignore byte is active { if ( CurrentMillis > TargetMillis )//checks if Light mask timeout has expired. { InternalMemory.write(199, 0); //clears forgotten light mask due to timeout. CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

else { }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

if ( PreviousLightMask != CurrentLightMask )//Checks if the light mask setting has been changed {

//Checks if light mask value has been set to an invalid value by direct memory access and clears (sets to 0) mask if not valid if ( CurrentLightMask > 2 ) { InternalMemory.write(199, 0); //clears light mask if value is not valid. }

if ( CurrentLightMask != 0 )// Checks if lights are masked on or off { if ( IgnoreMaskDuration == 0 )//Checks if Light mask timer ignore byte is active { if ( CurrentMillis > TargetMillis )//checks if Light mask timeout has expired. { InternalMemory.write(199, 0); //clears forgotten light mask due to timeout. CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

else { }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

//Checks if light mask value has been set to an invalid value by direct memory access and clears (sets to 0) mask if not valid if ( CurrentLightMask > 2 ) { InternalMemory.write(199, 0); //clears light mask if value is not valid. }

if ( CurrentLightMask != 0 )// Checks if lights are masked on or off { if ( IgnoreMaskDuration == 0 )//Checks if Light mask timer ignore byte is active { if ( CurrentMillis > TargetMillis )//checks if Light mask timeout has expired. { InternalMemory.write(199, 0); //clears forgotten light mask due to timeout. CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

else { }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

//Checks if light mask value has been set to an invalid value by direct memory access and clears (sets to 0) mask if not valid if ( CurrentLightMask > 2 ) { InternalMemory.write(199, 0); //clears light mask if value is not valid. }

if ( CurrentLightMask != 0 )// Checks if lights are masked on or off { if ( IgnoreMaskDuration == 0 )//Checks if Light mask timer ignore byte is active { if ( CurrentMillis > TargetMillis )//checks if Light mask timeout has expired. { InternalMemory.write(199, 0); //clears forgotten light mask due to timeout. CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

else { }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }

}

else { CurrentMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. TargetMillis = 0;//sets back to 0 when not being used to prevent display from counting negative time when Light mask is cleared. }