From 6dd88738e435adedbc0ee5eb4e1a4d0c43f97644 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 12 Feb 2004 20:28:19 +0000 Subject: [PATCH] Clean up headers and lower verbosity. --- scripts/perl/examples/aircraft.pl | 19 +++++++++++++++++++ scripts/perl/examples/autopilot.pl | 13 +++++++++++++ scripts/perl/examples/environment.pl | 19 ++++++++++++++++--- scripts/perl/examples/logging.pl | 16 +--------------- scripts/perl/examples/position.pl | 13 +++++++++++++ 5 files changed, 62 insertions(+), 18 deletions(-) diff --git a/scripts/perl/examples/aircraft.pl b/scripts/perl/examples/aircraft.pl index 41703bfcf..6a0936304 100755 --- a/scripts/perl/examples/aircraft.pl +++ b/scripts/perl/examples/aircraft.pl @@ -1,4 +1,16 @@ #!/usr/bin/perl +# +# aircraft.pl - Handle aircraft functions +# +# Written by Curtis L. Olson, started January 2004 +# +# Copyright (C) 2004 Curtis L. Olson - curt@flightgear.org +# +# This code is placed in the public domain by Curtis L. Olson. +# There is no warranty, etc. etc. etc. +# +# $Id$ +# ---------------------------------------------------------------------------- require "telnet.pl"; @@ -82,6 +94,13 @@ sub set_elevator { &set_prop( $fgfs, "/controls/flight/elevator", $pos_norm ); } +sub set_elevator_trim { + my( $fgfs ) = shift; + my( $pos_norm ) = shift; + + &set_prop( $fgfs, "/controls/flight/elevator-trim", $pos_norm ); +} + sub set_rudder { my( $fgfs ) = shift; my( $pos_norm ) = shift; diff --git a/scripts/perl/examples/autopilot.pl b/scripts/perl/examples/autopilot.pl index 0c28a147e..53da47d05 100755 --- a/scripts/perl/examples/autopilot.pl +++ b/scripts/perl/examples/autopilot.pl @@ -1,4 +1,17 @@ #!/usr/bin/perl +# +# autopilot.pl - Handle autopilot functions +# +# Written by Curtis L. Olson, started January 2004 +# +# Copyright (C) 2004 Curtis L. Olson - curt@flightgear.org +# +# This code is placed in the public domain by Curtis L. Olson. +# There is no warranty, etc. etc. etc. +# +# $Id$ +# ---------------------------------------------------------------------------- + require "telnet.pl"; diff --git a/scripts/perl/examples/environment.pl b/scripts/perl/examples/environment.pl index 8837c5410..d7a567f34 100755 --- a/scripts/perl/examples/environment.pl +++ b/scripts/perl/examples/environment.pl @@ -1,4 +1,17 @@ #!/usr/bin/perl +# +# environment.pl - Handle environment setup +# +# Written by Curtis L. Olson, started January 2004 +# +# Copyright (C) 2004 Curtis L. Olson - curt@flightgear.org +# +# This code is placed in the public domain by Curtis L. Olson. +# There is no warranty, etc. etc. etc. +# +# $Id$ +# ---------------------------------------------------------------------------- + require "telnet.pl"; @@ -41,7 +54,7 @@ sub set_env_layer { foreach $prop ( keys(%HASH) ) { $value = $HASH{$prop}; - print "setting $prop = $value\n"; + # print "setting $prop = $value\n"; &set_prop( $fgfs, $prop, $value ); } } @@ -88,7 +101,7 @@ sub set_pressure { foreach $prop ( keys(%HASH) ) { $value = $HASH{$prop}; - print "setting $prop = $value\n"; + # print "setting $prop = $value\n"; &set_prop( $fgfs, $prop, $value ); } } @@ -112,7 +125,7 @@ sub set_cloud_layer { foreach $prop ( keys(%HASH) ) { $value = $HASH{$prop}; - print "setting $prop = $value\n"; + # print "setting $prop = $value\n"; &set_prop( $fgfs, $prop, $value ); } } diff --git a/scripts/perl/examples/logging.pl b/scripts/perl/examples/logging.pl index c65528ad1..50bc421d9 100755 --- a/scripts/perl/examples/logging.pl +++ b/scripts/perl/examples/logging.pl @@ -24,20 +24,6 @@ my( $tmp_dir ) = "/tmp"; my( $field_index ) = 0; -# my( $page ); -# my( $server, $port, $timeout ); -# my( $last_plot_image ) = ""; -# my( $image_handle ); -# my( $junk ); -# my( @PLOTFIELDS ); -# my( $field_choice ); -# my( $plot_field ); - -# my( $home ) = $ENV{"HOME"}; -# my( $log_dir ) = "$home/ATC/data"; -# my( $log_file ) = "$log_dir/default.txt"; -# my( $plot_file ) = $log_file; - sub clear_logging { my( $fgfs ) = shift; @@ -69,7 +55,7 @@ sub add_field { # spaces seem to not work well. $title =~ s/ /\_/g; - print "$title - $prop\n"; + # print "$title - $prop\n"; &set_prop( $fgfs, "/logging/log[$lognum]/entry[$field_index]/title", $title ); &set_prop( $fgfs, diff --git a/scripts/perl/examples/position.pl b/scripts/perl/examples/position.pl index c94e04a43..fb006e02b 100755 --- a/scripts/perl/examples/position.pl +++ b/scripts/perl/examples/position.pl @@ -1,4 +1,17 @@ #!/usr/bin/perl +# +# position.pl - Handle repositioning aircraft (in air/on ground) +# +# Written by Curtis L. Olson, started January 2004 +# +# Copyright (C) 2004 Curtis L. Olson - curt@flightgear.org +# +# This code is placed in the public domain by Curtis L. Olson. +# There is no warranty, etc. etc. etc. +# +# $Id$ +# ---------------------------------------------------------------------------- + require "telnet.pl"; -- 2.39.5