From 780a3c6831a448a5cdd6c019a944a109d2cb37ce Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 1 Oct 1999 20:33:06 +0000 Subject: [PATCH] More heave tweaks. --- src/Main/fg_serial.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main/fg_serial.cxx b/src/Main/fg_serial.cxx index 59fbb1735..ec31a7d7b 100644 --- a/src/Main/fg_serial.cxx +++ b/src/Main/fg_serial.cxx @@ -572,7 +572,7 @@ static void send_pve_out( fgIOCHANNEL *p ) { pitch_deg -= 360; } - int heave = (int)(f->get_W_body()); + int heave = (int)(f->get_W_body()) + 128; // scale roll and pitch to output format (1 - 255) // straight && level == (128, 128) @@ -580,7 +580,7 @@ static void send_pve_out( fgIOCHANNEL *p ) { int roll = (int)( (roll_deg+180.0) * 255.0 / 360.0) + 1; int pitch = (int)( (pitch_deg+180.0) * 255.0 / 360.0) + 1; - sprintf( pve, "p%c%c\n", roll, pitch); + sprintf( pve, "p%c%c%c\n", roll, pitch, heave); FG_LOG( FG_SERIAL, FG_INFO, "roll=" << roll << " pitch=" << pitch << " heave=" << heave );