FlightGear next
ATC-Inputs.cxx File Reference
#include <simgear/compiler.h>
#include <errno.h>
#include <cmath>
#include <cstdio>
#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props_io.hxx>
#include <Main/fg_props.hxx>
#include "ATC-Inputs.hxx"

Go to the source code of this file.

Functions

static void ATCReadAnalogInputs (int fd, unsigned char *analog_in_bytes)
 
static void ATCReadRadios (int fd, unsigned char *switch_data)
 
static void ATCReadSwitches (int fd, unsigned char *switch_bytes)
 
static double scale (int center, int deadband, int min, int max, int value)
 
static double scale (int min, int max, int value)
 
static double clamp (double min, double max, double value)
 
static int tony_magic (int raw, int obs[3])
 
static double instr_pot_filter (double ave, double val)
 
static void update_switch_matrix (int board, unsigned char switch_data[16], int switch_matrix[2][8][16])
 

Function Documentation

◆ ATCReadAnalogInputs()

static void ATCReadAnalogInputs ( int fd,
unsigned char * analog_in_bytes )
static

Definition at line 74 of file ATC-Inputs.cxx.

◆ ATCReadRadios()

static void ATCReadRadios ( int fd,
unsigned char * switch_data )
static

Definition at line 89 of file ATC-Inputs.cxx.

◆ ATCReadSwitches()

static void ATCReadSwitches ( int fd,
unsigned char * switch_bytes )
static

Definition at line 104 of file ATC-Inputs.cxx.

◆ clamp()

static double clamp ( double min,
double max,
double value )
static

Definition at line 269 of file ATC-Inputs.cxx.

◆ instr_pot_filter()

static double instr_pot_filter ( double ave,
double val )
static

Definition at line 381 of file ATC-Inputs.cxx.

◆ scale() [1/2]

static double scale ( int center,
int deadband,
int min,
int max,
int value )
static

Definition at line 227 of file ATC-Inputs.cxx.

◆ scale() [2/2]

static double scale ( int min,
int max,
int value )
static

Definition at line 252 of file ATC-Inputs.cxx.

◆ tony_magic()

static int tony_magic ( int raw,
int obs[3] )
static

Definition at line 281 of file ATC-Inputs.cxx.

◆ update_switch_matrix()

static void update_switch_matrix ( int board,
unsigned char switch_data[16],
int switch_matrix[2][8][16] )
static

Definition at line 650 of file ATC-Inputs.cxx.