Просмотр исходного кода

add signaal for export step

master
Jeong Geol Kim 4 лет назад
Родитель
Сommit
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():

Загрузка…
Отмена
Сохранить