Skip to content

Commit 8e5becc

Browse files
committed
remove all possibile hard links to 8080 port wip #79
2 parents a27286c + 9ad0294 commit 8e5becc

File tree

6 files changed

+5
-36
lines changed

6 files changed

+5
-36
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ static/blockly-tutorial
6363
.Trashes
6464
ehthumbs.db
6565
Thumbs.db
66+
67+
# Swap files
68+
*.swp

.sudo.swp

-12 KB
Binary file not shown.

MPU6050.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Copyright 2015
77
"""
88

9-
import smbus
9+
import smbus2 as smbus
1010
import time
1111

1212
class MPU6050:

camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
class Camera(object):
4848

4949
_instance = None
50-
_img_template = image.Image.load("coderdojo-logo.png")
50+
_img_template = image.Image.load("static/media/coderdojo-logo.png")
5151

5252
@classmethod
5353
def get_instance(cls):

main.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,6 @@ def video_stream(a_cam):
185185
yield frame
186186
yield "\r\n"
187187

188-
@app.route("/video")
189-
def handle_video():
190-
return """
191-
<html>
192-
<head>
193-
<style type=text/css>
194-
body { background-image: url(/video/stream); background-repeat:no-repeat; background-position:center top; background-attachment:fixed; height:100% }
195-
</style>
196-
</head>
197-
<body>
198-
&nbsp;
199-
</body>
200-
</html>
201-
"""
202-
203188
@app.route("/video/stream")
204189
def handle_video_stream():
205190
try:
@@ -211,25 +196,6 @@ def handle_video_stream():
211196
except:
212197
pass
213198

214-
def video_stream_cv(a_cam):
215-
while not app.shutdown_requested:
216-
frame = a_cam.get_image_cv_jpeg()
217-
yield ("--BOUNDARYSTRING\r\n" +
218-
"Content-type: image/jpeg\r\n" +
219-
"Content-Length: " + str(len(frame)) + "\r\n\r\n" +
220-
frame + "\r\n")
221-
222-
@app.route("/video/stream/cv")
223-
def handle_video_stream_cv():
224-
try:
225-
h = Headers()
226-
h.add('Age', 0)
227-
h.add('Cache-Control', 'no-cache, private')
228-
h.add('Pragma', 'no-cache')
229-
return Response(video_stream_cv(cam), headers=h, mimetype="multipart/x-mixed-replace; boundary=--BOUNDARYSTRING")
230-
except:
231-
pass
232-
233199
@app.route("/photos", methods=["GET"])
234200
def handle_photos():
235201
logging.info("photos")
File renamed without changes.

0 commit comments

Comments
 (0)