FIx for wierd lighting glitch (constantly halving in brightness, values not being returned, general fuckiness)

This commit is contained in:
Robert Marshall 2018-10-30 12:54:04 +00:00
parent 93b15c9ebb
commit d382a4b0a2
2 changed files with 5 additions and 4 deletions

View file

@ -9,7 +9,8 @@ Lighting::Lighting(int ledCount, NaturalLight* naturalLight, Weather* weather, f
_weather = weather;
_cloudCoverLimit = cloudCoverLimit;
_leds = CRGB(_ledCount);
CRGB leds = CRGB(_ledCount);
_leds = &leds;
}
float Lighting::getIndexMultiplier(int now, int startTime, int endTime, bool swap) {
@ -50,6 +51,6 @@ void Lighting::update(int now) {
_nextLightningFlash = millis() + (random8(1, 60) * 1000);
}
fill_solid(&_leds, _ledCount, colour);
fill_solid(_leds, _ledCount, colour);
FastLED.show();
}