Log in

View Full Version : Methods are not being called


rawrpenguinlion
21-01-2015, 19:23
We have what should be working code with no syntax errors, but when we deploy to the robot nothing happens. We put print statements in many methods to check if methods were being called, including RobotInit(), TeleopInit(), and TeleopPeriodic(), but nothing prints. Any advice? Thanks.

Darkseer54
21-01-2015, 19:32
Do you have WPIlib.h included? Also, are you using java or C++?

Thanks,
Zach

rawrpenguinlion
21-01-2015, 19:49
Yes, we included WPILib.h
We also use C++, not Java.
Thanks.

Darkseer54
21-01-2015, 20:07
Are you sure you installed the frc toolchain correctly? When you look in your includes folder on the left toolbar (forgot what it's called) is WPIlibrary there? Also are you having problems with the functions themselves, or just printing?

Thanks,
Zach

JefferMC
21-01-2015, 22:13
Can you confirm any aspect of your program being loaded? i.e. is the Program communication indicator on on the dashboard? Where are you looking for the text messages? Have you tried the tab in Eclipse?

Darkseer54
21-01-2015, 22:22
Sorry, I had misinterpreted your issue :o . Are you sure that you are properly deploying? Is can you enable teleop? Have you tried to drive a motor?

rawrpenguinlion
22-01-2015, 19:10
@JefferMC We have robot communications and robot code working as shown on the Driver Station with green lights.

@DarkSeer54
We are properly deploying, but are not sure about teleop being enabled, as we have print statements in teleopInit() and teleopPeriodic() that are not printing.
We look for our printed statements in the NetConsole, which has been working fine.

otherguy
22-01-2015, 23:23
Code in the teleop*() methods won't get executed until you've enabled your robot in telop mode through the driver station.

The robotInit() and disabled*() methods get executed prior to enabling the robot.

Joe Ross
23-01-2015, 01:32
We are properly deploying, but are not sure about teleop being enabled, as we have print statements in teleopInit() and teleopPeriodic() that are not printing.
Make sure you are using the correct case. teleopInit/Periodic won't ever get called. TeleopInit/Periodic is correct.
We look for our printed statements in the NetConsole, which has been working fine.

What statements do come out in NetConsole?

MamaSpoldi
24-01-2015, 12:02
If you are actually looking at the Net console as in past years you will not see anything. You need to look at the Rio log in eclipse.

Is the print statement the first line in the RobotInit function?

Joe Ross
24-01-2015, 13:06
If you are actually looking at the Net console as in past years you will not see anything. You need to look at the Rio log in eclipse.

Netconsole still works. rioLog uses the same protocol.