瀏覽代碼

add signaal for export step

master
Jeong Geol Kim 4 年之前
父節點
當前提交
7810e5e257
共有 1 個檔案被更改,包括 7 行新增2 行删除
  1. 7
    2
      source/recorder.py

+ 7
- 2
source/recorder.py 查看文件

@@ -29,8 +29,8 @@ target_dir = str(root_path) + str(recent_file[0])
29 29
 
30 30
 def handler(signal, frame):
31 31
     global stop_signal
32
-    global zed_list
33
-    stop_signal = True    
32
+    global zed_list        
33
+    stop_signal = True
34 34
     time.sleep(2)
35 35
     exit()
36 36
 
@@ -62,6 +62,11 @@ def grab_run(index, cameras):
62 62
             frame_list[index] += 1
63 63
 
64 64
     zed_list[index].disable_recording()
65
+    
66
+    filepath = '%s/log.txt'%(target_dir)
67
+    f = open(filepath, 'w')
68
+    f.write('record succesfully stopped')
69
+    f.close()
65 70
     #print('saved')    
66 71
 
67 72
 def main():

Loading…
取消
儲存