Go to Post This tee-shirt collecting gets kind of addicting, doesn't it? - Chief Hedgehog [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
  #11   Spotlight this post!  
Unread 31-10-2002, 15:20
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
Quote:
Originally posted by f22flyboy
startShift:
leftDrive=127
rightDrive=127
gear_shifting=1
gear_count=0




also what is this here for?

p1_sw_top_prev=p1_sw_top

I see that it sets p1_sw_top_prev=0 but why not just say that?
As for time, it will depend on the program length and the number of processor 'slots' you are using. The longer the program scan, the slower the delay will be.

Gear Count =0 will set up a fresh delay since it increments to 40 and stops incrementing until the next time a gear shift is requested. Gear Count would be at 40 coming into that statement

p1_sw_top_prev=p1_sw_top
this type of statement is useful for storing the value of the switch on the previous scan and checking the current state against what you had before to see if a change has taken place, kind of a 1-shot since after the current scan they will both agree again
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC Syntax Question Raven_Writer Programming 4 20-08-2003 08:07
Question Obtaining Pbasic 2.5 PyroPhin Programming 3 18-01-2003 01:26
pbasic question Mike375 Programming 14 15-01-2003 06:54
pbasic question archiver 2001 5 23-06-2002 23:50
Another PBASIC Question Ian W. Programming 4 31-01-2002 21:36


All times are GMT -5. The time now is 04:22.

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