![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: Global.c
- Revision:
- 220:04c54405b82d
- Parent:
- 218:b4067cac75c0
- Child:
- 222:7de7b3bf3a1d
--- a/Global.c Wed Sep 27 13:09:24 2017 +0000 +++ b/Global.c Fri Oct 20 13:16:32 2017 +0000 @@ -37,9 +37,15 @@ int BuffADC_1Point [600]; int BuffADC_1Point_64 [100]; int BuffADC_1Point_Recalc [100]; - int BuffADC_64Point [100]; + + int BuffADC_128Point [100]; + int BuffADC_64Point [100]; + int BuffADC_32Point [100]; int BuffADC_16Point [100]; - int BuffADC_znak [100]; + int BuffADC_10v [100]; + int BuffADC_10v_OLD [100]; + int BuffADC_10v_F [100]; + int BuffADC_znak [100]; int Buff_Restored_Mod [100]; int Buff_PLC_Eror [100]; @@ -47,7 +53,10 @@ int BSinPls [100]; int ADC_1Point =0; int ADC_32PointD =0; + +int ADC_128Point =0; int ADC_64Point =0; +int ADC_32Point =0; int ADC_16Point =0; //unsigned int EventMod; @@ -117,7 +126,8 @@ // GyroP.Str.ParamMod=0; if(GyroP.Str.ParamMod) { - + Gyro.ShowMod2=0; + Gyro.ShiftMod = GyroP.Str.ShiftMod; Gyro.PLC_Start = 0x7fff+GyroP.Str.PLC_Start; Gyro.DownTreshold = 0x7fff+GyroP.Str.DownTreshold; //27 Gyro.HighTreshold = 0x7fff+GyroP.Str.HighTreshold; @@ -277,7 +287,7 @@ int Dummy; // инициализация мусорки для очистки буфера приема. - if(Gyro.LG_Type==1)Spi.DAC_A=(unsigned int)(26000); + if(Gyro.LG_Type==1)Spi.DAC_A=(unsigned int)(24000); @@ -291,7 +301,7 @@ LPC_PINCON->PINSEL3 |= 0x4100; //P1.20, p1.23 установить как входы кв.э LPC_PINCON->PINMODE3 |= 0x3C300; //P1.20, p1.23 - + //Gyro.ShiftMod=150; LPC_QEI->MAXPOS = MAX_QEI_CNT; //LPC_QEI->"регистор максимального положения" = 2147483646 LPC_QEI->FILTER = 2; // фильтр( ?? ) LPC_QEI->CON = 0xF; //сбросить в ноль все счетчики кв.э. (скорость, направление, позицию и тд)