|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
You know, I just thought of something else. IBM has this cool technology called Sash that I've read about. It basically uses simple languages like JavaScript and HTML to create what they call a "Weblication" which is really a full fledged program. A description from the IBM site:
Quote:
It's all free, BTW. |
|
#32
|
||||
|
||||
|
Okay, let me clarify the design of our dashboard program a little bit.
The key element that we want to have is style and visual apeal. Now, since refresh rate isn't that important, we decided to make the display in Flash. The problem is that Flash only does scripting - not any real programming. It's designed for the web, not real programming. As I see it, the only way to get Flash to read the info from the Dashboard is to use the import data options in Flash. Flash has two ways to inport data. One is to read from a text file, and the other is to get it in through a server-side script - php, asp, cgi, etc. (remember, flash was designed for the internet, not programming). To get it from a server-side script, I suppose the best way would be to make it read from a database. However, 1. we don't know how to access databases in C/C++. and 2. even if we could, I'd think that having the C++ store the info in a database, then have flash request the info from a php page several times a second is a bit slower than the alternative. The second way flash imports data is by a text file. We decided the fastest way would be to have the C++ proggie running in the background and constantly rewriting the text file while the flash proggie reads the data and displays it in style. Yes, we realize this isn't the most efficient way, but again, our priority is style over refresh rate. The goal of this proggie is more of something that shows off to potential sponsors or visitors what we can do - not something for debuging the robot like StangSense (which is something I'd definately like to learn more about some other time). We did consider that this would be very inefficient. However, to test just how inefficient it was, Ian and I created two small test proggies. The C++ one basically wrote to the text file one variable in an infinite loop, and the flash displayed it. Using just one variable and no additional calculations, the refresh rate is still better than we expected - easily about 10 times per second. I'm not sure how the additional calculations (both decoding the data sent in and the calculations required in the display proggie) will affect speed, but it should be good enough for our purposes. |
|
#33
|
||||
|
||||
|
Quote:
|
|
#34
|
||||||
|
||||||
|
Quote:
As for having the serial port and file open, it should work. Using regular fstreams, you can have as many files open as you want--no limits as far as I know. Same thing with Windows handles. |
|
#35
|
||||
|
||||
|
ok thanks. only one more problem then. how can i moniter the keyboard without stopping every loop cycle? i know about cin and fin (fstream). that's all. both stop until data is put in and the 'enter' key is hit. that wouldn't do. there must be some way around this, anyone know how? cause if that works, then the program will actually work better than i expected
![]() |
|
#36
|
||||
|
||||
|
Quote:
I'm not trying to imply that your design isn't good or won't work. It's actually a pretty common way to pass data around. I was just trying to help think of ways that you can improve the throughput without sacrificing the visual effectiveness of the project. It sounds like you've done the appropriate testing and are confident that this solution will work, so best of luck and keep us posted! Also, I wrote a program that spits out fake Dashboard port data for use in testing our Palm app for StangSense. Ian mentioned that you are losing access to your robot after this weekend, so maybe this could help. I could probably revive that and you could then hook two PCs together and have one pretend to be the operator interface if that would help... You also might be able to hook a PC up to the Operator Interface and just capture the Dashboard data to a file using Hyperterminal which you could then play back to the other PC. We never got that to work for us (hence the program to generate Dashboard data) but maybe you'd have better luck. |
|
#37
|
||||
|
||||
|
yes, a program like that would be great. i just wish i could take home the extra OI/RC and some joysticks... it's not like i'd break it. heck, i carried a school laptop around at all the competitions. it still works, sorta
. |
|
#38
|
||||
|
||||
|
also, i'm going to look into that sash thing. seems interesting, so i'll try it over the summer. heck, if i can figure it out, i might just start over. never hurts to do something twice.
|
|
#39
|
||||
|
||||
|
Quote:
![]() |
|
#40
|
||||||
|
||||||
|
I'll have to check that Sash stuff out too...
Anyway, if you can't get that to work, try the VC++ resource editors. They are simple to use and allow you to create powerful MFC-based programs even if you don't know MFC (sounds impossible, but its true). Also, if you're looking to learn real Windowing/Messaging/GUI stuff this summer, and you want to do it for Windows, I'd recomend you find a copy of Charle's Petzold's Programming Windows. It's a GIANT 1400 page book and is far and away the best one on the Windows API that I have ever read (and it presents it in such a way that you will be able to make the switch to MFC fairly easily later on). Anyway, that was my summer reading last year, and it's what I used to write my RoboGUI program. Anyway, if you need any real-time help, I'll be on ICQ for the rest of the night while I work on some of my programming projects. #152894206. |
|
#41
|
||||
|
||||
|
[edit]
i figured out my problem, so no need to show my stupidity ![]() [/edit] Last edited by Ian W. : 06-06-2002 at 22:23. |
|
#42
|
||||
|
||||
|
Nerd Vandalism
![]() |
|
#43
|
||||
|
||||
|
That's pretty cool! [Except for the defacing other people's property thing...] This one's my favorite:
![]() Last edited by Dave Flowerday : 07-06-2002 at 00:24. |
|
#44
|
|||
|
|||
|
Quote:
|
|
#45
|
||||
|
||||
|
Quote:
![]() I got the picture in an email, and I think the billboard was somewhere in England. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Win32 serial port - recieve buffer | seanwitte | Programming | 4 | 05-11-2003 21:41 |
| White Paper Discuss: FIRST Editor v1.2 | CD47-Bot | Extra Discussion | 1 | 18-09-2003 19:32 |
| How to communicate both through radio and serial port? | JC Denton | Programming | 1 | 08-02-2003 23:43 |
| Ever seen this serial port problem before??? | Aidan F. Browne | Programming | 5 | 05-02-2003 12:03 |
| serial communication using c++ | Malakili | Programming | 31 | 01-05-2002 15:51 |