Rev 2018 | Rev 2052 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2018 | Rev 2019 | ||
---|---|---|---|
Line 98... | Line 98... | ||
98 | flashMask[port] >>= 1; |
98 | flashMask[port] >>= 1; |
99 | outputSet(port, flashMask[port] & bitmask); |
99 | outputSet(port, flashMask[port] & bitmask); |
100 | } |
100 | } |
101 | } |
101 | } |
Line 102... | Line 102... | ||
102 | 102 | ||
103 | void flashingLights(void) { |
103 | void output_update(void) { |
104 | static int8_t delay = 0; |
104 | static int8_t delay = 0; |
105 | if (!delay--) { // 10 ms intervals |
105 | if (!delay--) { // 10 ms intervals |
106 | delay = 4; |
- | |
107 | if (staticParams.outputFlags & OUTPUTFLAGS_FLASH_0_AT_BEEP && beepModulation != BEEP_MODULATION_NONE) { |
- | |
108 | // alarm |
- | |
109 | flashingLight(0, 25, 0x55, 25); |
- | |
110 | } else { |
- | |
111 | flashingLight(0, staticParams.outputFlash[0].timing, staticParams.outputFlash[0].bitmask, dynamicParams.output0Timing); |
- | |
112 | } |
- | |
113 | if (staticParams.outputFlags & OUTPUTFLAGS_FLASH_1_AT_BEEP && beepModulation != BEEP_MODULATION_NONE) { |
- | |
114 | // alarm |
- | |
115 | flashingLight(1, 25, 0x55, 25); |
- | |
116 | } else { |
- | |
117 | flashingLight(1, staticParams.outputFlash[1].timing, staticParams.outputFlash[1].bitmask, dynamicParams.output1Timing); |
- | |
118 | } |
106 | delay = 4; |
119 | } |
- | |
120 | } |
- | |
121 | - | ||
122 | void output_update(void) { |
107 | } |
123 | if (staticParams.outputFlags & OUTPUTFLAGS_TEST_ON) { |
108 | if (staticParams.outputFlags & OUTPUTFLAGS_TEST_ON) { |
124 | outputSet(0, 1); |
109 | outputSet(0, 1); |
125 | outputSet(1, 1); |
110 | outputSet(1, 1); |
126 | } else if (staticParams.outputFlags & OUTPUTFLAGS_TEST_OFF) { |
111 | } else if (staticParams.outputFlags & OUTPUTFLAGS_TEST_OFF) { |
127 | outputSet(0, 0); |
112 | outputSet(0, 0); |
128 | outputSet(1, 0); |
- | |
129 | } else if (!staticParams.outputDebugMask) { |
- | |
130 | flashingLights(); |
113 | outputSet(1, 0); |
- | 114 | } else { |
|
- | 115 | if (staticParams.outputFlags & OUTPUTFLAGS_FLASH_0_AT_BEEP && beepModulation != BEEP_MODULATION_NONE) { |
|
- | 116 | flashingLight(0, 25, 0x55, 25); |
|
131 | } else { |
117 | } else if (staticParams.outputDebugMask) { |
- | 118 | outputSet(0, debugOut.digital[0] & staticParams.outputDebugMask); |
|
- | 119 | } else if (!delay) { |
|
- | 120 | flashingLight(0, staticParams.outputFlash[0].timing, staticParams.outputFlash[0].bitmask, dynamicParams.output0Timing); |
|
- | 121 | } |
|
- | 122 | if (staticParams.outputFlags & OUTPUTFLAGS_FLASH_1_AT_BEEP && beepModulation != BEEP_MODULATION_NONE) { |
|
- | 123 | flashingLight(1, 25, 0x55, 25); |
|
132 | outputSet(0, debugOut.digital[0] & staticParams.outputDebugMask); |
124 | } else if (staticParams.outputDebugMask) { |
- | 125 | outputSet(1, debugOut.digital[1] & staticParams.outputDebugMask); |
|
- | 126 | } else if (!delay) { |
|
- | 127 | flashingLight(1, staticParams.outputFlash[1].timing, staticParams.outputFlash[1].bitmask, dynamicParams.output1Timing); |
|
133 | outputSet(1, debugOut.digital[1] & staticParams.outputDebugMask); |
128 | } |
134 | } |
129 | } |
Line 135... | Line 130... | ||
135 | } |
130 | } |
136 | 131 |