|
Rockbox mail archiveSubject: RE: time syncRE: time sync
From: VanBaren, Gerald (AGRE) <"VanBaren,>
Date: Fri, 18 Jun 2004 06:03:26 -0600 > -----Original Message----- > From: rockbox-bounces_at_cool.haxx.se > [mailto:rockbox-bounces_at_cool.haxx.se]On Behalf Of Peter Grecian > Sent: Friday, June 18, 2004 5:33 AM > To: Rockbox development > Subject: Re: time sync > > > How timeSync works: > > You run the timeSync plugin on the jukebox and timeSync.pl on > the host. > You press f1 on the jukebox and enter on the host at the same time. > (This creates a file on the jukebox), > You connect the USB. > > (The host script mounts the filesystem, > calculates the difference in seconds between when enter was hit > and the timestamp on the file on the jukebox. > This is written to a file on the jukebox. > The script unmounts the jukebox) > > You disconnect the USB. > You run the timeSync plugin again which sets the clock > according to the > time difference file. > > Currently it only deals with hours, minutes and seconds so is > unreliable > at midnight. The script assumes the mount point is > /mnt/archos and would > need some changes for a non unix system (I guess). If the plugin > turns out to be useful it would be worth developing it further. > > Peter HI Peter, That's very clever. One thought to simplify it (thoughts are cheap, implmentation is a different matter ;-) is to put the timesync code in the portion of Rockbox that is running when the USB is connected. That code simply sits & spins, waiting for the USB to be disconnected. My thought is to add to the USB spin loop... 1 Watch the f1 key (or any key for that matter) while the USB was connected. 2 When the key is pressed, start a time counter. Meanwhile, on the PC... 3 Write a file which will inherently have a timestamp (and you could put a timestamp inside if you wished) when the <ENTER> key was pressed. When the PC is disconnected (hopefully fairly soon)... 4 The USB spin loop will see that the PC was disconnected. It can then look at the timestamp on (in) the special file, add the delta time it was accumulating from step 2, and viola' time setting capability. I have not looked at the Rockbox code in this area to verify this would work and how difficult it would be, but it sounds good in email. gvb ****************************************** The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email. ****************************************** _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox Received on 2004-06-18 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |