@@ -107,12 +107,12 @@ def onResume(self, screen):
107107 if self .cam :
108108 self .image .set_rotation (900 ) # internal camera is rotated 90 degrees
109109 else :
110- print ("camtest .py: no internal camera found, trying webcam on /dev/video0" )
110+ print ("camera .py: no internal camera found, trying webcam on /dev/video0" )
111111 try :
112112 self .cam = webcam .init ("/dev/video0" )
113113 self .use_webcam = True
114114 except Exception as e :
115- print (f"camtest .py: webcam exception: { e } " )
115+ print (f"camera .py: webcam exception: { e } " )
116116 if self .cam :
117117 print ("Camera initialized, continuing..." )
118118 self .capture_timer = lv .timer_create (self .try_capture , 100 , None )
@@ -123,20 +123,20 @@ def onResume(self, screen):
123123 self .qr_button .remove_flag (lv .obj .FLAG .HIDDEN )
124124 self .snap_button .remove_flag (lv .obj .FLAG .HIDDEN )
125125 else :
126- print ("No camera found, stopping camtest .py" )
126+ print ("No camera found, stopping camera .py" )
127127 if self .scanqr_mode :
128128 self .finish ()
129129
130130
131131 def onStop (self , screen ):
132- print ("camtest .py backgrounded, cleaning up..." )
132+ print ("camera .py backgrounded, cleaning up..." )
133133 if self .capture_timer :
134134 self .capture_timer .delete ()
135135 if self .use_webcam :
136136 webcam .deinit (self .cam )
137137 elif self .cam :
138138 self .cam .deinit ()
139- print ("camtest .py cleanup done." )
139+ print ("camera .py cleanup done." )
140140
141141 def qrdecode_one (self ):
142142 try :
@@ -172,11 +172,11 @@ def snap_button_click(self, e):
172172 except OSError :
173173 pass
174174 try :
175- os .mkdir ("data/com.example.camtest " )
175+ os .mkdir ("data/images " )
176176 except OSError :
177177 pass
178178 if self .current_cam_buffer is not None :
179- filename = "data/com.example.camtest/capture .raw"
179+ filename = "data/images/camera_capture .raw"
180180 try :
181181 with open (filename , 'wb' ) as f :
182182 f .write (self .current_cam_buffer )
0 commit comments