View unanswered posts | View active topics It is currently Sun Dec 21, 2014 12:33 pm






Reply to topic  [ 6 posts ] 
Rookie Team in need of help 
Author Message
Rookie

Joined: Thu Feb 20, 2014 11:23 pm
Posts: 2
Post Rookie Team in need of help
Code was working but now it is not. Cannot get the errors window back. (x-ed out to get it out of the way, cant get it back)

Robot set up- NXT-A-spinning attachment, NXT B & C- Drive motors, TETRIX D and E connected to S1- arm and spinning attachment.

Our Code

#pragma config(Motor, mtr_S1_C2_1, , tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C2_2, , tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C1_1, motorD, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C1_2, motorE, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C2_1, motorF, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C2_2, motorG, tmotorTetrix, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//


task main()

{
while(true)
{
getJoystickSettings(joystick); // Update Buttons and Joysticks
**Error**:Undefined procedure 'getJoystickSettings'.
**Error**:Undefined variable 'joystick'. 'short' assumed.

if(joy1Btn(0) == 1) // If Joy1-Button1 is pressed:
**Error**:Undefined procedure 'joy1Btn'.
{
motor[motorE] = 100; // Turn Motor E On at full power
}
else // If Joy1-Button1 is NOT pressed:
{
motor[motorE] = 0;
}
if(joy1Btn(3) == 1)
{
motor[motorD] = -75;
}
else
{
motor[motorD] = 0;
}
if(joy1Btn(4) == 1)
{
motor[motorA] = 100;
}
else
{
motor[motorA] = 0;
{
motor[motorB] = joystick.joy1_y1;
**Error**:'joystick' is not a reference to a 'struct'
**Error**:Expected->';'. Found 'joy1_y1'
*Warning*:Meaningless statement -- no code generated
motor[motorC] = joystick.joy1_y2;
**Error**:'joystick' is not a reference to a 'struct'
**Error**:Expected->';'. Found 'joy1_y2'
*Warning*:Meaningless statement -- no code generated
}
}
}
}

Any help is appreciated, not sure what some of these errors mean or how to fix them


Thu Feb 20, 2014 11:31 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1371
Post Re: Rookie Team in need of help
Where is your line that includes the joystick driver?
Code:
#include "JoystickDriver.c"


Fri Feb 21, 2014 4:29 am
Profile
Rookie

Joined: Thu Feb 20, 2014 11:23 pm
Posts: 2
Post Re: Rookie Team in need of help
Thanks for that. It is included now between the #pragma lines and taskmain()

Still having the same errors though


Fri Feb 21, 2014 10:38 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1371
Post Re: Rookie Team in need of help
SystemOverload wrote:
Thanks for that. It is included now between the #pragma lines and taskmain()

Still having the same errors though

If you included JoystickDriver.c, that should get rid of all the joystick related errors. Would you post all the error messages you get now? Are you sure all the messages are the same as before? If the joystick errors are not gone, the only explanation I have is that RobotC couldn't find JoystickDriver.c, in which case you should have another new message saying fail to include JoystickDriver.c. In that case, there is either a typo in the include line or the include path in the Configuration is wrong.


Fri Feb 21, 2014 3:16 pm
Profile
Rookie

Joined: Fri Feb 21, 2014 5:16 pm
Posts: 8
Post Re: Rookie Team in need of help
Try this. There was a problem in the #pragmas and a reversed bracket. I fixed them and threw in some indentation for good measure. To get the error window back, just get rid of a semi-colon somewhere and try to compile the program.


Attachments:
Revised code.c [1.15 KiB]
Downloaded 114 times

_________________
Vincent Bensch FTC #6806 Ratchet Robotics
Fri Feb 21, 2014 7:29 pm
Profile
Rookie

Joined: Fri Dec 19, 2014 2:13 pm
Posts: 1
Post Re: Rookie Team in need of help
So my RobotC, version 3.62 which is up to date, will start perfectly fine at school and at my house. Unfortunately at the last tournament for FTC I was at, since I was not connected to wifi it would show a window and then just not respond. I have tested this in other places with my internet off getting the same results. I restarted my computer, turned off the splash screen and auto checking for updates and it still runs into this problem. The only way to have it work offline is to start it when I'm online and then it's fine so I'm assuming it's something with the start up. Does anyone have some ideas as to what might be wrong and how to fix it? Thanks!

_________________
aliiiiii


Fri Dec 19, 2014 2:29 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.