1
0
Fork 0

Clean up headers and lower verbosity.

This commit is contained in:
curt 2004-02-12 20:28:19 +00:00
parent b8ac668719
commit 6dd88738e4
5 changed files with 62 additions and 18 deletions

View file

@ -1,4 +1,16 @@
#!/usr/bin/perl #!/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"; require "telnet.pl";
@ -82,6 +94,13 @@ sub set_elevator {
&set_prop( $fgfs, "/controls/flight/elevator", $pos_norm ); &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 { sub set_rudder {
my( $fgfs ) = shift; my( $fgfs ) = shift;
my( $pos_norm ) = shift; my( $pos_norm ) = shift;

View file

@ -1,4 +1,17 @@
#!/usr/bin/perl #!/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"; require "telnet.pl";

View file

@ -1,4 +1,17 @@
#!/usr/bin/perl #!/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"; require "telnet.pl";
@ -41,7 +54,7 @@ sub set_env_layer {
foreach $prop ( keys(%HASH) ) { foreach $prop ( keys(%HASH) ) {
$value = $HASH{$prop}; $value = $HASH{$prop};
print "setting $prop = $value\n"; # print "setting $prop = $value\n";
&set_prop( $fgfs, $prop, $value ); &set_prop( $fgfs, $prop, $value );
} }
} }
@ -88,7 +101,7 @@ sub set_pressure {
foreach $prop ( keys(%HASH) ) { foreach $prop ( keys(%HASH) ) {
$value = $HASH{$prop}; $value = $HASH{$prop};
print "setting $prop = $value\n"; # print "setting $prop = $value\n";
&set_prop( $fgfs, $prop, $value ); &set_prop( $fgfs, $prop, $value );
} }
} }
@ -112,7 +125,7 @@ sub set_cloud_layer {
foreach $prop ( keys(%HASH) ) { foreach $prop ( keys(%HASH) ) {
$value = $HASH{$prop}; $value = $HASH{$prop};
print "setting $prop = $value\n"; # print "setting $prop = $value\n";
&set_prop( $fgfs, $prop, $value ); &set_prop( $fgfs, $prop, $value );
} }
} }

View file

@ -24,20 +24,6 @@ my( $tmp_dir ) = "/tmp";
my( $field_index ) = 0; 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 { sub clear_logging {
my( $fgfs ) = shift; my( $fgfs ) = shift;
@ -69,7 +55,7 @@ sub add_field {
# spaces seem to not work well. # spaces seem to not work well.
$title =~ s/ /\_/g; $title =~ s/ /\_/g;
print "$title - $prop\n"; # print "$title - $prop\n";
&set_prop( $fgfs, &set_prop( $fgfs,
"/logging/log[$lognum]/entry[$field_index]/title", $title ); "/logging/log[$lognum]/entry[$field_index]/title", $title );
&set_prop( $fgfs, &set_prop( $fgfs,

View file

@ -1,4 +1,17 @@
#!/usr/bin/perl #!/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"; require "telnet.pl";