2024-11-04 21:06:01 +01:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using ServicePoint;
|
2024-11-02 23:15:54 +01:00
|
|
|
|
|
2025-02-16 14:09:11 +01:00
|
|
|
|
// TODO: replace with new Connection("127.0.0.1:2342") to send to a real display
|
|
|
|
|
var connection = Connection.NewFake();
|
2024-11-04 21:06:01 +01:00
|
|
|
|
connection.Send(Command.Clear());
|
|
|
|
|
|
|
|
|
|
connection.Send(Command.Brightness(5));
|
|
|
|
|
|
2025-02-16 17:08:18 +01:00
|
|
|
|
connection.Send(Command.Utf8Data(0,0, CharGrid.Load("This is a test")));
|
|
|
|
|
|
2024-11-04 21:06:01 +01:00
|
|
|
|
var pixels = Bitmap.NewMaxSized();
|
2025-02-16 17:08:18 +01:00
|
|
|
|
for (ulong offset = 0; offset < pixels.Width(); offset++)
|
2024-11-04 21:06:01 +01:00
|
|
|
|
{
|
|
|
|
|
pixels.Fill(false);
|
|
|
|
|
|
|
|
|
|
for (ulong y = 0; y < pixels.Height(); y++)
|
|
|
|
|
pixels.Set((y + offset) % pixels.Width(), y, true);
|
|
|
|
|
|
2025-02-16 14:47:03 +01:00
|
|
|
|
connection.Send(Command.BitmapLinearWin(0, 0, pixels, CompressionCode.Lzma));
|
2024-11-04 21:06:01 +01:00
|
|
|
|
Thread.Sleep(14);
|
|
|
|
|
}
|