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