We (I) am having watchdog errors, I’m not a good programmer by any streatch of the imagination and I have more then likely butchered this code but here it is: Robot Code
The error we are getting out of the Desktop Debugger is (And also found in the root directory on github under “Console.txt”):
"
********** Robot program starting **********
Watchdog not fed within 0.020000s
Warnin g at disablePeriodic()edu: .wpi.first.wpilibj.Iterative0.001929s
RobotBase.printLoopOverrunMessage(robotPeriodic()I: terativeRobotBase.java:273)0.025554: s
Loop time of 0.02s overrun
[phoenix] Initialization is complete.
"
This could be nothing as I havent tried it on the actual roboRIO but I would like to know if its a warning we can ignore?
And again sorry for the messy code, I got thrown into it with no knowlage of Java (Still none outside of FRC) and learnt everything from a handful of YouTube videos.
Thank you in advanced - 7023
It’s a warning, not an error. If that message only appears once on startup, then it’s probably Phoenix or something taking too long to initialize. It could also just be the operating system scheduling being bad because it doesn’t use a real-time scheduler.
As long as you don’t get it repeatedly on an actual roboRIO, you’re fine. If you do, try to make sure you don’t do too much in a periodic function or block the function for long periods of time.
If you’re doing processing that routinely takes longer then 20ms, you should do it in a lower priority thread, rather then in one of the TimedRobot periodic methods.
We dont use the WPILib “tankDrive”, we use a function, could that be an issue?
(But I dont see why it would as I have used the exact same funtion to drive 2 other robots and didnt have any issue)
After looking at your source code, it’s probably from the NetworkTables and SmartDashboard stuff in robotPeriodic() taking too long. Network I/O in general is slow. Drive stuff doesn’t take nearly long enough to trigger a watchdog timeout. Also note that watchdog timeouts are unrelated to motorsafety timeouts.
SmartDashboard and NetworkTables do not block on any network operations. It’s more likely that it’s simply extra time required on the first time through the loop for Java to load classes, do some combinations of string concatenation for the first time, etc.
So its “Hey if it happens once, don’t worry about it. But if you get one every .002 seconds, worry”
And was kinda scared to post this in fear it was going to be like stacks overflow (You all know what I’m talking about)