spectrum
This commit is contained in:
parent
1b38c4d638
commit
16d8cc01dc
@ -44,7 +44,7 @@ void PrgInit
|
||||
states[0] = &green_state;
|
||||
states[1] = &red_state;
|
||||
states[2] = &blue_state;
|
||||
spectrum_state = g;
|
||||
spectrum_state = r;
|
||||
pin = GREEN;
|
||||
lamp_idx = BEG_LAMP_IDX;
|
||||
n_loops = 10;
|
||||
@ -77,22 +77,22 @@ void spectrum()
|
||||
switch(spectrum_state)
|
||||
{
|
||||
case g:
|
||||
if(++green_state>=LIGHT_MAX) { spectrum_state = bg; }
|
||||
if(++green_state>=LIGHT_MAX) { ++spectrum_state; }
|
||||
break;
|
||||
case bg:
|
||||
if(--blue_state<=LIGHT_MIN) { spectrum_state = r; }
|
||||
if(--blue_state<=LIGHT_MIN) { ++spectrum_state; }
|
||||
break;
|
||||
case r:
|
||||
if(++red_state>=LIGHT_MAX) { spectrum_state = gr; }
|
||||
if(++red_state>=LIGHT_MAX) { ++spectrum_state; }
|
||||
break;
|
||||
case gr:
|
||||
if(--green_state<=LIGHT_MIN) { spectrum_state = b; }
|
||||
if(--green_state<=LIGHT_MIN) { ++spectrum_state; }
|
||||
break;
|
||||
case b:
|
||||
if(++blue_state>=LIGHT_MAX) { spectrum_state = rb; }
|
||||
if(++blue_state>=LIGHT_MAX) { ++spectrum_state; }
|
||||
break;
|
||||
case rb:
|
||||
if(--red_state<=LIGHT_MIN) { spectrum_state = g; }
|
||||
if(--red_state<=LIGHT_MIN) { ++spectrum_state; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user