Open derekyle opened 1 year ago
Actually, I figured it out. It looks like those functions are only available on the FastLed platform, which is deprecated. But I was able to get it to work by downgrading the arduino platform version and setting to FastLed.
I just merged the PR by @dvv, maybe he can adjust that to work with builtin functions.
Please try with below header.
#pragma once
#ifndef FASTLED_INTERNAL
uint8_t qadd8( uint8_t i, uint8_t j)
{
unsigned int t = i + j;
if( t > 255) t = 255;
return t;
}
uint8_t scale8_video( uint8_t i, uint8_t scale)
{
uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0);
// uint8_t nonzeroscale = (scale != 0) ? 1 : 0;
// uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale;
return j;
}
#endif
error: 'random8' was not declared in this scope; did you mean 'random'?
error: 'scale8_video' was not declared in this scope
error: 'qadd8' was not declared in this scope
Are the 3 errors I get. Are there some missing dependencies that I should be including?