|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#91
|
|||
|
|||
|
Re: Android Driver Station
Quote:
It was because the timing on sending the packets was off, it has to be exactly 0.02 seconds. |
|
#92
|
||||
|
||||
|
Re: Android Driver Station
Thanks for the information, I'll try to fix this.
|
|
#93
|
||||
|
||||
|
Re: Android Driver Station
I got the video to work, I used dmaciel10123's idea to get it to work, it may not be very fast, I have no idea how it will work since I have only tested it on an emulator. Feedback is appreciated.
|
|
#94
|
|||
|
|||
|
Re: Android Driver Station
I submitted a pull request that should make it easier to allow people to work on your code. It adds a .gitignore file that ignores the Eclipse build directory and auto-generated files. This makes it so only changes to code and other important files actually show up in the commit so people do not need to merge in a bunch of minor changes each time you push to the repo.
I hope you consider this. Thanks, Ben. |
|
#95
|
|||
|
|||
|
Re: Android Driver Station
This is sweet! Thanks.
Installed successfully on Samsung Galaxy SIII running Android 4.3 and on a Motorola Xoom tablet running Android 4.1.2. Next step, get access to our robot! |
|
#96
|
||||
|
||||
|
Re: Android Driver Station
Now that the iOS app is out, maybe work with them and see how they got features working? You guys are competing in different markets, so collaboration would help a lot. They've gotten video working on their end, apparently. Gonna have some team members pick up the app (our school is 1:1 tech on iPads) and see what they think.
|
|
#97
|
||||
|
||||
|
Re: Android Driver Station
This thread is quite dead. Ray's GitHub seems to be taken down as well.
In any case, I used this app with my Nvidia Shield and it's built in Gamepad Mapper this weekend at a carnival we were at this weekend, and drove around one of our stripped down chassis. I was also able to hand off the Shield to other people and let them drive, like the kid in this video. |
|
#98
|
|||
|
|||
|
Re: Android Driver Station
Quote:
The GitHub is still up, it's just at a different repo now. https://github.com/raystubbs/Andrid-FRC-Driverstation |
|
#99
|
||||
|
||||
|
Re: Android Driver Station
Quote:
|
|
#100
|
|||
|
|||
|
Re: Android Driver Station
Quote:
|
|
#101
|
|||
|
|||
|
Re: Android Driver Station
Quote:
Just load the html file into a string and replace {jquery} with the contents of a jquery library file and also replace {te} and {am} with teamNum / 100, teamNum % 100, and also replace width and height with the web views width and height and wallah! Code:
<html>
<head>
<script type="text/javascript">{jquery}</script>
<script type="text/javascript">
var timeout;
$(function() {
$("#errordiv").click(reload);
$("#stream").click(reload);
reload();
});
function reload()
{
$("#error").text("Loading Camera...");
$("#stream").attr("src", "http://10.{te}.{am}.11/mjpg/video.mjpg?resolution=640x480&fps=30");
timeout = setTimeout(function() {
//Cam did not load
$("#error").html("Error Loading Camera<br/>Tap to Refresh");
$("#stream").css({"display":"none"});
$("#errordiv").css({"display":"block"});
}, 4000);
$("#stream").load(function() {
$("#stream").css({"display":"block"});
$("#errordiv").css({"display":"none"});
clearTimeout(timeout);
}).error(function() {
$("#error").html("Error Loading Camera<br/>Tap to Refresh");
$("#stream").css({"display":"none"});
$("#errordiv").css({"display":"block"});
clearTimeout(timeout);
});
}
</script>
</head>
<body style="padding: 0; margin: 0;">
<div id="errordiv" style="display: none; background: lightgray; height: 100%; text-align: center;">
<label id="error" style="position: relative; top: 40%;">Tap to refresh camera</label>
</div>
<img id="stream" width="{width}" height="{height}"/>
</body>
</html>
|
|
#102
|
||||
|
||||
|
Tried the app out tonight, I am able to connect and enable, but since we are set up for cheesy drive, and not tank, I can only go forward and backward. And after about a minute the connection turns off and I loose connection.
|
|
#103
|
|||
|
|||
|
Re: Android Driver Station
After connecting to the Robot wifi and launching the app, does the app handle everything necessary with IP addresses (in other words, should it just work out of the box like that?)
|
|
#104
|
||||
|
||||
|
Re: Android Driver Station
We've had to go in through Android's Wi-Fi settings and set the static IP ourselves.
|
|
#105
|
||||
|
||||
|
Re: Android Driver Station
Sorry for all the problems, some of them may have been caused by bandwidth taken by the video, which I haven't tested. I only have a kindle fire to test with and it worked perfect before I added the video code. I'm not in the U.S right now and don't have access to any robots. I will try to buy another device by the beginning of the school year, so I'll be able to debug for another device.
Reminder: This is an open source project, a pretty easy project, and my first android app. So anyone interested in trying their hand at android development this would be a good place to start. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|