Go to Post This is a game of the mind. Size does not matter. - JohnBoucher [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 30-01-2005, 23:02
scitobor 617's Avatar
scitobor 617 scitobor 617 is offline
More nerd than you can handle!
AKA: Alan Meekins
FRC #0617 (HSHS 617 "DUKE")
Team Role: Programmer
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Richmond, VA
Posts: 153
scitobor 617 will become famous soon enoughscitobor 617 will become famous soon enough
Send a message via AIM to scitobor 617
Re: CMU cam and Linux?

Quote:
Originally Posted by Astronouth7303
The GUI requires a Windows DLL (sserial.dll) in order to run. As for not being allowed to install Java, that's just ****.

However, as it has been said before, you could easily write your own (or, if you don't mind not seeing the image, just use a terminal app). If you need a base, the source came with the app.
A quick google search turned up a Java program written specificly for use on Linux with the CMUcam. It can be found here. I have not gotten a chance to test it out with the CMUcam yet but it was written by students at CMU so I'm sure it will work. But then again I love to re-invent the wheel so I'm thinking of making a custom app! I started reading through the code in SerialComm.java and found the following...

Code:
/*
This file was a first attempt at making a cross platform
program.  This may seem strange, but this program switches
serial functions based on the OS.  Eventually I might get
around to using the java serial calls, but for now this
seems to work.
*/
Code:
String tempOs = new String( System.getProperty("os.name"));
	if(tempOs.startsWith("Windows")) os=0;
	   else
	   os=1;
	if(os==0)
	    {//Windows
		System.out.println( "Windows Detected" );
		 int error;
        	error = serialPort.openSerial(new Integer(commPort).intValue(), 5);
        
        	if (error != 0) {
            	System.err.println("Error " + error + " during openSerial()");
		JOptionPane.showMessageDialog(null,"Can't open serial port!", "Port Error", JOptionPane.ERROR_MESSAGE );	
		System.exit(0);
        	}
		serialPort.setReadTimeout(50); //Illah - make this much smaller?
        
        	System.out.println("serial port successfully opened!");     

	    }
	else
	    { // Unix Serial Init
		System.out.println( "Unix Based System Detected" );
		try{
		    sPortIn = new FileInputStream( commPort );
		    sPortOut = new FileOutputStream( commPort );
		}
		catch(Exception e){ System.out.println(e);}
	    }
This is supposed to switch serial functions when used on different OSes but it does not seem to work. The comment at the beginning of the file talks about a later version of this program using Java calls to communicate with the CMUcam. What are those calls and where can I find info on them?
__________________
Beta testers needed!
http://www.nullagent.no-ip.com

Your kidding, there are other operating systems besides Linux?!
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi