SD/CF dual slots free space display (5D3)

Started by a.sintes, October 19, 2023, 04:50:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

a.sintes

[UPDATED 2023-10-23]
Hello,

Following a request on our Discord channel, I've implemented a very small feature to replace the legacy "free space" display in the ML top bar (top-right corner) with a new one including:
- a proper refresh (e.g.: after recording a video) of the top bar (previously only set once at camera startup, or after taking a picture)
- an indication of the card concerned by the display (CF or SD prefix)
- a potential display of the two card slots in case of SD+CF usage (e.g.: 5D3)

Note:
- to reduce a little the size the unit was removed, which is implicitly GB
- in case of dual slots usage with sound recording activated, the temperature indication may disappear to leave some space

2023-10-23 update:
The refresh of the values is now working well (no need to reboot the camera): current ML code (fio-ml.c) is based over property callbacks that are triggered only with specific camera events (e.g.: taking a picture, removing a file using Canon menus...), so to avoid taking a picture (shutter consumption) I've finally managed to compute the remaining free space the "hard way", using a custom computation:
- the first time, ask ML about the remaining free space on card slots (using get_free_space_32k) then compute the cumulated size of the files within the DCIM/ folder, it allows then to deduce a close approximation of each card volume size
- each time we need to refresh the UI (happens quite rarely, but typically OK after recording something due to the UI reconfiguration), compute the current cumulated size of the files inside the DCIM folder then use a simple subtraction to deduce the remaining free space
For those worrying about the file size cumulation routine, it took approximatively less than 10ms (depending of the number of pictures/movies present on the cards), which is completely sustainable as the top-bar refresh happens really occasionally.

It look like this:


And it was pushed in my GitHub repository, which is basically an up-to-date fork of Danne's BitBucket one, including also the ultrafast framed preview feature.

You can download and install 5D3 (1.1.3 & 1.2.3) builds (including modules etc.) using these packages.

Hope it may help someone else!

Note: it may potentially solve this old ML thread.

Thanks to @WalterSchulz and @names_are_hard
It's too bad she won't live, but then again, who does?

Danne

Great man! Sorry for not having the time to check into your stuff lately. My 5D III is buried in a box atm :(.

a.sintes

We all have a family and a "real" job, so no need to apology ;-)

Note anyway this feature is not totally completed: the display is ok but it seems the "free remaining" value itself is not yet properly refreshed, the update event being triggered by the camera only in very specific situations (e.g.: taking a picture, removing a picture from the Canon menus...) so I need to find a workaround to force it so we may have a proper information refreshed after a video recording.
It's too bad she won't live, but then again, who does?

Mattia

You could make the camera take a picture after every recording, it would be useful also to identify the content of mlv files, just like a thumbnail

a.sintes

Seems to be the most obvious yes, note anyway MLVFS already provides an HTML page with details about the shots and a gif-based preview, so the image is maybe too much (and shutter consuming for nothing), will check if I can figure out something else before using this fallback
It's too bad she won't live, but then again, who does?

70MM13

Please,  if you decide to waste shutter actuations, add an option to disable it. Otherwise,  people who care about such things will not use your function.

a.sintes

UPDATED: refresh is working well now, without the need of wasting shutter actuations ;-)
It's too bad she won't live, but then again, who does?

Mattia

Great! It works well! But I've noticed how without the SD Overclock enabled it only updates the CF card. It is supposed to work like that? Or maybe tge amount of data written on the SD Card without the overclock is not that much, I need to test further..

a.sintes

must be totally independent of SD-overclock / Card Spanning / preferred card options, so yes, my guess is you don't exceed 1GB of write
(tell me otherwise)
It's too bad she won't live, but then again, who does?

Skinny

Very, very nice option! I hope it will be ported to other cameras at some point. Great job!

a.sintes

an easy one to port, small non-5D3-specific code addition and a minor change of menu priority, all done in the same single file (lens.c)
It's too bad she won't live, but then again, who does?