Go to Post A robot that does 60% of the tasks 100% of the time is better than a robot that does 100% of the tasks 60% of the time. - artdutra04 [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-10-2004, 16:47
Bob16 Bob16 is offline
Registered User
#1355 (Iron Stallions)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Wingham
Posts: 3
Bob16 is an unknown quantity at this point
Desensitizing Joysticks

We are trying to desensitize our joysticks and we know what to add to the code but we don't know where to add it. Whether to add it to User Routines Fast or User Routines. Where do we add it.
  #2   Spotlight this post!  
Unread 12-10-2004, 16:54
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Desensitizing Joysticks

Whenever you want to do processing on operator input (filtering, desensitizing, delta-coding, etc.), it makes the most sense to do it only when new values are available. I would definitely put it in user_routines.c, in the Process_Data_From_Master_uP() function.
  #3   Spotlight this post!  
Unread 12-10-2004, 17:24
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,188
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Desensitizing Joysticks

Quote:
Originally Posted by Alan Anderson
Whenever you want to do processing on operator input (filtering, desensitizing, delta-coding, etc.), it makes the most sense to do it only when new values are available. I would definitely put it in user_routines.c, in the Process_Data_From_Master_uP() function.
What i would do is make a function that adjusts the value of the joystick depending on the input..
Code:
unsigned char Dead_Band(unsigned char input_value)
{
	unsigned char Output = 127;
	if (input_value < Dead_Band_Forward)
	{
		if(input_value > Dead_Band_Reverse)
		{
			Output = 127;
		}
		else
		{	
		Output = input_value;
		}
	}
	else if(input_value > Dead_Band_Forward)
	{	
	Output = input_value;
	}

	return Output;
}
Then i would use that in the user_routines.c file under the Default_Routine() function as your output value to whatever PWM you want it to output in.

Code:
void Default_Routine(void)..........

pwm01 = Dead_Band(p1_y);
pwm02 = Dead_Band(p2_y);
  #4   Spotlight this post!  
Unread 12-10-2004, 17:44
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Desensitizing Joysticks

I know you said you already solved the coding part, but this thread extensively covers this topic.

Edit:
If you want to take a look at the low pass filter I mention, PM me. The version in the papers contains a slight bug. (Well, ok, it's fatal... but only if you push the joystick all the way forward. )
__________________


Last edited by Ryan M. : 12-10-2004 at 17:46.
Closed Thread


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
need joysticks! Tom Bottiglieri General Forum 14 24-02-2004 09:36
AVB joysticks..and other analogue joysticks tml240 Kit & Additional Hardware 6 07-02-2004 12:45
Other joysticks tml240 Programming 8 05-02-2004 15:09
number of joysticks doy Rules/Strategy 5 01-02-2004 00:05
Calibrating speed controllers and joysticks thedillybar Technical Discussion 4 11-02-2002 13:24


All times are GMT -5. The time now is 03:11.

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