Skip to content

Commit

Permalink
ws2812 library signal timing updates for #191
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyLindsay committed May 22, 2019
1 parent a9c6bad commit 9a9ba3b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
Binary file modified Learn/Simple Libraries/Light/libws2812/cmm/libws2812.a
Binary file not shown.
1 change: 1 addition & 0 deletions Learn/Simple Libraries/Light/libws2812/ws2812.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ typedef struct {
// -- ns1h is 1-bit high timing (ns)
// -- ns1l is 1-bit low timing (ns)
// -- type is TYPE_GRB for ws2812 or ws2812b
// ws_start(state, 50, 350, 900, 900, 350, TYPE_GRB); // for ws2812b
int ws_start(ws2812_t *state, int usreset, int ns0h, int ns0l, int ns1h, int ns1l, int type)
{
extern uint32_t binary_ws2812_driver_dat_start[];
Expand Down
34 changes: 33 additions & 1 deletion Learn/Simple Libraries/Light/libws2812/ws2812b_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,39 @@

int ws2812b_start(ws2812_t *state)
{
return ws_start(state, 50, 350, 900, 900, 350, TYPE_GRB);

/*
This is a temporary fix until a more suitable CogC
or PASM driver replaces the existing one. Tuning
actual vs. requested stays here until y = mx + b
is either ruled out or implemented.
*/

// usreset, ns0h, ns0l, ns1h, ns1l, int type)
//return ws_start(state, 50, 350, 900, 900, 350, TYPE_GRB);

// Actual us values suggested by DC 280, 410, 875, 875, 410

// 523, 1070, 1040, 563,
//return ws_start(state, 280, 410, 875, 875, 410, TYPE_GRB);
// 461, 1015, 789, 398,
//return ws_start(state, 280, 300, 675, 600, 260, TYPE_GRB);
// 375, 1250, 1160, 414,
//return ws_start(state, 280, 250, 600, 700, 270, TYPE_GRB);
// 406, 1270, 1120, 440,
//return ws_start(state, 280, 275, 600, 700, 270, TYPE_GRB);
// 411, 871, 892, 429,
//return ws_start(state, 280, 300, 670, 725, 275, TYPE_GRB);
// 418, 860, 878, 414,
//return ws_start(state, 280, 300, 670, 715, 265, TYPE_GRB);
// 404, 871, 878, 407,
//return ws_start(state, 280, 295, 675, 715, 265, TYPE_GRB);
// want 410, 875, 875, 410
// measured 404, 871, 878, 408,
//return ws_start(state, 280, 300, 675, 715, 270, TYPE_GRB);

// Start call suggested by MV after testing
return ws_start(state, 300, 200, 600, 600, 200, TYPE_GRB);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.115
v1.4.116

0 comments on commit 9a9ba3b

Please sign in to comment.