Skip to content. | Skip to navigation

Personal tools

display.h

display.h

display.h

/////////////////////////////////////////////////////////////////////////////
// DISPLAY.H
//
//  Last updated: 4/7/2004
//
//  Part of the source code for the Vane End Actuator Control System
//
//  Contains routines for updating the on-screen display
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// Global variables for the blinking cursor
int Cursor = 0; 						// Flag for a blinking cursor
int CursorTimer = 0; 				// Time since last blink
int CursorBlinkRate = 200; 	// Time in milliseconds between blinks

// Global variables for time and elapsed time
double et,oldet; // Elapsed time since program startup
double maxdword = 4294967295.0;
struct time t,oldt; // t is used to display the time

// Global variables for main loop cycle rate
// MainLoopTimer measures how many milliseconds pass during each
// cycle of the main loop.
// This is used to measure the speed of the program
int MainLoopTimer;
#define CycleHistorySize 1000
int CycleHistory[CycleHistorySize];
int CycleIndex = 0,CycleMax,CycleAv,OldCycleAv,OldCycleMax;

// Display reference points
// Bottom left y coordinate of Vane End boxes
int vbby = 113;
// Top left, bottom right y coordinates of Intrument Rotator box
int ibty = 114;
int ibby = 290;
// Top left, bottom right y coordinates of Fatal Flags box
int fbty = 114;
int fbby = 305;
// Top left, bottom right y coordinates of Cass-M3 position box
int cbty = 305;
int cbby = 367;
// Top left, bottom right y coordinates of Mirror Support box
int sbty = 291;
int sbby = 367;
// Top left y coordinate of Input log and Messages log boxes
int lby = 368;

/////////////////////////////////////////////////////////////////////////////
// Warning ranges
int EncoderWarningRange = 100;
	// Distance to soft limits (microns) that changes encoder display yellow
float TensionWarningRange = 200;
	// Distance to soft limits (pounds) that changes tension display yellow

/////////////////////////////////////////////////////////////////////////////
// Online help

#define NumHelpLines 29
char HelpText[NumHelpLines][80] =
{
	"X #,Y #,Z #,H # or V #: Single axis global move (# = new coordinate)",
	"G <x#> <y#> <z#> <h#> <v#>: Global move (each # is a coordinate)",
	"DX #,DY #,DZ #,DH # or DV #: Single axis relative move",
	"DG <x#> <y#> <z#> <h#> <v#>: Global relative move",
	"IR <motor #1-4> <dist>: Individual radial motor movement (dist at encoder)",
	"IA <motor #1-4> <dist>: Individual axial motor movement (dist at encoder)",
	"A <dist>: Adjust all vane tensions (0=no tension,2000=5000 lbs or so",
	"HOME: Perform a homing operation",
	"P: Toggle tension display between pounds and mV",
	"R: Reset all status/fatal flags",
	"TR: Terminal with radial DMC;           TA: Terminal with axial DMC",
	"TD/T3: Terminal with DGHs/at 300;       TI: Terminal with IRs",
	"TP/TV <corner #1-4> <1=on,0=off>: Turn pressure/vacuum at corner # on/off",
	"TE <corner #1-8> Toggle tension enabled, corner 1-4=axial, 5-8=radial",
	"W: Write current encoder readings as the new zero point to VANE.INI",
	"VERB n: Set verbose level to n (0=least info, 3=most info)",
	"Instrument Rotator commands: NASW/NASE/AUX1/AUX2/AUX3/CASS <cmds>",
  "<cmds>: BRAKE/HOME/ENABLE/DISABLE/DISPLAY/GOA/GOR <deg>/VEL <deg/sec>/STOP",
  "        JOG <deg/sec>/POWER/RESET",
	"        ACC n/DEC n/SPD n/P n/I n/D n: Set motion parameter to n",
  "        GOS <deg> <deg/dec>: Speed servo tracking of position and velocity",
  "Instrument Rotator display: ERROR <scale>/VEL <scale>/VOLT <scale>",
	"Q/EXIT: Quit",
	"<ESC>: Emergency halt of all movement;  !: Halt current movement (gently)",
	"<F1>: Display this help screen",
	"<F2>: Dump running log to a file named TEMP.LOG",
	"<F3>: Dump screen to a file SCREEN.BMP",
	"Up,Down,PageUp,PageDown,Home,End: Scroll log; <SCROLL LOCK>: Pause log",
	"                      * Hit <SPACE> key to exit *"
};

/////////////////////////////////////////////////////////////////////////////
// CmdLine - display a string on the command line
void CmdLine(char *data);
// Displays the string in data on the command line.

/////////////////////////////////////////////////////////////////////////////
// UpdateCursor - Make the cursor blink when it's supposed to.
void UpdateCursor(char *data);

/////////////////////////////////////////////////////////////////////////////
// UpdateTime - Update the onscreen UT and ET times
void UpdateTime(int UpdateAll);
// Pass a 1 in UpdateAll to display every digit,
// otherwise UpdateTime will only display digits that have changed

/////////////////////////////////////////////////////////////////////////////
// InitDisplay - Draw the intial screen (all windows, static text, etc.
void InitDisplay();

/////////////////////////////////////////////////////////////////////////////
// DisplayHelp - Display a list of all keyboard commands
void DisplayHelp();

/////////////////////////////////////////////////////////////////////////////
// DisplayScales
void DisplayScales();
// Display instrument rotator chart scales

/////////////////////////////////////////////////////////////////////////////
// ScreenDump - Copy the screen image to the file SCREEN.BMP
void ScreenDump();
// Copies the screen to the Windows BMP file SCREEN.BMP


Generated by GNU Enscript 1.6.5.2.
Document Actions