Rockbox Development > Feature Ideas

compensate for drifting RTC

(1/3) > >>

BdN3504:
I would like to propose a plugin which syncs the time of the target, each time it is connected to a pc. First, the user should be able to configure whether he wants to use this feature in the plugins menu. Then there shall be an option to always sync the time or to only do it sporadically (maybe once a month or so). And of course you should be able to configure the timezone you are living in.
The best means to sync  to actual time should look something like this: when the player is connected, it somehow tries to reach a host which has the time. If it's possible to establish a connection, the time shall be synced. If not, there should be a message saying that it couldn't be done and the user is asked if he would like to sync the time of the device to the pc it's connected with.

I don't know if it is possible to make the target look for a host. If that's not possible, maybe there is a way to sync the time with the pc the device is connected to?

Do you think this is a useful feature, or do you think i shall not create a request for this?

MarcGuay:
http://www.rockbox.org/tracker/task/2430

http://www.rockbox.org/tracker/task/530

http://www.rockbox.org/tracker/task/8744

http://www.rockbox.org/tracker/task/7845

Mad Cow:
How would you give the player the time through UMS? All the PC has access to through UMS is the filesystem.

And what's so hard about setting the time manually? Every player I've used except for my gigabeat had a battery connected to the RTC so it never loses power and always keeps the time so you only have to do it once.

EDIT: Looked at the patch, I thought of that method before, but it's too "hacky" and I would never use it. With it, the RTC will never have the right time because of the time it takes to connect and disconnect the player.

GodEater:
Slightly OT, but the original Apple firmware does this over UMS when it talks to iTunes by using some proprietary extra SCSI commands.

I'm pretty sure we're not going to duplicate it though.

PaulJam:
Hi,

i was wondering if the following procedure in a plugin would be possible in order to compensate the drift of the clock without need of communication with a host computer:

Assuming the drift is constant (for example for every 10000 seconds that have passed the clock is off by one second) i could imagine that it would be possible to have a plugin that calculates the necessary correction of the clock. So when the plugin is run the first time then you set the correct time and date in the plugin and it stores the current time and date to a file. When the plugin is run next time it calculates how many seconds have passed since the last synchronization and adjusts the time accordingly and updates the time and date of the last synchronization in the file. The hard part would probably be to determine how much the clock actually drifts.

Could this work? The only complication i could imagine is when the user modifies the time through the rockbox settings.

Navigation

[0] Message Index

[#] Next page

Go to full version