fill_raw_noise8 from Fastled library returns strange values

Sven

New member
Hello pcrc,

i have a strange behaviour of the Fastleds fill_raw_noise8 for teensy 3.2.
It seems to always fill an array with FFs.
I use teensy 3.2 with FastLED version 3003001 from teensyduino installer (arduino-1.8.10\hardware\teensy\avr\libraries\FastLED\FastLED.h)
Since FastLEDs inoise8 function seems to work, maybe the wrong qadd8function is used. On my setup the ide says it runs into the qadd8 function branch "#elif QADD8_ARM_DSP_ASM == 1".

Sample code:
#define FASTLED_INTERNAL
#include "FastLED.h"

#define LED_COUNT 100

float time = 0;
uint8_t* points = (uint8_t*)malloc(sizeof(uint8_t) * LED_COUNT);
unsigned long lastTick = 0;

void setup() {
Serial.begin(115200);
memset((void*)points, 0, LED_COUNT );
}

void loop() {
unsigned long now = millis();
unsigned long diff = now - lastTick;

//fill_raw_noise8(uint8_t * pData, uint8_t num_points, uint8_t octaves, uint16_t x, int scalex, uint16_t time);
fill_raw_noise8( points, LED_COUNT, 4, 0, 15, (uint16_t) time);

for (uint16_t i = 0; i < LED_COUNT; i++) {
Serial.print(points);
Serial.print(" ");
}

Serial.println("");
Serial.println(diff);
Serial.println((uint16_t)time);
time += 0.2 * diff * 10;

lastTick = now;
delay(10);
}



Producing the following output:
>255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 >255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
>12
>48818

thanks and kind regards,
Sven
 
Hi all,

ok got it myself.

the array which should be filled must be zero initialized...

sorry for the inconvenience.
 
Back
Top