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