Advertisement
Guest User

constants.h

a guest
Mar 18th, 2020
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.82 KB | None | 0 0
  1. // -------------------------------------------- CUSTOM PATTERNS LIST ---------------------------------------------
  2. // These array of indexes are used by customPattern() function in GreenMaskFinal
  3. // They correspond to the layout and NUM_OF_LEDS in the setup
  4.  
  5. uint_least8_t scrollingRowPattern[NUM_LEDS] = {
  6. // SCROLLING ROW
  7. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  8. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  9. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  10. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  11. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  12. };
  13.  
  14. uint_least8_t scrollingColumnPattern[NUM_LEDS] = {
  15. // SCROLLING COLUMN
  16. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  17. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
  18. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
  19. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
  20. 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
  21. };
  22.  
  23. uint_least8_t outwardsColumnPattern[NUM_LEDS] = {
  24. // OUTWARDS COLUMNS
  25. 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0,
  26. 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0,
  27. 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0,
  28. 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1,
  29. 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1,
  30. };
  31.  
  32. uint_least8_t outwardsWingsPattern[NUM_LEDS] = {
  33. // OUTWARDS WINGS
  34. 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8,
  35. 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7,
  36. 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6,
  37. 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6,
  38. 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6,
  39. };
  40.  
  41. uint_least8_t circlesPattern[NUM_LEDS] = {
  42. // CIRCLES
  43. 5, 5, 5, 5, 5, 5, 9, 5, 9, 5, 5, 5, 5, 5, 5,
  44. 5, 5, 0, 0, 5, 5, 8, 8, 5, 5, 0, 0, 5, 5,
  45. 5, 0, 0, 0, 1, 2, 3, 2, 1, 0, 0, 0, 5,
  46. 5, 0, 0, 5, 5, 8, 8, 5, 5, 0, 0, 5,
  47. 5, 5, 5, 5, 9, 5, 9, 5, 5, 5, 5,
  48. };
  49.  
  50. uint_least8_t trianglesPattern[NUM_LEDS] = {
  51. // TRIANGLES
  52. 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9,
  53. 8, 7, 6, 5, 4, 3, 2, 2, 3, 4, 5, 6, 7, 8,
  54. 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7,
  55. 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6,
  56. 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5,
  57. };
  58.  
  59.  
  60. uint_least8_t bigVPattern[NUM_LEDS] = {
  61. // BIG V
  62. 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0,
  63. 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0,
  64. 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0,
  65. 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0,
  66. 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0,
  67. };
  68.  
  69. uint_least8_t oneTwoPattern[NUM_LEDS] = {
  70. // One Two Three
  71. 14, 14, 0, 14, 14, 14, 4, 4, 14, 14, 14, 8, 8, 14, 14,
  72. 14, 0, 0, 14, 14, 4, 14, 4, 14, 14, 8, 14, 8, 14,
  73. 14, 0, 14, 14, 14, 14, 4, 14, 14, 14, 14, 8, 14,
  74. 0, 0, 14, 14, 14, 4, 14, 14, 14, 8, 14, 8,
  75. 0, 14, 14, 14, 4, 4, 4, 14, 14, 8, 8,
  76. };
  77.  
  78.  
  79. // Color Bridges
  80. // These color bridges are used by the customPattern() and pattern arrays
  81.  
  82.  
  83. uint_least8_t scrollingColors[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
  84. uint_least8_t scrollingReverseColors[16] = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
  85. uint_least8_t scrollingColorsB[16] = { 0, 0, 7, 7, 15, 15, 15, 4, 3, 4, 8, 2, 13, 13, 1, 9};
  86.  
  87.  
  88. // ------------------------------------------- END CUSTOM PATTERNS LIST --------------------------------------------
  89.  
  90.  
  91. DEFINE_GRADIENT_PALETTE( tom_test_gp ) {
  92. 0, 0, 0, 255,
  93. 255, 0, 0, 255,
  94. };
  95.  
  96. DEFINE_GRADIENT_PALETTE( saga_20_gp ) {
  97. 0, 41, 55, 0,
  98. 13, 66, 33, 0,
  99. 26, 100, 17, 0,
  100. 40, 140, 7, 0,
  101. 53, 192, 1, 0,
  102. 67, 255, 0, 0,
  103. 80, 142, 0, 4,
  104. 93, 67, 0, 25,
  105. 107, 23, 0, 71,
  106. 120, 3, 0,145,
  107. 134, 0, 0,255,
  108. 147, 0, 7,145,
  109. 161, 0, 33, 71,
  110. 174, 0, 82, 25,
  111. 187, 0,156, 4,
  112. 201, 0,255, 0,
  113. 214, 1,201, 0,
  114. 228, 3,154, 0,
  115. 241, 10,115, 0,
  116. 255, 22, 81, 0};
  117.  
  118.  
  119. DEFINE_GRADIENT_PALETTE( ib_jul01_gp ) {
  120. 0, 194, 1, 1,
  121. 94, 1, 29, 18,
  122. 132, 57,131, 28,
  123. 255, 113, 1, 1};
  124.  
  125. DEFINE_GRADIENT_PALETTE( es_vintage_57_gp ) {
  126. 0, 2, 1, 1,
  127. 53, 18, 1, 0,
  128. 104, 69, 29, 1,
  129. 153, 167,135, 10,
  130. 255, 46, 56, 4};
  131.  
  132. DEFINE_GRADIENT_PALETTE( es_vintage_01_gp ) {
  133. 0, 4, 1, 1,
  134. 51, 16, 0, 1,
  135. 76, 97,104, 3,
  136. 101, 255,131, 19,
  137. 127, 67, 9, 4,
  138. 153, 16, 0, 1,
  139. 229, 4, 1, 1,
  140. 255, 4, 1, 1};
  141.  
  142. DEFINE_GRADIENT_PALETTE( es_rivendell_15_gp ) {
  143. 0, 1, 14, 5,
  144. 101, 16, 36, 14,
  145. 165, 56, 68, 30,
  146. 242, 150,156, 99,
  147. 255, 150,156, 99};
  148.  
  149. DEFINE_GRADIENT_PALETTE( rgi_15_gp ) {
  150. 0, 4, 1, 31,
  151. 31, 55, 1, 16,
  152. 63, 197, 3, 7,
  153. 95, 59, 2, 17,
  154. 127, 6, 2, 34,
  155. 159, 39, 6, 33,
  156. 191, 112, 13, 32,
  157. 223, 56, 9, 35,
  158. 255, 22, 6, 38};
  159.  
  160. DEFINE_GRADIENT_PALETTE( retro2_16_gp ) {
  161. 0, 188,135, 1,
  162. 255, 46, 7, 1};
  163.  
  164. DEFINE_GRADIENT_PALETTE( Analogous_1_gp ) {
  165. 0, 3, 0,255,
  166. 63, 23, 0,255,
  167. 127, 67, 0,255,
  168. 191, 142, 0, 45,
  169. 255, 255, 0, 0};
  170.  
  171. DEFINE_GRADIENT_PALETTE( es_pinksplash_08_gp ) {
  172. 0, 126, 11,255,
  173. 127, 197, 1, 22,
  174. 175, 210,157,172,
  175. 221, 157, 3,112,
  176. 255, 157, 3,112};
  177.  
  178. DEFINE_GRADIENT_PALETTE( es_pinksplash_07_gp ) {
  179. 0, 229, 1, 1,
  180. 61, 242, 4, 63,
  181. 101, 255, 12,255,
  182. 127, 249, 81,252,
  183. 153, 255, 11,235,
  184. 193, 244, 5, 68,
  185. 255, 232, 1, 5};
  186.  
  187. DEFINE_GRADIENT_PALETTE( Coral_reef_gp ) {
  188. 0, 40,199,197,
  189. 50, 10,152,155,
  190. 96, 1,111,120,
  191. 96, 43,127,162,
  192. 139, 10, 73,111,
  193. 255, 1, 34, 71};
  194.  
  195. DEFINE_GRADIENT_PALETTE( es_ocean_breeze_068_gp ) {
  196. 0, 100,156,153,
  197. 51, 1, 99,137,
  198. 101, 1, 68, 84,
  199. 104, 35,142,168,
  200. 178, 0, 63,117,
  201. 255, 1, 10, 10};
  202.  
  203. DEFINE_GRADIENT_PALETTE( es_ocean_breeze_036_gp ) {
  204. 0, 1, 6, 7,
  205. 89, 1, 99,111,
  206. 153, 144,209,255,
  207. 255, 0, 73, 82};
  208.  
  209. DEFINE_GRADIENT_PALETTE( departure_gp ) {
  210. 0, 8, 3, 0,
  211. 42, 23, 7, 0,
  212. 63, 75, 38, 6,
  213. 84, 169, 99, 38,
  214. 106, 213,169,119,
  215. 116, 255,255,255,
  216. 138, 135,255,138,
  217. 148, 22,255, 24,
  218. 170, 0,255, 0,
  219. 191, 0,136, 0,
  220. 212, 0, 55, 0,
  221. 255, 0, 55, 0};
  222.  
  223. DEFINE_GRADIENT_PALETTE( es_landscape_64_gp ) {
  224. 0, 0, 0, 0,
  225. 37, 2, 25, 1,
  226. 76, 15,115, 5,
  227. 127, 79,213, 1,
  228. 128, 126,211, 47,
  229. 130, 188,209,247,
  230. 153, 144,182,205,
  231. 204, 59,117,250,
  232. 255, 1, 37,192};
  233.  
  234. DEFINE_GRADIENT_PALETTE( es_landscape_33_gp ) {
  235. 0, 1, 5, 0,
  236. 19, 32, 23, 1,
  237. 38, 161, 55, 1,
  238. 63, 229,144, 1,
  239. 66, 39,142, 74,
  240. 255, 1, 4, 1};
  241.  
  242. DEFINE_GRADIENT_PALETTE( rainbowsherbet_gp ) {
  243. 0, 255, 33, 4,
  244. 43, 255, 68, 25,
  245. 86, 255, 7, 25,
  246. 127, 255, 82,103,
  247. 170, 255,255,242,
  248. 209, 42,255, 22,
  249. 255, 87,255, 65};
  250.  
  251. DEFINE_GRADIENT_PALETTE( gr65_hult_gp ) {
  252. 0, 247,176,247,
  253. 48, 255,136,255,
  254. 89, 220, 29,226,
  255. 160, 7, 82,178,
  256. 216, 1,124,109,
  257. 255, 1,124,109};
  258.  
  259. DEFINE_GRADIENT_PALETTE( gr64_hult_gp ) {
  260. 0, 1,124,109,
  261. 66, 1, 93, 79,
  262. 104, 52, 65, 1,
  263. 130, 115,127, 1,
  264. 150, 52, 65, 1,
  265. 201, 1, 86, 72,
  266. 239, 0, 55, 45,
  267. 255, 0, 55, 45};
  268.  
  269. DEFINE_GRADIENT_PALETTE( GMT_drywet_gp ) {
  270. 0, 47, 30, 2,
  271. 42, 213,147, 24,
  272. 84, 103,219, 52,
  273. 127, 3,219,207,
  274. 170, 1, 48,214,
  275. 212, 1, 1,111,
  276. 255, 1, 7, 33};
  277.  
  278. DEFINE_GRADIENT_PALETTE( ib15_gp ) {
  279. 0, 113, 91,147,
  280. 72, 157, 88, 78,
  281. 89, 208, 85, 33,
  282. 107, 255, 29, 11,
  283. 141, 137, 31, 39,
  284. 255, 59, 33, 89};
  285.  
  286. DEFINE_GRADIENT_PALETTE( Fuschia_7_gp ) {
  287. 0, 43, 3,153,
  288. 63, 100, 4,103,
  289. 127, 188, 5, 66,
  290. 191, 161, 11,115,
  291. 255, 135, 20,182};
  292.  
  293. DEFINE_GRADIENT_PALETTE( es_emerald_dragon_08_gp ) {
  294. 0, 97,255, 1,
  295. 101, 47,133, 1,
  296. 178, 13, 43, 1,
  297. 255, 2, 10, 1};
  298.  
  299. DEFINE_GRADIENT_PALETTE( lava_gp ) {
  300. 0, 0, 0, 0,
  301. 46, 18, 0, 0,
  302. 96, 113, 0, 0,
  303. 108, 142, 3, 1,
  304. 119, 175, 17, 1,
  305. 146, 213, 44, 2,
  306. 174, 255, 82, 4,
  307. 188, 255,115, 4,
  308. 202, 255,156, 4,
  309. 218, 255,203, 4,
  310. 234, 255,255, 4,
  311. 244, 255,255, 71,
  312. 255, 255,255,255};
  313.  
  314. DEFINE_GRADIENT_PALETTE( fire_gp ) {
  315. 0, 1, 1, 0,
  316. 76, 32, 5, 0,
  317. 146, 192, 24, 0,
  318. 197, 220,105, 5,
  319. 240, 252,255, 31,
  320. 250, 252,255,111,
  321. 255, 255,255,255};
  322.  
  323. DEFINE_GRADIENT_PALETTE( Colorfull_gp ) {
  324. 0, 10, 85, 5,
  325. 25, 29,109, 18,
  326. 60, 59,138, 42,
  327. 93, 83, 99, 52,
  328. 106, 110, 66, 64,
  329. 109, 123, 49, 65,
  330. 113, 139, 35, 66,
  331. 116, 192,117, 98,
  332. 124, 255,255,137,
  333. 168, 100,180,155,
  334. 255, 22,121,174};
  335.  
  336. DEFINE_GRADIENT_PALETTE( Magenta_Evening_gp ) {
  337. 0, 71, 27, 39,
  338. 31, 130, 11, 51,
  339. 63, 213, 2, 64,
  340. 70, 232, 1, 66,
  341. 76, 252, 1, 69,
  342. 108, 123, 2, 51,
  343. 255, 46, 9, 35};
  344.  
  345. DEFINE_GRADIENT_PALETTE( Pink_Purple_gp ) {
  346. 0, 19, 2, 39,
  347. 25, 26, 4, 45,
  348. 51, 33, 6, 52,
  349. 76, 68, 62,125,
  350. 102, 118,187,240,
  351. 109, 163,215,247,
  352. 114, 217,244,255,
  353. 122, 159,149,221,
  354. 149, 113, 78,188,
  355. 183, 128, 57,155,
  356. 255, 146, 40,123};
  357.  
  358. DEFINE_GRADIENT_PALETTE( Sunset_Real_gp ) {
  359. 0, 120, 0, 0,
  360. 22, 179, 22, 0,
  361. 51, 255,104, 0,
  362. 85, 167, 22, 18,
  363. 135, 100, 0,103,
  364. 198, 16, 0,130,
  365. 255, 0, 0,160};
  366.  
  367. DEFINE_GRADIENT_PALETTE( es_autumn_19_gp ) {
  368. 0, 26, 1, 1,
  369. 51, 67, 4, 1,
  370. 84, 118, 14, 1,
  371. 104, 137,152, 52,
  372. 112, 113, 65, 1,
  373. 122, 133,149, 59,
  374. 124, 137,152, 52,
  375. 135, 113, 65, 1,
  376. 142, 139,154, 46,
  377. 163, 113, 13, 1,
  378. 204, 55, 3, 1,
  379. 249, 17, 1, 1,
  380. 255, 17, 1, 1};
  381.  
  382. DEFINE_GRADIENT_PALETTE( BlacK_Blue_Magenta_White_gp ) {
  383. 0, 0, 0, 0,
  384. 42, 0, 0, 45,
  385. 84, 0, 0,255,
  386. 127, 42, 0,255,
  387. 170, 255, 0,255,
  388. 212, 255, 55,255,
  389. 255, 255,255,255};
  390.  
  391. DEFINE_GRADIENT_PALETTE( BlacK_Magenta_Red_gp ) {
  392. 0, 0, 0, 0,
  393. 63, 42, 0, 45,
  394. 127, 255, 0,255,
  395. 191, 255, 0, 45,
  396. 255, 255, 0, 0};
  397.  
  398. DEFINE_GRADIENT_PALETTE( BlacK_Red_Magenta_Yellow_gp ) {
  399. 0, 0, 0, 0,
  400. 42, 42, 0, 0,
  401. 84, 255, 0, 0,
  402. 127, 255, 0, 45,
  403. 170, 255, 0,255,
  404. 212, 255, 55, 45,
  405. 255, 255,255, 0};
  406.  
  407. DEFINE_GRADIENT_PALETTE( Blue_Cyan_Yellow_gp ) {
  408. 0, 0, 0,255,
  409. 63, 0, 55,255,
  410. 127, 0,255,255,
  411. 191, 42,255, 45,
  412. 255, 255,255, 0};
  413.  
  414.  
  415.  
  416. // This list of color palettes acts as a "playlist"; you can
  417. // add or delete, or re-arrange as you wish.
  418. // Entire library of palettes Amount: 35
  419. const TProgmemRGBGradientPalettePtr gGradientPalettes[] = {
  420. tom_test_gp,
  421. Sunset_Real_gp,
  422. saga_20_gp,
  423. es_ocean_breeze_036_gp,
  424. es_rivendell_15_gp,
  425. rgi_15_gp,
  426. retro2_16_gp,
  427. Analogous_1_gp,
  428. es_pinksplash_08_gp,
  429. Coral_reef_gp,
  430. es_ocean_breeze_068_gp,
  431. es_pinksplash_07_gp,
  432. es_vintage_01_gp,
  433. departure_gp,
  434. es_landscape_64_gp,
  435. es_landscape_33_gp,
  436. rainbowsherbet_gp,
  437. gr65_hult_gp,
  438. gr64_hult_gp,
  439. GMT_drywet_gp,
  440. ib_jul01_gp,
  441. es_vintage_57_gp,
  442. ib15_gp,
  443. Fuschia_7_gp,
  444. es_emerald_dragon_08_gp,
  445. lava_gp,
  446. fire_gp,
  447. Colorfull_gp,
  448. Magenta_Evening_gp,
  449. Pink_Purple_gp,
  450. es_autumn_19_gp,
  451. BlacK_Blue_Magenta_White_gp,
  452. BlacK_Magenta_Red_gp,
  453. BlacK_Red_Magenta_Yellow_gp,
  454. Blue_Cyan_Yellow_gp,
  455. };
  456.  
  457. // Count of how many cpt-city gradients are defined in the full library:
  458. uint8_t gGradientPaletteCount =
  459. sizeof( gGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
  460.  
  461.  
  462. // Limited selection of palettes Amount: 2
  463. const TProgmemRGBGradientPalettePtr gCirclesGradientPalettes[] = {
  464. Colorfull_gp,
  465. BlacK_Magenta_Red_gp
  466. };
  467.  
  468. // Count of how many palettes in gCirclesGradientPalettes
  469. uint8_t gCirclesGradientPaletteCount =
  470. sizeof( gCirclesGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
  471.  
  472. // Limited selection of palettes Amount: 5
  473. // Would be better to have these limited lists use index references to the full library array, so I don't have to type the full name every time, just a number
  474. const TProgmemRGBGradientPalettePtr gOneTwoGradientPalettes[] = {
  475. Colorfull_gp,
  476. BlacK_Magenta_Red_gp,
  477. es_pinksplash_07_gp,
  478. es_vintage_01_gp,
  479. departure_gp,
  480. };
  481.  
  482. // Count of how many palettes in gCirclesGradientPalettes
  483. uint8_t gOneTwoGradientPaletteCount =
  484. sizeof( gOneTwoGradientPalettes) / sizeof( TProgmemRGBGradientPalettePtr );
  485.  
  486. // Would be better to have a list of indexes that refere to
  487.  
  488.  
  489. // Store a list with the sizes of each palette array
  490. // Would be better to automate the process of identifying these instead of having to declare each variable.
  491. uint8_t PaletteCounts[]
  492. {
  493. gGradientPaletteCount, gCirclesGradientPaletteCount, gOneTwoGradientPaletteCount
  494. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement