Softpaq Solution:  SP0993
File Name:      CHARGE.COM
Title:  A program that reports battery voltage as a DOS ERRORLEVEL
	on a Contura Aero.

_____________________________________________________________________


CATEGORY:  Utility program

EFFECTIVITY DATE:  October 31, 1994

PRODUCTS AFFECTED:  Contura Aero

OPERATING SYSTEM:  MS-DOS 2.0 or greater

SYSTEM CONFIGURATION:

	MS-DOS on a Contura Aero running on battery power.

SUPERCEDES:  na

DESCRIPTION:

	CHARGE.COM is a program that reports a Contura Aero's battery voltage 
	both on the screen and as a DOS ERRORLEVEL.  

HOW TO USE:

	1.  Copy the program CHARGE.COM to the hard disk.

	2.  If used in a batch file, edit the batch file and add a line 
	    similar to:
		C:\YOURPATH\CHARGE X

	3.  See SAMPLE PROGRAM OUTPUT section below for complete details.

CHARGE will report current battery voltage and wait for either a 
change in battery voltage or a keystroke.  If a keystroke occurs that 
is an ESCape, the program terminates with errorlevel set to the last 
battery level.  If a non ESCape keystroke occurs the current battery 
level is displayed.  Between keystrokes, each change of battery level 
is reported to the screen.

CHARGE.COM exits with DOS errorlevel set to 
		0 if run on any non-Aero machine.
		1 if run on an Aero AC power 
		else errorlevel = battery level as last displayed on screen
			lowest observed number is errorlevel 129 
			highest observed number is errorlevel 166

All input and output is done via DOS calls so input and output piping 
is available.  



SAMPLE PROGRAM OUTPUT:

This program reads current battery voltage in Contura Aero, displays it on the
screen, optionally continues to display any changes until the user presses the
ESCape key and then terminates with the DOS ERRORLEVEL set to the last battery
voltage reading.  The readings are not actual VOLTAGE, but follow this scale: 
	A fully charged system will return a value of around 166, dropping
	quickly in a few minutes to 160, slowing to 144 over the next hour, 
	depending on load ...
		at 143 the top "dot" on the battery gauge (Fn+F8) goes out ...
		at 142 the top 2 "dots" on the battery gauge go out ...
		at 141 down through 136 the top 3 "dots" go out ...
		at 135 down through 131 the top 4 "dots" go out ...
		at 130 LowBatt 1 beep is heard ...
		... and soon LowBatt 2 occurs
	The amount of time it takes to change from one value to the next 
	will vary greatly depending on factors such as hard drive and modem 
	activity, power conservation settings, battery type and age, 
	temperature, etc.

To run the program in a batch file, use any character other than 
a minus character as a command line parameter such as:
      C:\YOURPATH\CHARGE X

To suppress this message, use a minus character as a parameter such as:
      C:\YOURPATH\CHARGE -
or
      C:\YOURPATH\CHARGE - X
to suppress the message and terminate immediately.