]> defiant.homedns.org Git - ros_wild_thumper.git/commitdiff
www: properly set image hostname
authorErik Andresen <erik@vontaene.de>
Sun, 17 May 2020 10:33:12 +0000 (12:33 +0200)
committerErik Andresen <erik@vontaene.de>
Sun, 17 May 2020 10:33:12 +0000 (12:33 +0200)
www/assets/javascripts/application.js
www/index.html

index 7a87c12532d0fbb8bafc74d1cfa05702f5d29a0c..1a61324e4492bf7744c2e88b3112582eafc6dabf 100644 (file)
@@ -240,6 +240,7 @@ function init() {
        });
 
        $("input[type='number']").spinner();
+       $("#usb_cam").attr("src", "http://"+robothostname+":8080/stream?topic=/camera/color/image_raw");
 }
 
 Vue.component('input-value', {
index db7e48d8b2adcea71f0090abeeabbac4aa82a76a..15e2aed484069c100bcae030a87fd390722b5d00 100644 (file)
@@ -22,7 +22,7 @@
                <script src="assets/javascripts/vue.js"></script>
                <script src="assets/javascripts/application.js"></script>
                <script type="text/javascript">
-                       robothostname="wildthumper"
+                       const robothostname="wildthumper"
                </script>
 
                <title>Wild Thumper control</title>
                                        </div>
                                </div>
                                <div id="image" class="tab-pane" role="tabpanel">
-                                       <img id="usb_cam" src="http://"+robothostname+":8080/stream?topic=/usb_cam/image_raw" style="transform:rotate(-90deg); transform-origin: 60% 60%;"></img>
+                                       <img id="usb_cam" src=""></img>
                                </div>
                        </div>
                </div>