From 80f0aa95f6a9d20b78c3174666cf28312110b055 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 25 Apr 2017 16:34:04 +0200 Subject: [PATCH] Plane indianness + Plane timeout misplaced --- plane/plane.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); }