I got some bugs.
everything is ok when I write
shoot()
but the script starts to crush occasionally when I write
shoot()
shoot()
After the first shoot() camera is performing file saving into SD card (the led lamp is flashing) and it looks like function shoot() doesn't wait until the file is saved. The crush happens when it overlaps with the second shoot().
It happens when I started to use slower SD card and didn't happen when I used fast SD card.
The crush disappear when I use
shoot()
sleep(1000)
shoot()
The same thing for video record and I have to use sleep(10000) (ten seconds) after the video function.
Another problem is when the crush happens the camera doesn't work anymore (it writes that camera has some error and shut down when trying to make another shoot) and I have to format disk to fat32 to make it work again.
Questions:
1 is there any way to make function shoot() or video wait until file is saved and ready to go?
2 is there any way to fix the last broken file (if crush happened) and continue? May be there is any way to delete broken files of format it locally...