Skip to content

Commit

Permalink
#191 Establish better ws2812b signal timing (round 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyLindsay committed May 9, 2019
1 parent 948a8ec commit 616ec0c
Show file tree
Hide file tree
Showing 4 changed files with 32 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
31 changes: 30 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,36 @@

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);
//return ws_start(state, 280, 410, 875, 875, 410, TYPE_GRB);

// 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);
}

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

0 comments on commit 616ec0c

Please sign in to comment.