![]() |
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!!!! |
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. :)
|
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!! |
Re: Why doesn't this work??!??!!?!!!?!?
Quote:
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? |
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!!!!
|
Re: Why doesn't this work??!??!!?!!!?!?
Here are a couple of corrections.
Code:
|
Re: Why doesn't this work??!??!!?!!!?!?
YESSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!
thank you!!!!!!!!!!!!!!!!!!!!!!!!!! |
Re: Why doesn't this work??!??!!?!!!?!?
1 Attachment(s)
Quote:
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. |
Re: Why doesn't this work??!??!!?!!!?!?
Quote:
Good luck! |
Re: Why doesn't this work??!??!!?!!!?!?
Engineers are easily amused :^)
|
Re: Why doesn't this work??!??!!?!!!?!?
Quote:
|
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.
|
Re: Why doesn't this work??!??!!?!!!?!?
So similarly, Can you put 1 command across multiple lines? I mean with the compiler, not the language.
|
Re: Why doesn't this work??!??!!?!!!?!?
if it's anything like a normal C compiler, you should be able to. no guarantees, though.
|
| All times are GMT -5. The time now is 15:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi