Skip to content

Commit a27286c

Browse files
committed
remove all possibile hard links to 8080 port wip #79
1 parent 329112d commit a27286c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

camera.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class Camera(object):
4848

4949
_instance = None
5050
_img_template = image.Image.load("coderdojo-logo.png")
51-
stream_port = 8080
5251

5352
@classmethod
5453
def get_instance(cls):

main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ def get_locale():
8484

8585
@app.route("/")
8686
def handle_home():
87-
stream_port = cam.stream_port if cam else ""
8887
return render_template('main.html',
8988
host=request.host[:request.host.find(':')],
90-
stream_port=stream_port,
9189
locale=get_locale(),
9290
config=app.bot_config,
9391
program_level=app.bot_config.get("prog_level", "std"),
@@ -113,7 +111,7 @@ def handle_wifi():
113111
if mode == "ap":
114112
return "http://coder.bot:8080"
115113
else:
116-
return "http://coderbot.locali:8080"
114+
return "http://coderbot.local:8080"
117115

118116
@app.route("/update", methods=["GET"])
119117
def handle_update():

templates/config_params.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
var CODERBOT_MOV_TR_DEF_ELAPSE={{config.move_tr_elapse}};
66
var CODERBOT_PROG_MOVE_MOTION="{{config.prog_move_motion}}"=="yes";
77
var CODERBOT_PROG_MOVE_MPU="{{config.prog_move_mpu}}"=="yes";
8-
var CODERBOT_STREAM_URL="http://{{host}}:{{stream_port}}/stream"
98
var CODERBOT_PROG_LEVEL="{{config.prog_level}}";
109
var CODERBOT_PROG_SCROLLBARS="{{config.prog_scrollbars}}"=="true";
1110
var CODERBOT_PROG_MAXBLOCKS={{config.prog_maxblocks}}<=0?Infinity:{{config.prog_maxblocks}};
@@ -38,13 +37,13 @@
3837
</script>
3938
<style>
4039
.ui-content-stream {
41-
background:url('http://{{host}}:{{stream_port}}/video/stream') no-repeat;
40+
background:url('/video/stream') no-repeat;
4241
background-size: auto 100% !important;
4342
background-position: center;
4443
padding:0px;
4544
}
4645
.ui-content-stream-program {
47-
background:url('http://{{host}}:{{stream_port}}/video/stream') no-repeat;
46+
background:url('/video/stream') no-repeat;
4847
background-size: auto auto !important;
4948
background-position: center;
5049
}

0 commit comments

Comments
 (0)