![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Diff: pin.c
- Revision:
- 213:9953db9543d6
- Parent:
- 211:ac8251b067d2
- Child:
- 214:4c70e452c491
--- a/pin.c Mon Jul 03 08:32:27 2017 +0000 +++ b/pin.c Wed Jul 26 13:24:39 2017 +0000 @@ -38,7 +38,7 @@ if (Gyro.Discharg) { - if(Gyro.LG_Type==1) Spi.DAC_A = (unsigned int)(32767-(GyroP.Str.DAC_current_Work>>1)); + if(Gyro.LG_Type==1) {Spi.DAC_A =19500;}//Spi.DAC_A = (unsigned int)(32767-(GyroP.Str.DAC_current_Work>>1)); else Spi.DAC_A =(((int)(GyroP.Str.DAC_current_Start*0.98+0x7fff) & 0xffff)); Gyro.Discharg = Gyro.Discharg >> 1; @@ -57,7 +57,7 @@ TimeDischarg++; if(TimeDischarg==1) { - if (Spi.ADC5>35000) + if (Spi.ADC5>30000) { if (Try<10) { @@ -82,8 +82,8 @@ } TimeDischarg=5; Try=0; - if(Gyro.LG_Type==1) Spi.DAC_A = (unsigned int)(32767-(GyroP.Str.DAC_current_Work>>1)); - else Spi.DAC_A = ((((int)(GyroP.Str.DAC_current_Work+0x7fff) & 0xffff)+22544)*0.65); + if(Gyro.LG_Type==1){}// Spi.DAC_A = (unsigned int)(32767-(GyroP.Str.DAC_current_Work>>1)); + else Spi.DAC_A = ((((int)(GyroP.Str.DAC_current_Work+0x7fff) & 0xffff)+22544)*0.65); } } }