Skip to content. | Skip to navigation

Personal tools

remote/display.h

remote/display.h

remote/display.h

/////////////////////////////////////////////////////////////////////////////
// DISPLAY.H
//
//  Last updated: 05/12/2002
//
//  Part of the source code for the remote M3 Program
//
//  Contains routines for updating the on-screen display
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// Global variables for the blinking cursor
int Cursor = 0; 						// Flag for a blinking cursor
unsigned long CursorTimer = 0; 				// Time since last blink
int CursorBlinkRate = 200; 	// Time in milliseconds between blinks
int MaxCmdLine = 19;				// Maximum number of characters displayed on
														// the command line

// Center of Tilt Cartoon area
#define TiltX 300
#define TiltY 75

// 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
dword MainLoopTimer;
#define CycleHistorySize 100
dword CycleHistory[CycleHistorySize];
int CycleIndex = 0,CycleMax,CycleAv,OldCycleAv,OldCycleMax;

// Up arrow symbol
#define CUp 30
// Down arrow symbol
#define CDown 31
// Up/Down arrow symbol
#define CUpDown 18
// Left arrow symbol
#define CLeft 17
// Right arrow symbol
#define CRight 16
// Left/Right arrow symbol
#define CLeftRight 29

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

#define NumHelpLines 20
char HelpText[NumHelpLines][80] =
{
	"                þ M3 Program Online Help þ",
	"",
  "TAS/TBS/TCS <Volts>: Servo TiltA/B/C to desired position",
	"TILTS <Volts> <Volts> <Volts>: Servo tilts to positions",
	"TA/TB/TC <steps>: Move tilt A, B or C stepper <steps>",
	"PISTON <mm>: Tilt M3 in a piston type movement",
	"TH/TV <arcsec>: Tilt M3 horizontally/vertically",
	"SP: Toggle power to Tilt Steppers",
	"TBRK: Toggle tilt stepper brakes",
	"PVM: Toggle pres/vac control mode on/off",
	"T1: Open a terminal to COM 1 at 19.2k",
	"VERB #: Set verbose level of log to # (0=brief..2=verbose)",
	"<F1>: Display this help screen",
	"<F2>: Dump system log to a file TEMP.LOG",
	"<F3>: Dump screen to a file SCREEN.BMP",
	"<SCROLL LOCK>: Pause log",
	"Up,Down,PageUp,PageDown,Home,End: Scroll selected log",
	"Q/EXIT: Quit",
	"",
	"                * 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();

/////////////////////////////////////////////////////////////////////////////
// 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