Changeset 253 in flair-src for trunk


Ignore:
Timestamp:
Jul 13, 2018, 5:59:30 PM (6 years ago)
Author:
Sanahuja Guillaume
Message:

correction bug logs non fonctionnels

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/ui_com.cpp

    r252 r253  
    244244  char header;
    245245  if (IsBigEndian()) {
    246     header = DATAS_BIG_ENDIAN;
     246    header = DATA_BIG_ENDIAN;
    247247    Printf("System is big endian\n");
    248248  } else {
    249     header = DATAS_LITTLE_ENDIAN;
     249    header = DATA_LITTLE_ENDIAN;
    250250    Printf("System is little endian\n");
    251251  }
  • trunk/lib/FlairCore/src/unexported/communication.h

    r247 r253  
    1010#define ZLIB_HEADER 0x78
    1111#define WATCHDOG_HEADER 0x01
    12 #define DATAS_LITTLE_ENDIAN 0x02
    13 #define DATAS_BIG_ENDIAN 0x03
     12#define DATA_LITTLE_ENDIAN 0x02
     13#define DATA_BIG_ENDIAN 0x03
    1414#define CLOSING_CONNECTION 0x04
    1515
  • trunk/tools/FlairGCS/src/ConnectionLayout.cpp

    r247 r253  
    3737    break;
    3838  }
    39   case DATAS_BIG_ENDIAN: {
     39  case DATA_BIG_ENDIAN: {
    4040    // for(int i=0;i<size;i++) fprintf(stderr,"%x ",buf[i]);
    4141    // fprintf(stderr,"\n");
     
    4646    break;
    4747  }
    48   case DATAS_LITTLE_ENDIAN: {
     48  case DATA_LITTLE_ENDIAN: {
    4949    // for(int i=0;i<size;i++) fprintf(stderr,"%x ",buf[i]);
    5050    // fprintf(stderr,"\n");
  • trunk/tools/FlairGCS/src/UdtSocket.cpp

    r252 r253  
    4545  connect(heartbeat_timer, SIGNAL(timeout()), this, SLOT(heartbeat()));
    4646  heartbeat_timer->start(HEARTBEAT_TIMER);
    47   heartbeat();//send directly the first one
     47  //heartbeat();//send directly the first one, but conflicts if this socket is for logs... TODO: delay start of watchdog timer on uav side
    4848  udtstats_timer = new QTimer(this);
    4949  connect(udtstats_timer, SIGNAL(timeout()), this, SLOT(getUTDStats()));
     
    166166        size=UDT::recvmsg(socket, buf, buf_size);
    167167     
    168         //fprintf(stderr,"recu %i\n",size);
     168        //fprintf(stderr,"recu %i %x\n",size,buf[0]);
    169169        if (size > 0) {
    170170          total_received+=size;
     
    184184            }
    185185            case START_SENDING_FILES: {
     186              printf("log\n");
    186187              if((unsigned char)uncompressbuf[0]==XML_HEADER && socketType==unknown) {
    187188                socketType=log;
     
    192193              deleteLater();
    193194              stop=true;
     195              size=-1;//exit from do while loop
    194196              destroySocket=false;
    195197              break;
     
    202204                emit newConnectionLayout(remoteName);
    203205              }
    204             case DATAS_BIG_ENDIAN:
    205             case DATAS_LITTLE_ENDIAN:
     206            case DATA_BIG_ENDIAN:
     207            case DATA_LITTLE_ENDIAN:
    206208              emit dataReady(buf, size );
    207209              break;
     
    214216              break;
    215217            default:
    216               fprintf(stderr,"trame non supportée %x\n", buf[0]);
     218              fprintf(stderr,"udt trame non supportée %x\n", buf[0]);
    217219          }
    218220        } else {
Note: See TracChangeset for help on using the changeset viewer.