]> git.mxchange.org Git - flightgear.git/commit
Melchior FRANZ:
authorehofman <ehofman>
Fri, 27 Jun 2003 08:46:57 +0000 (08:46 +0000)
committerehofman <ehofman>
Fri, 27 Jun 2003 08:46:57 +0000 (08:46 +0000)
commit541d41af83da1ae51d7cfb51f19f725c7563276c
tree3491bcd9eca2f930ca10588dfe3332b7e693b223
parentfe1070bfc69e0f4097042b4101530017670b324f
Melchior FRANZ:
These patches add a clock instrument, which allows to model failure ("serviceable") and to adjust the time independently of the system time (defaults to GMT). The main incentive is to make the p51d clock work and adjustable via the knob.

 o Offers a time string ("12:03:15") for the LCD or for LED
   clocks, or an empty string in case of failure/power off. The
   instrument assumes that digital clocks are battery buffered,
   so they will be updated even if there's nothing on the display.

 o Offers the number of seconds since midnight for analog
   clocks, like in the p51d. This number is not increased
   if !serviceable. So the clock will stand still and continue
   where it stopped when it's serviceable again.

I did not consider voltage yet, because the Mustang's clock will need a lot more current than the LCD clock. The instrument is updated 4 times per second but returns immediately if neither time nor offset changed. The function getGMTString() in fg_props.cxx could be removed after applying these patches.
src/Instrumentation/Makefile.am
src/Instrumentation/clock.cxx [new file with mode: 0644]
src/Instrumentation/clock.hxx [new file with mode: 0644]
src/Instrumentation/instrument_mgr.cxx