Go to Post We figured it out. - benjiengi [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
  #2   Spotlight this post!  
Unread 06-02-2008, 21:17
eaglesfan10's Avatar
eaglesfan10 eaglesfan10 is offline
Registered User
FRC #1647 (Iron Devils)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2005
Location: New Jersey
Posts: 19
eaglesfan10 is an unknown quantity at this point
Re: button control

You could set a flag and use a counter. It would probably look something like this:
static int flag = 0;
static int counter = 0;

if(button_pressed)
{
flag = 1;
}

if(flag && counter < some_number)
{
//your code
}
else
{
flag = 0;
counter = 0;
}
counter++;
I'm probably missing something, but that's the general idea. I think there are about 40 loop counts in one second.
 


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
XBOX button fondyfire12 Programming 8 25-05-2007 15:39
button programming joesmomh00haha Programming 12 10-02-2007 10:36
Sarcasm Button Jessica Boucher CD Forum Support 3 19-03-2006 16:02
Button Making PureMachine4 Rumor Mill 58 16-04-2004 16:00
Button Bar Adrian Wong CD Forum Support 8 04-06-2001 20:27


All times are GMT -5. The time now is 19:12.

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