Beispiel #1
0
        private Task printOnLcd()
        {
            while (!_cts.IsCancellationRequested)
            {
                List <string> line1 = prepairLine1();

                foreach (var content in line1)
                {
                    SymbolConfig.initilizeSymbols();

                    LCD.prints(content);
                    LCD.gotoSecondLine();

                    printLine2();

                    try
                    {
                        Task.Delay(3500).Wait(_cts.Token);
                    }
                    catch (Exception e)
                    {
                        Debug.WriteLine("cancel LCD-Writing Task");
                        return(Task.CompletedTask);
                    }

                    LCD.clrscr();
                }
            }

            return(Task.CompletedTask);
        }
Beispiel #2
0
 private void printLine2()
 {
     LCD.prints(" ");
     this.LCD.printSymbol(SymbolConfig.busySymbolAddress);
     LCD.prints("   ");
     this.LCD.printSymbol(SymbolConfig.batterySymbolAddress);
     LCD.prints("   ");
     this.LCD.printSymbol(SymbolConfig.initSymbolAddress);
     LCD.prints("   ");
     this.LCD.printSymbol(SymbolConfig.volumeSymbolAddress);
     LCD.prints(" ");
 }