diff --git a/plane/plane.c b/plane/plane.c index 039ffef..ac80e3a 100644 --- a/plane/plane.c +++ b/plane/plane.c @@ -122,11 +122,11 @@ void send_data(){ /* 2. création objet */ strcpy(request.code, numero_vol); - request.x = crd.x; - request.y = crd.y; - request.z = crd.z; - request.cap = ctrl.cap; - request.spd = ctrl.speed; + request.x = htonl( crd.x ); + request.y = htonl( crd.y ); + request.z = htonl( crd.z ); + request.cap = htonl( ctrl.cap ); + request.spd = htonl( ctrl.speed ); /* 3. Copie buffer */ strcpy(buffer, request.code); @@ -245,9 +245,9 @@ void update(){ while( 1 ){ - sleep(PAUSE); calc_ctrl(); send_data(); + sleep(PAUSE); }