Go to Post When mentors and students battle it's the team that loses. - Koko Ed [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
  #1   Spotlight this post!  
Unread 17-01-2007, 13:12
DylanRoss DylanRoss is offline
Registered User
FRC #1987
 
Join Date: Jan 2007
Location: Lee's Summit, MO
Posts: 4
DylanRoss is an unknown quantity at this point
Axes in Default Code?

Hi, I've been looking over the 2007 default code and making adjustments where necessary; however, I've encountered something that doesn't seem right to me. Under the one-joystick drive section, I see this code:

p1_x = 255 - p1_y;
p1_y = 255 - pwm05;

pwm13 = pwm14 = Limit_Mix(2000 + p1_y + p1_x - 127);
pwm15 = pwm16 = Limit_Mix(2000 + p1_y - p1_x + 127);


I haven't actually downloaded the code to the robot, but it seems like the first two lines would switch the X and Y axes. I made a simple program that allowed me to input joystick values and it gave me the right/left drive values, and it gave me the backwards output I expected. It seems to me like removing those first two lines should solve the problem. Is this normal? Are the axes switched? Should I go ahead and remove those two lines?


Thanks,
Dylan
 


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
Modified default code gives "code violation" scottmso Programming 8 10-02-2006 23:17
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
user code to default code phoenixomega001 Programming 5 09-01-2005 00:09
Inserting Naviagation code into Default code? actorindp Programming 3 28-01-2004 18:12
default code archiver 2001 2 23-06-2002 22:53


All times are GMT -5. The time now is 01:24.

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