File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
internal_filesystem/apps/com.micropythonos.camera/assets Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,18 @@ target_sources(usermod_c_mpos INTERFACE ${MPOS_C_SOURCES})
2121# Add include directories.
2222target_include_directories (usermod_c_mpos INTERFACE ${MPOS_C_INCLUDES} )
2323
24+
25+ target_compile_definitions (usermod_c_mpos INTERFACE
26+ # force quirc to use single precision floating point math
27+ -DQUIRC_FLOAT_TYPE=float
28+ -DQUIRC_USE_TGMATH=1
29+ )
30+
31+ # Be sure to set the -O2 "optimize" flag!!
32+ target_compile_options (usermod_c_mpos INTERFACE
33+ -O2
34+ )
35+
2436# Link our INTERFACE library to the usermod target.
2537target_link_libraries (usermod INTERFACE usermod_c_mpos)
2638
Original file line number Diff line number Diff line change @@ -171,11 +171,15 @@ def set_image_size(self):
171171 def qrdecode_one (self ):
172172 try :
173173 import qrdecode
174+ import utime
175+ before = utime .ticks_ms ()
174176 result = qrdecode .qrdecode_rgb565 (self .current_cam_buffer , self .width , self .height )
177+ after = utime .ticks_ms ()
175178 #result = bytearray("INSERT_QR_HERE", "utf-8")
176179 if not result :
177180 self .status_label .set_text (self .status_label_text_searching )
178181 else :
182+ print (f"SUCCESSFUL QR DECODE TOOK: { after - before } ms" )
179183 result = remove_bom (result )
180184 result = print_qr_buffer (result )
181185 print (f"QR decoding found: { result } " )
You can’t perform that action at this time.
0 commit comments