Skip to content

Commit

Permalink
Working on Sound card volume control from backend PART-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumar-laxmi committed Feb 8, 2024
1 parent 7e0dd79 commit 795d94a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Binary file modified app/__pycache__/views.cpython-311.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def mitralVolumeChange(request):
if request.method == 'POST':
if request.POST['identifier'] == 'normal_heart':
volume = request.POST['rangeValue']
os.system('amixer -c 3 set Speaker {}%'.format(volume))
print('Mitral Valve\'s Volume updated to {}%'.format(volume))
return JsonResponse({'message': 'Success!'})
else:
return HttpResponse("Request method is not a POST")
Expand Down

0 comments on commit 795d94a

Please sign in to comment.