Skip to content

Commit e4ef3d6

Browse files
author
Jason Kridner
committed
Update connection status and links
1 parent 1da3249 commit e4ef3d6

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

Docs/testconn.htm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
function onconnect() {
1414
console.log("Connected to " + host);
15-
$("div#status").html("<em>Active</em>");
15+
$("div#status").html('<a href="http://' + host + '" class="external"><em>Active</em></a>");
16+
if(typeof parent.foundBone == "function") parent.foundBone(host);
1617
}
1718

1819
var host = get('host');

START.htm

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@
109109
<script type="text/javascript" src="Docs/bonescript.js"></script>
110110
<script>
111111
var step1done = false;
112-
var connected6 = false;
113-
var connected7 = false;
114-
var connected8 = false;
115-
var connectedLocal = false;
116112
var testedOnce = false;
117113
$(document).ready(function(){
118114
testForCompletedSteps();
@@ -132,26 +128,16 @@
132128
ga('send', 'event', 'bonescript', 'plugged-in', 'getting-started');
133129
}
134130
}
135-
if(!connected6) tryConnection('192.168.6.2');
136-
if(!connected7) tryConnection('192.168.7.2');
137-
if(!connected8) tryConnection('192.168.8.1');
138-
if(!connectedLocal) tryConnection('beaglebone.local');
139-
// what if there's already a connection?
140131
}
141-
function tryConnection(address) {
142-
return;
143-
setTargetAddress('192.168.7.2', function () {
144-
if(typeof _bonescript != 'undefined') {
145-
step1done = true;
146-
$('#fmStep1').addClass('fmGreen');
147-
$('#fmStep2').addClass('fmGreen');
148-
if(typeof ga == "function") {
149-
ga('send', 'event', 'bonescript', 'connected7', 'getting-started');
150-
}
151-
} else {
152-
failedConnect('192.168.7.2');
153-
}
154-
});
132+
133+
function foundBone(host) {
134+
console.log("Found BeagleBone at " + host);
135+
step1done = true;
136+
$('#fmStep1').addClass('fmGreen');
137+
$('#fmStep2').addClass('fmGreen');
138+
if(typeof ga == "function") {
139+
ga('send', 'event', 'bonescript', 'connected7', 'getting-started');
140+
}
155141
}
156142
</script>
157143
</head>

0 commit comments

Comments
 (0)