Comments from Aircoookie addressed
This commit is contained in:
parent
1889fe23c5
commit
7b28387bb4
@ -1170,13 +1170,13 @@ void WS2812FX::service() {
|
|||||||
_segment_index = 0;
|
_segment_index = 0;
|
||||||
Segment::handleRandomPalette(); // move it into for loop when each segment has individual random palette
|
Segment::handleRandomPalette(); // move it into for loop when each segment has individual random palette
|
||||||
for (segment &seg : _segments) {
|
for (segment &seg : _segments) {
|
||||||
if (!seg.isActive()) continue;
|
|
||||||
|
|
||||||
// process transition (mode changes in the middle of transition)
|
// process transition (mode changes in the middle of transition)
|
||||||
seg.handleTransition();
|
seg.handleTransition();
|
||||||
// reset the segment runtime data if needed
|
// reset the segment runtime data if needed
|
||||||
seg.resetIfRequired();
|
seg.resetIfRequired();
|
||||||
|
|
||||||
|
if (!seg.isActive()) continue;
|
||||||
|
|
||||||
// last condition ensures all solid segments are updated at the same time
|
// last condition ensures all solid segments are updated at the same time
|
||||||
if (nowUp > seg.next_time || _triggered || (doShow && seg.mode == FX_MODE_STATIC))
|
if (nowUp > seg.next_time || _triggered || (doShow && seg.mode == FX_MODE_STATIC))
|
||||||
{
|
{
|
||||||
@ -1387,9 +1387,7 @@ void WS2812FX::setMode(uint8_t segid, uint8_t m) {
|
|||||||
if (m >= getModeCount()) m = getModeCount() - 1;
|
if (m >= getModeCount()) m = getModeCount() - 1;
|
||||||
|
|
||||||
if (_segments[segid].mode != m) {
|
if (_segments[segid].mode != m) {
|
||||||
_segments[segid].startTransition(_transitionDur); // set effect transitions
|
_segments[segid].setMode(m); // do not load defaults
|
||||||
//_segments[segid].markForReset();
|
|
||||||
_segments[segid].mode = m;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user