Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Coding for Mecanum problems (http://www.chiefdelphi.com/forums/showthread.php?t=125293)

xXhunter47Xx 26-01-2014 15:46

Coding for Mecanum problems
 
We've started with a commandbasedrobot template created using RobotBuilder from WPILib for Mecanum drive and exported to windriver.


The problem is that we are trying to call the jaguars within Windriver in drivewithjoystick.cpp but it won't compile correctly.
Is there something wrong with our RobotBuilder template that isn't allowing us to do so?

EDIT: Please move to programming

ArchosR4 26-01-2014 15:55

In robot builder have you set the drivewithjoysticks command to require your joystick

xXhunter47Xx 26-01-2014 16:32

Re: Coding for Mecanum problems
 
It won't allow us to require any controllers in the OI.

SoftwareBug2.0 26-01-2014 21:11

Re: Coding for Mecanum problems
 
Could you supply the compiler's output?

xXhunter47Xx 26-01-2014 22:34

Re: Coding for Mecanum problems
 
We've gotten rid of all the non auto generated code so I'm afraid I can't do that.

Joe Ross 26-01-2014 23:03

Re: Coding for Mecanum problems
 
Quote:

Originally Posted by xXhunter47Xx (Post 1332775)
The problem is that we are trying to call the jaguars within Windriver in drivewithjoystick.cpp but it won't compile correctly.
Is there something wrong with our RobotBuilder template that isn't allowing us to do so

It's not a good practice to have a command directly access a piece of hardware, so RobotBuilder doesn't make the hardware public. Rather, you should create a public method of your subsystem that safely accesses the hardware, and then call those methods from your command.

SoftwareBug2.0 26-01-2014 23:04

Re: Coding for Mecanum problems
 
How can you tell that it won't compile correctly when you don't have any compiler output?

xXhunter47Xx 27-01-2014 13:16

Re: Coding for Mecanum problems
 
So it didn't compile correctly because the output told us that there was something wrong, but since the creation of this thread I've gotten rid of all non auto generated code. So now it compiles correctly but there's nothing that we have modified.


All times are GMT -5. The time now is 17:28.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi