Rev 342 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 342 | Rev 470 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | char *led_posflash[] = { |
54 | char *led_posflash[] = { |
55 | "A", // LED #1 rot |
55 | "A", // LED #1 rot |
56 | "A", // LED #2 |
56 | "A", // LED #2 |
57 | "A", // LED #3 blau |
57 | "A", // LED #3 blau |
58 | "A", // LED #4 |
58 | "A", // LED #4 |
59 | "A:aIA:aIA:aSV", // LED #5 weiss |
59 | "A;aIA;aIA;aSV", // LED #5 weiss |
60 | "NA:aIA:aIA:aMS", // LED #6 grün |
60 | "NA;aIA;aIA;aMS", // LED #6 grün |
61 | "A", // LED #7 |
61 | "A", // LED #7 |
62 | "A", // LED #8 weiss |
62 | "A", // LED #8 weiss |
63 | "A", // LED #9 |
63 | "A", // LED #9 |
64 | "A" // LED #10 blau |
64 | "A" // LED #10 blau |
65 | }; |
65 | }; |
Line 119... | Line 119... | ||
119 | "aIAI" // LED #10 |
119 | "aIAI" // LED #10 |
120 | }; |
120 | }; |
Line 121... | Line 121... | ||
121 | 121 | ||
122 | // alle LEDs toggeln mit verschiednen Zykluszeiten |
122 | // alle LEDs toggeln mit verschiednen Zykluszeiten |
123 | char *led_flash2[] = { |
123 | char *led_flash2[] = { |
124 | "a.A.", // LED #1 rot |
124 | "ASIIaIAIaIaV", // LED #1 |
125 | "a:A:", // LED #2 blau |
125 | "ASIIaIAIaIaV", // LED #2 |
126 | "a;A;", // LED #3 blau |
126 | "aSIIIAIaIIIIAIaI", // LED #3 |
127 | "aIAI", // LED #4 |
127 | "aSIIIAIaIIIAIaII", // LED #4 |
128 | "aNAN", // LED #5 weiss |
128 | "aSIIIAIaIIAIaIII", // LED #5 |
129 | "aMAM", // LED #6 grün |
129 | "aVSIAIaIII", // LED #6 |
130 | "aMIAMI", // LED #7 |
130 | "aSIIIAIaIIIAIaII", // LED #7 |
131 | "aVAV", // LED #8 weiss |
131 | "aSIIIAIaIIIIAIaI", // LED #8 |
132 | "aVIAVI", // LED #9 |
132 | "aSIIIAIaI IIII AI", // LED #9 |
133 | "aSAS" // LED #10 |
133 | "aSIIIAIaI IIII AI" // LED #10 |
Line 134... | Line 134... | ||
134 | }; |
134 | }; |
Line 135... | Line 135... | ||
135 | 135 | ||
Line 136... | Line 136... | ||
136 | 136 | ||
Line 137... | Line 137... | ||
137 | // Hier die zu verwendenden LichtProgramme einfach eintragen. |
137 | // Hier die zu verwendenden LichtProgramme einfach eintragen. |
Line 138... | Line 138... | ||
138 | 138 | ||
139 | int current = 0; |
139 | int current = 0; |
Line 156... | Line 156... | ||
156 | 156 | ||
Line 157... | Line 157... | ||
157 | 157 | ||
158 | int main(void) { |
158 | int main(void) { |
Line 159... | Line 159... | ||
159 | 159 | ||
160 | int tim1s, tim3s, tim10s, analog_state=0; |
160 | int tim1s, tim3s, tim10s, analog_state=0; |
Line 161... | Line 161... | ||
161 | int Vcurr; |
161 | int Vcurr, lowVwarn_on = 0; |
Line 190... | Line 190... | ||
190 | STATUS_ON; |
190 | STATUS_ON; |
Line 191... | Line 191... | ||
191 | 191 | ||
Line 192... | Line 192... | ||
192 | Timer_Init(); |
192 | Timer_Init(); |
193 | 193 | ||
194 | lprg_init(modes[current]); |
194 | lprg_init(modes[current]); |
195 | tim10s = SetDelay(10000); |
195 | tim10s = SetDelay(20000); |
Line 196... | Line 196... | ||
196 | tim3s = SetDelay(3000); |
196 | tim3s = SetDelay(3000); |
Line 221... | Line 221... | ||
221 | Vcurr = ADCW; // Wert merken |
221 | Vcurr = ADCW; // Wert merken |
222 | analog_state = 0; |
222 | analog_state = 0; |
223 | } |
223 | } |
224 | if(Vcurr < 180) { |
224 | if(Vcurr < 180) { |
225 | lprg_init(led_lowVolt); |
225 | lprg_init(led_lowVolt); |
- | 226 | lowVwarn_on = 1; |
|
226 | } |
227 | } |
227 | if(Vcurr>=180) { |
228 | if(lowVwarn_on && Vcurr>=180) { |
228 | lprg_init(modes[current]); |
229 | lprg_init(modes[current]); |
- | 230 | lowVwarn_on = 0; |
|
229 | } |
231 | } |
230 | STATUS_TOGGLE; |
232 | STATUS_TOGGLE; |
231 | tim1s = SetDelay(1000); |
233 | tim1s = SetDelay(1000); |
232 | } |
234 | } |