Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by petergrecian - 2004-06-18

FS#2232 - timesync

timesync sets the clock on the jukebox to that of a
host computer.

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.

Happy listening everybody!

Peter Grecian
Fri Jun 18 10:34:05 BST 2004

ToDo
====

1) get arround disk spin up time
see comment timesync.pl line 65

2) deal with days and years. Easiest way is to do 3
runs of the plugin.
First delta ignored and just sets the AJB clock to the
host file timestamp.
Hard way is to understand calendars - which has been
done somewhere in rockbox.

   patch (6.5 KiB)
Closed by  bagder
2007-05-19 15:27
Reason for closing:  Rejected
Anonymous Submitter commented on 2006-02-11 17:31

I think there is a better way, ie. automatically updating
the time on each connection without user intervention.

(Note I’m only familiar with Windows and the iRiver H140,
but this would probably work elsewhere).

You write a little app that sits on the host and waits for
the player to connect (ie. for the drive letter to
appear). As soon as that happens, the app creates a dummy
file on the player which is timestamped.

RockBox automatically waits for the appearance of this file
on connection (ideally this would be in the background and
wouldn’t cause a boot delay, and would timeout after eg. 30
secs). As soon as it shows, it compares the timestamp with
its own internal time and corrects accordingly, then
deletes the file.

This wouldn’t be accurate to the second, but that doesn’t
seem important to me.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing