Go to Post I heard that the only gift UFH wants on its birthday is an inbox full of nominations. :D - Brandon Martus [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 19-01-2005, 05:46
or yaniv or yaniv is offline
Registered User
#1574
 
Join Date: Jan 2005
Location: Israel
Posts: 16
or yaniv is an unknown quantity at this point
1 Joystick Drive

From the User Default Code, in the part of one joystick drive we used
only those two lines:
Code:
pwm09 = pwm11 = Limit_Mix(2000 + p1_x + p1_y - 127);
pwm10 = pwm12 = Limit_Mix(2000 + p1_x - p1_y + 127);
We want to know the meaninig of the other lines on this part of the code.
And we want to know what the Limit_Mix function is doing?

thanks...
  #2   Spotlight this post!  
Unread 19-01-2005, 11:06
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: 1 Joystick Drive

Although i do not know what other code in the part you are talking about, I do know what LimitMax is doing.
As you can see, the number being entered into the function is well over 2000, while the maximum that can be put to the PWM is only 255. What Limit_Max is reduces the input number, and its output is limited to the 0,255 range valid for the PWMs... On my team, we just skipped this and made all numbers signed so we could just add 127 making the range from -127,127, to 0,255.. but I would not advise doing this without knowing what you are doing, you may miss something and mess up the entire code.
__________________
- from B B frank

  #3   Spotlight this post!  
Unread 19-01-2005, 14:05
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: 1 Joystick Drive

I spent most of last season fiiguring out a better way to map the one joystick to the wheel speeds. I was please with what we finally created.

I posted a thread on it last March:
http://www.chiefdelphi.com/forums/sh...t=trentonDrivehttp://www.chiefdelphi.com/forums/sh...t=trentonDrive
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #4   Spotlight this post!  
Unread 19-01-2005, 14:18
Mike Lat Mike Lat is offline
Registered User
#1241
 
Join Date: Jan 2005
Location: Ontario, Canada
Posts: 8
Mike Lat is an unknown quantity at this point
Re: 1 Joystick Drive

Do yourself a favour and don't play with limit mix. In our first year (last year) we had no idea what we did, so we removed it in some variations of the code we made...

Some of the junior programmers ended up having the robot with the wrong code (limit mixed removed, among other things). The robot went crazy almost ran over a few people.

Becareful
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
trentonDrive.c: our joystick/wheel drive code gnormhurst Programming 16 03-02-2005 14:40
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
question about one joystick drive programing james700 Programming 13 29-01-2003 14:49
1 joystick drive Rickertsen2 Robotics Education and Curriculum 9 20-12-2002 20:00
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


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

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