Rev 2119 | Rev 2124 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2119 | Rev 2122 | ||
---|---|---|---|
1 | #include <stdlib.h> |
1 | #include <stdlib.h> |
2 | #include <avr/io.h> |
2 | #include <avr/io.h> |
3 | #include <avr/interrupt.h> |
3 | #include <avr/interrupt.h> |
4 | 4 | ||
5 | #include "rc.h" |
5 | #include "rc.h" |
6 | #include "controlMixer.h" |
6 | #include "controlMixer.h" |
7 | #include "configuration.h" |
7 | #include "configuration.h" |
8 | #include "commands.h" |
8 | #include "commands.h" |
9 | #include "output.h" |
9 | #include "output.h" |
10 | 10 | ||
11 | // The channel array is 0-based! |
11 | // The channel array is 0-based! |
12 | volatile int16_t PPM_in[MAX_CHANNELS]; |
12 | volatile int16_t PPM_in[MAX_CHANNELS]; |
13 | volatile uint8_t RCQuality; |
13 | volatile uint8_t RCQuality; |
14 | 14 | ||
15 | uint8_t lastRCCommand = COMMAND_NONE; |
15 | uint8_t lastRCCommand = COMMAND_NONE; |
16 | uint8_t lastFlightMode = FLIGHT_MODE_NONE; |
16 | uint8_t lastFlightMode = FLIGHT_MODE_NONE; |
17 | 17 | ||
18 | #define TIME(s) ((int16_t)(((long)F_CPU/(long)8000)*(float)s)) |
18 | #define TIME(s) ((int16_t)(((long)F_CPU/(long)8000)*(float)s)) |
19 | 19 | ||
20 | /*************************************************************** |
20 | /*************************************************************** |
21 | * 16bit timer 1 is used to decode the PPM-Signal |
21 | * 16bit timer 1 is used to decode the PPM-Signal |
22 | ***************************************************************/ |
22 | ***************************************************************/ |
23 | void RC_Init(void) { |
23 | void RC_Init(void) { |
24 | uint8_t sreg = SREG; |
24 | uint8_t sreg = SREG; |
25 | 25 | ||
26 | // disable all interrupts before reconfiguration |
26 | // disable all interrupts before reconfiguration |
27 | cli(); |
27 | cli(); |
28 | 28 | ||
29 | // PPM-signal is connected to the Input Capture Pin (PD6) of timer 1 |
29 | // PPM-signal is connected to the Input Capture Pin (PD6) of timer 1 |
30 | DDRD &= ~(1<<6); |
30 | DDRD &= ~(1<<6); |
31 | PORTD |= (1<<PORTD6); |
31 | PORTD |= (1<<PORTD6); |
32 | 32 | ||
33 | // Channel 5,6,7 is decoded to servo signals at pin PD5 (J3), PD4(J4), PD3(J5) |
33 | // Channel 5,6,7 is decoded to servo signals at pin PD5 (J3), PD4(J4), PD3(J5) |
34 | // set as output |
34 | // set as output |
35 | DDRD |= (1<<DDD5) | (1<<DDD4) | (1<<DDD3); |
35 | DDRD |= (1<<DDD5) | (1<<DDD4) | (1<<DDD3); |
36 | // low level |
36 | // low level |
37 | PORTD &= ~((1<<PORTD5) | (1<<PORTD4) | (1<<PORTD3)); |
37 | PORTD &= ~((1<<PORTD5) | (1<<PORTD4) | (1<<PORTD3)); |
38 | 38 | ||
39 | // PD3 can't be used if 2nd UART is activated |
39 | // PD3 can't be used if 2nd UART is activated |
40 | // because TXD1 is at that port |
40 | // because TXD1 is at that port |
41 | if (CPUType != ATMEGA644P) { |
41 | if (CPUType != ATMEGA644P) { |
42 | DDRD |= (1<<PORTD3); |
42 | DDRD |= (1<<PORTD3); |
43 | PORTD &= ~(1<<PORTD3); |
43 | PORTD &= ~(1<<PORTD3); |
44 | } |
44 | } |
45 | 45 | ||
46 | // Timer/Counter1 Control Register A, B, C |
46 | // Timer/Counter1 Control Register A, B, C |
47 | 47 | ||
48 | // Normal Mode (bits: WGM13=0, WGM12=0, WGM11=0, WGM10=0) |
48 | // Normal Mode (bits: WGM13=0, WGM12=0, WGM11=0, WGM10=0) |
49 | // Compare output pin A & B is disabled (bits: COM1A1=0, COM1A0=0, COM1B1=0, COM1B0=0) |
49 | // Compare output pin A & B is disabled (bits: COM1A1=0, COM1A0=0, COM1B1=0, COM1B0=0) |
50 | // Set clock source to SYSCLK/8 (bit: CS12=0, CS11=1, CS10=0) |
50 | // Set clock source to SYSCLK/8 (bit: CS12=0, CS11=1, CS10=0) |
51 | // Enable input capture noise cancler (bit: ICNC1=1) |
51 | // Enable input capture noise cancler (bit: ICNC1=1) |
52 | // Trigger on positive edge of the input capture pin (bit: ICES1=1), |
52 | // Trigger on positive edge of the input capture pin (bit: ICES1=1), |
53 | // Therefore the counter incremets at a clock of 20 MHz/64 = 312.5 kHz or 3.2�s |
53 | // Therefore the counter incremets at a clock of 20 MHz/64 = 312.5 kHz or 3.2�s |
54 | // The longest period is 0xFFFF / 312.5 kHz = 0.209712 s. |
54 | // The longest period is 0xFFFF / 312.5 kHz = 0.209712 s. |
55 | TCCR1A &= ~((1<<COM1A1)| (1<<COM1A0) | (1<<COM1B1) | (1<<COM1B0) | (1<<WGM11) | (1<<WGM10)); |
55 | TCCR1A &= ~((1<<COM1A1)| (1<<COM1A0) | (1<<COM1B1) | (1<<COM1B0) | (1<<WGM11) | (1<<WGM10)); |
56 | TCCR1B &= ~((1<<WGM13) | (1<<WGM12) | (1<<CS12)); |
56 | TCCR1B &= ~((1<<WGM13) | (1<<WGM12) | (1<<CS12)); |
57 | TCCR1B |= (1<<CS11) | (1<<ICNC1); |
57 | TCCR1B |= (1<<CS11) | (1<<ICNC1); |
58 | TCCR1C &= ~((1<<FOC1A) | (1<<FOC1B)); |
58 | TCCR1C &= ~((1<<FOC1A) | (1<<FOC1B)); |
59 | 59 | ||
60 | if (channelMap.RCPolarity) { |
60 | if (channelMap.RCPolarity) { |
61 | TCCR1B |= (1<<ICES1); |
61 | TCCR1B |= (1<<ICES1); |
62 | } else { |
62 | } else { |
63 | TCCR1B &= ~(1<<ICES1); |
63 | TCCR1B &= ~(1<<ICES1); |
64 | } |
64 | } |
65 | 65 | ||
66 | // Timer/Counter1 Interrupt Mask Register |
66 | // Timer/Counter1 Interrupt Mask Register |
67 | // Enable Input Capture Interrupt (bit: ICIE1=1) |
67 | // Enable Input Capture Interrupt (bit: ICIE1=1) |
68 | // Disable Output Compare A & B Match Interrupts (bit: OCIE1B=0, OICIE1A=0) |
68 | // Disable Output Compare A & B Match Interrupts (bit: OCIE1B=0, OICIE1A=0) |
69 | // Enable Overflow Interrupt (bit: TOIE1=0) |
69 | // Enable Overflow Interrupt (bit: TOIE1=0) |
70 | TIMSK1 &= ~((1<<OCIE1B) | (1<<OCIE1A) | (1<<TOIE1)); |
70 | TIMSK1 &= ~((1<<OCIE1B) | (1<<OCIE1A) | (1<<TOIE1)); |
71 | TIMSK1 |= (1<<ICIE1); |
71 | TIMSK1 |= (1<<ICIE1); |
72 | 72 | ||
73 | RCQuality = 0; |
73 | RCQuality = 0; |
74 | 74 | ||
75 | SREG = sreg; |
75 | SREG = sreg; |
76 | } |
76 | } |
77 | 77 | ||
78 | /********************************************************************/ |
78 | /********************************************************************/ |
79 | /* Every time a positive edge is detected at PD6 */ |
79 | /* Every time a positive edge is detected at PD6 */ |
80 | /********************************************************************/ |
80 | /********************************************************************/ |
81 | /* t-Frame |
81 | /* t-Frame |
82 | <-----------------------------------------------------------------------> |
82 | <-----------------------------------------------------------------------> |
83 | ____ ______ _____ ________ ______ sync gap ____ |
83 | ____ ______ _____ ________ ______ sync gap ____ |
84 | | | | | | | | | | | | |
84 | | | | | | | | | | | | |
85 | | | | | | | | | | | | |
85 | | | | | | | | | | | | |
86 | ___| |_| |_| |_| |_.............| |________________| |
86 | ___| |_| |_| |_| |_.............| |________________| |
87 | <-----><-------><------><----------- <------> <--- |
87 | <-----><-------><------><----------- <------> <--- |
88 | t0 t1 t2 t4 tn t0 |
88 | t0 t1 t2 t4 tn t0 |
89 | 89 | ||
90 | The PPM-Frame length is 22.5 ms. |
90 | The PPM-Frame length is 22.5 ms. |
91 | Channel high pulse width range is 0.7 ms to 1.7 ms completed by an 0.3 ms low pulse. |
91 | Channel high pulse width range is 0.7 ms to 1.7 ms completed by an 0.3 ms low pulse. |
92 | The mininimum time delay of two events coding a channel is ( 0.7 + 0.3) ms = 1 ms. |
92 | The mininimum time delay of two events coding a channel is ( 0.7 + 0.3) ms = 1 ms. |
93 | The maximum time delay of two events coding a channel is ( 1.7 + 0.3) ms = 2 ms. |
93 | The maximum time delay of two events coding a channel is ( 1.7 + 0.3) ms = 2 ms. |
94 | The minimum duration of all channels at minimum value is 8 * 1 ms = 8 ms. |
94 | The minimum duration of all channels at minimum value is 8 * 1 ms = 8 ms. |
95 | The maximum duration of all channels at maximum value is 8 * 2 ms = 16 ms. |
95 | The maximum duration of all channels at maximum value is 8 * 2 ms = 16 ms. |
96 | The remaining time of (22.5 - 8 ms) ms = 14.5 ms to (22.5 - 16 ms) ms = 6.5 ms is |
96 | The remaining time of (22.5 - 8 ms) ms = 14.5 ms to (22.5 - 16 ms) ms = 6.5 ms is |
97 | the syncronization gap. |
97 | the syncronization gap. |
98 | */ |
98 | */ |
99 | ISR(TIMER1_CAPT_vect) { // typical rate of 1 ms to 2 ms |
99 | ISR(TIMER1_CAPT_vect) { // typical rate of 1 ms to 2 ms |
100 | int16_t signal, tmp; |
100 | int16_t signal, tmp; |
101 | static int16_t index; |
101 | static int16_t index; |
102 | static uint16_t oldICR1 = 0; |
102 | static uint16_t oldICR1 = 0; |
103 | 103 | ||
104 | // 16bit Input Capture Register ICR1 contains the timer value TCNT1 |
104 | // 16bit Input Capture Register ICR1 contains the timer value TCNT1 |
105 | // at the time the edge was detected |
105 | // at the time the edge was detected |
106 | 106 | ||
107 | // calculate the time delay to the previous event time which is stored in oldICR1 |
107 | // calculate the time delay to the previous event time which is stored in oldICR1 |
108 | // calculatiing the difference of the two uint16_t and converting the result to an int16_t |
108 | // calculatiing the difference of the two uint16_t and converting the result to an int16_t |
109 | // implicit handles a timer overflow 65535 -> 0 the right way. |
109 | // implicit handles a timer overflow 65535 -> 0 the right way. |
110 | signal = (uint16_t) ICR1 - oldICR1; |
110 | signal = (uint16_t) ICR1 - oldICR1; |
111 | oldICR1 = ICR1; |
111 | oldICR1 = ICR1; |
112 | 112 | ||
113 | //sync gap? (3.5 ms < signal < 25.6 ms) |
113 | //sync gap? (3.5 ms < signal < 25.6 ms) |
114 | if (signal > TIME(3.5)) { |
114 | if (signal > TIME(3.5)) { |
115 | index = 0; |
115 | index = 0; |
116 | } else { // within the PPM frame |
116 | } else { // within the PPM frame |
117 | if (index < MAX_CHANNELS) { // PPM24 supports 12 channels |
117 | if (index < MAX_CHANNELS) { // PPM24 supports 12 channels |
118 | // check for valid signal length (0.8 ms < signal < 2.2 ms) |
118 | // check for valid signal length (0.8 ms < signal < 2.2 ms) |
119 | if ((signal >= TIME(0.8)) && (signal < TIME(2.2))) { |
119 | if ((signal >= TIME(0.8)) && (signal < TIME(2.2))) { |
120 | // shift signal to zero symmetric range -154 to 159 |
120 | // shift signal to zero symmetric range -154 to 159 |
121 | //signal -= 3750; // theoretical value |
121 | //signal -= 3750; // theoretical value |
122 | signal -= (TIME(1.5) - 128 + channelMap.trim); // best value with my Futaba in zero trim. |
122 | signal -= (TIME(1.5) - 128 + channelMap.HWTrim); |
123 | // check for stable signal |
123 | // check for stable signal |
124 | if (abs(signal - PPM_in[index]) < TIME(0.05)) { |
124 | if (abs(signal - PPM_in[index]) < TIME(0.05)) { |
125 | if (RCQuality < 200) |
125 | if (RCQuality < 200) |
126 | RCQuality += 10; |
126 | RCQuality += 10; |
127 | else |
127 | else |
128 | RCQuality = 200; |
128 | RCQuality = 200; |
129 | } |
129 | } |
130 | // If signal is the same as before +/- 1, just keep it there. Naah lets get rid of this slimy sticy stuff. |
130 | // If signal is the same as before +/- 1, just keep it there. Naah lets get rid of this slimy sticy stuff. |
131 | // if (signal >= PPM_in[index] - 1 && signal <= PPM_in[index] + 1) { |
131 | // if (signal >= PPM_in[index] - 1 && signal <= PPM_in[index] + 1) { |
132 | // In addition, if the signal is very close to 0, just set it to 0. |
132 | // In addition, if the signal is very close to 0, just set it to 0. |
133 | if (signal >= -1 && signal <= 1) { |
133 | if (signal >= -1 && signal <= 1) { |
134 | tmp = 0; |
134 | tmp = 0; |
135 | //} else { |
135 | //} else { |
136 | // tmp = PPM_in[index]; |
136 | // tmp = PPM_in[index]; |
137 | // } |
137 | // } |
138 | } else |
138 | } else |
139 | tmp = signal; |
139 | tmp = signal; |
140 | PPM_in[index] = tmp; // update channel value |
140 | PPM_in[index] = tmp; // update channel value |
141 | } |
141 | } |
142 | index++; // next channel |
142 | index++; // next channel |
143 | // demux sum signal for channels 5 to 7 to J3, J4, J5 |
143 | // demux sum signal for channels 5 to 7 to J3, J4, J5 |
144 | // TODO: General configurability of this R/C channel forwarding. Or remove it completely - the |
144 | // TODO: General configurability of this R/C channel forwarding. Or remove it completely - the |
145 | // channels are usually available at the receiver anyway. |
145 | // channels are usually available at the receiver anyway. |
146 | // if(index == 5) J3HIGH; else J3LOW; |
146 | // if(index == 5) J3HIGH; else J3LOW; |
147 | // if(index == 6) J4HIGH; else J4LOW; |
147 | // if(index == 6) J4HIGH; else J4LOW; |
148 | // if(CPUType != ATMEGA644P) // not used as TXD1 |
148 | // if(CPUType != ATMEGA644P) // not used as TXD1 |
149 | // { |
149 | // { |
150 | // if(index == 7) J5HIGH; else J5LOW; |
150 | // if(index == 7) J5HIGH; else J5LOW; |
151 | // } |
151 | // } |
152 | } |
152 | } |
153 | } |
153 | } |
154 | } |
154 | } |
155 | 155 | ||
156 | #define RCChannel(dimension) PPM_in[channelMap.channels[dimension]] |
156 | #define RCChannel(dimension) PPM_in[channelMap.channels[dimension]] |
157 | #define COMMAND_CHANNEL_VERTICAL CH_THROTTLE |
157 | #define COMMAND_CHANNEL_VERTICAL CH_THROTTLE |
158 | #define COMMAND_CHANNEL_HORIZONTAL CH_YAW |
158 | #define COMMAND_CHANNEL_HORIZONTAL CH_YAW |
159 | 159 | ||
160 | uint8_t getControlModeSwitch(void) { |
160 | uint8_t getControlModeSwitch(void) { |
161 | int16_t channel = RCChannel(CH_MODESWITCH); |
161 | int16_t channel = RCChannel(CH_MODESWITCH); |
162 | uint8_t flightMode = channel < -TIME(0.17) ? FLIGHT_MODE_MANUAL : (channel > TIME(0.17) ? FLIGHT_MODE_ANGLES : FLIGHT_MODE_RATE); |
162 | uint8_t flightMode = channel < -TIME(0.17) ? FLIGHT_MODE_MANUAL : (channel > TIME(0.17) ? FLIGHT_MODE_ANGLES : FLIGHT_MODE_RATE); |
163 | return flightMode; |
163 | return flightMode; |
164 | } |
164 | } |
165 | 165 | ||
166 | // Gyro calibration is performed as.... well mode switch with no throttle and no airspeed would be nice. |
166 | // Gyro calibration is performed as.... well mode switch with no throttle and no airspeed would be nice. |
167 | // Maybe simply: Very very low throttle. |
167 | // Maybe simply: Very very low throttle. |
168 | // Throttle xlow for COMMAND_TIMER: GYROCAL (once). |
168 | // Throttle xlow for COMMAND_TIMER: GYROCAL (once). |
169 | // mode switched: CHMOD |
169 | // mode switched: CHMOD |
170 | 170 | ||
171 | uint8_t RC_getCommand(void) { |
171 | uint8_t RC_getCommand(void) { |
172 | uint8_t flightMode = getControlModeSwitch(); |
172 | uint8_t flightMode = getControlModeSwitch(); |
173 | 173 | ||
174 | if (lastFlightMode != flightMode) { |
174 | if (lastFlightMode != flightMode) { |
175 | lastFlightMode = flightMode; |
175 | lastFlightMode = flightMode; |
176 | lastRCCommand = COMMAND_CHMOD; |
176 | lastRCCommand = COMMAND_CHMOD; |
177 | return lastRCCommand; |
177 | return lastRCCommand; |
178 | } |
178 | } |
179 | 179 | ||
180 | int16_t channel = RCChannel(CH_THROTTLE); |
180 | int16_t channel = RCChannel(CH_THROTTLE); |
181 | 181 | ||
182 | if (channel <= -TIME(0.55)) { |
182 | if (channel <= -TIME(0.55)) { |
183 | lastRCCommand = COMMAND_GYROCAL; |
183 | lastRCCommand = COMMAND_GYROCAL; |
184 | } else { |
184 | } else { |
185 | lastRCCommand = COMMAND_NONE; |
185 | lastRCCommand = COMMAND_NONE; |
186 | } |
186 | } |
187 | return lastRCCommand; |
187 | return lastRCCommand; |
188 | } |
188 | } |
189 | 189 | ||
190 | uint8_t RC_getArgument(void) { |
190 | uint8_t RC_getArgument(void) { |
191 | return lastFlightMode; |
191 | return lastFlightMode; |
192 | } |
192 | } |
193 | 193 | ||
194 | /* |
194 | /* |
195 | * Get Pitch, Roll, Throttle, Yaw values |
195 | * Get Pitch, Roll, Throttle, Yaw values |
196 | */ |
196 | */ |
197 | void RC_periodicTaskAndPRYT(int16_t* PRYT) { |
197 | void RC_periodicTaskAndPRYT(int16_t* PRYT) { |
198 | if (RCQuality) { |
198 | if (RCQuality) { |
199 | RCQuality--; |
199 | RCQuality--; |
200 | 200 | ||
201 | debugOut.analog[20] = RCChannel(CH_ELEVATOR); |
201 | PRYT[CONTROL_ELEVATOR] = RCChannel(CH_ELEVATOR) - rcTrim.trim[CH_ELEVATOR]; |
202 | debugOut.analog[21] = RCChannel(CH_AILERONS); |
202 | PRYT[CONTROL_AILERONS] = RCChannel(CH_AILERONS) - rcTrim.trim[CH_AILERONS]; |
203 | debugOut.analog[22] = RCChannel(CH_RUDDER); |
203 | PRYT[CONTROL_RUDDER] = RCChannel(CH_RUDDER) - rcTrim.trim[CH_RUDDER]; |
204 | debugOut.analog[23] = RCChannel(CH_THROTTLE); |
204 | PRYT[CONTROL_THROTTLE] = RCChannel(CH_THROTTLE); // no trim on throttle! |
205 | 205 | ||
206 | PRYT[CONTROL_ELEVATOR] = RCChannel(CH_ELEVATOR); |
206 | debugOut.analog[20] = PRYT[CONTROL_ELEVATOR]; |
207 | PRYT[CONTROL_AILERONS] = RCChannel(CH_AILERONS); |
207 | debugOut.analog[21] = PRYT[CONTROL_AILERONS]; |
208 | PRYT[CONTROL_RUDDER] = RCChannel(CH_RUDDER); |
208 | debugOut.analog[22] = PRYT[CONTROL_RUDDER]; |
209 | PRYT[CONTROL_THROTTLE] = RCChannel(CH_THROTTLE); |
209 | debugOut.analog[23] = PRYT[CONTROL_THROTTLE]; |
210 | } // if RCQuality is no good, we just do nothing. |
210 | } // if RCQuality is no good, we just do nothing. |
211 | } |
211 | } |
212 | 212 | ||
213 | /* |
213 | /* |
214 | * Get other channel value |
214 | * Get other channel value |
215 | */ |
215 | */ |
216 | int16_t RC_getVariable(uint8_t varNum) { |
216 | int16_t RC_getVariable(uint8_t varNum) { |
217 | if (varNum < 4) |
217 | if (varNum < 4) |
218 | // 0th variable is 5th channel (1-based) etc. |
218 | // 0th variable is 5th channel (1-based) etc. |
219 | return (RCChannel(varNum + CH_POTS) >> 3) + channelMap.variableOffset; |
219 | return (RCChannel(varNum + CH_POTS) >> 3) + channelMap.variableOffset; |
220 | /* |
220 | /* |
221 | * Let's just say: |
221 | * Let's just say: |
222 | * The RC variable i is hardwired to channel i, i>=4 |
222 | * The RC variable i is hardwired to channel i, i>=4 |
223 | */ |
223 | */ |
224 | return (PPM_in[varNum] >> 3) + channelMap.variableOffset; |
224 | return (PPM_in[varNum] >> 3) + channelMap.variableOffset; |
225 | } |
225 | } |
226 | 226 | ||
227 | uint8_t RC_getSignalQuality(void) { |
227 | uint8_t RC_getSignalQuality(void) { |
228 | if (RCQuality >= 160) |
228 | if (RCQuality >= 160) |
229 | return SIGNAL_GOOD; |
229 | return SIGNAL_GOOD; |
230 | if (RCQuality >= 140) |
230 | if (RCQuality >= 140) |
231 | return SIGNAL_OK; |
231 | return SIGNAL_OK; |
232 | if (RCQuality >= 120) |
232 | if (RCQuality >= 120) |
233 | return SIGNAL_BAD; |
233 | return SIGNAL_BAD; |
234 | return SIGNAL_LOST; |
234 | return SIGNAL_LOST; |
235 | } |
235 | } |
236 | 236 | ||
237 | void RC_calibrate(void) { |
237 | void RC_calibrate(void) { |
- | 238 | rcTrim.trim[CH_ELEVATOR] = RCChannel(CH_ELEVATOR); |
|
- | 239 | rcTrim.trim[CH_AILERONS] = RCChannel(CH_AILERONS); |
|
- | 240 | rcTrim.trim[CH_RUDDER] = RCChannel(CH_RUDDER); |
|
238 | // Do nothing. |
241 | rcTrim.trim[CH_THROTTLE] = 0; |
239 | } |
242 | } |
240 | 243 | ||
241 | int16_t RC_getZeroThrottle(void) { |
244 | int16_t RC_getZeroThrottle(void) { |
242 | return TIME (-0.5); |
245 | return TIME (-0.5); |
243 | } |
246 | } |
- | 247 | ||
- | 248 | void RC_setZeroTrim(void) { |
|
- | 249 | for (uint8_t i=0; i<MAX_CHANNELS; i++) { |
|
- | 250 | rcTrim.trim[i] = 0; |
|
- | 251 | } |
|
- | 252 | } |
|
244 | 253 |