Rev 1420 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1420 | Rev 1423 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | void LED_Update(void) |
21 | void LED_Update(void) |
22 | { |
22 | { |
23 | static char delay = 0; |
23 | static char delay = 0; |
24 | static unsigned char J16Bitmask = 0; |
24 | static unsigned char J16Bitmask = 0; |
25 | static unsigned char J17Bitmask = 0; |
25 | static unsigned char J17Bitmask = 0; |
- | 26 | static unsigned char J16Warn = 0, J17Warn = 0; |
|
26 | if(!delay--) // 10ms Intervall |
27 | if(!delay--) // 10ms Intervall |
27 | { |
28 | { |
28 | delay = 4; |
29 | delay = 4; |
Line 29... | Line 30... | ||
29 | 30 | ||
30 | if(FCFlags & FCFLAG_LOWBAT || SenderOkay < 128) |
31 | if(FCFlags & (FCFLAG_LOWBAT | FCFLAG_NOTLANDUNG | FCFLAG_I2CERR)) |
31 | { |
32 | { |
- | 33 | if(EE_Parameter.WARN_J16_Bitmask) |
|
- | 34 | { |
|
- | 35 | if(!J16Warn) J16Blinkcount = 4; |
|
- | 36 | J16Warn = 1; |
|
32 | J16Bitmask = EE_Parameter.WARN_J16_Bitmask; |
37 | } |
- | 38 | if(EE_Parameter.WARN_J17_Bitmask) |
|
- | 39 | { |
|
- | 40 | if(!J17Warn) J17Blinkcount = 4; |
|
- | 41 | J17Warn = 1; |
|
33 | J17Bitmask = EE_Parameter.WARN_J17_Bitmask; |
42 | } |
34 | } |
43 | } |
35 | else |
44 | else |
- | 45 | { |
|
- | 46 | J16Warn = 0; |
|
36 | { |
47 | J17Warn = 0; |
37 | J16Bitmask = EE_Parameter.J16Bitmask; |
48 | J16Bitmask = EE_Parameter.J16Bitmask; |
38 | J17Bitmask = EE_Parameter.J17Bitmask; |
49 | J17Bitmask = EE_Parameter.J17Bitmask; |
Line -... | Line 50... | ||
- | 50 | } |
|
- | 51 | ||
39 | } |
52 | if(!J16Warn) |
40 | 53 | { |
|
41 | if((EE_Parameter.BitConfig & CFG_MOTOR_BLINK) && !MotorenEin) {if(EE_Parameter.BitConfig & CFG_MOTOR_OFF_LED1) J16_ON; else J16_OFF;} |
54 | if((EE_Parameter.BitConfig & CFG_MOTOR_BLINK) && !MotorenEin) {if(EE_Parameter.BitConfig & CFG_MOTOR_OFF_LED1) J16_ON; else J16_OFF;} |
42 | else |
55 | else |
43 | if((EE_Parameter.J16Timing > 247) && (Parameter_J16Timing > 220)) {if(J16Bitmask & 128) J16_ON; else J16_OFF;} |
56 | if((EE_Parameter.J16Timing > 247) && (Parameter_J16Timing > 220)) {if(J16Bitmask & 128) J16_ON; else J16_OFF;} |
Line 48... | Line 61... | ||
48 | { |
61 | { |
49 | J16Blinkcount = Parameter_J16Timing-1; |
62 | J16Blinkcount = Parameter_J16Timing-1; |
50 | if(J16Mask == 1) J16Mask = 128; else J16Mask /= 2; |
63 | if(J16Mask == 1) J16Mask = 128; else J16Mask /= 2; |
51 | if(J16Mask & J16Bitmask) J16_ON; else J16_OFF; |
64 | if(J16Mask & J16Bitmask) J16_ON; else J16_OFF; |
52 | } |
65 | } |
- | 66 | } |
|
- | 67 | else |
|
- | 68 | if(!J16Blinkcount--) |
|
- | 69 | { |
|
- | 70 | J16Blinkcount = 10-1; |
|
- | 71 | if(J16Mask == 1) J16Mask = 128; else J16Mask /= 2; |
|
- | 72 | if(J16Mask & EE_Parameter.WARN_J16_Bitmask) J16_ON; else J16_OFF; |
|
- | 73 | } |
|
Line -... | Line 74... | ||
- | 74 | ||
- | 75 | if(!J17Warn) |
|
53 | 76 | { |
|
54 | if((EE_Parameter.BitConfig & CFG_MOTOR_BLINK) && !MotorenEin) {if(EE_Parameter.BitConfig & CFG_MOTOR_OFF_LED2) J17_ON; else J17_OFF;} |
77 | if((EE_Parameter.BitConfig & CFG_MOTOR_BLINK) && !MotorenEin) {if(EE_Parameter.BitConfig & CFG_MOTOR_OFF_LED2) J17_ON; else J17_OFF;} |
55 | else |
78 | else |
56 | if((EE_Parameter.J17Timing > 247) && (Parameter_J17Timing > 230)) {if(J17Bitmask & 128) J17_ON; else J17_OFF;} |
79 | if((EE_Parameter.J17Timing > 247) && (Parameter_J17Timing > 230)) {if(J17Bitmask & 128) J17_ON; else J17_OFF;} |
57 | else |
80 | else |
Line 62... | Line 85... | ||
62 | J17Blinkcount = Parameter_J17Timing-1; |
85 | J17Blinkcount = Parameter_J17Timing-1; |
63 | if(J17Mask == 1) J17Mask = 128; else J17Mask /= 2; |
86 | if(J17Mask == 1) J17Mask = 128; else J17Mask /= 2; |
64 | if(J17Mask & J17Bitmask) J17_ON; else J17_OFF; |
87 | if(J17Mask & J17Bitmask) J17_ON; else J17_OFF; |
65 | } |
88 | } |
66 | } |
89 | } |
- | 90 | else |
|
- | 91 | if(!J17Blinkcount--) |
|
- | 92 | { |
|
- | 93 | J17Blinkcount = 10-1; |
|
- | 94 | if(J17Mask == 1) J17Mask = 128; else J17Mask /= 2; |
|
- | 95 | if(J17Mask & EE_Parameter.WARN_J17_Bitmask) J17_ON; else J17_OFF; |
|
- | 96 | } |
|
67 | } |
97 | } |
- | 98 | } |
|
- | 99 |