![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: MTimer.c
- Revision:
- 213:9953db9543d6
- Parent:
- 211:ac8251b067d2
- Child:
- 214:4c70e452c491
diff -r 8d6784491bae -r 9953db9543d6 MTimer.c --- a/MTimer.c Mon Jul 03 08:32:27 2017 +0000 +++ b/MTimer.c Wed Jul 26 13:24:39 2017 +0000 @@ -23,14 +23,14 @@ { int tempdac,tempdac1; if (Event1Hz) { - if(Gyro.LogMod) ShowMod2(); + if(Gyro.LogMod==1) ShowMod2(); Discharg(); BackLight(); Gyro.Rate1_Event = 1; Event1Hz--; Time1Hz++; - sprintf((Time),"%i %i %i %i %d\r\n",Spi.DAC_A, Gyro.HFO_Min, Gyro.HFO_Max,Gyro.RgConA ); - WriteCon(Time); + /* sprintf((Time),"%i %i %i %i %d\r\n",Spi.DAC_A, Gyro.HFO_Min, Gyro.HFO_Max,Gyro.RgConA ); + WriteCon(Time); */ /* sprintf((Time)," %d %d %d \r\n", Gyro.PLC_Eror, Spi.DAC_B , Gyro.PLCDelay ,Gyro.RgConA); Gyro.CuruAngle=0; WriteCon(Time);*/ @@ -86,7 +86,12 @@ void Event_2KHz(void)// событие раз в 1 кГц { if (Event2K) - { + { if(Gyro.LogMod==2) + { + sprintf((Time),"%d %d %d %d \r\n", Spi.DAC_A, tempDeltaRegul, Spi.DAC_B, Gyro.CuruAngle); + WriteCon(Time); + Gyro.CuruAngle=0; + } Event2K --; Gyro.Rate3_Event++; } @@ -95,7 +100,7 @@ { if(Event500Hz) { - + Event500Hz--; Gyro.Event_500Hz=1;// Event 500Гц выдачи данных для постройки графика управления вибро } @@ -239,10 +244,12 @@ /////////////////////////////////////////////////////////////////////// __irq void TIMER2_IRQHandler (void) { - LoopOn + /// LoopOn LPC_TIM2->IR = 1; - - if(Time_UART) Time_UART--; + if (Gyro.UARTFlag) + { + if(Time_UART) Time_UART--; + } Time_vibro++; VibroOut(); Gyro.VibroOutF=1; @@ -259,7 +266,7 @@ Event1K ++; } - if (Time2K== 50) + if (Time2K== 2000) { Time2K=0; //Time100K = 0; Event2K ++; @@ -277,5 +284,5 @@ Event250Hz ++; } - LoopOff + //LoopOff } \ No newline at end of file