[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

RE: FODTRACK PWB's (Interest survey)



Maggie

> Actually, my understanding was there is a FODtrack board, and a FODtrack
> program, with the program being MS-dependent, but the board is not. I
> was thinking about FODtrack drivers for SstTrack and PREDICT (how hard
> could this be? :-) ) but need to lay my hands on the hardware first.

You're absolutely right: I knocked up the following 20 liner so I could
Telnet in from my mobile phone and set the Az & El when 180' up on the roof.
This was written for W2K/NT but should easily port to other environments
with header file and port I/O functions altered. It's also hard coded for a
printer port at 0x3BC, so you may need to change that to 0x378 or 0x278.

#include <windows.h>
#include "dlportio.h"
#include <stdio.h>

void main(int nArgs,char *apszArgs[])
{
	unsigned char ucAz;
	unsigned char ucEl;
	unsigned short usPort=0x3BC;

	if (nArgs!=3)
	{
		fprintf(stderr,"Usage: fodtrknt <az> <el>\n");
		return;
	}

	ucAz=(unsigned char)((atol(apszArgs[1]) * 256L) / 360L);
	ucEl=(unsigned char)((atol(apszArgs[2]) * 256L) / 180L);

	DlPortWritePortUchar(usPort+2,2);
	DlPortWritePortUchar(usPort,ucAz);
	DlPortWritePortUchar(usPort+2,3);
	DlPortWritePortUchar(usPort+2,2);

	DlPortWritePortUchar(usPort+2,0);
	DlPortWritePortUchar(usPort,ucEl);
	DlPortWritePortUchar(usPort+2,1);
	DlPortWritePortUchar(usPort+2,0);
}

73 Howard G6LVB

----
Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org



AMSAT Top AMSAT Home