Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion black-dashboard-django-master/apps/home/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
url(r'^front_down_feed', views.front_down_feed, name='front_down_feed'),
url(r'^rear_left_feed', views.rear_left_feed, name='rear_left_feed'),
url(r'^rear_right_feed', views.rear_right_feed, name='rear_right_feed'),

url(r'^bio_cam1_feed',views.bio_cam1_feed,name='bio_cam1_feed'),
url(r'^bio_cam2_feed',views.bio_cam2_feed,name='bio_cam2_feed'),
url(r'^bio_cam3_feed',views.bio_cam3_feed,name='bio_cam3_feed'),
url(r'^bio_cam4_feed',views.bio_cam4_feed,name='bio_cam4_feed'),
# Matches any html file
re_path(r'^.*\.*', views.pages, name='pages'),

Expand Down
20 changes: 20 additions & 0 deletions black-dashboard-django-master/apps/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
front_down_ip = "http://192.168.2.89:8080/shot.jpg?1"#"http://192.168.2.9:8080/video"
rear_right_topic = "/mrt/camera1/image_compressed"
rear_left_topic = "/mrt/camera2/image_compressed"
bio_cam1=''
bio_cam2=''
bio_cam3=''
bio_cam4=''

panorama_ips = ['192.168.2.60:8080/shot.jpg?1','192.168.2.61:8080/shot.jpg?1']

Expand Down Expand Up @@ -513,3 +517,19 @@ def rear_left_feed(request):
global rear_left_topic
return StreamingHttpResponse(gen(CompressedRosCamera(rear_left_topic)),
content_type='multipart/x-mixed-replace; boundary=frame')
def bio_cam1_feed(request):
global bio_cam1
return StreamingHttpResponse(gen(IPWebCam(bio_cam1)),
content_type='multipart/x-mixed-replace; boundary=frame')
def bio_cam2_feed(request):
global bio_cam2
return StreamingHttpResponse(gen(IPWebCam(bio_cam2)),
content_type='multipart/x-mixed-replace; boundary=frame')
def bio_cam3_feed(request):
global bio_cam3
return StreamingHttpResponse(gen(IPWebCam(bio_cam3)),
content_type='multipart/x-mixed-replace; boundary=frame')
def bio_cam4_feed(request):
global bio_cam4
return StreamingHttpResponse(gen(IPWebCam(bio_cam4)),
content_type='multipart/x-mixed-replace; boundary=frame')
70 changes: 70 additions & 0 deletions black-dashboard-django-master/apps/templates/home/camera-bio.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{% extends "layouts/base.html" %}

{% block title %} Maps {% endblock %}

<!-- Specific Page CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}

{% block content %}

<div class="row">
<div class="col-md-12">
<div class="card card-plain">
<div class="card-header">
Camera-Feed
</div>
<div class="row">
<div class="col-lg-6">
<div class="card card-chart">
<div class="card-header">
<h5 class="card-category">Bio Cam 1</h5>
</div>
<div class="card-body">
<div class="video" ><img src="{% url 'bio_cam1_feed' %}" width="720" height="540"></div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card card-chart">
<div class="card-header">
<h5 class="card-category">Bio Cam 2</h5>
</div>
<div class="card-body">
<div class="video" ><img src="{% url 'bio_cam2_feed' %}" width="720" height="540"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="card card-chart">
<div class="card-header">
<h5 class="card-category">Bio Cam 3</h5>
</div>
<div class="card-body">
<div class="video" ><img src="{% url 'bio_cam3_feed' %}" width="720" height="540"></div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card card-chart">
<div class="card-header">
<h5 class="card-category">Bio Cam 4</h5>
</div>
<div class="card-body">
<div class="video" ><img src="{% url 'bio_cam4_feed' %}" width="720" height="540"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

{% endblock content %}

<!-- Specific Page JS goes HERE -->
{% block javascripts %}


{% endblock javascripts %}