From 9de728d052abdc18df32836b999f3348c4b428eb Mon Sep 17 00:00:00 2001 From: HeisenberG2575 Date: Thu, 19 Jan 2023 23:17:41 +0530 Subject: [PATCH 1/3] changes for bio camera --- .../apps/home/urls.py | 5 +- .../apps/home/views.py | 20 ++++++ .../apps/templates/home/camera-bio.html | 70 +++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 black-dashboard-django-master/apps/templates/home/camera-bio.html diff --git a/black-dashboard-django-master/apps/home/urls.py b/black-dashboard-django-master/apps/home/urls.py index a7e27cf..e61731c 100644 --- a/black-dashboard-django-master/apps/home/urls.py +++ b/black-dashboard-django-master/apps/home/urls.py @@ -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'), diff --git a/black-dashboard-django-master/apps/home/views.py b/black-dashboard-django-master/apps/home/views.py index 8fa1e60..50b7f92 100644 --- a/black-dashboard-django-master/apps/home/views.py +++ b/black-dashboard-django-master/apps/home/views.py @@ -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'] @@ -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') \ No newline at end of file diff --git a/black-dashboard-django-master/apps/templates/home/camera-bio.html b/black-dashboard-django-master/apps/templates/home/camera-bio.html new file mode 100644 index 0000000..71ed2cd --- /dev/null +++ b/black-dashboard-django-master/apps/templates/home/camera-bio.html @@ -0,0 +1,70 @@ +{% extends "layouts/base.html" %} + +{% block title %} Maps {% endblock %} + + +{% block stylesheets %}{% endblock stylesheets %} + +{% block content %} + +
+
+
+
+ Camera-Feed +
+
+
+
+
+
Bio Cam 1
+
+
+
+
+
+
+
+
+
+
Bio Cam 2
+
+
+
+
+
+
+
+
+
+
+
+
Bio Cam 3
+
+
+
+
+
+
+
+
+
+
Bio Cam 4
+
+
+
+
+
+
+
+
+
+
+ +{% endblock content %} + + +{% block javascripts %} + + +{% endblock javascripts %} From 550eb77bf025b98d1085fea83e223ce313df4354 Mon Sep 17 00:00:00 2001 From: HeisenberG2575 Date: Thu, 19 Jan 2023 23:26:14 +0530 Subject: [PATCH 2/3] bug fix --- black-dashboard-django-master/apps/home/urls.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/black-dashboard-django-master/apps/home/urls.py b/black-dashboard-django-master/apps/home/urls.py index e61731c..edaecd9 100644 --- a/black-dashboard-django-master/apps/home/urls.py +++ b/black-dashboard-django-master/apps/home/urls.py @@ -25,10 +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') + 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'), From 4e33560567903e83881871df01ced57af57923dc Mon Sep 17 00:00:00 2001 From: HeisenberG2575 Date: Thu, 19 Jan 2023 23:34:51 +0530 Subject: [PATCH 3/3] bug fix --- black-dashboard-django-master/apps/home/urls.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/black-dashboard-django-master/apps/home/urls.py b/black-dashboard-django-master/apps/home/urls.py index edaecd9..c33a4a9 100644 --- a/black-dashboard-django-master/apps/home/urls.py +++ b/black-dashboard-django-master/apps/home/urls.py @@ -25,10 +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'), + 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'),