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(); } }
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); }
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); } }