![]() |
Robot will not drive when using UDP in autonomous
Hello!
I've wrote UDP code to communicate with a beaglebone from the roboRIO, however when the I put on autonomous mode and the UDP is used none of the motors work, and when I change back to teleop I still can't control anything. Here is the code: Code:
public class Robot extends IterativeRobot {Code:
try {Code:
public void autonomousPeriodic() { |
Re: Robot will not drive when using UDP in autonomous
Quote:
Code:
boolean eq = ("abc" == "abc");Otherwise, use the debugger to verify that sentence contains the "a" or "b" you need. |
Re: Robot will not drive when using UDP in autonomous
From the documentation for DatagramSocket.receive():
Quote:
We have a NetworkTables build for the beaglebone on the WPILib maven server (armhf): http://first.wpi.edu/FRC/roborio/mav...NetworkTables/ Take a look at this document for more information: http://wpilib.screenstepslive.com/s/...client-pc-side |
Re: Robot will not drive when using UDP in autonomous
Quote:
|
Re: Robot will not drive when using UDP in autonomous
As it turns out, the string being sent was not just a single letter, It was a single letter with another 1023 filler characters. When I made it split up the string based on spaces the switch function worked.
Also thank you for the networking table content, I will look into setting up a seperate thread because the robot "jitters" and moves a tiny bit every time a udp packet is received! |
Re: Robot will not drive when using UDP in autonomous
The beauty of NetworkTables is that they've dealt with the threading issues for you already. If you aren't familiar with/comfortable with multithreaded programming in Java, tread carefully on the UDP route!
|
| All times are GMT -5. The time now is 13:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi