View Single Post
  #29   Spotlight this post!  
Unread 02-01-2007, 15:33
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: Visual C++ 2005 Designer

Quote:
Originally Posted by esquared View Post
That while loop is waiting until there is at least 1 byte received, then it fails the conditional and packs the two bytes into a 16 bit variable. It's just a "smart" waiting function.

Although on further inspection it might be a good idea to ensure the while loop waits to get 2 bytes instead of just 1, since you end up using 2 bytes of data. That way you don't accidentally skip a byte if you ReadByte() twice before the second byte you assume is there hasn't shown up. Thats the fun of events that are asynchronous
Good point

The problem is it fails when i call in the other forms from the main:

main->...anything!!! (only when the pic is sending some data over the serial port to the computer, otherwise it runs fine. And I think it only happens in this function)

comes up with: Object reference not set to an instance of an object

I will try to get some more info.

Quote:
Originally Posted by fowlerm
This question has nothing to do with debugging the app, but is this designed to be connected to the RC's serial port or the dashboard port on the OI?
It is going to be use full duplex communication on the RC's Program port. The computer is supposed to have full control of the robot, including the hardware(but we will see how far this goes)


The dashboard is quite limiting in that you have reprogram your robot if you want to display different values. This should in theory allow you access any previously programed( and not removed) variables on the fly. The RC doesn't flood the program with all the stuff at the same time(wasting its processor time too). Rather when you change something in any column the Application send the RC which new variables to send to the App.
Attached Thumbnails
Click image for larger version

Name:	GUI_mod.JPG
Views:	48
Size:	54.0 KB
ID:	4799  

Last edited by 6600gt : 02-01-2007 at 15:49.