Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Subtotaling in PBASIC? (http://www.chiefdelphi.com/forums/showthread.php?t=2225)

Greg Ross 02-02-2002 01:10

Quote:

Originally posted by Ian W.
Yay! It works! I haven't tried the Delta_T thing yet, because I'm not sure where it goes into the Serin command. If someone can tell me this, then I can make it even better, but as of now, we can use a relay with one two-pole toggle switch. Yay! :D Thanks guys! Now, who wants to tell me where the Delta_T goes into the Serin command?
Looking at the commented out serin command in the default program (the one that shows you the order in which the variables in your real serin command must be), it shows delta_t in the second to last position. So, unles you're using res01 (and I'm not sure I've ever even seen what this variable is supposed to be used for -- it's probably just reserved for future use)... unless you want to read res01 just for fun, you'll want to have delta_t at the very end of your serin command.

Joe Johnson 02-02-2002 20:06

90% sure that the +1 is needed...
 
The way my brain works is that I file things away with flags on them that might be useful someday.

This whole process is more or less a mystery to me. It is more reliable than it ought to be which is either evidence of a higher being or that some people have all the luck.

In any case... checking my mental records under "Delta_T" I found a "delta_t is misnamed, it should be called packets_missed" flag in the file.

This is why I included the information in my post.

In actual fact, I don't know if I am right now that it comes down to it. I know that I have done it for as long as I can recall, but that is no proof.

The actual implementation is due to Eric Rasmussen at FIRST. Several years ago (prior to Innovation First taking on the controller), he and I were having a conversation about how it would be nice if the Stamp2 on the robot could know something about time (more than just loop count I mean). As a result of this conversation (and perhaps 10's of others from other FIRST fanatics ;-), Eric came up with this Delta_T thing. Innovation First adopted it as a legacy bit of code. He's a very clever sheep that Eric. But I digress...

Now that it comes to it, I don't know if I am right. I THINK I am right, but perhaps not.

No manual at hand...

anybody going to help me out here?

...Please...

Joe J..

Warren Boudreau 02-02-2002 20:22

I posed this question to InnovationFIRST last year. Here is the text of their reply. It includes some information about some of those other little undocumented gremlins in the code. I hope it helps.

Warren
Text follows:
The PB_mode contains data about the enable and disable of the robot. The
last bit of the PB_mode byte, PB_mode.bit7, (aliased as comp_mode) indicates
the status of the Competition Control, either Enabled (1) or Disabled (0).
This indicates the starting and stopping of rounds at the competitions. The
remaining bits are reserved.

The packet_num varies from 0 - 255 and is incremented with each new packet.
The number is incremented 40 times per second.

The delta_t refers to missed packets. If delta_t = 0, no packets are being
missed. Thus if delta_t = 1, one packet of data was missed. Data packets
will be missed if your code takes longer than 25ms to updata(excute 1 loop).

The res01 contain info about the version number and is reserved.


All times are GMT -5. The time now is 15:42.

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