Exemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="status"></param>
        public void setLockedIcon(bool status)
        {
            if(status == true)
                doorStatus = screen.customCharacters[LOCKED_ICON_INDEX];
            else
                doorStatus = screen.customCharacters[UNLOCKED_ICON_INDEX];

            showMessage(lastFirstRow, lastSecondRow);
        }
Exemplo n.º 2
0
 public void setSleepIcon(bool status)
 {
     if (status)
         sleepStatus = screen.customCharacters[SLEEP_ICON_INDEX];
     else
         sleepStatus = empty;
 }
Exemplo n.º 3
0
        /// <summary>
        /// 
        /// </summary>
        public void WaitForAttach()
        {
            // Attach the event handlers.
            lcdAdapter.Attach += new AttachEventHandler(lcd_Attach);
            lcdAdapter.Detach += new DetachEventHandler(lcd_Detach);
            lcdAdapter.Error += new ErrorEventHandler(lcd_Error);

            lcdAdapter.open();

            Console.Out.WriteLine("LCD Waiting for attachment...");
            lcdAdapter.waitForAttachment();

            screen = lcdAdapter.screens[1];
            screen.ScreenSize = TextLCD.ScreenSizes._2x40;
            screen.initialize();

            // Setup the custom characters.
            screen.customCharacters[LOCKED_ICON_INDEX].setCustomCharacter(574912, 32639);
            screen.customCharacters[UNLOCKED_ICON_INDEX].setCustomCharacter(38050, 32639);
            screen.customCharacters[SLEEP_ICON_INDEX].setCustomCharacter(36812, 424033);
            screen.customCharacters[EMPTY_ICON_INDEX].setCustomCharacter(0, 0);
            empty = screen.customCharacters[EMPTY_ICON_INDEX];
            sleepStatus = empty;
        }