2008/11/15 Alexander Wagner <[EMAIL PROTECTED]>
> Hi!
>
> As I managed to get my hands on a DGT XL clock I also added
> proper support to input engine driver and by that means also
> to Scid.
>
> Now I tried to hook it up with the usual game play
> functions, but I'm not entirely clear how to do this
> correctly. Especially I'm confused with the gameclock 1/2
> and their change with engine colour and if it is enough to
> just call ::gameclock:setSec at all.
To use clocks you just call gameclock::new and gameclock:setSec should be
enough. You can also change some parameters in ::gameclock::data array but
it should not be necessary (for example ::gameclock::data(fg$n) represents
clock's foreground color). There are many examples of use of clocks (play
games, FICS in Scid's code).
>
>
> Additionally, I'm not sure about how to handle Fisher
> timings. Point is, that in case of the DGT clock these
> timings can just be set as a Clock mode (same is ture for
> Bronstein and other time formats). Therefore, I think it is
> inconsistent to increment any times locally. What would be
> required is setting time from some source and just follow
> it.
>
Once the clock is created, basic operations are :
- start
- stop
- setSec
- getSec
Once a clock is started, it counts timing by itself, without external
source. For example with FICS, clocks are synchronized after every move
because I get the info from FICS server. But between two moves, it works (of
course) by itself.
>
> Pascal, maybe you could have a look here? I fear to screw
> things up. I think, it would be logical to either have a
> button "external timer" (as timing option) or to just use it
> in case an external timer is found.
>
I don't understand : where is the reference ? It is either Scid's clocks or
an external source. Depending on the reference you synchronize clocks in
master / slave mode. For example on FICS, the reference is the server.
>
> Currently, there're two variables that just contain external
> timing:
>
> ::inputengine::WhiteClock
>
> and
>
> ::inputengine::BlackClock
>
> The logic is, that these two variables just contain the time
> in seconds on the external clock. They are updated from this
> external source periodically, that is, a proper event
> arrives every second. If no clock is found, they both
> contain "--:--". (Currently, "no clock" is identical to a
> clock which is halted. dgtnix does not distingish between
> these two events, yet(?))
You should not need those extra variables. You already have Scid's clocks
that contain those informations and the same value in two places could lead
to problems.
>
>
> Additionally, there is
>
> ::inputengine::toMove
>
> which is set either to "White" or "Black", depending on the
> side to move. (This is also sent as a clock event actually.)
>
> I've commited the code to cvs.
I cannot give it a try (I have no DGT board and clock). Donations are
welcome :-)
But clock handling should not be a hard thing to do (the code is already
there in the ::gameclock namespace).
Pascal
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users