Skip to content

Commit

Permalink
Merge pull request #596 from luxonis/fix_uvc_windows
Browse files Browse the repository at this point in the history
Fix the UVC app on Windows
  • Loading branch information
alex-luxonis authored Dec 31, 2021
2 parents 9d956b8 + 3650fc6 commit b64e055
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 0 additions & 4 deletions apps/uvc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
import depthai as dai
import time

if os.name == 'nt':
print("This app is temporarily disabled on Windows system due to an issue with USB descriptors. We are working on resolving this issue")
raise SystemExit(0)

if platform.machine() == 'aarch64':
print("This app is temporarily disabled on AARCH64 systems due to an issue with stream preview. We are working on resolving this issue")
raise SystemExit(0)
Expand Down
2 changes: 1 addition & 1 deletion apps/uvc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
depthai==2.13.3.0.dev+b9dbc05ea35d19534678d791f8fbf03ec4b087ba
depthai==2.13.3.0.dev+f513b0f27b4f07a9940cd9dfe65d7fd6deeaf29d
5 changes: 4 additions & 1 deletion depthai_helpers/app_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def createVenv(self, force=False):
subprocess.check_call(' '.join([quoted(self.appInterpreter), '-m', 'pip', 'install', '--prefer-binary', '-r', str(self.appRequirements)]), env=initEnv, shell=True, cwd=self.appPath)

def runApp(self, shouldRun = lambda: True):
pro = subprocess.Popen(' '.join([quoted(self.appInterpreter), str(self.appEntrypoint)]), env=initEnv, shell=True, cwd=self.appPath, preexec_fn=os.setsid)
if os.name == 'nt':
pro = subprocess.Popen(' '.join([quoted(self.appInterpreter), str(self.appEntrypoint)]), env=initEnv, shell=True, cwd=self.appPath)
else:
pro = subprocess.Popen(' '.join([quoted(self.appInterpreter), str(self.appEntrypoint)]), env=initEnv, shell=True, cwd=self.appPath, preexec_fn=os.setsid)
while shouldRun():
try:
time.sleep(1)
Expand Down

0 comments on commit b64e055

Please sign in to comment.