Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Dashboard? (http://www.chiefdelphi.com/forums/showthread.php?t=21278)

Brandon Martus 11-07-2003 19:26

Quote:

Originally posted by Ian W.
<EDIT> Sorry about the lack of spacing, but I can't think of any other way to make it space correctly</EDIT>
use the [code ][/code ] tags.

dez250 11-07-2003 20:31

Ian great job with the code, that will be very useful to some of us and its nice to know someone on here can spit out code that works and is willing to share it...
~Mike

P.S~That post was not meant to be flaming anyone

rbayer 12-07-2003 01:04

First off, excellent idea. One thing that many people don't seem to know is that there is a variable called OUTH that is byte-sized and includes out8-out15. With it, you can clean up the code a lot, so that all you need is:

SELECT p3_wheel/16
CASE 0 to 15: outh=pwm1
case 16 to 31: outh=pwm2
...
ENDSELECT

FotoPlasma 12-07-2003 01:25

Hmm. Could you mux it like this?

Code:

var counter byte
counter = 0

mainloop:

select ( counter // 5 )
case 0:  outh = 255
case 1:  outh = pwm1
case 2:  outh = pwm2
case 3:  outh = pwm3
case 4:  outh = pwm4
endselect

counter = counter + 1

goto mainloop

Considering that the RC runs at ~40Hz, if you output four PWM values, along with a sync value (might be unnecessary), you'd get ~8 output values per second.

I have never written a dashboard program, so I don't know the intricacies of doing this kind of thing. Sorry. Just a random thought.

Ian W. 12-07-2003 09:15

i've tried stuff like this, but i never got it to actually work 100% of the time. i think it has something to do with the serial port or the PBASIC chip, but i was never able to find the problem, as i kinda gave up after a while. i based my "counter" off the BasicRun LED, which toggled between 0 and 1 every loop, so i think it may have gone too fast, or slow, or something, for it to properly sync with the computer. if anyone wants to see my 2002 dashboard program (simple C/C++ console app), i'm more than willing to post it, but it doesn't work.

rob, thanks for the tip with OUTH, i never knew it existed till now, although it may or may not be important next year.

brandon, would it be that hard to add a tag button, or are we just so close to vB3 now that it doesn't pay to go and edit the vB2 code (the latter, i hope :p)?

rbayer 12-07-2003 11:51

Quote:

Originally posted by Ian W.

brandon, would it be that hard to add a tag button, or are we just so close to vB3 now that it doesn't pay to go and edit the vB2 code (the latter, i hope :p)?

It's already there, but for some reason it's labeled #. Anybody have any idea why this is?

dez250 12-07-2003 18:46

Now i am really glad i am not the programmer for team 250...
~Mike

P.S., Thanks for the outh code, that will help is some other pbasic programing I'm doing on boebots...

Matt Leese 14-07-2003 08:37

Quote:

Originally posted by Tytus Gerrish
firestorm dosent work. WHY?
That's really not the most descriptive error report I've ever seen. Perhaps if you gave me some more information I might be able to help you (given I haven't looked at the code in about 4 years).

Matt


All times are GMT -5. The time now is 20:00.

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