-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature hot clip #99
Feature hot clip #99
Conversation
bkleiner
commented
Jan 19, 2023
- adds function to control dvr directly
- adds right button handlers to pages
- reworks playback sdcard scan
- marks clip as "hot" on right button
a579b64
to
951bfae
Compare
Picking up discussion from #96 ...
I would not say that it nessacitates it, but if you have a bunch of hot recordings on your SD card, and it becomes full, currently there is no way to free up space whilst preserving the hot clips (Without removing the SD card, putting it in another device)
Yeah, preclude is maybe a poor choice of words there - all I meant was that if the right button was now used to mark hot, it could not be used to open the context menu - as you say, it can be made an option. |
Also, just to add - I feel that maybe #98 should be considered before making a new release, as this PR as it stands would require an update to the manual (ie, the feature is non-discoverable? I don't see any evidence of something which informs the user that this option exists, although admittedly I have not tested it yet, just had a quick glance through the code) |
8ad0052
to
5ee2d08
Compare
I am sorry, but what exactly do you expect me to do here? Hold back this PR until somebody comes around and implements a context menu on top of it? Merge the PR and tell divimath that they can not create a new release until somebody comes around and implements the context menu? To me it feels like just not having this feature in the manual is way more acceptable than any other option, seeing that this is an additional feature and does not remove any functionality, i barely see any harm. For the time being we can simply add a text explaining the feature to the page. |
Apologies, I was not aware that implementing a context menu (Certainly in the menu) would be that big of a job. Makes much more sense to just merge it in for now and worry about that later then. |
6a9e103
to
98d4fb6
Compare
@bkleiner I just tried the latest build and it appears to have a bug. |
yepp, you are right, i was trying to be smart and made a last minute off-by-one error. |
yep, seemed to work.
|
But still the oddness with hot clip 2 at the end. |
humm, the code does not do any ordering itself, it relies on the kernel to return the dir entries in order. |
The ordering is an artefact of the way that |
lovely! pushed a version using scandir. |
Confirmed as fixed. |
ecf17b3
to
1f9e4ad
Compare
I flew this build today, and very bad things happened :( This happened on the very last flight of the day - here is a screenshot of how my DVR folder looked:
So yeah, whole loads of bork going on here. |
i'm sorry you had a bad experience, but i don't know how much of that is related to the subject of this PR. |
I just saw something in a video which maybe yields a clue... I just saw a DVR of me going into the playback menu and marking that "last flight" as hot (Thinking that recording had ended when I unplugged the quad). ie the DVR is still recording a clip while I mark that very same clip as hot.
|
no optimal for sure, but linux should handle this gracefully for the most part. it will hold on the the inode, so as long as the recording has the file open it should continue to "just work". (...otherwise the recording would stop dead there.)
yes, i think that's the problem we are looking at here: the record does not get terminated when it is supposed to. |
Another observation is that the OSD persists in the goggles once you unplug. Maybe somehow this is keeping it recording? Or could it be that the audio is still recording that's keeping it "alive"? |
eecb672
to
20d9690
Compare
no. osd data being displayed or not does not relate to the connected state. i have pushed a potential fix, the recording would simply not get stopped properly, because there were some missing break statements. additionally i have tried to improve thread safety, as the function would release the mutex before recording actually stopped. |
a415b77
to
8c2cf3e
Compare
Just a quick UX suggestion about the naming of hot clips. To that end you cannot name the hot files in a way that interfere with that count order.
you could just add
This way you still get the only clue about when a dvr was recorded, which is the order of the files between themselves. Bonus: Also, while we are modifying how the DVR file are named, perhaps it could you useful to use 4 numbers instead of 3, like in the VRX. Since you can use very big sd card, you could theoretically go past 1000 recordings. |
It depends on how the DVR names files - as long as we could avoid a scenraio like this, then I think this sounds like a reasonable idea:
|
Again, we simply do not know how the record app generates it names, so i went for a variant that makes collisions very unlikely. |
70735bb
to
925e8cc
Compare
925e8cc
to
0278b1a
Compare
The firmware works good for me without any problems. Simple and straight forward to use |
Had another day's flying - all the problems seem gone with this latest build. |
Actually, would it be possible to mark a clip hot without having to go into the menu, |
lets see that we can this merged as it currently stands ;) plenty of changes as is. further expansion is always an option. |