Skip to content
Merged

Dmx3 #1796

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8368829
ENABLE DMX on ESP
openshwprojects Sep 13, 2025
57e93ee
test
openshwprojects Sep 13, 2025
38937c9
s
openshwprojects Sep 13, 2025
374a5fb
Update hal_uart_espidf.c
openshwprojects Sep 13, 2025
466bade
Update obk_main.cmake
openshwprojects Sep 13, 2025
b89baf3
w
openshwprojects Sep 13, 2025
fe4ed2e
test
openshwprojects Sep 13, 2025
6f8ed03
Update hal_uart_espidf.c
openshwprojects Sep 13, 2025
ede2f5f
Update drv_dmx512.c
openshwprojects Sep 13, 2025
d0f9821
test
openshwprojects Sep 13, 2025
e4dc19a
test
openshwprojects Sep 13, 2025
e3167f3
test
openshwprojects Sep 13, 2025
812956f
w
openshwprojects Sep 13, 2025
126607e
t
openshwprojects Sep 13, 2025
32f260f
c
openshwprojects Sep 13, 2025
2c05d80
t
openshwprojects Sep 13, 2025
ecda258
test
openshwprojects Sep 13, 2025
5668452
T
openshwprojects Sep 13, 2025
39f67c8
Update drv_dmx512.c
openshwprojects Sep 13, 2025
010adef
test
openshwprojects Sep 13, 2025
20cece8
test
openshwprojects Sep 13, 2025
8c21a55
try flush
openshwprojects Sep 13, 2025
3337668
try wait
openshwprojects Sep 13, 2025
553b95e
ticks w
openshwprojects Sep 13, 2025
c6c8555
t
openshwprojects Sep 13, 2025
1c1fe14
fx
openshwprojects Sep 13, 2025
002b2d7
100 ms
openshwprojects Sep 13, 2025
e0b0e90
SIM fx
openshwprojects Sep 13, 2025
1d00327
Update cmd_newLEDDriver.c
openshwprojects Sep 13, 2025
ff9d0d4
test 2x
openshwprojects Sep 13, 2025
e526220
tests
openshwprojects Sep 13, 2025
7d9596e
fixes
openshwprojects Sep 14, 2025
89acc5a
free
openshwprojects Sep 14, 2025
44fa7b3
fix
openshwprojects Sep 14, 2025
2330be7
misc
openshwprojects Sep 14, 2025
ff035b8
b
openshwprojects Sep 14, 2025
cad47c3
hal
openshwprojects Sep 14, 2025
d31b75f
s
openshwprojects Sep 14, 2025
5635736
Update workflow.yaml
openshwprojects Sep 14, 2025
44f2c84
pin
openshwprojects Sep 14, 2025
aa7d4c8
fin
openshwprojects Sep 14, 2025
be4515b
test
openshwprojects Sep 14, 2025
ec7d001
Update hal_uart_espidf.c
openshwprojects Sep 14, 2025
9fdc87f
t
openshwprojects Sep 15, 2025
0e1ab88
Merge branch 'main' into dmx3
openshwprojects Sep 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 57 additions & 29 deletions src/driver/drv_leds_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@

static ledStrip_t led_backend;

enum ColorChannel {
COLOR_CHANNEL_RED,
COLOR_CHANNEL_GREEN,
COLOR_CHANNEL_BLUE,
COLOR_CHANNEL_COLD_WHITE,
COLOR_CHANNEL_WARM_WHITE
};

#define DEFAULT_PIXEL_SIZE 3
const enum ColorChannel default_color_channel_order[3] = {
COLOR_CHANNEL_RED,
Expand All @@ -33,7 +25,16 @@ int pixel_size = DEFAULT_PIXEL_SIZE; // default is RGB -> 3 bytes per pixel
// Number of pixels that can be addressed
uint32_t pixel_count;

void SM16703P_GetPixel(uint32_t pixel, byte *dst) {
bool Strip_HasChannel(ColorChannel_t ch) {
for (int i = 0; i < pixel_size; i++) {
if (color_channel_order[i] == ch) {
return true;
}
}
return false;
}

void Strip_GetPixel(uint32_t pixel, byte *dst) {
int i;

for (i = 0; i < pixel_size; i++) {
Expand All @@ -42,19 +43,34 @@ void SM16703P_GetPixel(uint32_t pixel, byte *dst) {
}

bool Strip_VerifyPixel(uint32_t pixel, byte r, byte g, byte b) {
byte real[4];
SM16703P_GetPixel(pixel, real);
byte real[5];
Strip_GetPixel(pixel, real);
if (real[0] != r)
return false;
if (real[1] != g)
return false;
if (real[2] != b)
return false;
return true;
}
bool Strip_VerifyPixel5(uint32_t pixel, byte r, byte g, byte b, byte c, byte w) {
byte real[5];
Strip_GetPixel(pixel, real);
if (real[0] != r)
return false;
if (real[1] != g)
return false;
if (real[2] != b)
return false;
if (real[3] != c)
return false;
if (real[4] != w)
return false;
return true;
}
bool Strip_VerifyPixel4(uint32_t pixel, byte r, byte g, byte b, byte w) {
byte real[4];
SM16703P_GetPixel(pixel, real);
byte real[5];
Strip_GetPixel(pixel, real);
if (real[0] != r)
return false;
if (real[1] != g)
Expand Down Expand Up @@ -139,8 +155,8 @@ void Strip_scaleAllPixels(int scale) {
byte *data, *input;

for (pixel = 0; pixel < pixel_count; pixel++) {
for (ofs = 0; ofs < 3; ofs++) {
int byteIndex = pixel * 3 + ofs;
for (ofs = 0; ofs < pixel_size; ofs++) {
int byteIndex = pixel * pixel_size + ofs;
byte b = led_backend.getByte(byteIndex);
b = SCALE8_PIXEL(b, scale);
led_backend.setByte(byteIndex, b);
Expand All @@ -158,7 +174,7 @@ void Strip_setAllPixels(int r, int g, int b, int c, int w) {

// SM16703P_SetRaw bUpdate byteOfs HexData
// SM16703P_SetRaw 1 0 FF000000FF000000FF
commandResult_t SM16703P_CMD_setRaw(const void *context, const char *cmd, const char *args, int flags) {
commandResult_t Strip_CMD_setRaw(const void *context, const char *cmd, const char *args, int flags) {
int ofs, bPush;
Tokenizer_TokenizeString(args, 0);
bPush = Tokenizer_GetArgInteger(0);
Expand All @@ -176,7 +192,7 @@ commandResult_t SM16703P_CMD_setRaw(const void *context, const char *cmd, const
}
return CMD_RES_OK;
}
commandResult_t SM16703P_CMD_setPixel(const void *context, const char *cmd, const char *args, int flags) {
commandResult_t Strip_CMD_setPixel(const void *context, const char *cmd, const char *args, int flags) {
int i, r, g, b, c, w;
int pixel = 0;
const char *all = 0;
Expand All @@ -199,13 +215,21 @@ commandResult_t SM16703P_CMD_setPixel(const void *context, const char *cmd, cons
r = Tokenizer_GetArgIntegerRange(1, 0, 255);
g = Tokenizer_GetArgIntegerRange(2, 0, 255);
b = Tokenizer_GetArgIntegerRange(3, 0, 255);
c = 0; // cold white is optional for backward compatibility
if (Tokenizer_GetArgsCount() > 4) {
c = Tokenizer_GetArgIntegerRange(4, 0, 255);
}
c = 0; // cold white is optional for backward compatibility]
w = 0; // warm white is optional for backward compatibility
if (Tokenizer_GetArgsCount() > 5) {
w = Tokenizer_GetArgIntegerRange(5, 0, 255);
int numArgs = Tokenizer_GetArgsCount();
// this is a hack, so we can easily write commands for RGBW...
if (numArgs == 5 && Strip_HasChannel(COLOR_CHANNEL_WARM_WHITE)) {
// treat it as Warm (not Cool)
w = Tokenizer_GetArgIntegerRange(4, 0, 255);
}
else {
if (numArgs > 4) {
c = Tokenizer_GetArgIntegerRange(4, 0, 255);
}
if (numArgs > 5) {
w = Tokenizer_GetArgIntegerRange(5, 0, 255);
}
}

ADDLOG_INFO(LOG_FEATURE_CMD, "Set Pixel %i to R %i G %i B %i C %i W %i", pixel, r, g, b, c, w);
Expand All @@ -223,7 +247,7 @@ commandResult_t SM16703P_CMD_setPixel(const void *context, const char *cmd, cons
return CMD_RES_OK;
}

commandResult_t SM16703P_InitForLEDCount(const void *context, const char *cmd, const char *args, int flags) {
commandResult_t Strip_CMD_InitForLEDCount(const void *context, const char *cmd, const char *args, int flags) {

Tokenizer_TokenizeString(args, 0);

Expand Down Expand Up @@ -292,7 +316,7 @@ bool Strip_IsActive() {
void Strip_Apply() {
led_backend.apply();
}
static commandResult_t SM16703P_StartTX(const void *context, const char *cmd, const char *args, int flags) {
static commandResult_t Strip_CMD_StartTX(const void *context, const char *cmd, const char *args, int flags) {
Strip_Apply();
return CMD_RES_OK;
}
Expand All @@ -307,22 +331,26 @@ void LEDS_InitShared(ledStrip_t *api) {
//cmddetail:"descr":"This will setup LED driver for a strip with given number of LEDs. Please note that it also works for WS2812B and similiar LEDs. You can optionally set the color order with can be any combination of R, G, B, C and W (e.g. RGBW or GRBWC, default is RGB). See [tutorial](https://www.elektroda.com/rtvforum/topic4036716.html).",
//cmddetail:"fn":"SM16703P_InitForLEDCount","file":"driver/drv_leds_shared.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("SM16703P_Init", SM16703P_InitForLEDCount, NULL);
CMD_RegisterCommand("SM16703P_Init", Strip_CMD_InitForLEDCount, NULL);
CMD_CreateAliasHelper("Strip_Init","SM16703P_Init");
//cmddetail:{"name":"SM16703P_Start","args":"",
//cmddetail:"descr":"This will send the currently set data to the strip. Please note that it also works for WS2812B and similiar LEDs. See [tutorial](https://www.elektroda.com/rtvforum/topic4036716.html).",
//cmddetail:"fn":"SM16703P_StartTX","file":"driver/drv_leds_shared.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("SM16703P_Start", SM16703P_StartTX, NULL);
CMD_RegisterCommand("SM16703P_Start", Strip_CMD_StartTX, NULL);
CMD_CreateAliasHelper("Strip_Start", "SM16703P_Start");
//cmddetail:{"name":"SM16703P_SetPixel","args":"[index/all] [R] [G] [B]",
//cmddetail:"descr":"Sets a pixel for LED strip. Index can be a number or 'all' keyword to set all. Then, 3 integer values for R, G and B. Please note that it also works for WS2812B and similiar LEDs. See [tutorial](https://www.elektroda.com/rtvforum/topic4036716.html).",
//cmddetail:"fn":"SM16703P_CMD_setPixel","file":"driver/drv_leds_shared.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("SM16703P_SetPixel", SM16703P_CMD_setPixel, NULL);
CMD_RegisterCommand("SM16703P_SetPixel", Strip_CMD_setPixel, NULL);
CMD_CreateAliasHelper("Strip_SetPixel", "SM16703P_SetPixel");
//cmddetail:{"name":"SM16703P_SetRaw","args":"[bUpdate] [byteOfs] [HexData]",
//cmddetail:"descr":"Sets the raw data bytes for SPI DMA LED driver at the given offset. Hex data should be as a hex string, for example, FF00AA, etc. The bUpdate, if set to 1, will run SM16703P_Start automatically after setting data. Please note that it also works for WS2812B and similiar LEDs. See [tutorial](https://www.elektroda.com/rtvforum/topic4036716.html).",
//cmddetail:"fn":"SM16703P_CMD_setRaw","file":"driver/drv_leds_shared.c","requires":"",
//cmddetail:"examples":""}
CMD_RegisterCommand("SM16703P_SetRaw", SM16703P_CMD_setRaw, NULL);
CMD_RegisterCommand("SM16703P_SetRaw", Strip_CMD_setRaw, NULL);
CMD_CreateAliasHelper("Strip_SetRaw", "SM16703P_SetRaw");

//CMD_RegisterCommand("SM16703P_SendBytes", SM16703P_CMD_sendBytes, NULL);
}
Expand Down
7 changes: 7 additions & 0 deletions src/driver/drv_leds_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ typedef struct ledStrip_s {
void (*setLEDCount)(int pixel_count, int pixel_size);
} ledStrip_t;

typedef enum ColorChannel {
COLOR_CHANNEL_RED,
COLOR_CHANNEL_GREEN,
COLOR_CHANNEL_BLUE,
COLOR_CHANNEL_COLD_WHITE,
COLOR_CHANNEL_WARM_WHITE
} ColorChannel_t;

void LEDS_InitShared(ledStrip_t *api);
void LEDS_ShutdownShared();
Expand Down
4 changes: 4 additions & 0 deletions src/selftest/selftest_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ const char *Test_GetJSONValue_String(const char *keyword, const char *obj) {
const char *Test_GetLastHTMLReply() {
return replyAt;
}
const char *Test_QueryHTMLReply(const char *url) {
Test_FakeHTTPClientPacket_GET(url);
return Test_GetLastHTMLReply();
}
void Test_Http_SingleRelayOnChannel1() {

SIM_ClearOBK(0);
Expand Down
2 changes: 1 addition & 1 deletion src/selftest/selftest_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ void Test_LEDDriver_BP5758_RGBCW() {
SIM_ClearOBK(0);

Test_FakeHTTPClientPacket_GET("index");
SELFTEST_ASSERT_HTML_REPLY_NOT_CONTAINS("LED RGB Color");
SELFTEST_ASSERT_PAGE_NOT_CONTAINS("index","LED RGB Color");
SELFTEST_ASSERT_HTML_REPLY_NOT_CONTAINS("LED Temperature Slider");

CMD_ExecuteCommand("StartDriver BP5758D", 0);
Expand Down
8 changes: 8 additions & 0 deletions src/selftest/selftest_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ void SelfTest_Failed(const char *file, const char *function, int line, const cha
#define SELFTEST_ASSERT_HTTP_HAS_BUTTON_LEDS_OFF(bHas) SELFTEST_ASSERT((bHas) == SIM_HasHTTP_LED_Toggler(false));






#define SELFTEST_ASSERT_PAGE_NOT_CONTAINS(page,expected) SELFTEST_ASSERT(!(strstr(Test_QueryHTMLReply(page),expected)));
#define SELFTEST_ASSERT_PAGE_CONTAINS(page,expected) SELFTEST_ASSERT((strstr(Test_QueryHTMLReply(page),expected)));

#define SELFTEST_ASSERT_STRING(current,expected) SELFTEST_ASSERT((strcmp(expected,current) == 0));
#define SELFTEST_ASSERT_INTEGER(current,expected) SELFTEST_ASSERT((expected==current));
#define SELFTEST_ASSERT_HTML_REPLY(expected) SELFTEST_ASSERT((strcmp(Test_GetLastHTMLReply(),expected) == 0));
Expand Down Expand Up @@ -149,6 +156,7 @@ void Test_FakeHTTPClientPacket_POST(const char *tg, const char *data);
void Test_FakeHTTPClientPacket_POST_withJSONReply(const char *tg, const char *data);
void Test_FakeHTTPClientPacket_JSON(const char *tg);
const char *Test_GetLastHTMLReply();
const char *Test_QueryHTMLReply(const char *url);

bool SIM_HasHTTPTemperature();
bool SIM_HasHTTPRGB();
Expand Down
100 changes: 78 additions & 22 deletions src/selftest/selftest_ws2812b.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

bool Strip_VerifyPixel(uint32_t pixel, byte r, byte g, byte b);
bool Strip_VerifyPixel4(uint32_t pixel, byte r, byte g, byte b, byte a);
bool Strip_VerifyPixel5(uint32_t pixel, byte r, byte g, byte b, byte c, byte w);

#define SELFTEST_ASSERT_PIXEL(index, r, g, b) SELFTEST_ASSERT(Strip_VerifyPixel(index, r, g, b));
#define SELFTEST_ASSERT_PIXEL4(index, r, g, b, w) SELFTEST_ASSERT(Strip_VerifyPixel4(index, r, g, b, w));
#define SELFTEST_ASSERT_PIXEL5(index, r, g, b, c, w) SELFTEST_ASSERT(Strip_VerifyPixel5(index, r, g, b, c, w));


void Strip_setMultiplePixel(uint32_t pixel, uint8_t *data, bool push);

Expand All @@ -20,8 +23,15 @@ void Test_DMX_RGB() {

SELFTEST_ASSERT_HAS_UART_EMPTY();

SELFTEST_ASSERT_PAGE_NOT_CONTAINS("index", "LED RGB Color");
SELFTEST_ASSERT_PAGE_NOT_CONTAINS("index", "LED Temperature Slider");

CMD_ExecuteCommand("startDriver DMX", 0);
CMD_ExecuteCommand("SM16703P_Init 3", 0);
CMD_ExecuteCommand("Strip_Init 3", 0);

SELFTEST_ASSERT_PAGE_CONTAINS("index", "LED RGB Color");
SELFTEST_ASSERT_PAGE_NOT_CONTAINS("index", "LED Temperature Slider");

CMD_ExecuteCommand("SM16703P_SetPixel all 255 0 128", 0);
SELFTEST_ASSERT_PIXEL(0, 255, 0, 128);
SELFTEST_ASSERT_PIXEL(1, 255, 0, 128);
Expand Down Expand Up @@ -110,13 +120,13 @@ void Test_DMX_RGBC() {
SELFTEST_ASSERT_HAS_UART_EMPTY();

CMD_ExecuteCommand("SM16703P_SetPixel 0 128 128 128 128", 0);
CMD_ExecuteCommand("SM16703P_SetPixel 1 255 255 255 255", 0);
CMD_ExecuteCommand("Strip_SetPixel 1 255 255 255 255", 0);
CMD_ExecuteCommand("SM16703P_SetPixel 2 15 15 15 15", 0);
SELFTEST_ASSERT_PIXEL4(0, 128, 128, 128, 128);
SELFTEST_ASSERT_PIXEL4(1, 255, 255, 255, 255);
SELFTEST_ASSERT_PIXEL4(2, 15, 15, 15, 15);
SELFTEST_ASSERT_HAS_UART_EMPTY();
CMD_ExecuteCommand("SM16703P_Start", 0);
CMD_ExecuteCommand("Strip_Start", 0);
SELFTEST_ASSERT_HAS_SOME_DATA_IN_UART();
SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 80808080 FFFFFFFF 0F0F0F0F");
// 512 channels, but checked already 12
Expand All @@ -129,37 +139,82 @@ void Test_DMX_RGBC() {
}
void Test_DMX_RGBW() {
// reset whole device
//SIM_ClearOBK(0);
SIM_ClearOBK(0);

//SIM_UART_InitReceiveRingBuffer(4096);
//SIM_ClearUART();
SIM_UART_InitReceiveRingBuffer(4096);
SIM_ClearUART();

//SELFTEST_ASSERT_HAS_UART_EMPTY();
SELFTEST_ASSERT_HAS_UART_EMPTY();

//CMD_ExecuteCommand("startDriver DMX", 0);
//CMD_ExecuteCommand("SM16703P_Init 3 RGBW", 0);
//CMD_ExecuteCommand("SM16703P_SetPixel all 255 0 128 255", 0);
//SELFTEST_ASSERT_PIXEL4(0, 255, 0, 128, 255);
//SELFTEST_ASSERT_PIXEL4(1, 255, 0, 128, 255);
//SELFTEST_ASSERT_PIXEL4(2, 255, 0, 128, 255);
CMD_ExecuteCommand("startDriver DMX", 0);
CMD_ExecuteCommand("SM16703P_Init 3 RGBW", 0);
CMD_ExecuteCommand("SM16703P_SetPixel all 255 0 128 255", 0);
SELFTEST_ASSERT_PIXEL4(0, 255, 0, 128, 255);
SELFTEST_ASSERT_PIXEL4(1, 255, 0, 128, 255);
SELFTEST_ASSERT_PIXEL4(2, 255, 0, 128, 255);

//SELFTEST_ASSERT_HAS_UART_EMPTY();
SELFTEST_ASSERT_HAS_UART_EMPTY();
CMD_ExecuteCommand("SM16703P_Start", 0);
SELFTEST_ASSERT_HAS_SOME_DATA_IN_UART();
SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 FF0080FF FF0080FF FF0080FF");
// 512 channels, but checked already 12
for (int i = 0; i < 100; i++) {
SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 00 00 00 00");
}
SELFTEST_ASSERT_HAS_UART_EMPTY();

CMD_ExecuteCommand("SM16703P_SetPixel 0 128 128 128 128", 0);
CMD_ExecuteCommand("SM16703P_SetPixel 1 255 255 255 255", 0);
CMD_ExecuteCommand("SM16703P_SetPixel 2 15 15 15 15", 0);
SELFTEST_ASSERT_PIXEL4(0, 128, 128, 128, 128);
SELFTEST_ASSERT_PIXEL4(1, 255, 255, 255, 255);
SELFTEST_ASSERT_PIXEL4(2, 15, 15, 15, 15);
SELFTEST_ASSERT_HAS_UART_EMPTY();
//CMD_ExecuteCommand("SM16703P_Start", 0);
//SELFTEST_ASSERT_HAS_SOME_DATA_IN_UART();
//SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 FF0080FF FF0080FF FF0080FF");
//SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 80808080 FFFFFFFF 0F0F0F0F");
//// 512 channels, but checked already 12
//for (int i = 0; i < 100; i++) {
// SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 00 00 00 00");
//}
//SELFTEST_ASSERT_HAS_UART_EMPTY();

//CMD_ExecuteCommand("SM16703P_SetPixel 0 128 128 128 128", 0);
//CMD_ExecuteCommand("SM16703P_SetPixel 1 255 255 255 255", 0);
//CMD_ExecuteCommand("SM16703P_SetPixel 2 15 15 15 15", 0);
//SELFTEST_ASSERT_PIXEL4(0, 128, 128, 128, 128);
//SELFTEST_ASSERT_PIXEL4(1, 255, 255, 255, 255);
//SELFTEST_ASSERT_PIXEL4(2, 15, 15, 15, 15);
//SELFTEST_ASSERT_HAS_UART_EMPTY();
// nothing is sent by OBK at that point
}
void Test_DMX_RGBCW() {
// reset whole device
SIM_ClearOBK(0);

SIM_UART_InitReceiveRingBuffer(4096);
SIM_ClearUART();

SELFTEST_ASSERT_HAS_UART_EMPTY();

CMD_ExecuteCommand("startDriver DMX", 0);
CMD_ExecuteCommand("SM16703P_Init 3 RGBCW", 0);
CMD_ExecuteCommand("SM16703P_SetPixel all 255 0 128 255 128", 0);
SELFTEST_ASSERT_PIXEL5(0, 255, 0, 128, 255, 128);
SELFTEST_ASSERT_PIXEL5(1, 255, 0, 128, 255, 128);
SELFTEST_ASSERT_PIXEL5(2, 255, 0, 128, 255, 128);

SELFTEST_ASSERT_HAS_UART_EMPTY();
CMD_ExecuteCommand("SM16703P_Start", 0);
SELFTEST_ASSERT_HAS_SOME_DATA_IN_UART();
SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 FF0080FF80 FF0080FF80 FF0080FF80");
// 512 channels, but checked already 12+3
SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 00");
for (int i = 0; i < 99; i++) {
SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 00 00 00 00");
}
SELFTEST_ASSERT_HAS_UART_EMPTY();

CMD_ExecuteCommand("SM16703P_SetPixel 0 128 128 128 128 11", 0);
CMD_ExecuteCommand("SM16703P_SetPixel 1 255 255 255 255 22", 0);
CMD_ExecuteCommand("SM16703P_SetPixel 2 15 15 15 15 33", 0);
SELFTEST_ASSERT_PIXEL5(0, 128, 128, 128, 128, 11);
SELFTEST_ASSERT_PIXEL5(1, 255, 255, 255, 255, 22);
SELFTEST_ASSERT_PIXEL5(2, 15, 15, 15, 15, 33);
SELFTEST_ASSERT_HAS_UART_EMPTY();
//CMD_ExecuteCommand("SM16703P_Start", 0);
//SELFTEST_ASSERT_HAS_SOME_DATA_IN_UART();
//SELFTEST_ASSERT_HAS_SENT_UART_STRING("00 80808080 FFFFFFFF 0F0F0F0F");
Expand Down Expand Up @@ -453,6 +508,7 @@ void Test_LEDstrips() {
Test_DMX_RGB();
Test_DMX_RGBC();
Test_DMX_RGBW();
Test_DMX_RGBCW();
Test_WS2812B();
}

Expand Down
Loading
Loading