![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Command.c@129:406995a91322, 2016-04-12 (annotated)
- Committer:
- Kovalev_D
- Date:
- Tue Apr 12 11:10:49 2016 +0000
- Revision:
- 129:406995a91322
- Parent:
- 128:1e4675a36c93
- Child:
- 131:ef5973569c02
?????? ? ?????? ??????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 0:8ad47e2b6f00 | 1 | #include "stdlib.h" |
igor_v | 0:8ad47e2b6f00 | 2 | #include "LPC17xx.h" |
igor_v | 0:8ad47e2b6f00 | 3 | #include "Global.h" |
Kovalev_D | 106:250ddd8629c6 | 4 | int tempNH,tempNL; |
igor_v | 0:8ad47e2b6f00 | 5 | unsigned int Rate_Flag; |
igor_v | 0:8ad47e2b6f00 | 6 | unsigned int CountBuFFIn; |
igor_v | 21:bc8c1cec3da6 | 7 | unsigned int N=0,CRC_N; |
igor_v | 21:bc8c1cec3da6 | 8 | unsigned int Param1=0; |
igor_v | 21:bc8c1cec3da6 | 9 | unsigned int Param2=0; |
igor_v | 21:bc8c1cec3da6 | 10 | unsigned int Param3=0; |
igor_v | 21:bc8c1cec3da6 | 11 | unsigned int Param4=0; |
Kovalev_D | 102:4270092be987 | 12 | unsigned int Consol=123; |
Kovalev_D | 121:bbae560cdd43 | 13 | unsigned int TempParam=1; |
Kovalev_D | 124:9ae09249f842 | 14 | unsigned int CountParam=0; |
Kovalev_D | 129:406995a91322 | 15 | |
Kovalev_D | 129:406995a91322 | 16 | void CMD_M_Param_R(void) |
igor_v | 0:8ad47e2b6f00 | 17 | { |
Kovalev_D | 129:406995a91322 | 18 | unsigned int NP; |
Kovalev_D | 129:406995a91322 | 19 | unsigned int Param; |
Kovalev_D | 129:406995a91322 | 20 | BuffTemp[0] = Gyro.SOC_Out; |
Kovalev_D | 129:406995a91322 | 21 | BuffTemp[1] = Gyro.My_Addres; |
Kovalev_D | 129:406995a91322 | 22 | |
Kovalev_D | 129:406995a91322 | 23 | NP = BuffTemp[3]; |
Kovalev_D | 129:406995a91322 | 24 | |
Kovalev_D | 129:406995a91322 | 25 | Param = GyroP.Array[NP]; |
Kovalev_D | 129:406995a91322 | 26 | |
Kovalev_D | 129:406995a91322 | 27 | BuffTemp[2] =(Param >> 8) & 0xff;//старший байт требуемого параметра |
Kovalev_D | 129:406995a91322 | 28 | BuffTemp[3] =(Param >> 0) & 0xff;//младший байт требуемого параметра |
Kovalev_D | 129:406995a91322 | 29 | |
Kovalev_D | 129:406995a91322 | 30 | Check(BuffTemp, 6); |
Kovalev_D | 129:406995a91322 | 31 | WriteConN (BuffTemp,6); |
Kovalev_D | 129:406995a91322 | 32 | } |
Kovalev_D | 129:406995a91322 | 33 | void CMD_M_Param_W(void) |
Kovalev_D | 129:406995a91322 | 34 | { |
Kovalev_D | 129:406995a91322 | 35 | unsigned int NP; |
Kovalev_D | 129:406995a91322 | 36 | unsigned int Param; |
Kovalev_D | 129:406995a91322 | 37 | |
Kovalev_D | 129:406995a91322 | 38 | NP = BuffTemp[3]; |
Kovalev_D | 129:406995a91322 | 39 | Param = (BuffTemp[4]<<8); |
Kovalev_D | 129:406995a91322 | 40 | Param |= BuffTemp[5]; |
Kovalev_D | 129:406995a91322 | 41 | |
Kovalev_D | 129:406995a91322 | 42 | GyroP.Array[NP] = Param; |
Kovalev_D | 129:406995a91322 | 43 | |
Kovalev_D | 129:406995a91322 | 44 | |
Kovalev_D | 129:406995a91322 | 45 | BuffTemp[0] = Gyro.SOC_Out; |
Kovalev_D | 129:406995a91322 | 46 | BuffTemp[1] = Gyro.My_Addres; |
Kovalev_D | 129:406995a91322 | 47 | BuffTemp[2] = Gyro.CMD_In; |
Kovalev_D | 129:406995a91322 | 48 | BuffTemp[3] = 0x00;//старший байт требуемого параметра |
Kovalev_D | 129:406995a91322 | 49 | |
Kovalev_D | 129:406995a91322 | 50 | Check(BuffTemp, 6); |
Kovalev_D | 129:406995a91322 | 51 | WriteConN (BuffTemp,6); |
Kovalev_D | 129:406995a91322 | 52 | } |
igor_v | 0:8ad47e2b6f00 | 53 | void CMD_Maintenance(void) |
igor_v | 0:8ad47e2b6f00 | 54 | { |
Kovalev_D | 122:fbacb932a30b | 55 | |
Kovalev_D | 122:fbacb932a30b | 56 | BuffTemp[0] = Gyro.SOC_Out; |
Kovalev_D | 124:9ae09249f842 | 57 | BuffTemp[1] = Gyro.My_Addres; |
Kovalev_D | 124:9ae09249f842 | 58 | BuffTemp[2] = Gyro.Firmware_Version; |
Kovalev_D | 124:9ae09249f842 | 59 | BuffTemp[3] = Gyro.GLD_Serial; |
igor_v | 21:bc8c1cec3da6 | 60 | BuffTemp[4]=0x00; |
igor_v | 21:bc8c1cec3da6 | 61 | BuffTemp[5]=0x00; |
igor_v | 21:bc8c1cec3da6 | 62 | Check(BuffTemp, 8); |
igor_v | 21:bc8c1cec3da6 | 63 | WriteConN (BuffTemp,8); |
Kovalev_D | 121:bbae560cdd43 | 64 | |
igor_v | 0:8ad47e2b6f00 | 65 | } |
Kovalev_D | 124:9ae09249f842 | 66 | void CMD_Delta_500Hz(void) |
Kovalev_D | 124:9ae09249f842 | 67 | { |
Kovalev_D | 124:9ae09249f842 | 68 | Gyro.Delta500_Event=0; |
Kovalev_D | 122:fbacb932a30b | 69 | unsigned int Temp; |
Kovalev_D | 124:9ae09249f842 | 70 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 122:fbacb932a30b | 71 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 124:9ae09249f842 | 72 | |
Kovalev_D | 124:9ae09249f842 | 73 | Temp = Gyro.CuruAngle; |
Kovalev_D | 124:9ae09249f842 | 74 | Gyro.CuruAngle = 0; |
Kovalev_D | 124:9ae09249f842 | 75 | |
Kovalev_D | 124:9ae09249f842 | 76 | BuffTemp[ 2] =(Temp >> 8) & 0xff;//старший байт разности счетчиков |
Kovalev_D | 124:9ae09249f842 | 77 | BuffTemp[ 3] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 124:9ae09249f842 | 78 | |
Kovalev_D | 124:9ae09249f842 | 79 | BuffTemp[ 4] = CountParam; |
Kovalev_D | 124:9ae09249f842 | 80 | switch(CountParam) { |
Kovalev_D | 124:9ae09249f842 | 81 | |
Kovalev_D | 124:9ae09249f842 | 82 | |
Kovalev_D | 124:9ae09249f842 | 83 | |
Kovalev_D | 124:9ae09249f842 | 84 | //F_ras |
Kovalev_D | 124:9ae09249f842 | 85 | case 0: |
Kovalev_D | 124:9ae09249f842 | 86 | Temp = Gyro.F_ras; |
Kovalev_D | 124:9ae09249f842 | 87 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 88 | break; |
Kovalev_D | 124:9ae09249f842 | 89 | |
Kovalev_D | 124:9ae09249f842 | 90 | case 1: |
Kovalev_D | 124:9ae09249f842 | 91 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 92 | break; |
Kovalev_D | 124:9ae09249f842 | 93 | |
Kovalev_D | 124:9ae09249f842 | 94 | |
Kovalev_D | 124:9ae09249f842 | 95 | |
Kovalev_D | 124:9ae09249f842 | 96 | //HFO |
Kovalev_D | 124:9ae09249f842 | 97 | case 2: |
Kovalev_D | 124:9ae09249f842 | 98 | Temp = 0;//HFO |
Kovalev_D | 124:9ae09249f842 | 99 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 100 | break; |
Kovalev_D | 124:9ae09249f842 | 101 | |
Kovalev_D | 124:9ae09249f842 | 102 | case 3: |
Kovalev_D | 124:9ae09249f842 | 103 | Temp = 0;//HFO |
Kovalev_D | 124:9ae09249f842 | 104 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 105 | break; |
Kovalev_D | 124:9ae09249f842 | 106 | |
Kovalev_D | 124:9ae09249f842 | 107 | |
Kovalev_D | 124:9ae09249f842 | 108 | |
Kovalev_D | 124:9ae09249f842 | 109 | //T_Vibro |
Kovalev_D | 124:9ae09249f842 | 110 | case 4: |
Kovalev_D | 124:9ae09249f842 | 111 | Temp = (unsigned int)((7680000*16/(Gyro.Frq>>12))); |
Kovalev_D | 124:9ae09249f842 | 112 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 113 | break; |
Kovalev_D | 124:9ae09249f842 | 114 | |
Kovalev_D | 124:9ae09249f842 | 115 | case 5: |
Kovalev_D | 124:9ae09249f842 | 116 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 117 | break; |
Kovalev_D | 124:9ae09249f842 | 118 | |
Kovalev_D | 124:9ae09249f842 | 119 | |
Kovalev_D | 124:9ae09249f842 | 120 | |
Kovalev_D | 124:9ae09249f842 | 121 | //L_Vibro |
Kovalev_D | 124:9ae09249f842 | 122 | case 6: |
Kovalev_D | 124:9ae09249f842 | 123 | Temp = (unsigned int)(((7680000*16/200) *Gyro.AmpPer /(Gyro.Frq>>12))); |
Kovalev_D | 124:9ae09249f842 | 124 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 125 | |
Kovalev_D | 124:9ae09249f842 | 126 | break; |
Kovalev_D | 124:9ae09249f842 | 127 | |
Kovalev_D | 124:9ae09249f842 | 128 | case 7: |
Kovalev_D | 124:9ae09249f842 | 129 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 130 | break; |
Kovalev_D | 124:9ae09249f842 | 131 | |
Kovalev_D | 124:9ae09249f842 | 132 | |
Kovalev_D | 124:9ae09249f842 | 133 | |
Kovalev_D | 124:9ae09249f842 | 134 | //Напряжение на регуляторе периметра |
Kovalev_D | 124:9ae09249f842 | 135 | case 8: |
Kovalev_D | 124:9ae09249f842 | 136 | Temp = Spi.DAC_B - 0x7fff; |
Kovalev_D | 124:9ae09249f842 | 137 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 138 | |
Kovalev_D | 124:9ae09249f842 | 139 | break; |
Kovalev_D | 124:9ae09249f842 | 140 | |
Kovalev_D | 124:9ae09249f842 | 141 | case 9: |
Kovalev_D | 124:9ae09249f842 | 142 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 143 | break; |
Kovalev_D | 124:9ae09249f842 | 144 | |
Kovalev_D | 124:9ae09249f842 | 145 | |
Kovalev_D | 124:9ae09249f842 | 146 | |
Kovalev_D | 124:9ae09249f842 | 147 | //темпкратурный канал 0 |
Kovalev_D | 124:9ae09249f842 | 148 | case 10: |
Kovalev_D | 124:9ae09249f842 | 149 | Temp = 100; |
Kovalev_D | 124:9ae09249f842 | 150 | BuffTemp[5] = (Temp >> 8) & 0xff; |
igor_v | 0:8ad47e2b6f00 | 151 | |
Kovalev_D | 124:9ae09249f842 | 152 | break; |
Kovalev_D | 124:9ae09249f842 | 153 | |
Kovalev_D | 124:9ae09249f842 | 154 | case 11: |
Kovalev_D | 124:9ae09249f842 | 155 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 156 | break; |
Kovalev_D | 124:9ae09249f842 | 157 | |
Kovalev_D | 124:9ae09249f842 | 158 | |
Kovalev_D | 124:9ae09249f842 | 159 | |
Kovalev_D | 124:9ae09249f842 | 160 | //темпкратурный канал 1 |
Kovalev_D | 124:9ae09249f842 | 161 | case 12: |
Kovalev_D | 124:9ae09249f842 | 162 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 124:9ae09249f842 | 163 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 164 | |
Kovalev_D | 124:9ae09249f842 | 165 | break; |
Kovalev_D | 124:9ae09249f842 | 166 | |
Kovalev_D | 124:9ae09249f842 | 167 | case 13: |
Kovalev_D | 124:9ae09249f842 | 168 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 169 | break; |
Kovalev_D | 124:9ae09249f842 | 170 | |
Kovalev_D | 124:9ae09249f842 | 171 | |
Kovalev_D | 124:9ae09249f842 | 172 | |
Kovalev_D | 124:9ae09249f842 | 173 | //ток 1 |
Kovalev_D | 124:9ae09249f842 | 174 | case 14: |
Kovalev_D | 124:9ae09249f842 | 175 | Temp = Gyro.In1; |
Kovalev_D | 124:9ae09249f842 | 176 | BuffTemp[5] = (Temp >> 8) & 0xff;//in1//2 |
Kovalev_D | 124:9ae09249f842 | 177 | |
Kovalev_D | 124:9ae09249f842 | 178 | break; |
Kovalev_D | 124:9ae09249f842 | 179 | |
Kovalev_D | 124:9ae09249f842 | 180 | case 15: |
Kovalev_D | 124:9ae09249f842 | 181 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 182 | break; |
Kovalev_D | 124:9ae09249f842 | 183 | |
Kovalev_D | 124:9ae09249f842 | 184 | |
Kovalev_D | 124:9ae09249f842 | 185 | |
Kovalev_D | 124:9ae09249f842 | 186 | //ток 2 |
Kovalev_D | 124:9ae09249f842 | 187 | case 16: |
Kovalev_D | 124:9ae09249f842 | 188 | Temp = Gyro.In2; |
Kovalev_D | 124:9ae09249f842 | 189 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 190 | break; |
Kovalev_D | 124:9ae09249f842 | 191 | |
Kovalev_D | 124:9ae09249f842 | 192 | case 17: |
Kovalev_D | 124:9ae09249f842 | 193 | BuffTemp[5] = (Temp >> 0) & 0xff;//in2//3 |
Kovalev_D | 124:9ae09249f842 | 194 | break; |
Kovalev_D | 124:9ae09249f842 | 195 | |
Kovalev_D | 124:9ae09249f842 | 196 | |
Kovalev_D | 124:9ae09249f842 | 197 | |
Kovalev_D | 124:9ae09249f842 | 198 | //разностный температурный канал Delta Temp |
Kovalev_D | 124:9ae09249f842 | 199 | case 18: |
Kovalev_D | 124:9ae09249f842 | 200 | Temp = Gyro.DeltaT; |
Kovalev_D | 124:9ae09249f842 | 201 | BuffTemp[5] = (Temp >> 8) & 0xff;//дельта |
Kovalev_D | 124:9ae09249f842 | 202 | break; |
Kovalev_D | 124:9ae09249f842 | 203 | |
Kovalev_D | 124:9ae09249f842 | 204 | case 19: |
Kovalev_D | 124:9ae09249f842 | 205 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 206 | break; |
Kovalev_D | 124:9ae09249f842 | 207 | |
Kovalev_D | 124:9ae09249f842 | 208 | |
Kovalev_D | 124:9ae09249f842 | 209 | |
Kovalev_D | 124:9ae09249f842 | 210 | //температурный канал 5 |
Kovalev_D | 124:9ae09249f842 | 211 | case 20: |
Kovalev_D | 124:9ae09249f842 | 212 | Temp = Gyro.Termo;//0xa4=164 |
Kovalev_D | 124:9ae09249f842 | 213 | BuffTemp[5] =(Temp >> 8) & 0xff;//температура |
Kovalev_D | 124:9ae09249f842 | 214 | |
Kovalev_D | 124:9ae09249f842 | 215 | break; |
Kovalev_D | 124:9ae09249f842 | 216 | |
Kovalev_D | 124:9ae09249f842 | 217 | case 21: |
Kovalev_D | 124:9ae09249f842 | 218 | BuffTemp[5] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 |
Kovalev_D | 124:9ae09249f842 | 219 | break; |
Kovalev_D | 124:9ae09249f842 | 220 | } |
Kovalev_D | 124:9ae09249f842 | 221 | Check(BuffTemp, 6); |
Kovalev_D | 124:9ae09249f842 | 222 | WriteConN (BuffTemp,6); |
Kovalev_D | 128:1e4675a36c93 | 223 | |
Kovalev_D | 124:9ae09249f842 | 224 | CountParam++; |
Kovalev_D | 124:9ae09249f842 | 225 | if(CountParam>21)CountParam=0;//зацикливания буфера от 0 до 21 |
Kovalev_D | 124:9ae09249f842 | 226 | |
Kovalev_D | 124:9ae09249f842 | 227 | } |
Kovalev_D | 124:9ae09249f842 | 228 | void CMD_Delta_Ext(void) |
Kovalev_D | 124:9ae09249f842 | 229 | { |
Kovalev_D | 124:9ae09249f842 | 230 | unsigned int Temp; |
Kovalev_D | 128:1e4675a36c93 | 231 | Gyro.EXT_Latch=0; |
Kovalev_D | 124:9ae09249f842 | 232 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 124:9ae09249f842 | 233 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 124:9ae09249f842 | 234 | Temp = Gyro.CuruAngle; |
Kovalev_D | 124:9ae09249f842 | 235 | Gyro.CuruAngle = 0; |
Kovalev_D | 124:9ae09249f842 | 236 | |
Kovalev_D | 124:9ae09249f842 | 237 | BuffTemp[ 2] =(Temp >> 8) & 0xff;//старший байт разности счетчиков |
Kovalev_D | 124:9ae09249f842 | 238 | BuffTemp[ 3] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 124:9ae09249f842 | 239 | |
Kovalev_D | 124:9ae09249f842 | 240 | BuffTemp[ 4] = CountParam; |
Kovalev_D | 128:1e4675a36c93 | 241 | switch(CountParam) { |
Kovalev_D | 124:9ae09249f842 | 242 | |
Kovalev_D | 128:1e4675a36c93 | 243 | WriteCon("5"); |
Kovalev_D | 124:9ae09249f842 | 244 | |
Kovalev_D | 124:9ae09249f842 | 245 | //F_ras |
Kovalev_D | 124:9ae09249f842 | 246 | case 0: |
Kovalev_D | 124:9ae09249f842 | 247 | Temp = Gyro.F_ras; |
Kovalev_D | 124:9ae09249f842 | 248 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 128:1e4675a36c93 | 249 | |
Kovalev_D | 124:9ae09249f842 | 250 | break; |
Kovalev_D | 124:9ae09249f842 | 251 | |
Kovalev_D | 124:9ae09249f842 | 252 | case 1: |
Kovalev_D | 124:9ae09249f842 | 253 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 128:1e4675a36c93 | 254 | |
Kovalev_D | 124:9ae09249f842 | 255 | break; |
Kovalev_D | 124:9ae09249f842 | 256 | |
Kovalev_D | 124:9ae09249f842 | 257 | |
Kovalev_D | 124:9ae09249f842 | 258 | |
Kovalev_D | 124:9ae09249f842 | 259 | //HFO |
Kovalev_D | 124:9ae09249f842 | 260 | case 2: |
Kovalev_D | 124:9ae09249f842 | 261 | Temp = 0;//HFO |
Kovalev_D | 124:9ae09249f842 | 262 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 128:1e4675a36c93 | 263 | |
Kovalev_D | 124:9ae09249f842 | 264 | break; |
Kovalev_D | 124:9ae09249f842 | 265 | |
Kovalev_D | 124:9ae09249f842 | 266 | case 3: |
Kovalev_D | 124:9ae09249f842 | 267 | Temp = 0;//HFO |
Kovalev_D | 124:9ae09249f842 | 268 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 128:1e4675a36c93 | 269 | |
Kovalev_D | 124:9ae09249f842 | 270 | break; |
Kovalev_D | 124:9ae09249f842 | 271 | |
Kovalev_D | 124:9ae09249f842 | 272 | |
Kovalev_D | 124:9ae09249f842 | 273 | |
Kovalev_D | 124:9ae09249f842 | 274 | //T_Vibro |
Kovalev_D | 124:9ae09249f842 | 275 | case 4: |
Kovalev_D | 124:9ae09249f842 | 276 | Temp = (unsigned int)((7680000*16/(Gyro.Frq>>12))); |
Kovalev_D | 124:9ae09249f842 | 277 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 128:1e4675a36c93 | 278 | |
Kovalev_D | 124:9ae09249f842 | 279 | break; |
Kovalev_D | 124:9ae09249f842 | 280 | |
Kovalev_D | 124:9ae09249f842 | 281 | case 5: |
Kovalev_D | 124:9ae09249f842 | 282 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 128:1e4675a36c93 | 283 | |
Kovalev_D | 124:9ae09249f842 | 284 | break; |
Kovalev_D | 124:9ae09249f842 | 285 | |
Kovalev_D | 124:9ae09249f842 | 286 | |
Kovalev_D | 124:9ae09249f842 | 287 | |
Kovalev_D | 124:9ae09249f842 | 288 | //L_Vibro |
Kovalev_D | 124:9ae09249f842 | 289 | case 6: |
Kovalev_D | 124:9ae09249f842 | 290 | Temp = (unsigned int)(((7680000*16/200) *Gyro.AmpPer /(Gyro.Frq>>12))); |
Kovalev_D | 124:9ae09249f842 | 291 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 122:fbacb932a30b | 292 | |
Kovalev_D | 124:9ae09249f842 | 293 | break; |
Kovalev_D | 124:9ae09249f842 | 294 | |
Kovalev_D | 124:9ae09249f842 | 295 | case 7: |
Kovalev_D | 124:9ae09249f842 | 296 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 297 | break; |
Kovalev_D | 124:9ae09249f842 | 298 | |
Kovalev_D | 124:9ae09249f842 | 299 | |
Kovalev_D | 124:9ae09249f842 | 300 | |
Kovalev_D | 124:9ae09249f842 | 301 | //Напряжение на регуляторе периметра |
Kovalev_D | 124:9ae09249f842 | 302 | case 8: |
Kovalev_D | 124:9ae09249f842 | 303 | Temp = Spi.DAC_B - 0x7fff; |
Kovalev_D | 124:9ae09249f842 | 304 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 305 | |
Kovalev_D | 124:9ae09249f842 | 306 | break; |
Kovalev_D | 124:9ae09249f842 | 307 | |
Kovalev_D | 124:9ae09249f842 | 308 | case 9: |
Kovalev_D | 124:9ae09249f842 | 309 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 310 | break; |
Kovalev_D | 124:9ae09249f842 | 311 | |
Kovalev_D | 124:9ae09249f842 | 312 | |
Kovalev_D | 124:9ae09249f842 | 313 | |
Kovalev_D | 124:9ae09249f842 | 314 | //темпкратурный канал 0 |
Kovalev_D | 124:9ae09249f842 | 315 | case 10: |
Kovalev_D | 124:9ae09249f842 | 316 | Temp = 100; |
Kovalev_D | 124:9ae09249f842 | 317 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 318 | |
Kovalev_D | 124:9ae09249f842 | 319 | break; |
Kovalev_D | 124:9ae09249f842 | 320 | |
Kovalev_D | 124:9ae09249f842 | 321 | case 11: |
Kovalev_D | 124:9ae09249f842 | 322 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 323 | break; |
Kovalev_D | 124:9ae09249f842 | 324 | |
Kovalev_D | 124:9ae09249f842 | 325 | |
Kovalev_D | 124:9ae09249f842 | 326 | |
Kovalev_D | 124:9ae09249f842 | 327 | //темпкратурный канал 1 |
Kovalev_D | 124:9ae09249f842 | 328 | case 12: |
Kovalev_D | 124:9ae09249f842 | 329 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 124:9ae09249f842 | 330 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 331 | |
Kovalev_D | 124:9ae09249f842 | 332 | break; |
Kovalev_D | 124:9ae09249f842 | 333 | |
Kovalev_D | 124:9ae09249f842 | 334 | case 13: |
Kovalev_D | 124:9ae09249f842 | 335 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 336 | break; |
Kovalev_D | 124:9ae09249f842 | 337 | |
Kovalev_D | 124:9ae09249f842 | 338 | |
Kovalev_D | 124:9ae09249f842 | 339 | |
Kovalev_D | 124:9ae09249f842 | 340 | //ток 1 |
Kovalev_D | 124:9ae09249f842 | 341 | case 14: |
Kovalev_D | 124:9ae09249f842 | 342 | Temp = Gyro.In1; |
Kovalev_D | 124:9ae09249f842 | 343 | BuffTemp[5] = (Temp >> 8) & 0xff;//in1//2 |
Kovalev_D | 124:9ae09249f842 | 344 | |
Kovalev_D | 124:9ae09249f842 | 345 | break; |
Kovalev_D | 124:9ae09249f842 | 346 | |
Kovalev_D | 124:9ae09249f842 | 347 | case 15: |
Kovalev_D | 124:9ae09249f842 | 348 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 349 | break; |
Kovalev_D | 124:9ae09249f842 | 350 | |
Kovalev_D | 124:9ae09249f842 | 351 | |
Kovalev_D | 124:9ae09249f842 | 352 | |
Kovalev_D | 124:9ae09249f842 | 353 | //ток 2 |
Kovalev_D | 124:9ae09249f842 | 354 | case 16: |
Kovalev_D | 124:9ae09249f842 | 355 | Temp = Gyro.In2; |
Kovalev_D | 124:9ae09249f842 | 356 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 357 | break; |
Kovalev_D | 124:9ae09249f842 | 358 | |
Kovalev_D | 124:9ae09249f842 | 359 | case 17: |
Kovalev_D | 124:9ae09249f842 | 360 | BuffTemp[5] = (Temp >> 0) & 0xff;//in2//3 |
Kovalev_D | 124:9ae09249f842 | 361 | break; |
Kovalev_D | 124:9ae09249f842 | 362 | |
Kovalev_D | 124:9ae09249f842 | 363 | |
Kovalev_D | 124:9ae09249f842 | 364 | |
Kovalev_D | 124:9ae09249f842 | 365 | //разностный температурный канал Delta Temp |
Kovalev_D | 124:9ae09249f842 | 366 | case 18: |
Kovalev_D | 124:9ae09249f842 | 367 | Temp = Gyro.DeltaT; |
Kovalev_D | 124:9ae09249f842 | 368 | BuffTemp[5] = (Temp >> 8) & 0xff;//дельта |
Kovalev_D | 124:9ae09249f842 | 369 | break; |
Kovalev_D | 124:9ae09249f842 | 370 | |
Kovalev_D | 124:9ae09249f842 | 371 | case 19: |
Kovalev_D | 124:9ae09249f842 | 372 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 373 | break; |
Kovalev_D | 124:9ae09249f842 | 374 | |
Kovalev_D | 124:9ae09249f842 | 375 | |
Kovalev_D | 124:9ae09249f842 | 376 | |
Kovalev_D | 124:9ae09249f842 | 377 | //температурный канал 5 |
Kovalev_D | 124:9ae09249f842 | 378 | case 20: |
Kovalev_D | 124:9ae09249f842 | 379 | Temp = Gyro.Termo;//0xa4=164 |
Kovalev_D | 124:9ae09249f842 | 380 | BuffTemp[5] =(Temp >> 8) & 0xff;//температура |
Kovalev_D | 124:9ae09249f842 | 381 | |
Kovalev_D | 124:9ae09249f842 | 382 | break; |
Kovalev_D | 124:9ae09249f842 | 383 | |
Kovalev_D | 124:9ae09249f842 | 384 | case 21: |
Kovalev_D | 124:9ae09249f842 | 385 | BuffTemp[5] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 |
Kovalev_D | 124:9ae09249f842 | 386 | break; |
Kovalev_D | 124:9ae09249f842 | 387 | } |
Kovalev_D | 128:1e4675a36c93 | 388 | Check(BuffTemp, 8); |
Kovalev_D | 128:1e4675a36c93 | 389 | WriteConN (BuffTemp,8); |
Kovalev_D | 124:9ae09249f842 | 390 | CountParam++; |
Kovalev_D | 124:9ae09249f842 | 391 | if(CountParam>21)CountParam=0;//зацикливания буфера от 0 до 21 |
Kovalev_D | 122:fbacb932a30b | 392 | } |
Kovalev_D | 124:9ae09249f842 | 393 | |
Kovalev_D | 121:bbae560cdd43 | 394 | void CMD_Rate2(void) |
Kovalev_D | 121:bbae560cdd43 | 395 | { |
Kovalev_D | 124:9ae09249f842 | 396 | Gyro.Rate2_Event=0; |
Kovalev_D | 121:bbae560cdd43 | 397 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 121:bbae560cdd43 | 398 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 121:bbae560cdd43 | 399 | |
Kovalev_D | 121:bbae560cdd43 | 400 | |
Kovalev_D | 121:bbae560cdd43 | 401 | BuffTemp[ 2] =(Gyro.CaunPlus >> 8) & 0xff;//старший байт счетчика +. |
Kovalev_D | 121:bbae560cdd43 | 402 | BuffTemp[ 3] =(Gyro.CaunPlus >> 0) & 0xff;//младший байт счетчика +. |
Kovalev_D | 121:bbae560cdd43 | 403 | |
Kovalev_D | 121:bbae560cdd43 | 404 | BuffTemp[ 4] =(Gyro.CaunMin >> 8) & 0xff;//старший байт счетчика -. |
Kovalev_D | 121:bbae560cdd43 | 405 | BuffTemp[ 5] =(Gyro.CaunMin >> 0) & 0xff;//младший байт счетчика -. |
Kovalev_D | 124:9ae09249f842 | 406 | |
Kovalev_D | 122:fbacb932a30b | 407 | Check(BuffTemp, 8); |
Kovalev_D | 122:fbacb932a30b | 408 | WriteConN (BuffTemp,8); |
Kovalev_D | 121:bbae560cdd43 | 409 | } |
Kovalev_D | 124:9ae09249f842 | 410 | |
igor_v | 0:8ad47e2b6f00 | 411 | void CMD_Rate(void) |
igor_v | 21:bc8c1cec3da6 | 412 | { |
Kovalev_D | 124:9ae09249f842 | 413 | |
Kovalev_D | 124:9ae09249f842 | 414 | Gyro.Rate1_Event=0; |
Kovalev_D | 108:030cdde08314 | 415 | unsigned int Temp; |
Kovalev_D | 107:4d178bcc9d8a | 416 | |
igor_v | 30:17c84ed091b3 | 417 | Gyro.Firmware_Version=0xff; /// промежуточная затычка |
Kovalev_D | 122:fbacb932a30b | 418 | |
igor_v | 0:8ad47e2b6f00 | 419 | |
igor_v | 30:17c84ed091b3 | 420 | BuffTemp[ 0] = Gyro.SOC_Out; |
igor_v | 30:17c84ed091b3 | 421 | BuffTemp[ 1] = Gyro.My_Addres; |
igor_v | 21:bc8c1cec3da6 | 422 | |
Kovalev_D | 108:030cdde08314 | 423 | |
Kovalev_D | 112:4a96133a1311 | 424 | BuffTemp[ 2] =(Gyro.CaunPlus >> 8) & 0xff;//старший байт счетчика +. |
Kovalev_D | 112:4a96133a1311 | 425 | BuffTemp[ 3] =(Gyro.CaunPlus >> 0) & 0xff;//младший байт счетчика +. |
Kovalev_D | 108:030cdde08314 | 426 | |
Kovalev_D | 112:4a96133a1311 | 427 | BuffTemp[ 4] =(Gyro.CaunMin >> 8) & 0xff;//старший байт счетчика -. |
Kovalev_D | 112:4a96133a1311 | 428 | BuffTemp[ 5] =(Gyro.CaunMin >> 0) & 0xff;//младший байт счетчика -. |
Kovalev_D | 108:030cdde08314 | 429 | |
Kovalev_D | 113:8be429494918 | 430 | |
Kovalev_D | 108:030cdde08314 | 431 | Temp = Gyro.CuruAngle; |
Kovalev_D | 108:030cdde08314 | 432 | Gyro.CuruAngle = 0; |
Kovalev_D | 125:9400e64d0636 | 433 | Temp = Gyro.AD_Fast >> 16; |
Kovalev_D | 108:030cdde08314 | 434 | BuffTemp[ 6] =(Temp >> 8) & 0xff;//старший байт разности счетчиков |
Kovalev_D | 108:030cdde08314 | 435 | BuffTemp[ 7] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 108:030cdde08314 | 436 | |
Kovalev_D | 108:030cdde08314 | 437 | |
Kovalev_D | 122:fbacb932a30b | 438 | Temp = Gyro.F_ras; |
Kovalev_D | 122:fbacb932a30b | 439 | BuffTemp[ 8] = (Temp >> 8) & 0xff;//расщипление частота |
Kovalev_D | 122:fbacb932a30b | 440 | BuffTemp[ 9] = (Temp >> 0) & 0xff;// |
igor_v | 21:bc8c1cec3da6 | 441 | |
Kovalev_D | 108:030cdde08314 | 442 | BuffTemp[10] = (Temp >> 8) & 0xff;//выход регулятора гвч; |
Kovalev_D | 122:fbacb932a30b | 443 | BuffTemp[11] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 444 | |
Kovalev_D | 122:fbacb932a30b | 445 | Temp = (Gyro.AD_Slow >> 16)- 0x7fff; |
Kovalev_D | 108:030cdde08314 | 446 | BuffTemp[12]=(Temp >> 8) & 0xff;//// |
Kovalev_D | 108:030cdde08314 | 447 | BuffTemp[13]=(Temp >> 0) & 0xff;//// |
igor_v | 21:bc8c1cec3da6 | 448 | |
Kovalev_D | 108:030cdde08314 | 449 | |
Kovalev_D | 108:030cdde08314 | 450 | Temp = (unsigned int)((7680000*16/(Gyro.Frq>>12))); |
Kovalev_D | 108:030cdde08314 | 451 | BuffTemp[14] = (Temp >> 8) & 0xff; |
Kovalev_D | 108:030cdde08314 | 452 | BuffTemp[15] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 453 | |
Kovalev_D | 107:4d178bcc9d8a | 454 | BuffTemp[16] = 0xf; |
Kovalev_D | 106:250ddd8629c6 | 455 | BuffTemp[17] = 0x02; |
Kovalev_D | 108:030cdde08314 | 456 | |
igor_v | 21:bc8c1cec3da6 | 457 | |
Kovalev_D | 108:030cdde08314 | 458 | Temp = (unsigned int)(((7680000*16/200) *Gyro.AmpPer /(Gyro.Frq>>12))); |
Kovalev_D | 108:030cdde08314 | 459 | BuffTemp[18] = (Temp >> 8) & 0xff; |
Kovalev_D | 108:030cdde08314 | 460 | BuffTemp[19] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 461 | |
Kovalev_D | 106:250ddd8629c6 | 462 | BuffTemp[20] = 0x00; |
Kovalev_D | 106:250ddd8629c6 | 463 | BuffTemp[21] = 0x00; |
Kovalev_D | 120:9f446f1495e8 | 464 | |
Kovalev_D | 119:4d7fcece9e8e | 465 | |
Kovalev_D | 125:9400e64d0636 | 466 | |
Kovalev_D | 121:bbae560cdd43 | 467 | Temp = Spi.DAC_B - 0x7fff; |
Kovalev_D | 108:030cdde08314 | 468 | BuffTemp[22] = (Temp >> 8) & 0xff; |
Kovalev_D | 108:030cdde08314 | 469 | BuffTemp[23] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 470 | |
Kovalev_D | 121:bbae560cdd43 | 471 | |
Kovalev_D | 121:bbae560cdd43 | 472 | Temp = Gyro.PLC_Delta >> 16; |
Kovalev_D | 121:bbae560cdd43 | 473 | BuffTemp[24] = (Temp >> 8) & 0xff; |
Kovalev_D | 121:bbae560cdd43 | 474 | BuffTemp[25] = (Temp >> 0) & 0xff;// ХЗ |
Kovalev_D | 113:8be429494918 | 475 | |
Kovalev_D | 125:9400e64d0636 | 476 | Temp = 100; |
Kovalev_D | 125:9400e64d0636 | 477 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 113:8be429494918 | 478 | BuffTemp[26] = (Temp >> 8) & 0xff; |
Kovalev_D | 113:8be429494918 | 479 | BuffTemp[27] = (Temp >> 0) & 0xff; |
Kovalev_D | 113:8be429494918 | 480 | |
Kovalev_D | 113:8be429494918 | 481 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 113:8be429494918 | 482 | BuffTemp[28] = (Temp >> 8) & 0xff; |
Kovalev_D | 113:8be429494918 | 483 | BuffTemp[29] = (Temp >> 0) & 0xff; |
Kovalev_D | 113:8be429494918 | 484 | |
Kovalev_D | 113:8be429494918 | 485 | Temp = Gyro.In1; |
Kovalev_D | 113:8be429494918 | 486 | BuffTemp[30] = (Temp >> 8) & 0xff;//in1//2 |
Kovalev_D | 113:8be429494918 | 487 | BuffTemp[31] = (Temp >> 0) & 0xff; |
Kovalev_D | 113:8be429494918 | 488 | |
Kovalev_D | 113:8be429494918 | 489 | Temp = Gyro.In2; |
Kovalev_D | 113:8be429494918 | 490 | BuffTemp[32] = (Temp >> 8) & 0xff; |
Kovalev_D | 113:8be429494918 | 491 | BuffTemp[33] = (Temp >> 0) & 0xff;//in2//3 |
Kovalev_D | 113:8be429494918 | 492 | |
Kovalev_D | 113:8be429494918 | 493 | Temp = Gyro.DeltaT; |
Kovalev_D | 113:8be429494918 | 494 | BuffTemp[34] = (Temp >> 8) & 0xff;//дельта |
Kovalev_D | 113:8be429494918 | 495 | BuffTemp[35] = (Temp >> 0) & 0xff; |
Kovalev_D | 115:e5a230e5af52 | 496 | |
Kovalev_D | 116:66f1f0ff2dab | 497 | Temp = Gyro.Termo;//0xa4=164 |
Kovalev_D | 115:e5a230e5af52 | 498 | |
Kovalev_D | 113:8be429494918 | 499 | BuffTemp[36] =(Temp >> 8) & 0xff;//температура |
Kovalev_D | 115:e5a230e5af52 | 500 | BuffTemp[37] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 |
igor_v | 21:bc8c1cec3da6 | 501 | |
Kovalev_D | 106:250ddd8629c6 | 502 | BuffTemp[38] =0x00; |
Kovalev_D | 106:250ddd8629c6 | 503 | BuffTemp[39] =0x00; |
Kovalev_D | 106:250ddd8629c6 | 504 | BuffTemp[40] =0x00; |
Kovalev_D | 106:250ddd8629c6 | 505 | BuffTemp[41] =0x00; |
igor_v | 21:bc8c1cec3da6 | 506 | |
igor_v | 21:bc8c1cec3da6 | 507 | |
igor_v | 21:bc8c1cec3da6 | 508 | Check(BuffTemp, 44); |
igor_v | 21:bc8c1cec3da6 | 509 | WriteConN (BuffTemp,44); |
Kovalev_D | 92:c892f0311aa7 | 510 | |
igor_v | 0:8ad47e2b6f00 | 511 | } |
igor_v | 0:8ad47e2b6f00 | 512 | |
igor_v | 21:bc8c1cec3da6 | 513 | void CMD_M_Control_D8()///установка\сброс регистров управления |
igor_v | 21:bc8c1cec3da6 | 514 | { |
Kovalev_D | 104:ab1cb4ff56b2 | 515 | unsigned int bit,NReg,Pa; |
Kovalev_D | 104:ab1cb4ff56b2 | 516 | unsigned int SR,V,A,Bit_num; |
Kovalev_D | 104:ab1cb4ff56b2 | 517 | SR=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 518 | V=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 519 | A=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 520 | Bit_num=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 521 | |
igor_v | 30:17c84ed091b3 | 522 | BuffTemp[0] = Gyro.SOC_Out; //DD |
igor_v | 30:17c84ed091b3 | 523 | BuffTemp[1] = Gyro.My_Addres; //00 |
igor_v | 30:17c84ed091b3 | 524 | BuffTemp[2] = Gyro.CMD_In; //D8 |
Kovalev_D | 104:ab1cb4ff56b2 | 525 | |
Kovalev_D | 104:ab1cb4ff56b2 | 526 | /* |
Kovalev_D | 104:ab1cb4ff56b2 | 527 | |
Kovalev_D | 104:ab1cb4ff56b2 | 528 | FrqON |
Kovalev_D | 104:ab1cb4ff56b2 | 529 | PlcON |
Kovalev_D | 104:ab1cb4ff56b2 | 530 | HFOOFF |
Kovalev_D | 104:ab1cb4ff56b2 | 531 | HFOON |
igor_v | 21:bc8c1cec3da6 | 532 | |
Kovalev_D | 104:ab1cb4ff56b2 | 533 | PlcOFF |
Kovalev_D | 104:ab1cb4ff56b2 | 534 | PlcON |
Kovalev_D | 104:ab1cb4ff56b2 | 535 | */ |
Kovalev_D | 104:ab1cb4ff56b2 | 536 | Pa = BuffTemp[3]; |
Kovalev_D | 104:ab1cb4ff56b2 | 537 | |
Kovalev_D | 104:ab1cb4ff56b2 | 538 | SR = Pa >> 0x7; |
Kovalev_D | 104:ab1cb4ff56b2 | 539 | |
Kovalev_D | 104:ab1cb4ff56b2 | 540 | V = Pa >> 0x5; |
Kovalev_D | 104:ab1cb4ff56b2 | 541 | V = V & 0x3; |
Kovalev_D | 104:ab1cb4ff56b2 | 542 | |
Kovalev_D | 104:ab1cb4ff56b2 | 543 | A = Pa >> 0x4; |
Kovalev_D | 104:ab1cb4ff56b2 | 544 | A = A & 0x1; |
Kovalev_D | 104:ab1cb4ff56b2 | 545 | |
Kovalev_D | 104:ab1cb4ff56b2 | 546 | Bit_num = Pa & 0xf; |
Kovalev_D | 104:ab1cb4ff56b2 | 547 | |
Kovalev_D | 104:ab1cb4ff56b2 | 548 | if(SR) { |
Kovalev_D | 104:ab1cb4ff56b2 | 549 | switch (Bit_num){ |
Kovalev_D | 105:bd01d8d20fb6 | 550 | |
Kovalev_D | 104:ab1cb4ff56b2 | 551 | case 0x06: |
Kovalev_D | 104:ab1cb4ff56b2 | 552 | FrqON |
Kovalev_D | 105:bd01d8d20fb6 | 553 | break; |
Kovalev_D | 105:bd01d8d20fb6 | 554 | |
Kovalev_D | 104:ab1cb4ff56b2 | 555 | case 0x03: |
Kovalev_D | 105:bd01d8d20fb6 | 556 | HFOON |
Kovalev_D | 105:bd01d8d20fb6 | 557 | break; |
Kovalev_D | 105:bd01d8d20fb6 | 558 | |
Kovalev_D | 105:bd01d8d20fb6 | 559 | case 0x01: |
Kovalev_D | 105:bd01d8d20fb6 | 560 | PlcON |
Kovalev_D | 105:bd01d8d20fb6 | 561 | break; |
Kovalev_D | 104:ab1cb4ff56b2 | 562 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 563 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 564 | else{ |
Kovalev_D | 104:ab1cb4ff56b2 | 565 | switch (Bit_num){ |
Kovalev_D | 105:bd01d8d20fb6 | 566 | |
Kovalev_D | 105:bd01d8d20fb6 | 567 | case 0x06: |
Kovalev_D | 104:ab1cb4ff56b2 | 568 | FrqOff |
Kovalev_D | 105:bd01d8d20fb6 | 569 | break; |
Kovalev_D | 105:bd01d8d20fb6 | 570 | |
Kovalev_D | 105:bd01d8d20fb6 | 571 | case 0x03: |
Kovalev_D | 105:bd01d8d20fb6 | 572 | HFOOFF |
Kovalev_D | 105:bd01d8d20fb6 | 573 | break; |
Kovalev_D | 105:bd01d8d20fb6 | 574 | |
Kovalev_D | 105:bd01d8d20fb6 | 575 | case 0x01: |
Kovalev_D | 105:bd01d8d20fb6 | 576 | PlcOFF |
Kovalev_D | 105:bd01d8d20fb6 | 577 | break; |
Kovalev_D | 104:ab1cb4ff56b2 | 578 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 579 | } |
Kovalev_D | 129:406995a91322 | 580 | BuffTemp[0] = Gyro.SOC_Out; //DD |
Kovalev_D | 129:406995a91322 | 581 | BuffTemp[1] = Gyro.My_Addres; //00 |
Kovalev_D | 129:406995a91322 | 582 | BuffTemp[2] = Gyro.CMD_In; //D8 |
Kovalev_D | 129:406995a91322 | 583 | BuffTemp[3] = A<<4; |
Kovalev_D | 129:406995a91322 | 584 | BuffTemp[4] = 0x0; |
Kovalev_D | 129:406995a91322 | 585 | BuffTemp[5] = 0x0; |
Kovalev_D | 129:406995a91322 | 586 | Check(BuffTemp, CRC_N); |
Kovalev_D | 129:406995a91322 | 587 | WriteConN (BuffTemp,CRC_N); |
igor_v | 0:8ad47e2b6f00 | 588 | } |
igor_v | 0:8ad47e2b6f00 | 589 | |
igor_v | 21:bc8c1cec3da6 | 590 | void CMD_M_Control_D9()///чтение регистров управления |
igor_v | 21:bc8c1cec3da6 | 591 | { |
igor_v | 21:bc8c1cec3da6 | 592 | int bit,NReg; |
igor_v | 30:17c84ed091b3 | 593 | BuffTemp[0] = Gyro.SOC_Out; //DD |
igor_v | 30:17c84ed091b3 | 594 | BuffTemp[1] = Gyro.My_Addres; //00 |
igor_v | 30:17c84ed091b3 | 595 | BuffTemp[2] = Gyro.CMD_In; //D9 |
igor_v | 21:bc8c1cec3da6 | 596 | if ((Param1 & 0x10) == 0) { |
igor_v | 21:bc8c1cec3da6 | 597 | BuffTemp[3]=0<<4; |
igor_v | 30:17c84ed091b3 | 598 | BuffTemp[4] = (Gyro.RgConA>>8 )& 0xff; |
igor_v | 30:17c84ed091b3 | 599 | BuffTemp[5] = Gyro.RgConA & 0xff; |
igor_v | 21:bc8c1cec3da6 | 600 | } else { |
igor_v | 21:bc8c1cec3da6 | 601 | BuffTemp[3]=1<<4; |
igor_v | 30:17c84ed091b3 | 602 | BuffTemp[4] = (Gyro.RgConB>>8 ) & 0xff; |
igor_v | 30:17c84ed091b3 | 603 | BuffTemp[5] = Gyro.RgConB & 0xff; |
igor_v | 21:bc8c1cec3da6 | 604 | } |
igor_v | 21:bc8c1cec3da6 | 605 | Check(BuffTemp, CRC_N); |
igor_v | 21:bc8c1cec3da6 | 606 | WriteConN (BuffTemp,CRC_N); |
igor_v | 21:bc8c1cec3da6 | 607 | } |
igor_v | 21:bc8c1cec3da6 | 608 | // (номер (код) ЦАПа 0...3, старший байт требуемого ЦАПа, младший байт треб ЦАПа) |
igor_v | 0:8ad47e2b6f00 | 609 | void CMD_M_Stymul() |
igor_v | 0:8ad47e2b6f00 | 610 | { |
igor_v | 21:bc8c1cec3da6 | 611 | int temp; |
Kovalev_D | 102:4270092be987 | 612 | int HFO; |
Kovalev_D | 102:4270092be987 | 613 | temp=BuffTemp[3]; |
Kovalev_D | 102:4270092be987 | 614 | Consol = temp&0x3; |
Kovalev_D | 103:e96f08947def | 615 | HFO = temp&0x3;// // (номер (код) ЦАПа 0...3, HFO - 3dac, PLC - 0DAC |
igor_v | 21:bc8c1cec3da6 | 616 | temp =((BuffTemp[4]<<8) | BuffTemp[5]); |
igor_v | 21:bc8c1cec3da6 | 617 | // temp=0; |
igor_v | 21:bc8c1cec3da6 | 618 | temp=temp&0xFFFF; |
Kovalev_D | 102:4270092be987 | 619 | |
Kovalev_D | 102:4270092be987 | 620 | if(HFO) |
Kovalev_D | 102:4270092be987 | 621 | { |
Kovalev_D | 102:4270092be987 | 622 | Spi.DAC_A=(unsigned int)temp; |
Kovalev_D | 102:4270092be987 | 623 | } |
Kovalev_D | 102:4270092be987 | 624 | else{ |
igor_v | 21:bc8c1cec3da6 | 625 | DACF =(temp*K_DAC)+deltaDAC; |
igor_v | 21:bc8c1cec3da6 | 626 | Spi.DAC_B =(unsigned int)(DACF) /*(unsigned int)(temp*K_DAC+deltaDAC)*/; // K_DAC); |
igor_v | 21:bc8c1cec3da6 | 627 | } |
igor_v | 0:8ad47e2b6f00 | 628 | } |
Kovalev_D | 103:e96f08947def | 629 | void Gph_W() |
Kovalev_D | 103:e96f08947def | 630 | { |
Kovalev_D | 108:030cdde08314 | 631 | Out_G_photo(BuffTemp[4],BuffTemp[5]); |
Kovalev_D | 103:e96f08947def | 632 | } |
igor_v | 0:8ad47e2b6f00 | 633 | |
Kovalev_D | 98:95b8e79f13e1 | 634 | void CMD_M_vib() |
Kovalev_D | 115:e5a230e5af52 | 635 | { |
Kovalev_D | 102:4270092be987 | 636 | unsigned int temp1,temp2; |
Kovalev_D | 102:4270092be987 | 637 | |
Kovalev_D | 102:4270092be987 | 638 | temp1 =((BuffTemp[4]<<8) | BuffTemp[5]); |
Kovalev_D | 102:4270092be987 | 639 | temp1=temp1&0xFFFF; |
Kovalev_D | 102:4270092be987 | 640 | |
Kovalev_D | 102:4270092be987 | 641 | temp2 =((BuffTemp[6]<<8) | BuffTemp[7]); |
Kovalev_D | 102:4270092be987 | 642 | temp2=temp2&0xFFFF; |
Kovalev_D | 102:4270092be987 | 643 | Gyro.Frq = ((unsigned int) ((7680000*16/temp1)))*16*16*16; |
Kovalev_D | 102:4270092be987 | 644 | Consol=Gyro.Frq ; |
Kovalev_D | 98:95b8e79f13e1 | 645 | } |
igor_v | 0:8ad47e2b6f00 | 646 | unsigned int Check(char *c, unsigned int Count) |
igor_v | 0:8ad47e2b6f00 | 647 | { |
igor_v | 21:bc8c1cec3da6 | 648 | int i=1; |
igor_v | 21:bc8c1cec3da6 | 649 | unsigned int temp,CRC; |
igor_v | 21:bc8c1cec3da6 | 650 | |
igor_v | 21:bc8c1cec3da6 | 651 | |
igor_v | 21:bc8c1cec3da6 | 652 | temp=1; |
igor_v | 21:bc8c1cec3da6 | 653 | CRC=0; |
igor_v | 21:bc8c1cec3da6 | 654 | |
igor_v | 21:bc8c1cec3da6 | 655 | |
igor_v | 21:bc8c1cec3da6 | 656 | for(; i<Count-2; i++) { |
igor_v | 21:bc8c1cec3da6 | 657 | CRC+=c[i]; |
igor_v | 21:bc8c1cec3da6 | 658 | } |
igor_v | 0:8ad47e2b6f00 | 659 | |
igor_v | 21:bc8c1cec3da6 | 660 | if(c[Count-2]!=((CRC>>8)&0xFF)) { |
igor_v | 21:bc8c1cec3da6 | 661 | temp=0; |
igor_v | 30:17c84ed091b3 | 662 | Gyro.RsErrLine = (Gyro.RsErrLine)&=0x2; |
igor_v | 21:bc8c1cec3da6 | 663 | } |
igor_v | 0:8ad47e2b6f00 | 664 | |
igor_v | 21:bc8c1cec3da6 | 665 | if(c[Count-1]!=((CRC>>0)&0xFF)) { |
igor_v | 21:bc8c1cec3da6 | 666 | temp=0; |
igor_v | 30:17c84ed091b3 | 667 | // Gyro.RsErrLine= (Gyro.RsErrLine)=0x2; |
igor_v | 21:bc8c1cec3da6 | 668 | } |
igor_v | 21:bc8c1cec3da6 | 669 | |
igor_v | 21:bc8c1cec3da6 | 670 | c[Count-2]=(CRC>>8)&0xFF; |
igor_v | 21:bc8c1cec3da6 | 671 | c[Count-1]=(CRC>>0)&0xFF; |
igor_v | 21:bc8c1cec3da6 | 672 | |
igor_v | 21:bc8c1cec3da6 | 673 | |
igor_v | 21:bc8c1cec3da6 | 674 | |
igor_v | 21:bc8c1cec3da6 | 675 | return temp; |
igor_v | 0:8ad47e2b6f00 | 676 | } |
igor_v | 0:8ad47e2b6f00 | 677 | |
igor_v | 0:8ad47e2b6f00 | 678 | int Getlengf(void) |
igor_v | 0:8ad47e2b6f00 | 679 | { |
Kovalev_D | 121:bbae560cdd43 | 680 | unsigned int lengf; |
Kovalev_D | 121:bbae560cdd43 | 681 | lengf = 1; |
igor_v | 30:17c84ed091b3 | 682 | switch(Gyro.CMD_In) { |
igor_v | 30:17c84ed091b3 | 683 | case 0x99://Gyrotainance |
Kovalev_D | 92:c892f0311aa7 | 684 | |
igor_v | 21:bc8c1cec3da6 | 685 | lengf=6; |
igor_v | 21:bc8c1cec3da6 | 686 | CRC_N=8; |
igor_v | 21:bc8c1cec3da6 | 687 | break; |
igor_v | 0:8ad47e2b6f00 | 688 | |
igor_v | 21:bc8c1cec3da6 | 689 | case 0x0A: //m_stymul |
igor_v | 21:bc8c1cec3da6 | 690 | lengf=8; |
igor_v | 21:bc8c1cec3da6 | 691 | break; |
igor_v | 21:bc8c1cec3da6 | 692 | |
Kovalev_D | 129:406995a91322 | 693 | case 0xE9://DeviceMode |
igor_v | 21:bc8c1cec3da6 | 694 | |
igor_v | 21:bc8c1cec3da6 | 695 | lengf=6; |
igor_v | 21:bc8c1cec3da6 | 696 | CRC_N=8; |
igor_v | 21:bc8c1cec3da6 | 697 | break; |
Kovalev_D | 129:406995a91322 | 698 | case 0xE8://DeviceMode |
igor_v | 21:bc8c1cec3da6 | 699 | |
Kovalev_D | 129:406995a91322 | 700 | lengf=6; |
Kovalev_D | 129:406995a91322 | 701 | CRC_N=8; |
Kovalev_D | 129:406995a91322 | 702 | break; |
Kovalev_D | 129:406995a91322 | 703 | |
Kovalev_D | 129:406995a91322 | 704 | case 0xA5://DeviceMode |
Kovalev_D | 129:406995a91322 | 705 | |
Kovalev_D | 129:406995a91322 | 706 | lengf=6; |
Kovalev_D | 129:406995a91322 | 707 | CRC_N=8; |
Kovalev_D | 129:406995a91322 | 708 | break; |
Kovalev_D | 129:406995a91322 | 709 | |
igor_v | 21:bc8c1cec3da6 | 710 | case 0xDD://m_rate |
igor_v | 21:bc8c1cec3da6 | 711 | lengf=6; |
igor_v | 21:bc8c1cec3da6 | 712 | CRC_N=44; |
igor_v | 21:bc8c1cec3da6 | 713 | break; |
Kovalev_D | 124:9ae09249f842 | 714 | |
Kovalev_D | 124:9ae09249f842 | 715 | case 0xA0://Delta_PS |
Kovalev_D | 124:9ae09249f842 | 716 | lengf=6; |
Kovalev_D | 124:9ae09249f842 | 717 | CRC_N=8; |
Kovalev_D | 124:9ae09249f842 | 718 | break; |
Kovalev_D | 124:9ae09249f842 | 719 | |
Kovalev_D | 124:9ae09249f842 | 720 | |
igor_v | 21:bc8c1cec3da6 | 721 | case 0xB0://DeviceMode |
igor_v | 21:bc8c1cec3da6 | 722 | |
igor_v | 21:bc8c1cec3da6 | 723 | lengf=6; |
igor_v | 21:bc8c1cec3da6 | 724 | CRC_N=8; |
igor_v | 21:bc8c1cec3da6 | 725 | break; |
igor_v | 21:bc8c1cec3da6 | 726 | |
igor_v | 21:bc8c1cec3da6 | 727 | case 0xD8://m_control |
igor_v | 0:8ad47e2b6f00 | 728 | |
igor_v | 21:bc8c1cec3da6 | 729 | lengf=6; |
igor_v | 21:bc8c1cec3da6 | 730 | CRC_N=8; |
igor_v | 21:bc8c1cec3da6 | 731 | break; |
igor_v | 21:bc8c1cec3da6 | 732 | |
igor_v | 21:bc8c1cec3da6 | 733 | case 0xD9://m_control |
igor_v | 0:8ad47e2b6f00 | 734 | |
igor_v | 21:bc8c1cec3da6 | 735 | lengf=6; |
igor_v | 21:bc8c1cec3da6 | 736 | CRC_N=8; |
igor_v | 21:bc8c1cec3da6 | 737 | break; |
Kovalev_D | 102:4270092be987 | 738 | |
Kovalev_D | 102:4270092be987 | 739 | case 0xE4: |
Kovalev_D | 98:95b8e79f13e1 | 740 | lengf=8; |
Kovalev_D | 98:95b8e79f13e1 | 741 | break; |
Kovalev_D | 103:e96f08947def | 742 | |
Kovalev_D | 103:e96f08947def | 743 | |
Kovalev_D | 103:e96f08947def | 744 | case 0xE6: |
Kovalev_D | 103:e96f08947def | 745 | lengf=8; |
Kovalev_D | 103:e96f08947def | 746 | break; |
Kovalev_D | 103:e96f08947def | 747 | |
igor_v | 21:bc8c1cec3da6 | 748 | } |
Kovalev_D | 98:95b8e79f13e1 | 749 | |
igor_v | 21:bc8c1cec3da6 | 750 | return lengf; |
igor_v | 0:8ad47e2b6f00 | 751 | } |
igor_v | 0:8ad47e2b6f00 | 752 | |
igor_v | 0:8ad47e2b6f00 | 753 | void Read_CMD(void) |
igor_v | 21:bc8c1cec3da6 | 754 | { |
Kovalev_D | 92:c892f0311aa7 | 755 | |
Kovalev_D | 45:cbc955aecebe | 756 | |
Kovalev_D | 45:cbc955aecebe | 757 | Gyro.RsErrLine = (Gyro.RsErrLine)& 0xffff;//для сброса ошибки |
igor_v | 21:bc8c1cec3da6 | 758 | |
Kovalev_D | 93:b3803774f110 | 759 | CountBuFFIn=ReadChekCon1(BuffTemp); // чтение данных из консоли |
igor_v | 42:6fc307c4963e | 760 | |
Kovalev_D | 92:c892f0311aa7 | 761 | if(CountBuFFIn==1) { // если есть первый байт |
igor_v | 21:bc8c1cec3da6 | 762 | if (BuffTemp[0] != SOC_In) { |
Kovalev_D | 93:b3803774f110 | 763 | ReadCon1(BuffTemp); |
igor_v | 30:17c84ed091b3 | 764 | Gyro.RsErrLine += 0x100;//WriteCon("\n\r ...Error.... "); |
Kovalev_D | 93:b3803774f110 | 765 | BuffTemp[99]=Gyro.RsErrLine; |
Kovalev_D | 102:4270092be987 | 766 | |
igor_v | 21:bc8c1cec3da6 | 767 | } |
Kovalev_D | 92:c892f0311aa7 | 768 | } else if(CountBuFFIn==2) { //если второй ,fqn |
igor_v | 30:17c84ed091b3 | 769 | if (BuffTemp[1] != Gyro.My_Addres) { |
Kovalev_D | 93:b3803774f110 | 770 | ReadCon1(BuffTemp); |
igor_v | 30:17c84ed091b3 | 771 | Gyro.RsErrLine += 0x1;//WriteCon("\n\r ...Error_ADDRES.... "); |
igor_v | 21:bc8c1cec3da6 | 772 | } |
igor_v | 42:6fc307c4963e | 773 | } else if(CountBuFFIn==3) { // если ьоетий байт |
igor_v | 30:17c84ed091b3 | 774 | Gyro.CMD_In=BuffTemp[2]; |
Kovalev_D | 92:c892f0311aa7 | 775 | N=Getlengf(); |
Kovalev_D | 92:c892f0311aa7 | 776 | } |
Kovalev_D | 92:c892f0311aa7 | 777 | else if(CountBuFFIn==4 && (N==6)) |
Kovalev_D | 92:c892f0311aa7 | 778 | { // N - длина посылки аскглд(для записи параметров). определяется по коду команды в Getlengf(); |
igor_v | 21:bc8c1cec3da6 | 779 | Param1=BuffTemp[3]; |
Kovalev_D | 92:c892f0311aa7 | 780 | } |
Kovalev_D | 92:c892f0311aa7 | 781 | else if((CountBuFFIn==5)&&(N==7)) |
Kovalev_D | 92:c892f0311aa7 | 782 | { |
Kovalev_D | 92:c892f0311aa7 | 783 | |
igor_v | 21:bc8c1cec3da6 | 784 | Param1=BuffTemp[3]; |
igor_v | 21:bc8c1cec3da6 | 785 | Param2=BuffTemp[4]; |
igor_v | 0:8ad47e2b6f00 | 786 | |
Kovalev_D | 92:c892f0311aa7 | 787 | } |
Kovalev_D | 92:c892f0311aa7 | 788 | else if((CountBuFFIn==6)&&(N==8)) |
Kovalev_D | 92:c892f0311aa7 | 789 | { |
igor_v | 21:bc8c1cec3da6 | 790 | Param1=BuffTemp[3]; |
igor_v | 21:bc8c1cec3da6 | 791 | Param2=BuffTemp[4]; |
igor_v | 21:bc8c1cec3da6 | 792 | Param3=BuffTemp[5]; |
Kovalev_D | 92:c892f0311aa7 | 793 | } |
Kovalev_D | 102:4270092be987 | 794 | else if((CountBuFFIn==8)&&(N==10)) |
Kovalev_D | 102:4270092be987 | 795 | { |
Kovalev_D | 102:4270092be987 | 796 | Param1=BuffTemp[4]; |
Kovalev_D | 102:4270092be987 | 797 | Param2=BuffTemp[5]; |
Kovalev_D | 102:4270092be987 | 798 | Param3=BuffTemp[6]; |
Kovalev_D | 102:4270092be987 | 799 | Param4=BuffTemp[7]; |
Kovalev_D | 102:4270092be987 | 800 | } |
Kovalev_D | 98:95b8e79f13e1 | 801 | |
Kovalev_D | 92:c892f0311aa7 | 802 | else if(CountBuFFIn > (N-1)) |
Kovalev_D | 92:c892f0311aa7 | 803 | { |
Kovalev_D | 93:b3803774f110 | 804 | ReadCon1(BuffTemp); |
igor_v | 30:17c84ed091b3 | 805 | switch(Gyro.CMD_In) { |
Kovalev_D | 122:fbacb932a30b | 806 | Rate_Flag=0; |
Kovalev_D | 129:406995a91322 | 807 | |
Kovalev_D | 92:c892f0311aa7 | 808 | case 0x99: |
Kovalev_D | 124:9ae09249f842 | 809 | Gyro.ModeOut=0; |
igor_v | 21:bc8c1cec3da6 | 810 | CMD_Maintenance(); |
Kovalev_D | 124:9ae09249f842 | 811 | break; |
Kovalev_D | 129:406995a91322 | 812 | |
Kovalev_D | 124:9ae09249f842 | 813 | case 0xA0: |
Kovalev_D | 124:9ae09249f842 | 814 | TempParam=(BuffTemp[3]) & 0x90; |
Kovalev_D | 124:9ae09249f842 | 815 | if (TempParam==Delta_500) CMD_Delta_500Hz(); |
Kovalev_D | 124:9ae09249f842 | 816 | else if (TempParam==Delta_EXT) CMD_Delta_Ext(); |
Kovalev_D | 124:9ae09249f842 | 817 | else if (TempParam==PDelta_500) { Gyro.ModeOut=3; Gyro.Delta500_Event=0; WriteCon("Delta500"); } |
Kovalev_D | 124:9ae09249f842 | 818 | else if (TempParam==PDelta_EXT) { Gyro.ModeOut=4; Gyro.DeltaEXT_Event=0; WriteCon("deltaEXT"); } |
igor_v | 21:bc8c1cec3da6 | 819 | break; |
Kovalev_D | 129:406995a91322 | 820 | |
igor_v | 21:bc8c1cec3da6 | 821 | case 0xD8: |
igor_v | 21:bc8c1cec3da6 | 822 | CMD_M_Control_D8(); |
Kovalev_D | 124:9ae09249f842 | 823 | break; |
Kovalev_D | 129:406995a91322 | 824 | |
Kovalev_D | 129:406995a91322 | 825 | case 0xE9://чтение параметров |
Kovalev_D | 129:406995a91322 | 826 | CMD_M_Param_R(); |
Kovalev_D | 129:406995a91322 | 827 | break; |
Kovalev_D | 129:406995a91322 | 828 | |
Kovalev_D | 129:406995a91322 | 829 | case 0xE8://запись параметра |
Kovalev_D | 129:406995a91322 | 830 | CMD_M_Param_W(); |
Kovalev_D | 129:406995a91322 | 831 | break; |
Kovalev_D | 129:406995a91322 | 832 | |
igor_v | 21:bc8c1cec3da6 | 833 | case 0xD9: |
igor_v | 21:bc8c1cec3da6 | 834 | CMD_M_Control_D9(); |
igor_v | 21:bc8c1cec3da6 | 835 | break; |
Kovalev_D | 129:406995a91322 | 836 | |
igor_v | 21:bc8c1cec3da6 | 837 | case 0x0A: |
Kovalev_D | 45:cbc955aecebe | 838 | CMD_M_Stymul(); |
igor_v | 21:bc8c1cec3da6 | 839 | break; |
Kovalev_D | 129:406995a91322 | 840 | |
igor_v | 21:bc8c1cec3da6 | 841 | case 0xDD: |
Kovalev_D | 124:9ae09249f842 | 842 | TempParam=(BuffTemp[3]) & 0x9f; |
Kovalev_D | 124:9ae09249f842 | 843 | if (TempParam == Rate1) { CMD_Rate(); WriteCon("Rate11");} |
Kovalev_D | 124:9ae09249f842 | 844 | else if (TempParam == Rate2) { CMD_Rate2(); WriteCon("Rate21");} |
Kovalev_D | 124:9ae09249f842 | 845 | else if (TempParam == PRate1) { Gyro.ModeOut=1; Gyro.Rate1_Event=0; WriteCon("Rate12");} |
Kovalev_D | 124:9ae09249f842 | 846 | else if (TempParam == PRate2) { Gyro.ModeOut=2; Gyro.Rate2_Event=0; WriteCon("Rate22");} |
Kovalev_D | 122:fbacb932a30b | 847 | break; |
Kovalev_D | 129:406995a91322 | 848 | |
Kovalev_D | 102:4270092be987 | 849 | case 0xE4: |
Kovalev_D | 102:4270092be987 | 850 | CMD_M_vib(); |
Kovalev_D | 102:4270092be987 | 851 | break; |
Kovalev_D | 129:406995a91322 | 852 | |
Kovalev_D | 103:e96f08947def | 853 | case 0xE6: |
Kovalev_D | 103:e96f08947def | 854 | Gph_W(); |
Kovalev_D | 103:e96f08947def | 855 | break; |
Kovalev_D | 108:030cdde08314 | 856 | |
Kovalev_D | 103:e96f08947def | 857 | |
igor_v | 30:17c84ed091b3 | 858 | Gyro.RsErrLine = 0; |
Kovalev_D | 103:e96f08947def | 859 | |
Kovalev_D | 103:e96f08947def | 860 | |
Kovalev_D | 102:4270092be987 | 861 | } |
Kovalev_D | 121:bbae560cdd43 | 862 | |
igor_v | 21:bc8c1cec3da6 | 863 | } |
Kovalev_D | 121:bbae560cdd43 | 864 | // else if(CountBuFFIn > 40 ) |
Kovalev_D | 121:bbae560cdd43 | 865 | // { |
Kovalev_D | 121:bbae560cdd43 | 866 | // ReadCon1(BuffTemp); |
Kovalev_D | 121:bbae560cdd43 | 867 | // } |
Kovalev_D | 121:bbae560cdd43 | 868 | |
igor_v | 0:8ad47e2b6f00 | 869 | } |
igor_v | 0:8ad47e2b6f00 | 870 | |
igor_v | 0:8ad47e2b6f00 | 871 | |
igor_v | 21:bc8c1cec3da6 | 872 |