Log in

View Full Version : removed classes from wpilib


mwtidd
09-01-2011, 20:10
I tried loading the code base from last year and noticed that there are quite a bit classes missing now. This includes things like the RobotDrive class and the DigitalInput class. I just wanted to give programmers a heads up that once you update, last years code may not work.


*and as always, remember if you plan you use last years code you MUST open source it

Garten Haeska
09-01-2011, 20:17
I tried loading the code base from last year and noticed that there are quite a bit classes missing now. This includes things like the RobotDrive class and the DigitalInput class. I just wanted to give programmers a heads up that once you update, last years code may not work.


*and as always, remember if you plan you use last years code you MUST open source it

yes i have noticed this too, it is quite strange, there will be no arcade drive this year im assuming saying thats whats missing from our code?

Slix
09-01-2011, 20:18
I tried loading the code base from last year and noticed that there are quite a bit classes missing now. This includes things like the RobotDrive class and the DigitalInput class. I just wanted to give programmers a heads up that once you update, last years code may not work.


*and as always, remember if you plan you use last years code you MUST open source it

What? That seems odd. I was looking through the C++ documentation that detailed all of the classes, and RobotDrive was included. And I'm sure it's not an outdated version because it includes the new Watchdog replacement.

http://firstforge.wpi.edu/sf/go/doc1198?nav=1

topgun
09-01-2011, 21:19
*and as always, remember if you plan you use last years code you MUST open source it

I think that MUST should read "SHOULD HAVE ALREADY open sourceD it". If you haven't already open sourced it at this point, I think you are too late. The competition started yesterday.

Maybe Chief Delphi should have an open source announcements forum just for this purpose.

imac256
10-01-2011, 01:42
Where in the rules does it talk about being allowed to use open source code? I looked through the rules and couldn't find any reference to it. I remember that last year they had a rule saying any open source code was considered COTS, but I can't find that for this year.

mwtidd
10-01-2011, 01:49
a COTS item is something you can get from a distributor and can be made available to and supplied to every team if need be
software free or not falls under this definition

AllenGregoryIV
10-01-2011, 02:09
In the first section of the manual there is a glossary that defines COTS parts. Specifically in section 1.6 COTS the note says

For the purposes of the FRC, generally available software modules obtained from open sources (e.g. professional publications, commonly used FRC community accessible web resources, industry source code repositories, etc.) that are not specifically affiliated with individual FRC teams shall be considered COTS items.

Slix
10-01-2011, 03:18
I looked at this years WPILib manual that has doxygen documentation of all the classes. I saw RobotDrive included.

mwtidd
10-01-2011, 03:56
I looked at this years WPILib manual that has doxygen documentation of all the classes. I saw RobotDrive included.

I think it's all set now. They were having issues before with having the most recent release ready. Seems to be fixed.

jhersh
11-01-2011, 02:40
yes i have noticed this too, it is quite strange, there will be no arcade drive this year im assuming saying thats whats missing from our code?

You have some other problem. None of these classes were removed.

-Joe

davidthefat
11-01-2011, 02:47
Use the following if you want arcade drive. Tank drive is easier.

Linear Arcade drive:


int m1 = 0; //Temp Variables
int m2 = 0; //Temp Variable
int x = 0; //Joystick X
int y = 0; //Joystick Y
Joystick JoyHoy = new Joystick(1);
PWM motor1 = new PWM(1);
PWM motor2 = new PWM(2);

/*
I usually declare and initialize separately like I do for C++, but for simplicity sake I didn't.
*/

while(teleop) //arbitrary while loop, its the teleop
{
Y = JoyHoy.getY();
X = JoyHoy.getX();
m1 = 127 * y + 127;
m2 = 127 * y + 127;
motor1.setRaw((int)(m1 + m1 * x));
motor2.setRaw((int)(m2 - m2 * x));
}

edit:
also regulate the PWM, as is, the code will generate invalid PWMs

thepcphysician
11-01-2011, 04:43
On the topic of WPILib changes, they changed "SetLeftRightMotorSpeeds" to "SetLeftRightMotorOutputs" without updating the documentation. Took me an hour of compiler errors before I finally looked in RobotDrive and figured that out.

jhersh
11-01-2011, 12:25
On the topic of WPILib changes, they changed "SetLeftRightMotorSpeeds" to "SetLeftRightMotorOutputs" without updating the documentation. Took me an hour of compiler errors before I finally looked in RobotDrive and figured that out.

Which document is not updated? We'll get that fixed.

thepcphysician
12-01-2011, 02:31
Page 35, WPI Robotics Library User's Guide, January 5th, 2011. Are you with WPI?

jhersh
12-01-2011, 02:48
Page 35, WPI Robotics Library User's Guide, January 5th, 2011. Are you with WPI?

No, but I'm one of the developers of WPILib for C++.

davidthefat
12-01-2011, 03:20
No, but I'm one of the developers of WPILib for C++.

Where can I learn the real low level stuff? Like PWMs. I mean low level as in the FPGA. how PWM gets generated and stuff like that.

Greg McKaskle
12-01-2011, 09:48
If you want to learn how PWM is generated, I'd start with a simple PIC or Arduino based system. The implementation isn't the same, but the concepts are.

Greg McKaskle

jhersh
12-01-2011, 13:20
Where can I learn the real low level stuff? Like PWMs. I mean low level as in the FPGA. how PWM gets generated and stuff like that.

Please don't hijack threads. This is very off topic. If you want to ask an unrelated question, please start a new thread.

Thanks,
-Joe