diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2014-07-07 22:19:42 +0400 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2014-07-07 22:19:42 +0400 |
commit | 5097274af4c772ba44e5b0233aa855230cd686bb (patch) | |
tree | 6fd63093c8e001314108ce4abd66a8ced56b0d5e /controller.h | |
parent | cfb8cdd19f46e06044af6ad1ca3cd934dacdcdc1 (diff) |
checkpoint
Diffstat (limited to 'controller.h')
-rw-r--r-- | controller.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/controller.h b/controller.h index eaff967b..ace0d888 100644 --- a/controller.h +++ b/controller.h @@ -357,7 +357,7 @@ struct MultiPixelController { mScale = other.mScale; mAdvance = other.mAdvance; mLen = other.mLen; - for(int i = 0; i < LANES; i++) { mOffsets = other.mOffsets[i]; } + for(int i = 0; i < LANES; i++) { mOffsets[i] = other.mOffsets[i]; } } @@ -523,8 +523,8 @@ struct MultiPixelController { // composite shortcut functions for loading, dithering, and scaling template<int SLOT> __attribute__((always_inline)) inline static uint8_t loadAndScale(MultiPixelController & pc, int lane) { return scale<SLOT>(pc, pc.dither<SLOT>(pc, pc.loadByte<SLOT>(pc, lane))); } - template<int SLOT> __attribute__((always_inline)) inline static uint8_t loadAndScale(MultiPixelController & pc, int lane, uint8_t d, uint8_t scale) { return scale<SLOT>(pc, pc.dither<SLOT>(pc, pc.loadByte<SLOT>(pc, lane), d), scale); } - template<int SLOT> __attribute__((always_inline)) inline static uint8_t loadAndScale(MultiPixelController & pc, int lane, uint8_t scale) { return scale<SLOT>(pc, pc.loadByte<SLOT>(pc, lane), scale); } + template<int SLOT> __attribute__((always_inline)) inline static uint8_t loadAndScale(MultiPixelController & pc, int lane, uint8_t d, uint8_t scale) { return scale8(pc.dither<SLOT>(pc, pc.loadByte<SLOT>(pc, lane), d), scale); } + template<int SLOT> __attribute__((always_inline)) inline static uint8_t loadAndScale(MultiPixelController & pc, int lane, uint8_t scale) { return scale8(pc.loadByte<SLOT>(pc, lane), scale); } template<int SLOT> __attribute__((always_inline)) inline static uint8_t advanceAndLoadAndScale(MultiPixelController & pc, int lane) { pc.advanceData(); return pc.loadAndScale<SLOT>(pc, lane); } template<int SLOT> __attribute__((always_inline)) inline static uint8_t getd(MultiPixelController & pc) { return pc.d[RO(SLOT)]; } |