Skip to content

Commit

Permalink
Testing for Sound Card's volume control PART-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumar-laxmi committed Feb 9, 2024
1 parent 199353c commit 770bbf5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
Binary file modified app/__pycache__/views.cpython-311.pyc
Binary file not shown.
Binary file modified app/sounds.sqlite3
Binary file not shown.
20 changes: 10 additions & 10 deletions app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ def index(request):
start_mitral_thread('split_second_heart')
elif 'third_heart_sound_mitral_valve' in request.POST:
print('\nSound Played: Third Heart (gallop), Location: Mitral Valve')
start_mitral_thread('third_heart_sound_gallop')
start_mitral_thread('third_heart')
elif 'fourth_heart_sound_mitral_valve' in request.POST:
print('\nSound Played: Fourth Heart (gallop), Location: Mitral Valve')
start_mitral_thread('fourth_heart_sound_gallop')
start_mitral_thread('fourth_heart')
elif 'functional_murmur_sound_mitral_valve' in request.POST:
print('\nSound Played: Functional Murmur, Location: Mitral Valve')
start_mitral_thread('functional_murmur')
Expand Down Expand Up @@ -405,10 +405,10 @@ def index(request):
start_aortic_thread('split_second_heart')
elif 'third_heart_sound_aortic_valve' in request.POST:
print('\nSound Played: Third Heart (gallop), Location: Aortic Valve')
start_aortic_thread('third_heart_sound_gallop')
start_aortic_thread('third_heart')
elif 'fourth_heart_sound_aortic_valve' in request.POST:
print('\nSound Played: Fourth Heart (gallop), Location: Aortic Valve')
start_aortic_thread('fourth_heart_sound_gallop')
start_aortic_thread('fourth_heart')
elif 'functional_murmur_sound_aortic_valve' in request.POST:
print('\nSound Played: Functional Murmur, Location: Aortic Valve')
start_aortic_thread('functional_murmur')
Expand Down Expand Up @@ -530,10 +530,10 @@ def index(request):
start_pulmonary_thread('split_second_heart')
elif 'third_heart_sound_pulmonary_valve' in request.POST:
print('\nSound Played: Third Heart (gallop), Location: Pulmonanary Valve')
start_pulmonary_thread('third_heart_sound_gallop')
start_pulmonary_thread('third_heart')
elif 'fourth_heart_sound_pulmonary_valve' in request.POST:
print('\nSound Played: Fourth Heart (gallop), Location: Pulmonanary Valve')
start_pulmonary_thread('fourth_heart_sound_gallop')
start_pulmonary_thread('fourth_heart')
elif 'functional_murmur_sound_pulmonary_valve' in request.POST:
print('\nSound Played: Functional Murmur, Location: Pulmonanary Valve')
start_pulmonary_thread('functional_murmur')
Expand Down Expand Up @@ -655,10 +655,10 @@ def index(request):
start_tricuspid_thread('split_second_heart')
elif 'third_heart_sound_tricuspid_valve' in request.POST:
print('\nSound Played: Third Heart (gallop), Location: Tricuspid Valve')
start_tricuspid_thread('third_heart_sound_gallop')
start_tricuspid_thread('third_heart')
elif 'fourth_heart_sound_tricuspid_valve' in request.POST:
print('\nSound Played: Fourth Heart (gallop), Location: Tricuspid Valve')
start_tricuspid_thread('fourth_heart_sound_gallop')
start_tricuspid_thread('fourth_heart')
elif 'functional_murmur_sound_tricuspid_valve' in request.POST:
print('\nSound Played: Functional Murmur, Location: Tricuspid Valve')
start_tricuspid_thread('functional_murmur')
Expand Down Expand Up @@ -780,10 +780,10 @@ def index(request):
start_erb_thread('split_second_heart')
elif 'third_heart_sound_erb_point' in request.POST:
print('\nSound Played: Third Heart (gallop), Location: Erb Valve')
start_erb_thread('third_heart_sound_gallop')
start_erb_thread('third_heart')
elif 'fourth_heart_sound_erb_point' in request.POST:
print('\nSound Played: Fourth Heart (gallop), Location: Erb Valve')
start_erb_thread('fourth_heart_sound_gallop')
start_erb_thread('fourth_heart')
elif 'functional_murmur_sound_erb_point' in request.POST:
print('\nSound Played: Functional Murmur, Location: Erb Valve')
start_erb_thread('functional_murmur')
Expand Down
26 changes: 23 additions & 3 deletions db_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,7 +25,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -95,6 +95,26 @@
"con.commit()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"cur.execute(\"UPDATE app_heartaudio SET sound_name='third_heart' WHERE sound_name='third_heart_sound_gallop'\")\n",
"con.commit()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"cur.execute(\"UPDATE app_heartaudio SET sound_name='fourth_heart' WHERE sound_name='fourth_heart_sound_gallop'\")\n",
"con.commit()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 770bbf5

Please sign in to comment.