![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: Command.c
- Revision:
- 107:4d178bcc9d8a
- Parent:
- 106:250ddd8629c6
- Child:
- 108:030cdde08314
--- a/Command.c Fri Apr 01 10:05:35 2016 +0000 +++ b/Command.c Fri Apr 01 16:13:55 2016 +0000 @@ -34,7 +34,7 @@ void CMD_Rate(void) { - + unsigned int T_VibH , T_VibL; // Частота вибропривода. unsigned int tau_VibH , tau_VibL; unsigned int Cnt_PlsL , Cnt_PlsH; // Счетчик +. @@ -52,6 +52,8 @@ // Gyro .T_Vib=(unsigned int)((7680000*16/Gyro.Frq)*4096); Gyro.T_Vib=(unsigned int)((7680000*16/(Gyro.Frq>>12))); + Gyro.tau=(unsigned int)(Gyro.T_Vib * Gyro.AmpPer/200); + Gyro.Firmware_Version=0xff; /// промежуточная затычка T_VibH = ( Gyro.T_Vib>>8 ) TakeByte; @@ -75,9 +77,11 @@ F_rasH = ( Gyro.F_ras>>8 ) TakeByte; F_rasL = ( Gyro.F_ras ) TakeByte; - HF_regL = ( Spi.DAC_A>>8 ) TakeByte; + HF_regL = ( Spi.DAC_A ) TakeByte; HF_regH = ( Spi.DAC_A>>8 ) TakeByte; - + + WP_regH = ( Spi.DAC_A>>8 ) TakeByte; + WP_regL = ( Spi.DAC_A ) TakeByte; ADC1H = ( Spi.ADC1>>8 ) TakeByte; ADC1L = ( Spi.ADC1 ) TakeByte; @@ -126,11 +130,11 @@ BuffTemp[14] = T_VibH; BuffTemp[15] = T_VibL; - BuffTemp[16] = 0x01; + BuffTemp[16] = 0xf; BuffTemp[17] = 0x02; - BuffTemp[18] = tau_VibH; - BuffTemp[19] = tau_VibL; + BuffTemp[18] = tau_VibH; + BuffTemp[19] = tau_VibL; BuffTemp[20] = 0x00; BuffTemp[21] = 0x00;