|
109 | 109 | <script type="text/javascript" src="Docs/bonescript.js"></script>
|
110 | 110 | <script>
|
111 | 111 | var step1done = false;
|
112 |
| -var connected6 = false; |
113 |
| -var connected7 = false; |
114 |
| -var connected8 = false; |
115 |
| -var connectedLocal = false; |
116 | 112 | var testedOnce = false;
|
117 | 113 | $(document).ready(function(){
|
118 | 114 | testForCompletedSteps();
|
|
132 | 128 | ga('send', 'event', 'bonescript', 'plugged-in', 'getting-started');
|
133 | 129 | }
|
134 | 130 | }
|
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? |
140 | 131 | }
|
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 | + } |
155 | 141 | }
|
156 | 142 | </script>
|
157 | 143 | </head>
|
|
0 commit comments