Page 1 of 1

flashed Script don't start

Posted: Wed May 08, 2019 5:13 am
by msrtoto1
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)

Re: flashed Script don't start

Posted: Wed May 08, 2019 8:34 am
by iabdalkader
Just make sure to umount (or eject on Windows) the flash drive before resetting the camera.

Re: flashed Script don't start

Posted: Wed May 08, 2019 9:56 am
by msrtoto1
I tried but it didn't solve my problem. I can flash some files but not the most important one.

Re: flashed Script don't start

Posted: Wed May 08, 2019 10:44 am
by iabdalkader
I don't understand the problem.

Re: flashed Script don't start

Posted: Wed May 08, 2019 11:21 am
by msrtoto1
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.

Re: flashed Script don't start

Posted: Wed May 08, 2019 11:53 am
by iabdalkader
Yes please attach it.

Re: flashed Script don't start

Posted: Thu May 09, 2019 3:04 am
by msrtoto1
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.

Re: flashed Script don't start

Posted: Thu May 09, 2019 9:35 am
by msrtoto1
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.

Re: flashed Script don't start

Posted: Thu May 09, 2019 10:19 am
by iabdalkader
Hi, you don't have to remove the comments, but we'll try to fix this issue anyway.

Re: flashed Script don't start

Posted: Thu May 09, 2019 2:11 pm
by kwagyeman
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.