From 94d4bbdd094c08b4beb4749efb3e258edea78a6d Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 29 Sep 1998 02:01:31 +0000 Subject: [PATCH] Added a brake. --- Controls/controls.c | 26 +++++++++++++++++++++++--- Controls/controls.h | 12 +++++++++--- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Controls/controls.c b/Controls/controls.c index 4745ffa97..386b5a58a 100644 --- a/Controls/controls.c +++ b/Controls/controls.c @@ -45,6 +45,7 @@ void fgControlsInit( void ) { FG_Throttle[i] = 0.0; } + FG_Brake_Amt = 0.0; } @@ -169,11 +170,30 @@ void fgThrottleSet(int engine, double pos) { } +double fgBrakeGet( void ) { + fgCONTROLS *c; + c = current_aircraft.controls; + + return FG_Brake_Amt; +} + + +void fgBrakeSet( double brake_amt ) { + fgCONTROLS *c; + c = current_aircraft.controls; + + FG_Brake_Amt = brake_amt; +} + + /* $Log$ -/* Revision 1.7 1998/02/07 15:29:36 curt -/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss -/* +/* Revision 1.8 1998/09/29 02:01:31 curt +/* Added a brake. /* + * Revision 1.7 1998/02/07 15:29:36 curt + * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss + * + * * Revision 1.6 1998/01/19 19:27:02 curt * Merged in make system changes from Bob Kuehne * This should simplify things tremendously. diff --git a/Controls/controls.h b/Controls/controls.h index b5009cdcb..ea2d6438c 100644 --- a/Controls/controls.h +++ b/Controls/controls.h @@ -44,6 +44,7 @@ typedef struct { double elevator_trim; double rudder; double throttle[FG_MAX_ENGINES]; + double brake_amt; } fgCONTROLS, *pfgControls; @@ -53,6 +54,7 @@ typedef struct { #define FG_Throttle c->throttle #define FG_Throttle_All -1 #define FG_Elev_Trim c->elevator_trim +#define FG_Brake_Amt c->brake_amt /* #define Left_button cockpit_.left_pb_on_stick @@ -81,7 +83,8 @@ void fgRudderMove(double amt); void fgRudderSet(double pos); void fgThrottleMove(int engine, double amt); void fgThrottleSet(int engine, double pos); - +void fgBrakeSet( double brake_amt ); +double fgBrakeGet( void ); #ifdef __cplusplus } @@ -92,9 +95,12 @@ void fgThrottleSet(int engine, double pos); /* $Log$ -/* Revision 1.15 1998/04/25 22:06:27 curt -/* Edited cvs log messages in source files ... bad bad bad! +/* Revision 1.16 1998/09/29 02:01:32 curt +/* Added a brake. /* + * Revision 1.15 1998/04/25 22:06:27 curt + * Edited cvs log messages in source files ... bad bad bad! + * * Revision 1.14 1998/04/22 13:26:19 curt * C++ - ifing the code a bit. * -- 2.39.2