Exemple #1
0
//This function updates the backlight, applies screen strings if they have
//changed, and applies menu hints. Up to now, variables topLCDLine and
//bottomLCDLine have been set to the desired strings. This keeps the LCD from
//being cleared and set excessively (which causes ugly blinking).
void outputLCD()
	{
	updateBacklight();
	if (changedString(topLCDLine))
		{
		clearLCDLine(0);
		displayLCDCenteredString(0,topLCDLine.curr);
		}
	if (changedString(bottomLCDLine))
		{
		clearLCDLine(1);
		displayLCDCenteredString(1,bottomLCDLine.curr);
		}
#ifdef MENU_WRAP //Wrap
	if (sysState.curr != AUTONOMOUS && sysError==ERR_NONE)
		{
		displayLCDString(0,0, "<");
		displayLCDString(0,15,">");
		}
#else //No wrap
	if (sysState.curr != AUTONOMOUS && sysError==ERR_NONE)
		{
		if (menuItemIndex>0)                 displayLCDString(0,0, "<"); //If not at the first item, show prev arrow
		if (menuItemIndex<(int)M_NO_ITEMS-1) displayLCDString(0,15,">"); //If not at the last item, show next arrow
		}
#endif

	setLastString(&topLCDLine);
	setLastString(&bottomLCDLine);
	}
Exemple #2
0
// This will turn the backlight off
void ShiftLCD::backlightOff(void) {
	_backlight &= ~LCD_BL_PIN;
	updateBacklight();
}
Exemple #3
0
// This will turn the backlight on
void ShiftLCD::backlightOn(void) {
	_backlight = LCD_BL_PIN;
	updateBacklight();
}