Go to Post my theory on the matter was always something along the lines of "Oh, we're all girls? What an odd thing for you to notice." - karinka13 [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 01-29-2005, 04:40 PM
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
problem with void Process_Data_From_Local_IO

ok, this has been sort of annoying, mplab says that there is a syntax error in this line void Process_Data_From_Local_IO(void) this to me makes no sense whatsoever. also, it says that there is a syntax error on the last line of the program which is completly blank. here is the problem code
Code:
 /*******************************************************************************
 * FUNCTION NAME: Process_Data_From_Local_IO
 * PURPOSE:	   Execute user's realtime code.
 * You should modify this routine by adding code which you wish to run fast.
 * It will be executed every program loop, and not wait for fresh data 
 * from the Operator Interface.
 * CALLED FROM:   main.c
 * ARGUMENTS:	 none
 * RETURNS:	   void
 *******************************************************************************/
 void Process_Data_From_Local_IO(void)
 {
 	  if (p3_sw_aux1 == 0 && p3_sw_top == 0 && p3_sw_trig == 0)
 	{
 		   auton_state = 1;
 	 }
 
 	 else if (p3_sw_aux1 == 1 && p3_sw_top == 0 && p3_sw_trig == 0)
 	{
 		auton_state = 2;
 	  }
 
 	else if (p3_sw_aux1 == 0 && p3_sw_top == 1 && p3_sw_trig == 0)
 	{
 		auton_state = 3;
 	}
 
 	  else if (p3_sw_aux1 == 0 && p3_sw_top == 0 && p3_sw_trig == 1)
 	{
 		auton_state = 4;
 	  }
 
 	  else if (p3_sw_aux1 == 1 && p3_sw_top == 1 && p3_sw_trig == 0)
 	{
 		auton_state = 5;
 	 }
   
 	else if (p3_sw_aux1 == 1 && p3_sw_top == 0 && p3_sw_trig == 1)
 	{
 		auton_state = 6;
 	}
 
 	 else if (p3_sw_aux1 == 0 && p3_sw_top == 1 && p3_sw_trig == 1)
 	{
 		auton_state = 7;
 	}
 
 	  else if (p3_sw_aux1 == 1 && p3_sw_top == 1 && p3_sw_trig == 1) 
 	{
 		auton_state = 8;
 	}
 	
 	
 }
 
 }
 
 
 /******************************************************************************/
 /******************************************************************************/
 /******************************************************************************/
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


  #2   Spotlight this post!  
Unread 01-29-2005, 04:51 PM
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,700
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: problem with void Process_Data_From_Local_IO

Quote:
Originally Posted by CmptrGk

}

}


/************************************************** ****************************/
/************************************************** ****************************/
/************************************************** ****************************/
[/code]
The first error sounds like it really occurs earlier in user_routines_fast.c. Take a look at the line(s) before this routine and look for at least 2 open brackets that don't have matching close brackets.

You have one too many closing brackets "}" in this routine, but it doesn't complain, so I'd say you have too many open brackets "{" earlier in the file. That would explain why you get an error message about "void Process_Data..."

The error message on the last line usually means the compiler cannot resolve an earlier problem (such as too many open brackets).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 01-29-2005 at 05:23 PM. Reason: open/close mixed up
  #3   Spotlight this post!  
Unread 01-29-2005, 05:14 PM
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
Re: problem with void Process_Data_From_Local_IO

thanks, i belive it was caused by a missing bracket in case 4 in the autonomus section
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


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
Programming Problem: Extremely Frustrating chantilly_team Programming 19 02-12-2005 11:00 PM
Physics Problem Venkatesh Math and Science 13 11-30-2004 08:30 PM
heres the code. y this not working omega Programming 16 03-31-2004 03:18 PM
The problem with scouting... archiver 2001 10 06-23-2002 11:49 PM
Major problem with chipphua motors aka Scott White Motors 18 03-19-2002 07:44 PM


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

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