Dmitry Kovalev
/
LG2
fork
Fork of LG by
Revision 219:2d3475d0dd1b, committed 2017-09-27
- Comitter:
- Kovalev_D
- Date:
- Wed Sep 27 13:09:24 2017 +0000
- Parent:
- 218:b4067cac75c0
- Commit message:
- hnjtfgyy
Changed in this revision
Command.c | Show annotated file Show diff for this revision Revisions of this file |
diff -r b4067cac75c0 -r 2d3475d0dd1b Command.c --- a/Command.c Mon Sep 25 10:35:56 2017 +0000 +++ b/Command.c Wed Sep 27 13:09:24 2017 +0000 @@ -671,8 +671,8 @@ { case 1: Temp1 =(int)(((float)(Spi.DAC_A)/0.6667)- 0xefff); break; - case 0: Temp2 = (Spi.DAC_A*1.538) - 0xd80f; - Temp1= (int)Temp2; break; + case 0: // Temp2 = (Spi.DAC_A*1.538) - 0xd80f; + Temp1 =(int)(((float)(Spi.DAC_A)/0.64)- 56000); break; } //Temp1=Gyro.DacIn/*-0x7fff*/; BuffTemp[10] = (Temp1 >> 8) & 0xff;//выход регулятора гвч; 11 --выход регулятора ГВЧ @@ -681,7 +681,7 @@ if(Gyro.LG_Type) Temp =(int)(tempDeltaRegul); - else Temp =(unsigned int)(0x7fff-Spi.ADC5)*0.79; + else Temp =(unsigned int)((0x7fff-Spi.ADC5)*0.79)<<1; BuffTemp[12]=(Temp >> 8) & 0xff;//// HFO 13 --сигнал ошибки регулятора ГВЧ BuffTemp[13]=(Temp >> 0) & 0xff;//// 14 --сигнал ошибки регулятора ГВЧ @@ -802,7 +802,11 @@ { Gyro.DacIn=temp; if(Gyro.LG_Type==1) Spi.DAC_A = ((unsigned int)((Gyro.DacIn+0x7011)*0.6667)); - else Spi.DAC_A = (unsigned int)((temp)); + else Spi.DAC_A = ((unsigned int)((Gyro.DacIn+23200)*0.64)); + + /*Temp2 = (Spi.DAC_A*1.538) - 0xd80f; + Temp1= (int)Temp2; */ + } else Spi.DAC_B = (unsigned int)temp; /*