Go to Post a robot can always be your girl. xcept for the fact you need to share - greencactus3 [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 05-04-2006, 16:24
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Critique this code

I cannot connect to the server you hosted your code on, I don't know if it's my end or yours, but any suggestions?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #2   Spotlight this post!  
Unread 05-04-2006, 16:28
Jeff Rodriguez Jeff Rodriguez is offline
Too young to be an 'old guy'
FRC #0155 (Technonuts)
Team Role: Teacher
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Newington, CT
Posts: 1,943
Jeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond reputeJeff Rodriguez has a reputation beyond repute
Send a message via AIM to Jeff Rodriguez Send a message via Yahoo to Jeff Rodriguez
Re: Critique this code

Quote:
Originally Posted by Matt Krass
I cannot connect to the server you hosted your code on, I don't know if it's my end or yours, but any suggestions?
I can't get there just fine. Must be on your end.
__________________
173, student: 1999-2002
173, mentor: 2005-2010
155, teacher: 2011-
  #3   Spotlight this post!  
Unread 05-04-2006, 17:46
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Critique this code

Definitely odd, is it a new server perhaps? Maybe my DNS hasn't updated, could somebody resolve the IP and send it to me?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #4   Spotlight this post!  
Unread 05-04-2006, 18:47
sur2124 sur2124 is offline
Registered User
FRC #0116
 
Join Date: Apr 2005
Location: herndon, Va
Posts: 6
sur2124 is an unknown quantity at this point
Re: Critique this code

I could get there just fine, the code is a little unorganized, can you formatt it(it would help alot).
  #5   Spotlight this post!  
Unread 05-04-2006, 23:10
Ben Englert Ben Englert is offline
Registered User
FRC #1072
 
Join Date: Jan 2006
Location: San Jose CA
Posts: 40
Ben Englert has a spectacular aura aboutBen Englert has a spectacular aura aboutBen Englert has a spectacular aura about
Re: Critique this code

Quote:
Originally Posted by sur2124
I could get there just fine, the code is a little unorganized, can you formatt it(it would help alot).
Elaborate... what do you mean by format it?
__________________
Before a match at SVR, 3/17/06
Tatsu: "Yo Englert, what's our autonomous mode?"
Me: "We'll find out, won't we."
Both: *maniacal laughter*
After the match's autonomous period ends:
Me: "Well, the basic control system still responds. That's always good."
Both: *further laughter*
  #6   Spotlight this post!  
Unread 05-04-2006, 23:20
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,186
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: Critique this code

Why did you use integer math in control_system.c and floating point in drive_control.c. All assignments are being dropped into int variables, so multiplying by 1.30 is just going to put extra strain on the processor to just get the same answer.

Try
Code:
targetticks = (percentage * 26) /20;
Yay for math by multiples of 2.

Another general question for all of the PIC gurus out there.. which would be more efficient, if there is any difference?
Code:
targetticks = (percentage * 26) /20;

or...

targetticks = (percentage * 13) /10;
  #7   Spotlight this post!  
Unread 06-04-2006, 00:29
Ben Englert Ben Englert is offline
Registered User
FRC #1072
 
Join Date: Jan 2006
Location: San Jose CA
Posts: 40
Ben Englert has a spectacular aura aboutBen Englert has a spectacular aura aboutBen Englert has a spectacular aura about
Re: Critique this code

Quote:
Originally Posted by Tom Bottiglieri
Why did you use integer math in control_system.c and floating point in drive_control.c. All assignments are being dropped into int variables, so multiplying by 1.30 is just going to put extra strain on the processor to just get the same answer.

Try
Code:
targetticks = (percentage * 26) /20;
That's something I've always wondered... people say that doing floating point math really does stretch the PIC to the edge of its capacity, but I haven't had any problems with it, even when it is handling a lot of interrupts from encoders etc. Is there an easy way to tell how much load it's under?
__________________
Before a match at SVR, 3/17/06
Tatsu: "Yo Englert, what's our autonomous mode?"
Me: "We'll find out, won't we."
Both: *maniacal laughter*
After the match's autonomous period ends:
Me: "Well, the basic control system still responds. That's always good."
Both: *further laughter*
  #8   Spotlight this post!  
Unread 05-04-2006, 19:26
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: Critique this code

Quote:
Originally Posted by Matt Krass
Definitely odd, is it a new server perhaps? Maybe my DNS hasn't updated, could somebody resolve the IP and send it to me?
Try 75.2.172.223
__________________

  #9   Spotlight this post!  
Unread 05-04-2006, 23:50
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Critique this code

Quote:
Originally Posted by Ryan M.
Try 75.2.172.223
Still can't connect. Argh! Can somebody email me the file?

Email is my CD username, no spaces all lower case, and it's a gmail.com account.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Problem with idata_user_routines.o? Adrien Programming 3 12-02-2006 01:33
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
Sourceforge for Code Repository and other stuff SilverStar Programming 9 15-01-2005 21:16
heres the code. y this not working omega Programming 16 31-03-2004 15:18


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

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