I was unable to find a class/method to directly report whether the mounted filesystem is the built-in flash or a microSD card. I want to verify that a microSD is being used before attempting to save images. (The docs warn not to save images to the built-in flash.)
As a workaround, I am checking whether the tuple returned by
uos.statvfs("/") matches the value returned for the onboard flash —
(4096, 4096, 8183, 8178, 8178, 0, 0, 0, 0, 255) for the H7 Plus. If not, I’ll presume a microSD is mounted.
Is there a better or more appropriate way to check? My approach requires knowing which OpenMV device the code is running on and having this tuple to compare. Ideally, I’d prefer to call a function that returns True/False on all OpenMV devices.