![](/media/cache/group/icon1_qbDJ87a.png.50x50_q85.png)
2018 IZU GRUND STATION Program
HYBRYD2018_IZU_GRAUND_STATION.cpp@0:dfa2ad4bec3a, 2018-03-22 (annotated)
- Committer:
- zebrin1422
- Date:
- Thu Mar 22 05:53:05 2018 +0000
- Revision:
- 0:dfa2ad4bec3a
2018 IZU GRAUND STAION
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
zebrin1422 | 0:dfa2ad4bec3a | 1 | #include "mbed.h" |
zebrin1422 | 0:dfa2ad4bec3a | 2 | #include "ES920LR.hpp" |
zebrin1422 | 0:dfa2ad4bec3a | 3 | |
zebrin1422 | 0:dfa2ad4bec3a | 4 | #define TX D1 |
zebrin1422 | 0:dfa2ad4bec3a | 5 | #define RX D0 |
zebrin1422 | 0:dfa2ad4bec3a | 6 | |
zebrin1422 | 0:dfa2ad4bec3a | 7 | RawSerial pc(USBTX,USBRX,115200); |
zebrin1422 | 0:dfa2ad4bec3a | 8 | RawSerial bus(TX, RX, 115200); |
zebrin1422 | 0:dfa2ad4bec3a | 9 | ES920LR es(bus, pc, 115200); |
zebrin1422 | 0:dfa2ad4bec3a | 10 | |
zebrin1422 | 0:dfa2ad4bec3a | 11 | bool safety_flag = false; |
zebrin1422 | 0:dfa2ad4bec3a | 12 | |
zebrin1422 | 0:dfa2ad4bec3a | 13 | Timeout send; |
zebrin1422 | 0:dfa2ad4bec3a | 14 | |
zebrin1422 | 0:dfa2ad4bec3a | 15 | //safety device release command |
zebrin1422 | 0:dfa2ad4bec3a | 16 | //forced transition fllight mode |
zebrin1422 | 0:dfa2ad4bec3a | 17 | //forced nicrom fire |
zebrin1422 | 0:dfa2ad4bec3a | 18 | |
zebrin1422 | 0:dfa2ad4bec3a | 19 | void header0x10() |
zebrin1422 | 0:dfa2ad4bec3a | 20 | { |
zebrin1422 | 0:dfa2ad4bec3a | 21 | char buff = pc.getc(); |
zebrin1422 | 0:dfa2ad4bec3a | 22 | |
zebrin1422 | 0:dfa2ad4bec3a | 23 | if(buff == 'R')es << (char)0x10 << 'r' << es.endl; //release's "r" |
zebrin1422 | 0:dfa2ad4bec3a | 24 | else if(buff == 'F') es << (char)0x10 << 'f' << es.endl; //flight's "f" |
zebrin1422 | 0:dfa2ad4bec3a | 25 | else if(buff == 'N') es << (char)0x10 << 'n' << es.endl; //nicrom's "n" |
zebrin1422 | 0:dfa2ad4bec3a | 26 | else if(buff == 'S') es << (char)0x10 << 's' << es.endl; //solenoid's "s" |
zebrin1422 | 0:dfa2ad4bec3a | 27 | else if(buff == 'C') es << (char)0x10 << 'c' << es.endl; //collect's "c" |
zebrin1422 | 0:dfa2ad4bec3a | 28 | else if(buff == 'D') es << (char)0x10 << 'd' << es.endl; //debug's "d" |
zebrin1422 | 0:dfa2ad4bec3a | 29 | else if(buff == 'I') es << (char)0x10 << 'i' << es.endl; //inner's "i" |
zebrin1422 | 0:dfa2ad4bec3a | 30 | else if(buff == 'B') es << (char)0x10 << 'b' << es.endl; //beck's "b" |
zebrin1422 | 0:dfa2ad4bec3a | 31 | else pc.printf("NG command\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 32 | } |
zebrin1422 | 0:dfa2ad4bec3a | 33 | |
zebrin1422 | 0:dfa2ad4bec3a | 34 | |
zebrin1422 | 0:dfa2ad4bec3a | 35 | |
zebrin1422 | 0:dfa2ad4bec3a | 36 | |
zebrin1422 | 0:dfa2ad4bec3a | 37 | bool bit_check(short data, short mask) |
zebrin1422 | 0:dfa2ad4bec3a | 38 | { |
zebrin1422 | 0:dfa2ad4bec3a | 39 | if((data & mask) == mask)return true; |
zebrin1422 | 0:dfa2ad4bec3a | 40 | else return false; |
zebrin1422 | 0:dfa2ad4bec3a | 41 | } |
zebrin1422 | 0:dfa2ad4bec3a | 42 | /* |
zebrin1422 | 0:dfa2ad4bec3a | 43 | if(safety_flag) state |= 0x01; //0bit |
zebrin1422 | 0:dfa2ad4bec3a | 44 | if(flight_detect_mode) state |= 0x02; //1bit |
zebrin1422 | 0:dfa2ad4bec3a | 45 | if(hr.flight_pin_state) state |= 0x04; //2bit |
zebrin1422 | 0:dfa2ad4bec3a | 46 | if(flight_mode) state |= 0x08; //3bit |
zebrin1422 | 0:dfa2ad4bec3a | 47 | if(sepa_accept) state |= 0x10; //4bit |
zebrin1422 | 0:dfa2ad4bec3a | 48 | if(extrusion_accept) state |= 0x20; //5bit |
zebrin1422 | 0:dfa2ad4bec3a | 49 | if(collect_mode) state |= 0x40; //6bit |
zebrin1422 | 0:dfa2ad4bec3a | 50 | if(vertex_arrival) state |= 0x80; //7bit |
zebrin1422 | 0:dfa2ad4bec3a | 51 | */ |
zebrin1422 | 0:dfa2ad4bec3a | 52 | void flag_display(char data) |
zebrin1422 | 0:dfa2ad4bec3a | 53 | { |
zebrin1422 | 0:dfa2ad4bec3a | 54 | |
zebrin1422 | 0:dfa2ad4bec3a | 55 | if(data & 0x80)pc.printf("1"); |
zebrin1422 | 0:dfa2ad4bec3a | 56 | else pc.printf("0"); |
zebrin1422 | 0:dfa2ad4bec3a | 57 | |
zebrin1422 | 0:dfa2ad4bec3a | 58 | if(data & 0x40)pc.printf("1"); |
zebrin1422 | 0:dfa2ad4bec3a | 59 | else pc.printf("0"); |
zebrin1422 | 0:dfa2ad4bec3a | 60 | |
zebrin1422 | 0:dfa2ad4bec3a | 61 | if(data & 0x20)pc.printf("1"); |
zebrin1422 | 0:dfa2ad4bec3a | 62 | else pc.printf("0"); |
zebrin1422 | 0:dfa2ad4bec3a | 63 | |
zebrin1422 | 0:dfa2ad4bec3a | 64 | if(data & 0x10)pc.printf("1|"); |
zebrin1422 | 0:dfa2ad4bec3a | 65 | else pc.printf("0|"); |
zebrin1422 | 0:dfa2ad4bec3a | 66 | |
zebrin1422 | 0:dfa2ad4bec3a | 67 | if(data & 0x08)pc.printf("1"); |
zebrin1422 | 0:dfa2ad4bec3a | 68 | else pc.printf("0"); |
zebrin1422 | 0:dfa2ad4bec3a | 69 | |
zebrin1422 | 0:dfa2ad4bec3a | 70 | if(data & 0x04)pc.printf("1"); |
zebrin1422 | 0:dfa2ad4bec3a | 71 | else pc.printf("0"); |
zebrin1422 | 0:dfa2ad4bec3a | 72 | |
zebrin1422 | 0:dfa2ad4bec3a | 73 | if(data & 0x02)pc.printf("1"); |
zebrin1422 | 0:dfa2ad4bec3a | 74 | else pc.printf("0"); |
zebrin1422 | 0:dfa2ad4bec3a | 75 | |
zebrin1422 | 0:dfa2ad4bec3a | 76 | |
zebrin1422 | 0:dfa2ad4bec3a | 77 | if(data & 0x01)pc.printf("1\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 78 | else pc.printf("0\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 79 | |
zebrin1422 | 0:dfa2ad4bec3a | 80 | if(data==0x00)pc.printf("安全装置:ロック\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 81 | if(data==0x01)pc.printf("安全装置:解除\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 82 | if(data==0x03)pc.printf("フライトピン待機状態\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 83 | if(data==0x07)pc.printf("フライトピンが抜けた\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 84 | if(data==0x0F)pc.printf("飛行中\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 85 | if(data==0x1F || data==0x9F)pc.printf("ニクロムファイア\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 86 | if(data==0x3F || data==0xBF)pc.printf("ソレノイドプッシュ\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 87 | if(data==0x7F || data==0xFF)pc.printf("回収モード\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 88 | |
zebrin1422 | 0:dfa2ad4bec3a | 89 | } |
zebrin1422 | 0:dfa2ad4bec3a | 90 | |
zebrin1422 | 0:dfa2ad4bec3a | 91 | void second_to_time(int data) |
zebrin1422 | 0:dfa2ad4bec3a | 92 | { |
zebrin1422 | 0:dfa2ad4bec3a | 93 | char hour,min,second; |
zebrin1422 | 0:dfa2ad4bec3a | 94 | float dummy; |
zebrin1422 | 0:dfa2ad4bec3a | 95 | |
zebrin1422 | 0:dfa2ad4bec3a | 96 | dummy = (float)(data/3600); |
zebrin1422 | 0:dfa2ad4bec3a | 97 | hour = (char)dummy; |
zebrin1422 | 0:dfa2ad4bec3a | 98 | data -= 3600*(int)hour; |
zebrin1422 | 0:dfa2ad4bec3a | 99 | |
zebrin1422 | 0:dfa2ad4bec3a | 100 | dummy = (float)(data/60); |
zebrin1422 | 0:dfa2ad4bec3a | 101 | min = (char)dummy; |
zebrin1422 | 0:dfa2ad4bec3a | 102 | data -= 60*(int)min; |
zebrin1422 | 0:dfa2ad4bec3a | 103 | |
zebrin1422 | 0:dfa2ad4bec3a | 104 | second = (char)data; |
zebrin1422 | 0:dfa2ad4bec3a | 105 | |
zebrin1422 | 0:dfa2ad4bec3a | 106 | pc.printf("Inner Time = %d hour %d min %d sec\r\n", hour, min, second); |
zebrin1422 | 0:dfa2ad4bec3a | 107 | } |
zebrin1422 | 0:dfa2ad4bec3a | 108 | |
zebrin1422 | 0:dfa2ad4bec3a | 109 | |
zebrin1422 | 0:dfa2ad4bec3a | 110 | void header0x01() |
zebrin1422 | 0:dfa2ad4bec3a | 111 | { |
zebrin1422 | 0:dfa2ad4bec3a | 112 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 113 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 114 | |
zebrin1422 | 0:dfa2ad4bec3a | 115 | if(es.data[0] == (char)9) //PQの9 |
zebrin1422 | 0:dfa2ad4bec3a | 116 | { |
zebrin1422 | 0:dfa2ad4bec3a | 117 | pc.printf("safety device release complete\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 118 | safety_flag = true; |
zebrin1422 | 0:dfa2ad4bec3a | 119 | } |
zebrin1422 | 0:dfa2ad4bec3a | 120 | else |
zebrin1422 | 0:dfa2ad4bec3a | 121 | { |
zebrin1422 | 0:dfa2ad4bec3a | 122 | pc.printf("couldn't communicate\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 123 | safety_flag = false; |
zebrin1422 | 0:dfa2ad4bec3a | 124 | } |
zebrin1422 | 0:dfa2ad4bec3a | 125 | |
zebrin1422 | 0:dfa2ad4bec3a | 126 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 127 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 128 | } |
zebrin1422 | 0:dfa2ad4bec3a | 129 | |
zebrin1422 | 0:dfa2ad4bec3a | 130 | // センサ external_INA inner_INA mpu_acc mpu_mag LPS22HB SHT35 TSL2561 three SD |
zebrin1422 | 0:dfa2ad4bec3a | 131 | // ビット 8 7 6 5 4 3 2 1 0 |
zebrin1422 | 0:dfa2ad4bec3a | 132 | // 対応するビットがHIGHになっておれば接続確認できている |
zebrin1422 | 0:dfa2ad4bec3a | 133 | void header0x02() |
zebrin1422 | 0:dfa2ad4bec3a | 134 | { |
zebrin1422 | 0:dfa2ad4bec3a | 135 | short state = es.toShort(0); |
zebrin1422 | 0:dfa2ad4bec3a | 136 | if(state & 0x001)pc.printf("external ina OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 137 | else pc.printf("external ina NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 138 | |
zebrin1422 | 0:dfa2ad4bec3a | 139 | if(state & 0x002)pc.printf("inner ina OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 140 | else pc.printf("inner ina NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 141 | |
zebrin1422 | 0:dfa2ad4bec3a | 142 | if(state & 0x004)pc.printf("mpu acc OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 143 | else pc.printf("mpu acc OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 144 | |
zebrin1422 | 0:dfa2ad4bec3a | 145 | if(state & 0x008)pc.printf("mpu mag OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 146 | else pc.printf("mpu mag OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 147 | |
zebrin1422 | 0:dfa2ad4bec3a | 148 | if(state & 0x010)pc.printf("LPS22HB OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 149 | else pc.printf("LPS22HB NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 150 | |
zebrin1422 | 0:dfa2ad4bec3a | 151 | if(state & 0x020)pc.printf("SHT35 OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 152 | else pc.printf("SHT35 NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 153 | |
zebrin1422 | 0:dfa2ad4bec3a | 154 | if(state & 0x040)pc.printf("TSL2561 OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 155 | else pc.printf("TSL2561 NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 156 | |
zebrin1422 | 0:dfa2ad4bec3a | 157 | if(state & 0x080)pc.printf("ADXL OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 158 | else pc.printf("ADXL NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 159 | |
zebrin1422 | 0:dfa2ad4bec3a | 160 | if(state & 0x100)pc.printf("SD OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 161 | else pc.printf("SD NG\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 162 | |
zebrin1422 | 0:dfa2ad4bec3a | 163 | if(state & 0x200)pc.printf("GPS OK\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 164 | else pc.printf("GPS NO\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 165 | } |
zebrin1422 | 0:dfa2ad4bec3a | 166 | |
zebrin1422 | 0:dfa2ad4bec3a | 167 | #define COMPRES_Inner_Time 36.40833333 //32768/1800 |
zebrin1422 | 0:dfa2ad4bec3a | 168 | #define COMPRES_Q 305200 // ? pakuru |
zebrin1422 | 0:dfa2ad4bec3a | 169 | #define COMPRES_VOLTAGE 0.9102222 // 65535/36 = |
zebrin1422 | 0:dfa2ad4bec3a | 170 | #define COMPRES_CURRENT 0.8192 // 65535/40 = |
zebrin1422 | 0:dfa2ad4bec3a | 171 | #define COMPRES_PRESSURE 26.0063 // 65535/1260 = |
zebrin1422 | 0:dfa2ad4bec3a | 172 | #define COMPRES_ALTITUDE 65.536 // 65535/500 = //range = 0~500 |
zebrin1422 | 0:dfa2ad4bec3a | 173 | #define COMPRES_VELOCITY 327.68 // 65535/100 = //pakuru |
zebrin1422 | 0:dfa2ad4bec3a | 174 | #define COMPRES_LUMINOSITY 3.2768 // 65535/10000 = |
zebrin1422 | 0:dfa2ad4bec3a | 175 | #define COMPRES_TEMPERATURE 546.133 // 63353/60 = //range = -20 ~ 40 |
zebrin1422 | 0:dfa2ad4bec3a | 176 | #define COMPRES_HUMIDITY 327.68 // 65535/100 = |
zebrin1422 | 0:dfa2ad4bec3a | 177 | #define COMPRES_ACC 81.92 // 65535/400 = |
zebrin1422 | 0:dfa2ad4bec3a | 178 | #define COMPRES_PITOT 32768 // 65535/1 = |
zebrin1422 | 0:dfa2ad4bec3a | 179 | |
zebrin1422 | 0:dfa2ad4bec3a | 180 | void header0x03() |
zebrin1422 | 0:dfa2ad4bec3a | 181 | { |
zebrin1422 | 0:dfa2ad4bec3a | 182 | int i=0; |
zebrin1422 | 0:dfa2ad4bec3a | 183 | |
zebrin1422 | 0:dfa2ad4bec3a | 184 | pc.printf("header:0x03\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 185 | |
zebrin1422 | 0:dfa2ad4bec3a | 186 | if(es.data[i]==1 || es.data[i]==2 || es.data[i]==3) |
zebrin1422 | 0:dfa2ad4bec3a | 187 | { |
zebrin1422 | 0:dfa2ad4bec3a | 188 | |
zebrin1422 | 0:dfa2ad4bec3a | 189 | pc.printf("rocket phase : %d\r\n",es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 190 | i++; |
zebrin1422 | 0:dfa2ad4bec3a | 191 | |
zebrin1422 | 0:dfa2ad4bec3a | 192 | flag_display(es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 193 | i++; |
zebrin1422 | 0:dfa2ad4bec3a | 194 | |
zebrin1422 | 0:dfa2ad4bec3a | 195 | second_to_time(es.toInt(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 196 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 197 | |
zebrin1422 | 0:dfa2ad4bec3a | 198 | //i+=8; |
zebrin1422 | 0:dfa2ad4bec3a | 199 | |
zebrin1422 | 0:dfa2ad4bec3a | 200 | pc.printf("latitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 201 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 202 | |
zebrin1422 | 0:dfa2ad4bec3a | 203 | pc.printf("longitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 204 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 205 | |
zebrin1422 | 0:dfa2ad4bec3a | 206 | /* |
zebrin1422 | 0:dfa2ad4bec3a | 207 | pc.printf("ex_vol = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 208 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 209 | |
zebrin1422 | 0:dfa2ad4bec3a | 210 | pc.printf("ex_current = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 211 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 212 | |
zebrin1422 | 0:dfa2ad4bec3a | 213 | pc.printf("in_vol = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 214 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 215 | |
zebrin1422 | 0:dfa2ad4bec3a | 216 | pc.printf("in_current = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 217 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 218 | |
zebrin1422 | 0:dfa2ad4bec3a | 219 | //pc.printf("pressure = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 220 | //i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 221 | |
zebrin1422 | 0:dfa2ad4bec3a | 222 | //pc.printf("lux = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 223 | //i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 224 | |
zebrin1422 | 0:dfa2ad4bec3a | 225 | |
zebrin1422 | 0:dfa2ad4bec3a | 226 | pc.printf("press = %f\r\n",(float)(es.toShort(i) / COMPRES_PRESSURE)); |
zebrin1422 | 0:dfa2ad4bec3a | 227 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 228 | |
zebrin1422 | 0:dfa2ad4bec3a | 229 | pc.printf("lux %f\r\n", (float)(es.toShort(i) / COMPRES_LUMINOSITY)); |
zebrin1422 | 0:dfa2ad4bec3a | 230 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 231 | |
zebrin1422 | 0:dfa2ad4bec3a | 232 | pc.printf("temp = %f\r\n",(float)(es.toShort(i) / COMPRES_TEMPERATURE)); |
zebrin1422 | 0:dfa2ad4bec3a | 233 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 234 | |
zebrin1422 | 0:dfa2ad4bec3a | 235 | pc.printf("hum = %f\r\n",(float)(es.toShort(i) / COMPRES_HUMIDITY)); |
zebrin1422 | 0:dfa2ad4bec3a | 236 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 237 | */ |
zebrin1422 | 0:dfa2ad4bec3a | 238 | pc.printf("ex_vol = %f\r\n",(float)(es.toShort(i))/COMPRES_VOLTAGE); |
zebrin1422 | 0:dfa2ad4bec3a | 239 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 240 | |
zebrin1422 | 0:dfa2ad4bec3a | 241 | pc.printf("ex_current = %f\r\n",(float)(es.toShort(i))/COMPRES_CURRENT); |
zebrin1422 | 0:dfa2ad4bec3a | 242 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 243 | |
zebrin1422 | 0:dfa2ad4bec3a | 244 | //pc.printf("i = %d\r\n",i); |
zebrin1422 | 0:dfa2ad4bec3a | 245 | pc.printf("in_vol = %f\r\n",(float)(es.toShort(i))/COMPRES_VOLTAGE); |
zebrin1422 | 0:dfa2ad4bec3a | 246 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 247 | |
zebrin1422 | 0:dfa2ad4bec3a | 248 | pc.printf("in_current = %f\r\n",(float)(es.toShort(i))/COMPRES_CURRENT); |
zebrin1422 | 0:dfa2ad4bec3a | 249 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 250 | |
zebrin1422 | 0:dfa2ad4bec3a | 251 | pc.printf("pressure = %f\r\n",(float)(es.toShort(i)/COMPRES_PRESSURE)); |
zebrin1422 | 0:dfa2ad4bec3a | 252 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 253 | |
zebrin1422 | 0:dfa2ad4bec3a | 254 | pc.printf("luminosity = %f\r\n",(float)(es.toShort(i)/COMPRES_LUMINOSITY)); |
zebrin1422 | 0:dfa2ad4bec3a | 255 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 256 | |
zebrin1422 | 0:dfa2ad4bec3a | 257 | pc.printf("temperature = %f\r\n",(float)(es.toShort(i))/COMPRES_TEMPERATURE); |
zebrin1422 | 0:dfa2ad4bec3a | 258 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 259 | |
zebrin1422 | 0:dfa2ad4bec3a | 260 | pc.printf("humidity = %f\r\n",(float)(es.toShort(i))/COMPRES_HUMIDITY); |
zebrin1422 | 0:dfa2ad4bec3a | 261 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 262 | |
zebrin1422 | 0:dfa2ad4bec3a | 263 | |
zebrin1422 | 0:dfa2ad4bec3a | 264 | } |
zebrin1422 | 0:dfa2ad4bec3a | 265 | if(es.data[i]==4) |
zebrin1422 | 0:dfa2ad4bec3a | 266 | { |
zebrin1422 | 0:dfa2ad4bec3a | 267 | pc.printf("rocket phase : %d\r\n",es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 268 | i++; |
zebrin1422 | 0:dfa2ad4bec3a | 269 | |
zebrin1422 | 0:dfa2ad4bec3a | 270 | flag_display(es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 271 | i++; |
zebrin1422 | 0:dfa2ad4bec3a | 272 | |
zebrin1422 | 0:dfa2ad4bec3a | 273 | second_to_time(es.toInt(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 274 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 275 | |
zebrin1422 | 0:dfa2ad4bec3a | 276 | pc.printf("latitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 277 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 278 | |
zebrin1422 | 0:dfa2ad4bec3a | 279 | pc.printf("longitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 280 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 281 | |
zebrin1422 | 0:dfa2ad4bec3a | 282 | /* |
zebrin1422 | 0:dfa2ad4bec3a | 283 | pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 284 | pc.printf("Q.w = %f\r\n",(float)(es.toShort(i))*COMPRES_Q); |
zebrin1422 | 0:dfa2ad4bec3a | 285 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 286 | |
zebrin1422 | 0:dfa2ad4bec3a | 287 | pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 288 | pc.printf("Q.x = %f\r\n",(float)(es.toShort(i))*COMPRES_Q); |
zebrin1422 | 0:dfa2ad4bec3a | 289 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 290 | |
zebrin1422 | 0:dfa2ad4bec3a | 291 | pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 292 | pc.printf("Q.y = %f\r\n",(float)(es.toShort(i))*COMPRES_Q); |
zebrin1422 | 0:dfa2ad4bec3a | 293 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 294 | |
zebrin1422 | 0:dfa2ad4bec3a | 295 | pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 296 | pc.printf("Q.z = %f\r\n",(float)(es.toShort(i))*COMPRES_Q); |
zebrin1422 | 0:dfa2ad4bec3a | 297 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 298 | */ |
zebrin1422 | 0:dfa2ad4bec3a | 299 | //i+=8; |
zebrin1422 | 0:dfa2ad4bec3a | 300 | |
zebrin1422 | 0:dfa2ad4bec3a | 301 | pc.printf("in_vol = %f\r\n",(float)(es.toShort(i))/COMPRES_VOLTAGE); |
zebrin1422 | 0:dfa2ad4bec3a | 302 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 303 | |
zebrin1422 | 0:dfa2ad4bec3a | 304 | pc.printf("in_current = %f\r\n",(float)(es.toShort(i))/COMPRES_CURRENT); |
zebrin1422 | 0:dfa2ad4bec3a | 305 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 306 | |
zebrin1422 | 0:dfa2ad4bec3a | 307 | pc.printf("altitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 308 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 309 | |
zebrin1422 | 0:dfa2ad4bec3a | 310 | pc.printf("velocity = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 311 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 312 | |
zebrin1422 | 0:dfa2ad4bec3a | 313 | pc.printf("luminosity = %f\r\n",(float)(es.toShort(i))/COMPRES_LUMINOSITY); |
zebrin1422 | 0:dfa2ad4bec3a | 314 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 315 | |
zebrin1422 | 0:dfa2ad4bec3a | 316 | pc.printf("temperature = %f\r\n",(float)(es.toShort(i))/COMPRES_TEMPERATURE); |
zebrin1422 | 0:dfa2ad4bec3a | 317 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 318 | |
zebrin1422 | 0:dfa2ad4bec3a | 319 | pc.printf("humidity = %f\r\n",(float)(es.toShort(i))/COMPRES_HUMIDITY); |
zebrin1422 | 0:dfa2ad4bec3a | 320 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 321 | |
zebrin1422 | 0:dfa2ad4bec3a | 322 | pc.printf("press_pitot = %f\r\n",(float)(es.toShort(i))/COMPRES_PITOT); |
zebrin1422 | 0:dfa2ad4bec3a | 323 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 324 | |
zebrin1422 | 0:dfa2ad4bec3a | 325 | pc.printf("gps_altitude = %f\r\n",(float)(es.toShort(i)/COMPRES_ALTITUDE)); |
zebrin1422 | 0:dfa2ad4bec3a | 326 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 327 | } |
zebrin1422 | 0:dfa2ad4bec3a | 328 | if(es.data[i]==5) |
zebrin1422 | 0:dfa2ad4bec3a | 329 | { |
zebrin1422 | 0:dfa2ad4bec3a | 330 | pc.printf("rocket phase : %d\r\n",es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 331 | i++; |
zebrin1422 | 0:dfa2ad4bec3a | 332 | |
zebrin1422 | 0:dfa2ad4bec3a | 333 | flag_display(es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 334 | /* |
zebrin1422 | 0:dfa2ad4bec3a | 335 | pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 336 | pc.printf("rocket state : 0x%x\r\n",es.data[i]); |
zebrin1422 | 0:dfa2ad4bec3a | 337 | */ |
zebrin1422 | 0:dfa2ad4bec3a | 338 | i++; |
zebrin1422 | 0:dfa2ad4bec3a | 339 | |
zebrin1422 | 0:dfa2ad4bec3a | 340 | second_to_time(es.toInt(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 341 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 342 | /* |
zebrin1422 | 0:dfa2ad4bec3a | 343 | pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 344 | pc.printf("Inner time = %d\r\n",es.toInt(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 345 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 346 | */ |
zebrin1422 | 0:dfa2ad4bec3a | 347 | |
zebrin1422 | 0:dfa2ad4bec3a | 348 | //pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 349 | pc.printf("longitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 350 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 351 | |
zebrin1422 | 0:dfa2ad4bec3a | 352 | //pc.printf("i = %d\t",i); |
zebrin1422 | 0:dfa2ad4bec3a | 353 | pc.printf("latitude = %f\r\n",es.toFloat(i)); |
zebrin1422 | 0:dfa2ad4bec3a | 354 | i+=4; |
zebrin1422 | 0:dfa2ad4bec3a | 355 | |
zebrin1422 | 0:dfa2ad4bec3a | 356 | //i+=8; |
zebrin1422 | 0:dfa2ad4bec3a | 357 | |
zebrin1422 | 0:dfa2ad4bec3a | 358 | pc.printf("in_vol = %f\r\n",(float)(es.toShort(i))/COMPRES_VOLTAGE); |
zebrin1422 | 0:dfa2ad4bec3a | 359 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 360 | |
zebrin1422 | 0:dfa2ad4bec3a | 361 | pc.printf("in_current = %f\r\n",(float)(es.toShort(i))/COMPRES_CURRENT); |
zebrin1422 | 0:dfa2ad4bec3a | 362 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 363 | |
zebrin1422 | 0:dfa2ad4bec3a | 364 | pc.printf("press = %f\r\n",(float)(es.toShort(i) / COMPRES_PRESSURE)); |
zebrin1422 | 0:dfa2ad4bec3a | 365 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 366 | |
zebrin1422 | 0:dfa2ad4bec3a | 367 | pc.printf("luminosity = %f\r\n",(float)(es.toShort(i)/COMPRES_LUMINOSITY)); |
zebrin1422 | 0:dfa2ad4bec3a | 368 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 369 | |
zebrin1422 | 0:dfa2ad4bec3a | 370 | pc.printf("temperature = %f\r\n",(float)(es.toShort(i)/COMPRES_TEMPERATURE)); |
zebrin1422 | 0:dfa2ad4bec3a | 371 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 372 | |
zebrin1422 | 0:dfa2ad4bec3a | 373 | pc.printf("humidity = %f\r\n",(float)(es.toShort(i)/COMPRES_HUMIDITY)); |
zebrin1422 | 0:dfa2ad4bec3a | 374 | i+=2; |
zebrin1422 | 0:dfa2ad4bec3a | 375 | } |
zebrin1422 | 0:dfa2ad4bec3a | 376 | } |
zebrin1422 | 0:dfa2ad4bec3a | 377 | |
zebrin1422 | 0:dfa2ad4bec3a | 378 | void header0x05() |
zebrin1422 | 0:dfa2ad4bec3a | 379 | { |
zebrin1422 | 0:dfa2ad4bec3a | 380 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 381 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 382 | pc.printf("header:0x05\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 383 | |
zebrin1422 | 0:dfa2ad4bec3a | 384 | if(es.data[0] == 'd')pc.printf("flight pin detect\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 385 | //else pc.printf("NG data\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 386 | |
zebrin1422 | 0:dfa2ad4bec3a | 387 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 388 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 389 | |
zebrin1422 | 0:dfa2ad4bec3a | 390 | } |
zebrin1422 | 0:dfa2ad4bec3a | 391 | |
zebrin1422 | 0:dfa2ad4bec3a | 392 | void header0x06() |
zebrin1422 | 0:dfa2ad4bec3a | 393 | { |
zebrin1422 | 0:dfa2ad4bec3a | 394 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 395 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 396 | pc.printf("header:0x06\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 397 | |
zebrin1422 | 0:dfa2ad4bec3a | 398 | if(es.data[0] == 'n')pc.printf("nicrom fire finish\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 399 | //else pc.printf("NG data\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 400 | |
zebrin1422 | 0:dfa2ad4bec3a | 401 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 402 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 403 | } |
zebrin1422 | 0:dfa2ad4bec3a | 404 | |
zebrin1422 | 0:dfa2ad4bec3a | 405 | void header0x07() |
zebrin1422 | 0:dfa2ad4bec3a | 406 | { |
zebrin1422 | 0:dfa2ad4bec3a | 407 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 408 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 409 | pc.printf("header:0x07\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 410 | |
zebrin1422 | 0:dfa2ad4bec3a | 411 | if(es.data[0] == 's')pc.printf("solenoid push complete\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 412 | //else pc.printf("NG data\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 413 | |
zebrin1422 | 0:dfa2ad4bec3a | 414 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 415 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 416 | } |
zebrin1422 | 0:dfa2ad4bec3a | 417 | |
zebrin1422 | 0:dfa2ad4bec3a | 418 | void header0x08() |
zebrin1422 | 0:dfa2ad4bec3a | 419 | { |
zebrin1422 | 0:dfa2ad4bec3a | 420 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 421 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 422 | //pc.printf("header:0x08\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 423 | |
zebrin1422 | 0:dfa2ad4bec3a | 424 | if(es.data[0] == 'c')pc.printf("collect mode transimit complete\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 425 | else pc.printf("NG data\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 426 | |
zebrin1422 | 0:dfa2ad4bec3a | 427 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 428 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 429 | } |
zebrin1422 | 0:dfa2ad4bec3a | 430 | |
zebrin1422 | 0:dfa2ad4bec3a | 431 | void header0x09() |
zebrin1422 | 0:dfa2ad4bec3a | 432 | { |
zebrin1422 | 0:dfa2ad4bec3a | 433 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 434 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 435 | pc.printf("header:0x09\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 436 | |
zebrin1422 | 0:dfa2ad4bec3a | 437 | if(es.data[0] == 1)pc.printf("ROCKET PHASE 1 START\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 438 | if(es.data[0] == 2)pc.printf("ROCKET PHASE 2 START\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 439 | if(es.data[0] == 3)pc.printf("ROCKET PHASE 3 START\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 440 | if(es.data[0] == 4)pc.printf("ROCKET PHASE 4 START\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 441 | if(es.data[0] == 5)pc.printf("ROCKET PHASE 5 START\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 442 | //else pc.printf("NG data\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 443 | |
zebrin1422 | 0:dfa2ad4bec3a | 444 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 445 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 446 | } |
zebrin1422 | 0:dfa2ad4bec3a | 447 | |
zebrin1422 | 0:dfa2ad4bec3a | 448 | void header0x1A() |
zebrin1422 | 0:dfa2ad4bec3a | 449 | { |
zebrin1422 | 0:dfa2ad4bec3a | 450 | |
zebrin1422 | 0:dfa2ad4bec3a | 451 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 452 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 453 | pc.printf("header : 0x1A\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 454 | |
zebrin1422 | 0:dfa2ad4bec3a | 455 | if(es.data[0] == 'd'){pc.printf("Rocket's transceiver normal\r\n");} |
zebrin1422 | 0:dfa2ad4bec3a | 456 | if(es.data[0] == 'i'){pc.printf("Inner time reset complete\r\n");} |
zebrin1422 | 0:dfa2ad4bec3a | 457 | if(es.data[0] == 'b'){pc.printf("safety device reboot complete\r\n");} |
zebrin1422 | 0:dfa2ad4bec3a | 458 | //else pc.printf("NG command\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 459 | |
zebrin1422 | 0:dfa2ad4bec3a | 460 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 461 | pc.printf("--------------------------------------------------------\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 462 | } |
zebrin1422 | 0:dfa2ad4bec3a | 463 | |
zebrin1422 | 0:dfa2ad4bec3a | 464 | |
zebrin1422 | 0:dfa2ad4bec3a | 465 | int main() { |
zebrin1422 | 0:dfa2ad4bec3a | 466 | |
zebrin1422 | 0:dfa2ad4bec3a | 467 | pc.attach(&header0x10, Serial::RxIrq); |
zebrin1422 | 0:dfa2ad4bec3a | 468 | |
zebrin1422 | 0:dfa2ad4bec3a | 469 | es.attach(&header0x01, (char)0x01); |
zebrin1422 | 0:dfa2ad4bec3a | 470 | es.attach(&header0x02, (char)0x02); |
zebrin1422 | 0:dfa2ad4bec3a | 471 | es.attach(&header0x03, (char)0x03); |
zebrin1422 | 0:dfa2ad4bec3a | 472 | //es.attach(&header0x04, (char)0x04); |
zebrin1422 | 0:dfa2ad4bec3a | 473 | es.attach(&header0x05, (char)0x05); |
zebrin1422 | 0:dfa2ad4bec3a | 474 | es.attach(&header0x06, (char)0x06); |
zebrin1422 | 0:dfa2ad4bec3a | 475 | es.attach(&header0x07, (char)0x07); |
zebrin1422 | 0:dfa2ad4bec3a | 476 | es.attach(&header0x08, (char)0x08); |
zebrin1422 | 0:dfa2ad4bec3a | 477 | es.attach(&header0x09, (char)0x09); |
zebrin1422 | 0:dfa2ad4bec3a | 478 | |
zebrin1422 | 0:dfa2ad4bec3a | 479 | es.attach(&header0x1A, (char)0x1A); |
zebrin1422 | 0:dfa2ad4bec3a | 480 | |
zebrin1422 | 0:dfa2ad4bec3a | 481 | |
zebrin1422 | 0:dfa2ad4bec3a | 482 | |
zebrin1422 | 0:dfa2ad4bec3a | 483 | while(1) |
zebrin1422 | 0:dfa2ad4bec3a | 484 | { |
zebrin1422 | 0:dfa2ad4bec3a | 485 | pc.printf("couldn't receive cmd\r\n"); |
zebrin1422 | 0:dfa2ad4bec3a | 486 | |
zebrin1422 | 0:dfa2ad4bec3a | 487 | wait(30); |
zebrin1422 | 0:dfa2ad4bec3a | 488 | } |
zebrin1422 | 0:dfa2ad4bec3a | 489 | |
zebrin1422 | 0:dfa2ad4bec3a | 490 | |
zebrin1422 | 0:dfa2ad4bec3a | 491 | } |