2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-06-09 17:53:36 +00:00
|
|
|
|
namespace Matrix_App
|
2021-06-09 16:43:27 +00:00
|
|
|
|
{
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public static class Defaults
|
2021-06-09 16:43:27 +00:00
|
|
|
|
{
|
2021-07-04 12:56:52 +00:00
|
|
|
|
public const int MatrixStartWidth = 16;
|
|
|
|
|
public const int MatrixStartHeight = 16;
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public const int MatrixStartFrames = 1;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public const int MatrixLimitedWidth = 512;
|
|
|
|
|
public const int MatrixLimitedHeight = 512;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-08-08 12:50:24 +00:00
|
|
|
|
public const int BaudRate = 9600;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-08-08 12:50:24 +00:00
|
|
|
|
public const int ReadTimeoutMs = 20500;
|
|
|
|
|
public const int WriteTimeoutMs = 2500;
|
|
|
|
|
|
2021-06-09 16:43:27 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Number of Bytes Per Pixel: 3 cause Red (1 byte) + Blue (1 Byte) + Green (1 byte) = 3
|
|
|
|
|
/// </summary>
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public const int Bpp = 3;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public const int FilterPreviewWidth = 32;
|
|
|
|
|
public const int FilterPreviewHeight = 32;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-08-08 12:50:24 +00:00
|
|
|
|
public const int ArduinoSynchronizationByte = 91;
|
2021-07-06 12:17:53 +00:00
|
|
|
|
public const int ArduinoSuccessByte = 75;
|
2021-08-08 12:50:24 +00:00
|
|
|
|
public const int ArduinoErrorByte = 255;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-07-04 12:56:52 +00:00
|
|
|
|
public const int ArduinoCommandQueueSize = 2;
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public const int ArduinoReceiveBufferSize = 1 + 1 + 1 + MatrixLimitedWidth * MatrixLimitedHeight;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
|
2021-07-04 12:56:52 +00:00
|
|
|
|
public const int DequeueWaitTimeoutCounter = 3;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public static class ArduinoInstruction
|
2021-06-09 16:43:27 +00:00
|
|
|
|
{
|
2021-06-09 17:53:36 +00:00
|
|
|
|
public const byte OpcodeScale = 0;
|
|
|
|
|
public const byte OpcodeImage = 2;
|
|
|
|
|
public const byte OpcodeFill = 3;
|
2021-08-08 12:50:24 +00:00
|
|
|
|
public const byte OpcodePush = 5;
|
|
|
|
|
|
|
|
|
|
public const byte OpcodeInfo = 6;
|
|
|
|
|
// public static readonly byte OpcodeConfig = 4;
|
2021-06-09 16:43:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|