-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
fix system time from sd card files #1748
base: master
Are you sure you want to change the base?
Conversation
Please check the current implementation here: https://github.com/OpenIPC/firmware/blob/master/general/overlay/etc/init.d/S30customizer#L5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello
Thank you for your interest in our project.
Unfortunately, we will not be able to accept your PR as a default in the main branch, as it will conflict with the ability of various implementations and approaches to setting the time (batteries, GPS, synchronization via the Internet).
You can put this script in the Sandbox repository and upload it or use the Builder profiler if you have a customized device.
Thank you for understanding.
As I said before, the original implementation is to set the system time to the firmware release time every time it starts, such as 25-1-7 1:00. After I fly twice, the DVR file will be in 2025-1-7 of the SD card, and the video fragments will be mixed together. 正如我前面说的,原有实现是每次启动将系统时间设置到固件发布时间,比如我的25-1-7 1:00。当我飞行两次后,dvr文件将会在sd card的2025-1-7里面,视频碎片混合在一起。 |
I understand your choice. What I want to explain is that,
Finally, I posted the code here. Even if it is not accepted, it can be seen by more people, which is also good. 我理解你的选择。我要说明的是, 最后,我把代码贴在这里,即便不被接受,也能被更多的人看到,这也不错。 |
Thanks for your clarification. |
Add little shell code to restore system time from sd card file after boot up.It's woking in my rc.local, but I'm not sure there's a better place to put it.
The root reason for modifying the time is that the sky-side card recording DVR stores files according to the system time. When offline, the system always use defaults time, resulting in chaotic connection of video files. Possible solutions include:
1, Modify the time
1.1, Manually modify the time
1.2, Automatically correct the time
1.2.1, Use GPS data to synchronize the time
1.2.2, The receiving end (Android) pushes the time
1.2.3, Use the existing DVR to infer the time, at least avoid duplication
2, Modify the algorithm
2.1, Detect the existence of the file and append a number
2.2, Do not use time as the file name
This pr is method 1.2.3, method 1.1 send in msposd pr #58
修改时间的根本原因是天空端卡录DVR按系统时间存储文件,离线时系统总是默认时间,导致视频文件混乱连接在一起。可能的解決方式包括:
1,修改时间
1.1,手动修改时间
1.2,自动修正时间
1.2.1,使用GPS数据同步时间
1.2.2,接收端(安卓)推送时间
1.2.3,借助已有DVR推测时间,至少避免重复
2,修改算法
2.1,检测文件存在,追加数字
2.2,不适用时间作为文件名
本pr为方法1.2.3,方法1.1已经在msposd pr #58 提交