Go to Post Be civil in all things and you will get far. - Wetzel [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 04-03-2004, 14:58
HuskieRobotics HuskieRobotics is offline
Registered User
#1352
 
Join Date: Feb 2004
Location: Stratford NorthWestern
Posts: 34
HuskieRobotics has a little shameless behaviour in the past
Exclamation Why doesn't this work??!??!!?!!!?!?

I am using the following code to make our robot follow the line but it won't build and i was wondering if anyone could help me out cuz i am frantic...

void User_Autonomous_Code(void)
{
while (autonomous_mode)
{
if (statusflag.NEW_SPI_DATA)
{
Getdata(&rxdata); // bad things will happen if you move or delete this

// Autonomous code goes here.
digital_io_1 = 1;
if(rc_dig_1 ==1 )
{
pwm13 = 137 pwm14=100;
{
else
{
pwm13 = pwm14 = 140;
}
if(rc_dig_2 == 1)
{
pwm13 = 100 pwm = 137;
}
else
{
pwm13 = pwm14 = 140;
}

Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

Putdata(&txdata); // even more bad things will happen if you mess with this
}
}
}



Thanks!!!!
  #2   Spotlight this post!  
Unread 04-03-2004, 15:11
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: Why doesn't this work??!??!!?!!!?!?

Could you copy the output from the failed build here? I think your problem is missing a few closing brackets, but it's hard to tell. The output should make it very easy to solve.
__________________

  #3   Spotlight this post!  
Unread 04-03-2004, 15:12
HuskieRobotics HuskieRobotics is offline
Registered User
#1352
 
Join Date: Feb 2004
Location: Stratford NorthWestern
Posts: 34
HuskieRobotics has a little shameless behaviour in the past
Exclamation Re: Why doesn't this work??!??!!?!!!?!?

sure can here it is:

Deleting intermediary files... done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "ifi_startup.c" -fo="ifi_startup.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "ifi_utilities.c" -fo="ifi_utilities.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "main.c" -fo="main.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "printf_lib.c" -fo="printf_lib.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "receiver.c" -fo="receiver.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "tracker.c" -fo="tracker.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "user_routines.c" -fo="user_routines.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "user_routines_fast.c" -fo="user_routines_fast.o" /i"C:\MCC18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
H:\Working on it\Robot\frc_tracker\user_routines_fast.c:201:Erro r: syntax error
Halting build on first failure as requested.
BUILD FAILED: Thu Mar 04 15:15:45 2004

hope that it will help you to help me!!
  #4   Spotlight this post!  
Unread 04-03-2004, 15:12
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Why doesn't this work??!??!!?!!!?!?

Quote:
Originally Posted by HuskieRobotics
I am using the following code to make our robot follow the line but it won't build and i was wondering if anyone could help me out cuz i am frantic...
[...]
Thanks!!!!
First, use the [code] tag.
At line 14, use } instead of { (I asume that was a copy error).
Where is the error? double click it in the build window to see. (line 22, probably)

If you're using the yellow Banner sensors, what wire are you connecting to the FRC? And, compared to the line, are far apart are they?
  #5   Spotlight this post!  
Unread 04-03-2004, 15:16
HuskieRobotics HuskieRobotics is offline
Registered User
#1352
 
Join Date: Feb 2004
Location: Stratford NorthWestern
Posts: 34
HuskieRobotics has a little shameless behaviour in the past
Exclamation Re: Why doesn't this work??!??!!?!!!?!?

That was not the error because when i fixed it i still get the same error and i do not know where the error is but i wish that i did!!!!
  #6   Spotlight this post!  
Unread 04-03-2004, 15:17
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,851
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Why doesn't this work??!??!!?!!!?!?

Here are a couple of corrections.
Code:
 
void User_Autonomous_Code(void)
{
	while (autonomous_mode)
	{
		if (statusflag.NEW_SPI_DATA)
		{
			Getdata(&rxdata); // bad things will happen if you move or delete this
 
			// Autonomous code goes here.
//		 digital_io_1 = 1; /* Belongs in User_Initialization */
			if(rc_dig_in01 ==1 )
				 {
				pwm13 = 137;
				pwm14=100;
				 }
			else
				{
				pwm13 = pwm14 = 140;
				}
			if(rc_dig_in02 == 1)
				{
				pwm13 = 100;
				pwm14 = 137;
				}
			else
				{
				pwm13 = pwm14 = 140;
				}
 
			Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
 
			Putdata(&txdata); // even more bad things will happen if you mess with this
		}
	}
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-03-2004 at 15:20.
  #7   Spotlight this post!  
Unread 04-03-2004, 15:21
HuskieRobotics HuskieRobotics is offline
Registered User
#1352
 
Join Date: Feb 2004
Location: Stratford NorthWestern
Posts: 34
HuskieRobotics has a little shameless behaviour in the past
Cool Re: Why doesn't this work??!??!!?!!!?!?

YESSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!
thank you!!!!!!!!!!!!!!!!!!!!!!!!!!
  #8   Spotlight this post!  
Unread 04-03-2004, 15:26
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Why doesn't this work??!??!!?!!!?!?

Quote:
Originally Posted by HuskieRobotics
That was not the error because when i fixed it i still get the same error and i do not know where the error is but i wish that i did!!!!
Sorry, I'm slow!

Which one? line 14 or 22? and what is it now? (or 13? I just found that)

Also, see the pic for what I mean.
Attached Thumbnails
Click image for larger version

Name:	HuskieRobotics.png
Views:	43
Size:	35.3 KB
ID:	1943  
  #9   Spotlight this post!  
Unread 04-03-2004, 15:27
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,851
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Why doesn't this work??!??!!?!!!?!?

Quote:
Originally Posted by HuskieRobotics
YESSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!
thank you!!!!!!!!!!!!!!!!!!!!!!!!!!
Some people are just so easy to please

Good luck!
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #10   Spotlight this post!  
Unread 04-03-2004, 15:42
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Why doesn't this work??!??!!?!!!?!?

Engineers are easily amused :^)
  #11   Spotlight this post!  
Unread 04-03-2004, 15:45
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,851
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Why doesn't this work??!??!!?!!!?!?

Quote:
Originally Posted by KenWittlief
Engineers are easily amused :^)
Simple minds, simple pleasures
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #12   Spotlight this post!  
Unread 04-03-2004, 19:09
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Why doesn't this work??!??!!?!!!?!?

note - you can put multiple commands on the same line if you want - just make sure you still have a semicolon after each command, just as you would if they were on separate lines. semicolons are not line separators, they are instruction separators.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #13   Spotlight this post!  
Unread 04-03-2004, 19:23
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Why doesn't this work??!??!!?!!!?!?

So similarly, Can you put 1 command across multiple lines? I mean with the compiler, not the language.
  #14   Spotlight this post!  
Unread 05-03-2004, 00:20
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Why doesn't this work??!??!!?!!!?!?

if it's anything like a normal C compiler, you should be able to. no guarantees, though.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
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
3D Studio Max won't work David the bomb 3D Animation and Competition 3 03-03-2004 17:12
Problems of the mind... effecting work Gadget470 Chit-Chat 20 18-11-2003 11:56
Edit doesn't work on original title posts??? Elgin Clock CD Forum Support 6 12-03-2003 17:30
Who knows how the motors [I]really[/I] work? Wetzel Chit-Chat 5 13-02-2002 21:50
Does anyone on this board work at home depot? mnkysp6353 General Forum 2 30-12-2001 13:27


All times are GMT -5. The time now is 10:18.

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