flashed Script don't start

Discussion related to "under the hood" OpenMV topics.
msrtoto1
Posts: 5
Joined: Wed May 08, 2019 4:58 am

flashed Script don't start

Postby msrtoto1 » Wed May 08, 2019 5:13 am

Hi everybody,
I have a problem with my Open MV M7. I have a program and I want to flash him in my open Mv. I followed this topic viewtopic.php?t=668 but it didn’t work. I tryed to flash two example program: the first was « Multi Color Code Tracking » but it doesn’t work and the second was « LED Control » and It works!!! I don’t understand why…
I tryed to erase the internal memory and to update the software but nothing fixes my problem. Can someone help me?
(sorry for my aproximative English)
User avatar
iabdalkader
Posts: 920
Joined: Sun May 24, 2015 3:53 pm

Re: flashed Script don't start

Postby iabdalkader » Wed May 08, 2019 8:34 am

Just make sure to umount (or eject on Windows) the flash drive before resetting the camera.
msrtoto1
Posts: 5
Joined: Wed May 08, 2019 4:58 am

Re: flashed Script don't start

Postby msrtoto1 » Wed May 08, 2019 9:56 am

I tried but it didn't solve my problem. I can flash some files but not the most important one.
User avatar
iabdalkader
Posts: 920
Joined: Sun May 24, 2015 3:53 pm

Re: flashed Script don't start

Postby iabdalkader » Wed May 08, 2019 10:44 am

I don't understand the problem.
msrtoto1
Posts: 5
Joined: Wed May 08, 2019 4:58 am

Re: flashed Script don't start

Postby msrtoto1 » Wed May 08, 2019 11:21 am

I don't understand what I'm doing wrong either. can I send you the script to see if you can flash it on your open mv? I'm in the middle of graduation work and unfortunately it blocks all my progress.
User avatar
iabdalkader
Posts: 920
Joined: Sun May 24, 2015 3:53 pm

Re: flashed Script don't start

Postby iabdalkader » Wed May 08, 2019 11:53 am

Yes please attach it.
msrtoto1
Posts: 5
Joined: Wed May 08, 2019 4:58 am

Re: flashed Script don't start

Postby msrtoto1 » Thu May 09, 2019 3:04 am

Here's my code. I wonder if it's not the size of the code that the mv opem won't be able to launch. I hope it will work for you. I don't have an SD card connected to my Open MV m7.
Thank you very much for your help.
Attachments
test 4.py
(3.6 KiB) Downloaded 43 times
msrtoto1
Posts: 5
Joined: Wed May 08, 2019 4:58 am

Re: flashed Script don't start

Postby msrtoto1 » Thu May 09, 2019 9:35 am

Hello,
I found the problem. it was a string that included the "#" character. when you compile a script in the Cam, the IDE deletes all comments so the end of my line after the "#". and therefore the line :
text="X={:03},Y={:03},T={:03}#".format(pos[0],pos[1],pos[2])
turned into:
text="X={:03},Y={:03},T={:03}
and it created a mistake.
Anyway, thank you for helping me and giving me your time.
Last edited by msrtoto1 on Fri May 10, 2019 3:36 am, edited 1 time in total.
User avatar
iabdalkader
Posts: 920
Joined: Sun May 24, 2015 3:53 pm

Re: flashed Script don't start

Postby iabdalkader » Thu May 09, 2019 10:19 am

Hi, you don't have to remove the comments, but we'll try to fix this issue anyway.
User avatar
kwagyeman
Posts: 3209
Joined: Sun May 24, 2015 2:10 pm

Re: flashed Script don't start

Postby kwagyeman » Thu May 09, 2019 2:11 pm

Ah, yeah, the IDE assumes when you strip comments that # is the start of a comment. It doesn't check if that's in the middle of a string.

Hmmm, that's extremely difficult to fix. The IDE is just doing a simple regex to remove the comments. I would need a much stronger parser.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests