Skip to content

Commit 71a74c8

Browse files
author
PolygonalTree
committed
mergin with ggilestro master
2 parents 6e898c8 + 2c18142 commit 71a74c8

File tree

6 files changed

+153
-1
lines changed

6 files changed

+153
-1
lines changed

accessories/DesktopApp/receive_stream.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def open_with_socket():
3636
# Connect a client socket to my_server:8000 (change my_server to the
3737
# hostname of your server)
3838
client_socket = socket.socket()
39-
client_socket.connect(('192.168.0.6', 8000))
39+
40+
client_socket.connect(('192.168.1.201', 8000))
41+
4042
connection = client_socket.makefile('rb')
4143

4244
try:

accessories/DesktopApp/view.py~

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Form implementation generated from reading ui file 'view.ui'
4+
#
5+
# Created: Mon Jun 16 21:45:19 2014
6+
# by: pyside-uic 0.2.15 running on PySide 1.2.1
7+
#
8+
# WARNING! All changes made in this file will be lost!
9+
10+
from PySide import QtCore, QtGui
11+
12+
class Ui_MainWindow(object):
13+
def setupUi(self, MainWindow):
14+
MainWindow.setObjectName("MainWindow")
15+
MainWindow.resize(521, 392)
16+
self.centralwidget = QtGui.QWidget(MainWindow)
17+
self.centralwidget.setObjectName("centralwidget")
18+
self.listView = QtGui.QListView(self.centralwidget)
19+
self.listView.setGeometry(QtCore.QRect(20, 90, 491, 251))
20+
self.listView.setObjectName("listView")
21+
self.loadButton = QtGui.QPushButton(self.centralwidget)
22+
self.loadButton.setGeometry(QtCore.QRect(360, 40, 111, 27))
23+
self.loadButton.setObjectName("loadButton")
24+
self.ipEdit = QtGui.QLineEdit(self.centralwidget)
25+
self.ipEdit.setGeometry(QtCore.QRect(60, 40, 61, 31))
26+
self.ipEdit.setPlaceholderText("")
27+
self.ipEdit.setObjectName("ipEdit")
28+
self.ipEdit_2 = QtGui.QLineEdit(self.centralwidget)
29+
self.ipEdit_2.setGeometry(QtCore.QRect(130, 40, 61, 31))
30+
self.ipEdit_2.setObjectName("ipEdit_2")
31+
self.ipEdit_3 = QtGui.QLineEdit(self.centralwidget)
32+
self.ipEdit_3.setGeometry(QtCore.QRect(200, 40, 61, 31))
33+
self.ipEdit_3.setObjectName("ipEdit_3")
34+
self.label = QtGui.QLabel(self.centralwidget)
35+
self.label.setGeometry(QtCore.QRect(120, 40, 31, 41))
36+
font = QtGui.QFont()
37+
font.setFamily("Sans")
38+
font.setPointSize(18)
39+
self.label.setFont(font)
40+
self.label.setObjectName("label")
41+
self.label_2 = QtGui.QLabel(self.centralwidget)
42+
self.label_2.setGeometry(QtCore.QRect(190, 40, 21, 41))
43+
font = QtGui.QFont()
44+
font.setFamily("Sans")
45+
font.setPointSize(18)
46+
self.label_2.setFont(font)
47+
self.label_2.setObjectName("label_2")
48+
self.label_3 = QtGui.QLabel(self.centralwidget)
49+
self.label_3.setGeometry(QtCore.QRect(60, 20, 131, 16))
50+
self.label_3.setObjectName("label_3")
51+
self.label_4 = QtGui.QLabel(self.centralwidget)
52+
self.label_4.setGeometry(QtCore.QRect(270, 46, 55, 21))
53+
font = QtGui.QFont()
54+
font.setFamily("Sans")
55+
font.setPointSize(18)
56+
self.label_4.setFont(font)
57+
self.label_4.setObjectName("label_4")
58+
self.label_5 = QtGui.QLabel(self.centralwidget)
59+
self.label_5.setGeometry(QtCore.QRect(260, 40, 21, 41))
60+
font = QtGui.QFont()
61+
font.setFamily("Sans")
62+
font.setPointSize(18)
63+
self.label_5.setFont(font)
64+
self.label_5.setObjectName("label_5")
65+
MainWindow.setCentralWidget(self.centralwidget)
66+
self.menubar = QtGui.QMenuBar(MainWindow)
67+
self.menubar.setGeometry(QtCore.QRect(0, 0, 521, 23))
68+
self.menubar.setObjectName("menubar")
69+
MainWindow.setMenuBar(self.menubar)
70+
self.statusbar = QtGui.QStatusBar(MainWindow)
71+
self.statusbar.setObjectName("statusbar")
72+
MainWindow.setStatusBar(self.statusbar)
73+
74+
self.retranslateUi(MainWindow)
75+
QtCore.QMetaObject.connectSlotsByName(MainWindow)
76+
77+
def retranslateUi(self, MainWindow):
78+
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
79+
self.loadButton.setText(QtGui.QApplication.translate("MainWindow", "Discover Sleeps", None, QtGui.QApplication.UnicodeUTF8))
80+
self.ipEdit.setText(QtGui.QApplication.translate("MainWindow", "192", None, QtGui.QApplication.UnicodeUTF8))
81+
self.ipEdit_2.setText(QtGui.QApplication.translate("MainWindow", "168", None, QtGui.QApplication.UnicodeUTF8))
82+
self.ipEdit_3.setText(QtGui.QApplication.translate("MainWindow", "1", None, QtGui.QApplication.UnicodeUTF8))
83+
self.label.setText(QtGui.QApplication.translate("MainWindow", ".", None, QtGui.QApplication.UnicodeUTF8))
84+
self.label_2.setText(QtGui.QApplication.translate("MainWindow", ".", None, QtGui.QApplication.UnicodeUTF8))
85+
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Direccion Red local ", None, QtGui.QApplication.UnicodeUTF8))
86+
self.label_4.setText(QtGui.QApplication.translate("MainWindow", "0", None, QtGui.QApplication.UnicodeUTF8))
87+
self.label_5.setText(QtGui.QApplication.translate("MainWindow", ".", None, QtGui.QApplication.UnicodeUTF8))
88+

pysolovideo.py

+8
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,23 @@ def startNetworkStream(self, port=8000):
191191
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
192192
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
193193
self.socket.bind(('', port))
194+
<<<<<<< HEAD
194195
print ("Live stream socket listening on port {p}...".format(p=port))
196+
=======
197+
print "Live stream socket listening on port {p}...".format(p=port)
198+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
195199
self.pipe = None
196200

197201
self.socket.listen(5)
198202

199203
self.socket_thread_1 = threading.Thread(target=self.socket_listen)
204+
<<<<<<< HEAD
200205
self.socket_thread_1.daemon=True
201206
self.socket_thread_2 = threading.Thread(target=self.socket_stream)
202207
self.socket_thread_2.daemon=True
208+
=======
209+
self.socket_thread_2 = threading.Thread(target=self.socket_stream)
210+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
203211
self.keepSocket = True
204212

205213
self.socket_thread_1.start()

rPI/server.py

+18
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import db
2+
<<<<<<< HEAD
23
import zipfile
34
import glob
45
from subprocess import call
6+
=======
7+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
58
from bottle import *
69

710
from os import path
811
import json
12+
<<<<<<< HEAD
913
import zipfile
1014
import glob
15+
=======
16+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
1117

1218
os.sys.path.append("..")
1319
from pvg_headless import pvg_cli
@@ -20,7 +26,11 @@ def __init__(self):
2026
rois = []
2127
trackingType = 0
2228

29+
<<<<<<< HEAD
2330
@app.get('/favicon.ico')
31+
=======
32+
@get('/favicon.ico')
33+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
2434
def get_favicon():
2535
return server_static(path.join(basedir,'static/img/favicon.ico'))
2636

@@ -97,7 +107,11 @@ def starStop():
97107
db.writeMask(data)
98108

99109
#start a python thread and begins tracking
110+
<<<<<<< HEAD
100111
print ("tracking type", data['trackingType'])
112+
=======
113+
print "tracking type", data['trackingType']
114+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
101115
pysolo_headless.setTracking(track_type=data['trackingType'], mask_file="mask.msk", output_file=outputfile)
102116
pysolo_headless.startTracking()
103117

@@ -155,6 +169,7 @@ def poweroff(machineID):
155169
if isTracking():
156170
startStop()
157171
off = call("poweroff")
172+
<<<<<<< HEAD
158173

159174
@app.post('/update')
160175
def do_update():
@@ -178,6 +193,9 @@ def do_update():
178193
#change this for a service restart:
179194
return call(["python3 restartScript.py"],shell=True)
180195

196+
=======
197+
198+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
181199
"""helpers methods."""
182200

183201
def isTracking():

rPI/static/js/main.js

+3
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ app.controller('poweroffCtrl',['$scope', '$http',function($scope,$http){
396396
}
397397
};
398398
}]);
399+
<<<<<<< HEAD
399400
app.controller('uploadCtrl',['$scope', '$http',function($scope,$http){
400401
$scope.upload = function(){
401402
var ext = $('#data').val().split('.').pop().toLowerCase();
@@ -416,6 +417,8 @@ app.controller('uploadCtrl',['$scope', '$http',function($scope,$http){
416417
}
417418
};
418419
}]);
420+
=======
421+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
419422

420423
})();
421424

rPI/views/index.tpl

+33
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
<link rel="stylesheet" href="static/css/main.css">
2323

2424
<script src="static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
25+
<<<<<<< HEAD
2526
<script></script>
27+
=======
28+
29+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
2630

2731
</head>
2832
<body ng-app="fly">
@@ -38,7 +42,11 @@
3842
<span class="icon-bar"></span>
3943
<span class="icon-bar"></span>
4044
</button>
45+
<<<<<<< HEAD
4146
<span class="navbar-brand" >PySolo ControlPanel:</span><a id="machineid" class="navbar-brand" href="" ng-click="changeName()" data-toggle="tooltip" data-placement="right" title="Click to edit">{{machineId}}</a>
47+
=======
48+
<span class="navbar-brand" > PySolo ControlPanel:</span><a id="machineid" class="navbar-brand" href="" ng-click="changeName()" data-toggle="tooltip" data-placement="right" title="Click to edit">{{machineId}}</a>
49+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
4250

4351
</div>
4452
<div class="navbar-collapse collapse">
@@ -50,19 +58,33 @@
5058
<input type="password" placeholder="Password" class="form-control">
5159
</div>
5260
<button type="submit" class="btn btn-success">Sign in</button>
61+
<<<<<<< HEAD
62+
=======
63+
<img src='static/img/logo.png' height=30>
64+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
5365
</form>
5466
</div><!--/.navbar-collapse -->
5567
</div>
5668
</div>
5769

5870
<!-- Main jumbotron for a primary marketing message or call to action -->
71+
<<<<<<< HEAD
5972
<div class="jumbotron">
6073
<div class="container text-center">
6174
<div class="row">
6275
<h2>PySolo-Video Browser editor</h2>
6376
<div id="ROI-input" class="col-md-12">
6477
<canvas id="ROIView" width="500" height="300"></canvas>
6578
<!--<canvas id="drawingCanvas" width="500" height="3i00"></canvas>-->
79+
=======
80+
<div class="snapshot">
81+
<div class="container text-center">
82+
<div class="row">
83+
<h2>Camera Snapshot</h2>
84+
<div id="ROI-input" class="col-md-12">
85+
<canvas id="ROIView" width="500" height="375"></canvas>
86+
<!--<canvas id="drawingCanvas" width="500" height="300"></canvas>-->
87+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
6688
</div>
6789
</div>
6890
<div class="row ">
@@ -92,7 +114,11 @@
92114
<div class="col-md-4">
93115
<h2>Refresh</h2>
94116
<p>Click Here to refresh the camera image</p>
117+
<<<<<<< HEAD
95118
<p><button type="submit" id="refreshBackground" class="btn btn-default" href="#" role="button" action="/refresh" method="get">Refresh</button></p>
119+
=======
120+
<p><button type="button" id="refreshBackground"class="btn btn-default" href="#" role="button">Refresh</button></p>
121+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
96122
</div>
97123
%if status == True:
98124
<div class="col-md-4">
@@ -202,6 +228,7 @@
202228
</div>
203229
</div>
204230
<hr>
231+
<<<<<<< HEAD
205232

206233
<div class = "col-md-12" ng-controller="uploadCtrl">
207234
<form id="upload-file" method="post" enctype="multipart/form-data">
@@ -214,6 +241,9 @@
214241
</div>
215242
<hr>
216243

244+
=======
245+
246+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
217247
<footer>
218248
<p>&copy; Polygonal Tree 2014</p>
219249
</footer>
@@ -226,8 +256,11 @@
226256
$('#machineid').tooltip();
227257
$('#autoMask').tooltip();
228258
</script>
259+
<<<<<<< HEAD
229260

230261

262+
=======
263+
>>>>>>> 2c18142d99048230a47ad507b4237c753bbd75ed
231264
</body>
232265
</html>
233266

0 commit comments

Comments
 (0)