![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
MTimer.c@211:ac8251b067d2, 2017-07-03 (annotated)
- Committer:
- Kovalev_D
- Date:
- Mon Jul 03 05:50:08 2017 +0000
- Revision:
- 211:ac8251b067d2
- Parent:
- 210:b02fa166315d
- Child:
- 213:9953db9543d6
prizm worck
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 0:8ad47e2b6f00 | 1 | #include "MTimer.h" |
igor_v | 0:8ad47e2b6f00 | 2 | #include "LPC17xx.h" |
igor_v | 0:8ad47e2b6f00 | 3 | #include "MTimer.h" |
igor_v | 0:8ad47e2b6f00 | 4 | #include "vibro.h" |
igor_v | 0:8ad47e2b6f00 | 5 | #include "QEI.h" |
igor_v | 0:8ad47e2b6f00 | 6 | #include "Global.h" |
igor_v | 0:8ad47e2b6f00 | 7 | #include "SPI.h" |
igor_v | 0:8ad47e2b6f00 | 8 | #include "InputOutput.h" |
Kovalev_D | 112:4a96133a1311 | 9 | |
Kovalev_D | 197:7a05523bf588 | 10 | unsigned int CountV64=0; |
igor_v | 0:8ad47e2b6f00 | 11 | unsigned int CountV31=0; |
Kovalev_D | 197:7a05523bf588 | 12 | unsigned int CountV255=0; |
Kovalev_D | 209:224e7331a061 | 13 | unsigned int f,MODCount=0; |
Kovalev_D | 124:9ae09249f842 | 14 | int loop=0; |
Kovalev_D | 208:19150d2b528f | 15 | int t; |
Kovalev_D | 88:b5c1d9d338d1 | 16 | ///////////////////////////////////////////////////// |
Kovalev_D | 88:b5c1d9d338d1 | 17 | /////////////////////EVENT/////////////////////////// |
Kovalev_D | 88:b5c1d9d338d1 | 18 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 19 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 20 | ///////////////////// 1Hz /////////////////////////// |
Kovalev_D | 89:a0d344db227e | 21 | ///////////////////////////////////////////////////// |
Kovalev_D | 88:b5c1d9d338d1 | 22 | void Event_1Hz(void)// событие раз в 1 Гц |
Kovalev_D | 211:ac8251b067d2 | 23 | { int tempdac,tempdac1; |
Kovalev_D | 115:e5a230e5af52 | 24 | if (Event1Hz) |
Kovalev_D | 208:19150d2b528f | 25 | { |
Kovalev_D | 209:224e7331a061 | 26 | if(Gyro.LogMod) ShowMod2(); |
Kovalev_D | 208:19150d2b528f | 27 | Discharg(); |
Kovalev_D | 208:19150d2b528f | 28 | BackLight(); |
Kovalev_D | 208:19150d2b528f | 29 | Gyro.Rate1_Event = 1; |
Kovalev_D | 208:19150d2b528f | 30 | Event1Hz--; |
Kovalev_D | 208:19150d2b528f | 31 | Time1Hz++; |
Kovalev_D | 211:ac8251b067d2 | 32 | sprintf((Time),"%i %i %i %i %d\r\n",Spi.DAC_A, Gyro.HFO_Min, Gyro.HFO_Max,Gyro.RgConA ); |
Kovalev_D | 211:ac8251b067d2 | 33 | WriteCon(Time); |
Kovalev_D | 211:ac8251b067d2 | 34 | /* sprintf((Time)," %d %d %d \r\n", Gyro.PLC_Eror, Spi.DAC_B , Gyro.PLCDelay ,Gyro.RgConA); |
Kovalev_D | 211:ac8251b067d2 | 35 | Gyro.CuruAngle=0; |
Kovalev_D | 211:ac8251b067d2 | 36 | WriteCon(Time);*/ |
Kovalev_D | 211:ac8251b067d2 | 37 | if(Gyro.CuruAngleLog) |
Kovalev_D | 211:ac8251b067d2 | 38 | { |
Kovalev_D | 211:ac8251b067d2 | 39 | /* sprintf((Time),"%d %d %d %d \r\n", Gyro.CuruAngle, Gyro.CuruAngle64, Gyro.CuruAngle96, Gyro.CuruAngle128); |
Kovalev_D | 211:ac8251b067d2 | 40 | WriteCon(Time);*/ |
Kovalev_D | 211:ac8251b067d2 | 41 | |
Kovalev_D | 211:ac8251b067d2 | 42 | /* Gyro.CuruAngle = 0; |
Kovalev_D | 211:ac8251b067d2 | 43 | Gyro.CuruAngle64 = 0; |
Kovalev_D | 211:ac8251b067d2 | 44 | Gyro.CuruAngle96 = 0; |
Kovalev_D | 211:ac8251b067d2 | 45 | Gyro.CuruAngle128 = 0; */ |
Kovalev_D | 211:ac8251b067d2 | 46 | } |
Kovalev_D | 211:ac8251b067d2 | 47 | |
Kovalev_D | 211:ac8251b067d2 | 48 | |
Kovalev_D | 209:224e7331a061 | 49 | |
Kovalev_D | 209:224e7331a061 | 50 | /* for(int i=0; i<32;i++) |
Kovalev_D | 209:224e7331a061 | 51 | { |
Kovalev_D | 209:224e7331a061 | 52 | sprintf((Time),"%d ", Buff_Restored_sin[i]); |
Kovalev_D | 209:224e7331a061 | 53 | WriteCon(Time); |
Kovalev_D | 209:224e7331a061 | 54 | } |
Kovalev_D | 209:224e7331a061 | 55 | sprintf((Time),"\r\n"); |
Kovalev_D | 209:224e7331a061 | 56 | WriteCon(Time); |
Kovalev_D | 209:224e7331a061 | 57 | for(int i=0; i<32;i++) |
Kovalev_D | 209:224e7331a061 | 58 | { |
Kovalev_D | 209:224e7331a061 | 59 | sprintf((Time)," %d ", Buff_1Point[i-7]); |
Kovalev_D | 209:224e7331a061 | 60 | WriteCon(Time); |
Kovalev_D | 209:224e7331a061 | 61 | } |
Kovalev_D | 209:224e7331a061 | 62 | sprintf((Time),"\r\n"); |
Kovalev_D | 209:224e7331a061 | 63 | WriteCon(Time);*/ |
Kovalev_D | 209:224e7331a061 | 64 | } |
Kovalev_D | 203:3a6615de9581 | 65 | |
Kovalev_D | 88:b5c1d9d338d1 | 66 | } |
Kovalev_D | 89:a0d344db227e | 67 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 68 | ///////////////////// 1kHz ////////////////////////// |
Kovalev_D | 197:7a05523bf588 | 69 | ///////////////////////////////////////////////////// |
Kovalev_D | 88:b5c1d9d338d1 | 70 | void Event_1KHz(void)// событие раз в 1 кГц |
Kovalev_D | 88:b5c1d9d338d1 | 71 | { |
Kovalev_D | 116:66f1f0ff2dab | 72 | if (Event1K) |
Kovalev_D | 116:66f1f0ff2dab | 73 | { |
Kovalev_D | 211:ac8251b067d2 | 74 | if(Gyro.PLCDelay)Gyro.PLCDelay--; |
Kovalev_D | 88:b5c1d9d338d1 | 75 | Event1K --; |
Kovalev_D | 116:66f1f0ff2dab | 76 | Time1K++;//первый ++ работает каждые 125 (event100kHz)второй был в 100 кГц |
Kovalev_D | 209:224e7331a061 | 77 | if (Time1K > 1000) |
Kovalev_D | 115:e5a230e5af52 | 78 | { |
Kovalev_D | 208:19150d2b528f | 79 | Time1K -=1000; |
Kovalev_D | 88:b5c1d9d338d1 | 80 | Event1Hz ++; |
Kovalev_D | 88:b5c1d9d338d1 | 81 | } |
Kovalev_D | 209:224e7331a061 | 82 | |
Kovalev_D | 208:19150d2b528f | 83 | } |
Kovalev_D | 88:b5c1d9d338d1 | 84 | } |
Kovalev_D | 209:224e7331a061 | 85 | |
Kovalev_D | 209:224e7331a061 | 86 | void Event_2KHz(void)// событие раз в 1 кГц |
Kovalev_D | 209:224e7331a061 | 87 | { |
Kovalev_D | 209:224e7331a061 | 88 | if (Event2K) |
Kovalev_D | 209:224e7331a061 | 89 | { |
Kovalev_D | 209:224e7331a061 | 90 | Event2K --; |
Kovalev_D | 209:224e7331a061 | 91 | Gyro.Rate3_Event++; |
Kovalev_D | 209:224e7331a061 | 92 | } |
Kovalev_D | 209:224e7331a061 | 93 | } |
Kovalev_D | 124:9ae09249f842 | 94 | void Event_500Hz(void)// событие раз в 500 Гц |
Kovalev_D | 124:9ae09249f842 | 95 | { |
Kovalev_D | 124:9ae09249f842 | 96 | if(Event500Hz) |
Kovalev_D | 211:ac8251b067d2 | 97 | { |
Kovalev_D | 211:ac8251b067d2 | 98 | |
Kovalev_D | 205:775d54fdf646 | 99 | Event500Hz--; |
Kovalev_D | 208:19150d2b528f | 100 | Gyro.Event_500Hz=1;// Event 500Гц выдачи данных для постройки графика управления вибро |
Kovalev_D | 197:7a05523bf588 | 101 | } |
Kovalev_D | 197:7a05523bf588 | 102 | } |
Kovalev_D | 209:224e7331a061 | 103 | void Event_250Hz(void) |
Kovalev_D | 209:224e7331a061 | 104 | { |
Kovalev_D | 209:224e7331a061 | 105 | if(Event250Hz) |
Kovalev_D | 209:224e7331a061 | 106 | { |
Kovalev_D | 209:224e7331a061 | 107 | |
Kovalev_D | 209:224e7331a061 | 108 | // Gyro.CuruAngle=0; |
Kovalev_D | 209:224e7331a061 | 109 | Event250Hz--; |
Kovalev_D | 209:224e7331a061 | 110 | MODCount++; |
Kovalev_D | 209:224e7331a061 | 111 | if((MODCount&0x3f)==0) |
Kovalev_D | 209:224e7331a061 | 112 | {/* |
Kovalev_D | 209:224e7331a061 | 113 | sprintf((Time),"%d %d %d\r\n", Spi.DAC_B, (0xffff - Spi.ADC5), Gyro.CuruAngle); |
Kovalev_D | 209:224e7331a061 | 114 | WriteCon(Time); |
Kovalev_D | 209:224e7331a061 | 115 | Gyro.CuruAngle = 0; |
Kovalev_D | 209:224e7331a061 | 116 | Gyro.CaunMinRate = 0; |
Kovalev_D | 209:224e7331a061 | 117 | Gyro.CaunPlusRate = 0; |
Kovalev_D | 209:224e7331a061 | 118 | */ |
Kovalev_D | 209:224e7331a061 | 119 | } |
Kovalev_D | 209:224e7331a061 | 120 | if(MODFlag==2) |
Kovalev_D | 209:224e7331a061 | 121 | { |
Kovalev_D | 209:224e7331a061 | 122 | BuffADC_64Point[MODCount&0x3f]=ADC5New; |
Kovalev_D | 209:224e7331a061 | 123 | LPC_DAC->DACR = (ModArraySin[MODCount&0x3f] * Gyro.ModAmp); |
Kovalev_D | 209:224e7331a061 | 124 | |
Kovalev_D | 209:224e7331a061 | 125 | if((MODCount&0x3f)==0) PLCRegul250(); |
Kovalev_D | 209:224e7331a061 | 126 | } |
Kovalev_D | 209:224e7331a061 | 127 | } |
Kovalev_D | 209:224e7331a061 | 128 | } |
Kovalev_D | 89:a0d344db227e | 129 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 130 | ///////////////////// 100kHz ////////////////////////// |
Kovalev_D | 89:a0d344db227e | 131 | ///////////////////////////////////////////////////// |
Kovalev_D | 193:a0fe8bfc97e4 | 132 | void Event_100KHz(void)// событие раз в 100 кГц |
Kovalev_D | 88:b5c1d9d338d1 | 133 | { |
Kovalev_D | 162:44e4ded32c6a | 134 | |
Kovalev_D | 88:b5c1d9d338d1 | 135 | if (Event100K) { |
Kovalev_D | 197:7a05523bf588 | 136 | |
Kovalev_D | 88:b5c1d9d338d1 | 137 | Event100K --; |
Kovalev_D | 197:7a05523bf588 | 138 | |
Kovalev_D | 124:9ae09249f842 | 139 | if (OutBufCon1Count)OutBufCon1Count--; // обратный отсчет для управления ногой и формирование задержки на выдачу |
Kovalev_D | 124:9ae09249f842 | 140 | |
Kovalev_D | 124:9ae09249f842 | 141 | PinCheng(); // чтение регистра состояния выводов(вибро, полсветка, поджиг, LED) и управление выводами. |
Kovalev_D | 88:b5c1d9d338d1 | 142 | } |
Kovalev_D | 88:b5c1d9d338d1 | 143 | } |
Kovalev_D | 89:a0d344db227e | 144 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 145 | //////////////////vibro EVENT//////////////////////// |
Kovalev_D | 89:a0d344db227e | 146 | ///////////////////////////////////////////////////// |
Kovalev_D | 88:b5c1d9d338d1 | 147 | void Event_Vibro(void)// событие от вибр |
Kovalev_D | 88:b5c1d9d338d1 | 148 | { |
Kovalev_D | 88:b5c1d9d338d1 | 149 | if (EventVibro) { |
Kovalev_D | 88:b5c1d9d338d1 | 150 | EventVibro --; |
Kovalev_D | 88:b5c1d9d338d1 | 151 | } |
Kovalev_D | 88:b5c1d9d338d1 | 152 | } |
Kovalev_D | 89:a0d344db227e | 153 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 154 | ///////////////////////////////////////////////////// |
Kovalev_D | 89:a0d344db227e | 155 | ///////////////////////////////////////////////////// |
Kovalev_D | 88:b5c1d9d338d1 | 156 | |
Kovalev_D | 88:b5c1d9d338d1 | 157 | |
Kovalev_D | 112:4a96133a1311 | 158 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 159 | ////////////////////////////////////////////////////////TIMER1//////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 160 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 161 | |
Kovalev_D | 112:4a96133a1311 | 162 | ////////////////////////////////////////////////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 163 | /////////////////////инициализация таймера 1 ///////////////////////// |
Kovalev_D | 112:4a96133a1311 | 164 | ////////////////////////////////////////////////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 165 | |
Kovalev_D | 112:4a96133a1311 | 166 | unsigned int Init_TIM1 (unsigned int TimerInterval ) |
Kovalev_D | 112:4a96133a1311 | 167 | { |
Kovalev_D | 112:4a96133a1311 | 168 | LPC_TIM1->MR0 = TimerInterval; |
Kovalev_D | 112:4a96133a1311 | 169 | LPC_TIM1->MCR = 3; /* Interrupt and Reset on MR1 */ |
Kovalev_D | 112:4a96133a1311 | 170 | NVIC_EnableIRQ(TIMER1_IRQn); |
Kovalev_D | 112:4a96133a1311 | 171 | } |
Kovalev_D | 112:4a96133a1311 | 172 | |
Kovalev_D | 112:4a96133a1311 | 173 | |
igor_v | 0:8ad47e2b6f00 | 174 | ////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 175 | /////////////////////////включение таймера 1////////////////////////// |
igor_v | 0:8ad47e2b6f00 | 176 | ////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 177 | void enable_timer1( void ) |
igor_v | 21:bc8c1cec3da6 | 178 | { |
igor_v | 21:bc8c1cec3da6 | 179 | LPC_TIM1->TCR = 1; |
igor_v | 21:bc8c1cec3da6 | 180 | return; |
igor_v | 21:bc8c1cec3da6 | 181 | } |
igor_v | 0:8ad47e2b6f00 | 182 | |
igor_v | 0:8ad47e2b6f00 | 183 | |
igor_v | 0:8ad47e2b6f00 | 184 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
igor_v | 0:8ad47e2b6f00 | 185 | /////////////////////////////////////////////////TIMER2////////////////////////////////////////////////////////////////////////////////// |
igor_v | 0:8ad47e2b6f00 | 186 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 187 | |
igor_v | 0:8ad47e2b6f00 | 188 | ////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 189 | /////////////////////инициализация таймера 2 ///////////////////////// |
igor_v | 0:8ad47e2b6f00 | 190 | ////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 191 | unsigned int Init_TIM2 (void) |
igor_v | 21:bc8c1cec3da6 | 192 | { |
Kovalev_D | 124:9ae09249f842 | 193 | LPC_TIM2->MR0 = 257; |
igor_v | 21:bc8c1cec3da6 | 194 | LPC_TIM2->MCR = 3; /* Interrupt and Reset on MR0 */ |
igor_v | 21:bc8c1cec3da6 | 195 | NVIC_EnableIRQ(TIMER2_IRQn); |
igor_v | 21:bc8c1cec3da6 | 196 | return 1; |
igor_v | 21:bc8c1cec3da6 | 197 | } |
igor_v | 0:8ad47e2b6f00 | 198 | |
igor_v | 21:bc8c1cec3da6 | 199 | ////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 200 | /////////////////////////включение таймера 2////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 201 | ////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 202 | void enable_timer2(void) |
igor_v | 21:bc8c1cec3da6 | 203 | { |
igor_v | 21:bc8c1cec3da6 | 204 | LPC_TIM2->TCR = 1; |
igor_v | 21:bc8c1cec3da6 | 205 | LPC_TIM2->TCR = 0x01; |
igor_v | 21:bc8c1cec3da6 | 206 | } |
igor_v | 21:bc8c1cec3da6 | 207 | |
igor_v | 21:bc8c1cec3da6 | 208 | |
Kovalev_D | 112:4a96133a1311 | 209 | ////////////////////////////////////////////////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 210 | /////////////////////////прерывание таймера 1////////////////////////// |
Kovalev_D | 112:4a96133a1311 | 211 | ////////////////////////////////////////////////////////////////////// |
Kovalev_D | 183:7e200f4d9b16 | 212 | __irq void TIMER1_IRQHandler (void)//13.27 kHz |
Kovalev_D | 205:775d54fdf646 | 213 | { |
Kovalev_D | 208:19150d2b528f | 214 | |
Kovalev_D | 208:19150d2b528f | 215 | |
igor_v | 114:5cc38a53d8a7 | 216 | ResetCS(ADC); //prepare ADC for sampling |
Kovalev_D | 112:4a96133a1311 | 217 | SetDAC(DAC); |
Kovalev_D | 208:19150d2b528f | 218 | Global_Time++; |
igor_v | 114:5cc38a53d8a7 | 219 | CountV255++; // инкремент счеттчика |
Kovalev_D | 164:6f43f85fdd8d | 220 | CountV255 &= 0xff; // ОБРЕЗАНИЕ СЧЕТЧИКА |
Kovalev_D | 197:7a05523bf588 | 221 | CountV64 = CountV255 & 0x3f; |
Kovalev_D | 197:7a05523bf588 | 222 | CountV31 = CountV255 & 0x1f; // малый счетчик |
Kovalev_D | 197:7a05523bf588 | 223 | |
Kovalev_D | 112:4a96133a1311 | 224 | D_QEI(); //чтение данных по счетчику |
Kovalev_D | 143:2b15794a6cd2 | 225 | cheng(); // выставление флагов в 32 тактном цикле. |
Kovalev_D | 116:66f1f0ff2dab | 226 | |
Kovalev_D | 116:66f1f0ff2dab | 227 | |
Kovalev_D | 116:66f1f0ff2dab | 228 | SetCS(ADC); //start ADC sampling |
Kovalev_D | 116:66f1f0ff2dab | 229 | ResetDAC(DAC); |
Kovalev_D | 197:7a05523bf588 | 230 | SPI_Exchange(); //Чтение ADC_SPI |
igor_v | 114:5cc38a53d8a7 | 231 | |
Kovalev_D | 112:4a96133a1311 | 232 | LPC_TIM1->IR = 1; |
Kovalev_D | 208:19150d2b528f | 233 | |
Kovalev_D | 208:19150d2b528f | 234 | |
Kovalev_D | 112:4a96133a1311 | 235 | } |
Kovalev_D | 112:4a96133a1311 | 236 | |
igor_v | 21:bc8c1cec3da6 | 237 | /////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 238 | /////////////////////////прерывание таймера 2////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 239 | /////////////////////////////////////////////////////////////////////// |
igor_v | 21:bc8c1cec3da6 | 240 | __irq void TIMER2_IRQHandler (void) |
Kovalev_D | 210:b02fa166315d | 241 | { |
Kovalev_D | 210:b02fa166315d | 242 | LoopOn |
igor_v | 21:bc8c1cec3da6 | 243 | LPC_TIM2->IR = 1; |
Kovalev_D | 208:19150d2b528f | 244 | |
Kovalev_D | 190:289514f730ee | 245 | if(Time_UART) Time_UART--; |
igor_v | 21:bc8c1cec3da6 | 246 | Time_vibro++; |
Kovalev_D | 203:3a6615de9581 | 247 | VibroOut(); |
Kovalev_D | 112:4a96133a1311 | 248 | Gyro.VibroOutF=1; |
Kovalev_D | 190:289514f730ee | 249 | Event100K ++; |
Kovalev_D | 197:7a05523bf588 | 250 | Time500Hz++; |
Kovalev_D | 209:224e7331a061 | 251 | Time250Hz++; |
Kovalev_D | 197:7a05523bf588 | 252 | Time100K++; |
Kovalev_D | 209:224e7331a061 | 253 | Time2K++; |
Kovalev_D | 209:224e7331a061 | 254 | //Time2K++; |
Kovalev_D | 205:775d54fdf646 | 255 | // Time250Hz++; |
Kovalev_D | 197:7a05523bf588 | 256 | if (Time100K == 100) |
Kovalev_D | 197:7a05523bf588 | 257 | { |
Kovalev_D | 197:7a05523bf588 | 258 | Time100K = 0; |
Kovalev_D | 197:7a05523bf588 | 259 | Event1K ++; |
Kovalev_D | 197:7a05523bf588 | 260 | } |
Kovalev_D | 209:224e7331a061 | 261 | |
Kovalev_D | 209:224e7331a061 | 262 | if (Time2K== 50) |
Kovalev_D | 209:224e7331a061 | 263 | { Time2K=0; |
Kovalev_D | 209:224e7331a061 | 264 | //Time100K = 0; |
Kovalev_D | 209:224e7331a061 | 265 | Event2K ++; |
Kovalev_D | 209:224e7331a061 | 266 | } |
Kovalev_D | 209:224e7331a061 | 267 | |
Kovalev_D | 197:7a05523bf588 | 268 | if (Time500Hz > 200) |
Kovalev_D | 208:19150d2b528f | 269 | { // LoopOn |
Kovalev_D | 197:7a05523bf588 | 270 | Time500Hz -= 200; |
Kovalev_D | 208:19150d2b528f | 271 | Event500Hz ++; |
Kovalev_D | 197:7a05523bf588 | 272 | } |
Kovalev_D | 209:224e7331a061 | 273 | |
Kovalev_D | 209:224e7331a061 | 274 | if (Time250Hz > 6) |
Kovalev_D | 209:224e7331a061 | 275 | { // LoopOn |
Kovalev_D | 209:224e7331a061 | 276 | Time250Hz -= 6; |
Kovalev_D | 209:224e7331a061 | 277 | Event250Hz ++; |
Kovalev_D | 209:224e7331a061 | 278 | } |
Kovalev_D | 210:b02fa166315d | 279 | |
Kovalev_D | 210:b02fa166315d | 280 | LoopOff |
igor_v | 21:bc8c1cec3da6 | 281 | } |