Thread: PBasic Question
View Single Post
  #7   Spotlight this post!  
Unread 31-10-2002, 14:45
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


I get most of it, but I am confused by this line:


if ((gear_shifting=1) and (gear_count=10)) then shift


do you have to press the top button of your joystick 10 times to shift?

My best guess for the code is you have to press the top button to shift gears which will stop both drive motors while the shift takes place, they increment a counter for a delay (gear_count) when it increments to 10 the shift takes place (relay lowGear toggles) when gear_count hits 40 it looks like the section gets skipped over

BUt I am not sure where gear_shifting ever gets reset back to zero after the first initialization.?