spectrum
This commit is contained in:
parent
7fd61af329
commit
3612b4b5df
@ -46,7 +46,7 @@ void PrgInit
|
||||
states[1] = &green_state;
|
||||
states[2] = &blue_state;
|
||||
spectrum_state = 0;
|
||||
pin = RED;
|
||||
pin = 0;
|
||||
lamp_idx = BEG_LAMP_IDX;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ void spectrum()
|
||||
if(--green_state<LIGHT_MIN) {spectrum_state = 0;}
|
||||
break;
|
||||
default:
|
||||
spectrum_state = 0;
|
||||
spectrum_state = pr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,22 +127,22 @@ void simple_rgb_test
|
||||
break;
|
||||
default:
|
||||
p_ta->hook_table.DisplayMsg(p_ta, NULL);
|
||||
pin = GREEN;
|
||||
pin = RED;
|
||||
}
|
||||
}
|
||||
|
||||
void update_lights(TA * p_ta_array)
|
||||
{
|
||||
TA * p_ta = &p_ta_array[TA_LOCAL];
|
||||
if(green_state>LIGHT_MAX) { green_state=LIGHT_MAX; }
|
||||
if(red_state>LIGHT_MAX) { red_state = LIGHT_MAX; }
|
||||
if(green_state>LIGHT_MAX) { green_state=LIGHT_MAX; }
|
||||
if(blue_state>LIGHT_MAX) { blue_state = LIGHT_MAX; }
|
||||
|
||||
if(green_state<LIGHT_MIN) { green_state=LIGHT_MIN; }
|
||||
if(red_state<LIGHT_MIN) { red_state = LIGHT_MIN; }
|
||||
if(green_state<LIGHT_MIN) { green_state=LIGHT_MIN; }
|
||||
if(blue_state<LIGHT_MIN) { blue_state = LIGHT_MIN; }
|
||||
|
||||
p_ta->output.duty[GREEN] = green_state;
|
||||
p_ta->output.duty[RED] = red_state;
|
||||
p_ta->output.duty[GREEN] = green_state;
|
||||
p_ta->output.duty[BLUE] = blue_state;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user