Ignore:
Timestamp:
Sep 10, 2019, 11:25:01 AM (7 years ago)
Author:
markus
Message:

Updated Arduino libraries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Arduino/libraries/Adafruit_Circuit_Playground/utility/Adafruit_CPlay_NeoPixel.cpp

    r3 r20  
    713713// table (in flash memory) holding an 8-bit unsigned sine wave (0-255).
    714714static 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),
    716716#define _S2_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ _S1_ // Expands to 8 items
    717717#define _S3_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ _S2_ // Expands to 64 items
    … …  
    721721#define _GAMMA_ 2.6
    722722static 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),
    724724#define _G2_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ _G1_ // Expands to 8 items
    725725#define _G3_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ _G2_ // Expands to 64 items
Note: See TracChangeset for help on using the changeset viewer.