![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: Command.c
- Revision:
- 179:2b4e6bc277df
- Parent:
- 177:1666a83d88a5
- Child:
- 180:375dcd9c0cb6
diff -r 672ef279c8e0 -r 2b4e6bc277df Command.c --- a/Command.c Sun Jul 03 13:40:48 2016 +0000 +++ b/Command.c Tue Jul 05 14:00:50 2016 +0000 @@ -210,7 +210,7 @@ - //темпкратурный канал 1 + //f case 12: Temp = Gyro.AD_Slow >> 16; BuffTemp[5] = (Temp >> 8) & 0xff; @@ -517,17 +517,17 @@ - Temp = Spi.DAC_B - 0x7fff; + Temp = Spi.DAC_B - 0x7fff; BuffTemp[22] = (Temp >> 8) & 0xff; BuffTemp[23] = (Temp >> 0) & 0xff; -Temp = Gyro.PLC_Delta >> 16; + Temp = Gyro.PLC_Delta >> 16; BuffTemp[24] = (Temp >> 8) & 0xff; - BuffTemp[25] = (Temp >> 0) & 0xff;// ХЗ + BuffTemp[25] = (Temp >> 0) & 0xff;// -Temp = 100; -Temp = Gyro.AD_Slow >> 16; + + Temp = Gyro.AD_Slow >> 16; BuffTemp[26] = (Temp >> 8) & 0xff; BuffTemp[27] = (Temp >> 0) & 0xff; @@ -562,7 +562,21 @@ WriteConN (BuffTemp,44); } +void CMD_M_vib() +{ + unsigned int temp1,temp2; + temp1 =((BuffTemp[4]<<8) | BuffTemp[5]); + temp1=temp1&0xFFFF; + + temp2 =((BuffTemp[6]<<8) | BuffTemp[7]); + temp2=temp2&0xFFFF; + + Gyro.AmpPer=(((((Gyro.Frq>>12)*200)/16)*temp2)/7680000); + + // Gyro.AmpPer = ((unsigned int) ((7680000*16/temp1)))*16*16*16; + Consol=Gyro.Frq ; +} void CMD_M_Control_D8()///установка\сброс регистров управления { unsigned int bit,NReg,Pa; @@ -694,18 +708,7 @@ } -void CMD_M_vib() -{ - unsigned int temp1,temp2; - temp1 =((BuffTemp[4]<<8) | BuffTemp[5]); - temp1=temp1&0xFFFF; - - temp2 =((BuffTemp[6]<<8) | BuffTemp[7]); - temp2=temp2&0xFFFF; - Gyro.Frq = ((unsigned int) ((7680000*16/temp1)))*16*16*16; - Consol=Gyro.Frq ; -} unsigned int Check(char *c, unsigned int Count) { int i=1; @@ -1016,6 +1019,12 @@ for (int i = 0; i < 32; i++ )sprintf((Time)," <%07d> ",Cur_Amp); WriteCon(Time); } + if (Time[0] == 'x') { // выдача технологическая + sprintf(Time,"\r\n"); + WriteCon(Time); + sprintf((Time)," Gyro.MaxAmp = <%07d> Gyro.CaunPlus = <%07d> Gyro.CaunMin= <%07d> Gyro.CaunPlus+Gyro.CaunMin-5000 <%07d> ",Gyro.MaxAmp, Gyro.CaunPlus, Gyro.CaunMin, ((Gyro.CaunPlus + Gyro.CaunMin)-5000)); + WriteCon(Time); + } if (Time[0] == 'm') { // выдача технологическая sprintf(Time,"\r\n"); WriteCon(Time);