servicepoint-binding-csharp/ServicePoint.Example/Program.cs
Vinzenz Schroeter 178ab1eb74
Some checks failed
Rust / build (pull_request) Failing after 16s
separate types for commands
2025-06-16 16:41:46 +02:00

23 lines
635 B
C#

using System.Threading;
using ServicePoint;
//var connection = new Connection("127.0.0.1:2342");
var connection = new FakeConnection();
connection.Send(new ClearCommand());
connection.Send(new GlobalBrightnessCommand(5));
connection.Send(new CharGridCommand(0, 0, CharGrid.Load("This is a test")));
var pixels = Bitmap.NewMaxSized();
for (ulong offset = 0; offset < pixels.Width(); offset++)
{
pixels.Fill(false);
for (ulong y = 0; y < pixels.Height(); y++)
pixels.Set((y + offset) % pixels.Width(), y, true);
connection.Send(new BitmapCommand(0, 0, pixels, CompressionCode.Lzma));
Thread.Sleep(14);
}