This repository has been archived on 2023-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
PainterlyUNO/Matrix App/Defaults.cs

48 lines
1.5 KiB
C#
Raw Normal View History

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-06-09 17:53:36 +00:00
public const int PortNameUpdateInterval = 5000;
2021-06-09 16:43:27 +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
public const int BaudRate = 48000;
2021-06-09 16:43:27 +00:00
2021-06-09 17:53:36 +00:00
public const int ReadTimeoutMs = 5500;
public const int WriteTimeoutMs = 5500;
2021-06-09 16:43:27 +00:00
/// <summary>
/// Total count of LEDs at start
/// </summary>
2021-06-09 17:53:36 +00:00
public static readonly int MATRIX_START_LED_COUNT = MatrixStartWidth * MatrixStartHeight * Bpp;
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-06-09 17:53:36 +00:00
public const int ArduinoSuccessByte = 21;
2021-06-09 16:43:27 +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
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-06-09 16:43:27 +00:00
public static readonly byte OPCODE_CONFIG = 4;
}
}