diff --git a/Matomat/Automat.cs b/Matomat/Automat.cs index 8c241eb..8f3ce65 100644 --- a/Matomat/Automat.cs +++ b/Matomat/Automat.cs @@ -108,5 +108,13 @@ namespace Matomat { return shutdown; } + + internal void GetInitStatus() + { + lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²abcdef 321" + + "² MATOMAT Wilkommen! ²ghijkl 123" + + "² Frohes genießen der Mate ²mnopqr 066" + + "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²stuvwx 001"); + } } } diff --git a/Matomat/Input.cs b/Matomat/Input.cs index 2ec9128..b1f5297 100644 --- a/Matomat/Input.cs +++ b/Matomat/Input.cs @@ -51,7 +51,7 @@ namespace Matomat while (true) { Thread.Sleep(1); - char k = 'r'; + char k = 'k'; if (k == 'r') { data.id = rfid.getCardID(); diff --git a/Matomat/LCDDisplay.cs b/Matomat/LCDDisplay.cs index 9530d5e..90ebae6 100644 --- a/Matomat/LCDDisplay.cs +++ b/Matomat/LCDDisplay.cs @@ -68,6 +68,7 @@ namespace Matomat { this.disable = true; } + this.createChars(); messages = new Queue(); Thread workerThread = new Thread(this.DoWork); workerThread.Start(); @@ -109,7 +110,7 @@ namespace Matomat } Console.WriteLine(text); this.displayClear(); - byte[] btext = text.ToCharArray("ÄÖÜäöüß²€", new byte[] { 0xE1, 0xEF, 0xF5, 0xE1, 0xEF, 0xF5, 0xE2, 0xFF, 0xFF}); + byte[] btext = text.ToCharArray("ÄÖÜäöüß²€", new byte[] { 0xE1, 0xEF, 0xF5, 0xE1, 0xEF, 0xF5, 0xE2, 0xFF, 0x80}); byte[] upper; byte[] lower; if (text.Length > 80) @@ -145,6 +146,11 @@ namespace Matomat } } + private void createChars() + { + this.displayEscCode("UDC0GH_H_HG@"); + } + private void displayEscCode(string code) { this.displayCode(new byte[] { 0x1b }); diff --git a/Matomat/Worker.cs b/Matomat/Worker.cs index 269f04a..4e56c98 100644 --- a/Matomat/Worker.cs +++ b/Matomat/Worker.cs @@ -25,16 +25,8 @@ namespace Matomat { while (!_shouldStop) { - lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²abcdef 321"+ - "² MATOMAT Wilkommen! ²ghijkl 123"+ - "² Frohes genießen der Mate ²mnopqr 066"+ - "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²stuvwx 001"); + automat.GetInitStatus(); InputData input = inp.getAnyInput(0); - - /*int userId = rfid.getCardID(); - - * ; - long codeId = barcode.getCodeID();*/ automat.doJob(input); } Console.WriteLine("worker thread: terminating gracefully.");