Display not turning off

Basic / Standard Reef Angel hardware
Post Reply
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Display not turning off

Post by javisaman »

Hi,

I've noticed recently that the reef angel display on my plus unit is not turning off. I noticed that the joystick was stuck (kept scrolling down), so I cleaned the joystick with contact cleaner and added dielectric grease and it fixed that problem. However, the screen remains on. Is there something else I can try?
User avatar
brennyn21
Posts: 116
Joined: Mon Nov 23, 2020 5:40 pm

Re: Display not turning off

Post by brennyn21 »

It sounds like it still thinks the joy stick is being pressed or moved.

Here is the relevant code in the ReefAngel_1.5_LCD.h

Code: Select all

void ReefAngelClass::CheckScreenSaver()
{
	// process screensaver timeout
	if ( Timer[LCD_TIMER].IsTriggered() )
	{
		// Screensaver timeout expired
		LCD.BacklightOff();
	}

	if ( Joystick.IsButtonPressed() )
	{
		// turn the backlight on
		LCD.BacklightOn();

		// TODO check Timer[LCD_TIMER] code
		if ( Timer[LCD_TIMER].Trigger == 0 )
		{
			Timer[LCD_TIMER].Start();
			return;
		}
		PrepMenuScreen();
		// get out of this function and display the menu
		return;
	}
#ifdef MAIN_2014
	if ( Joystick.IsUp() || Joystick.IsDown() )
#else
	if ( Joystick.IsUp() || Joystick.IsDown() || Joystick.IsRight() || Joystick.IsLeft() )
#endif // MAIN_2014
	{
		// Turn backlight on
		LCD.BacklightOn();
		Timer[LCD_TIMER].Start();
	}
}
Sincerely, Brennyn
Post Reply