Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Methods are not being called (http://www.chiefdelphi.com/forums/showthread.php?t=133306)

rawrpenguinlion 21-01-2015 19:23

Methods are not being called
 
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

Re: Methods are not being called
 
Do you have WPIlib.h included? Also, are you using java or C++?

Thanks,
Zach

rawrpenguinlion 21-01-2015 19:49

Re: Methods are not being called
 
Yes, we included WPILib.h
We also use C++, not Java.
Thanks.

Darkseer54 21-01-2015 20:07

Re: Methods are not being called
 
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

Re: Methods are not being called
 
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

Re: Methods are not being called
 
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

Re: Methods are not being called
 
@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

Re: Methods are not being called
 
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

Re: Methods are not being called
 
Quote:

Originally Posted by rawrpenguinlion (Post 1432380)
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.
Quote:

Originally Posted by rawrpenguinlion (Post 1432380)
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

Re: Methods are not being called
 
Quote:

Originally Posted by MamaSpoldi (Post 1433216)
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.


All times are GMT -5. The time now is 02:39.

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