Changeset 253 in flair-src
- Timestamp:
- Jul 13, 2018, 5:59:30 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/ui_com.cpp
r252 r253 244 244 char header; 245 245 if (IsBigEndian()) { 246 header = DATA S_BIG_ENDIAN;246 header = DATA_BIG_ENDIAN; 247 247 Printf("System is big endian\n"); 248 248 } else { 249 header = DATA S_LITTLE_ENDIAN;249 header = DATA_LITTLE_ENDIAN; 250 250 Printf("System is little endian\n"); 251 251 } -
trunk/lib/FlairCore/src/unexported/communication.h
r247 r253 10 10 #define ZLIB_HEADER 0x78 11 11 #define WATCHDOG_HEADER 0x01 12 #define DATA S_LITTLE_ENDIAN 0x0213 #define DATA S_BIG_ENDIAN 0x0312 #define DATA_LITTLE_ENDIAN 0x02 13 #define DATA_BIG_ENDIAN 0x03 14 14 #define CLOSING_CONNECTION 0x04 15 15 -
trunk/tools/FlairGCS/src/ConnectionLayout.cpp
r247 r253 37 37 break; 38 38 } 39 case DATA S_BIG_ENDIAN: {39 case DATA_BIG_ENDIAN: { 40 40 // for(int i=0;i<size;i++) fprintf(stderr,"%x ",buf[i]); 41 41 // fprintf(stderr,"\n"); … … 46 46 break; 47 47 } 48 case DATA S_LITTLE_ENDIAN: {48 case DATA_LITTLE_ENDIAN: { 49 49 // for(int i=0;i<size;i++) fprintf(stderr,"%x ",buf[i]); 50 50 // fprintf(stderr,"\n"); -
trunk/tools/FlairGCS/src/UdtSocket.cpp
r252 r253 45 45 connect(heartbeat_timer, SIGNAL(timeout()), this, SLOT(heartbeat())); 46 46 heartbeat_timer->start(HEARTBEAT_TIMER); 47 heartbeat();//send directly the first one47 //heartbeat();//send directly the first one, but conflicts if this socket is for logs... TODO: delay start of watchdog timer on uav side 48 48 udtstats_timer = new QTimer(this); 49 49 connect(udtstats_timer, SIGNAL(timeout()), this, SLOT(getUTDStats())); … … 166 166 size=UDT::recvmsg(socket, buf, buf_size); 167 167 168 //fprintf(stderr,"recu %i \n",size);168 //fprintf(stderr,"recu %i %x\n",size,buf[0]); 169 169 if (size > 0) { 170 170 total_received+=size; … … 184 184 } 185 185 case START_SENDING_FILES: { 186 printf("log\n"); 186 187 if((unsigned char)uncompressbuf[0]==XML_HEADER && socketType==unknown) { 187 188 socketType=log; … … 192 193 deleteLater(); 193 194 stop=true; 195 size=-1;//exit from do while loop 194 196 destroySocket=false; 195 197 break; … … 202 204 emit newConnectionLayout(remoteName); 203 205 } 204 case DATA S_BIG_ENDIAN:205 case DATA S_LITTLE_ENDIAN:206 case DATA_BIG_ENDIAN: 207 case DATA_LITTLE_ENDIAN: 206 208 emit dataReady(buf, size ); 207 209 break; … … 214 216 break; 215 217 default: 216 fprintf(stderr," trame non supportée %x\n", buf[0]);218 fprintf(stderr,"udt trame non supportée %x\n", buf[0]); 217 219 } 218 220 } else {
Note:
See TracChangeset
for help on using the changeset viewer.