Changeset 20 for trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_NeoPixel.cpp
- Timestamp:
- Sep 10, 2019, 11:25:01 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_NeoPixel.cpp
r3 r20 713 713 // table (in flash memory) holding an 8-bit unsigned sine wave (0-255). 714 714 static const int _SBASE_ = __COUNTER__ + 1; // Index of 1st __COUNTER__ below 715 #define _S1_ ( sin((__COUNTER__ - _SBASE_) / 128.0 * M_PI) + 1.0) * 127.5 + 0.5,715 #define _S1_ (uint8_t) ((sin((__COUNTER__ - _SBASE_) / 128.0 * M_PI) + 1.0) * 127.5 + 0.5), 716 716 #define _S2_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ // Expands to 8 items 717 717 #define _S3_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ // Expands to 64 items … … 721 721 #define _GAMMA_ 2.6 722 722 static const int _GBASE_ = __COUNTER__ + 1; // Index of 1st __COUNTER__ below 723 #define _G1_ pow((__COUNTER__ - _GBASE_) / 255.0, _GAMMA_) * 255.0 + 0.5,723 #define _G1_ (uint8_t) (pow((__COUNTER__ - _GBASE_) / 255.0, _GAMMA_) * 255.0 + 0.5), 724 724 #define _G2_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ // Expands to 8 items 725 725 #define _G3_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ // Expands to 64 items
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/trac/Paradigma/chrome/site/paradigma.png)