add library json

This commit is contained in:
2018-09-05 12:24:08 +02:00
parent cbb4b95244
commit d2a818af74
5 changed files with 185 additions and 8 deletions

View File

@@ -41,13 +41,11 @@ const PIXEL_FP PIXEL_FNCS[] = {
},
/*
COLOR_MODE
Input: rgb hex color without #
parses the hex string to r,g,b and sets all pixels accordingly
sets the color from an rgb int
*/
[](NeoPattern* pixels, const char *color){
int r, g, b;
sscanf(color, "%02x%02x%02x", &r, &g, &b);
pixels->ColorSet(pixels->Color(r,g,b));
pixels->ActivePattern = NONE;
pixels->ColorSet(atoi(color));
},
/*
PATTERN_MODE