예제 #1
0
        public Connection(string appFriendlyName = "testapp")
        {
            AppFriendlyName = appFriendlyName;

            LcdProxy.LogiLcdInit(AppFriendlyName, Constants.LOGI_LCD_TYPE_MONO);
            Success = LcdProxy.LogiLcdIsConnected(Constants.LOGI_LCD_TYPE_MONO);
            if (Success)
            {
                LedSuccess = LedProxy.LogiLedInit();
            }
        }
예제 #2
0
 public int CheckButtons()
 {
     foreach (var button in ButtonHandlers)
     {
         if (LcdProxy.LogiLcdIsButtonPressed(button.Key))
         {
             foreach (var func in button.Value)
             {
                 func();
             }
             return(button.Key);
         }
     }
     return(-1);
 }
예제 #3
0
        public bool UpdateDisplay(List <string> lines)
        {
            try
            {
                foreach (var line in lines.Select((value, i) => new { i, value }))
                {
                    LcdProxy.LogiLcdMonoSetText(line.i, line.value);
                }

                LcdProxy.LogiLcdUpdate();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }