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.
This commit is contained in:
parent
d6db5103d9
commit
4d4fef591b
2 changed files with 6 additions and 2 deletions
|
@ -84,13 +84,13 @@ properties' values.
|
||||||
<chunks>
|
<chunks>
|
||||||
<chunk>
|
<chunk>
|
||||||
<type>text-value</type>
|
<type>text-value</type>
|
||||||
<property>/sim/time/gmt-string</property>
|
<property>/instrumentation/clock/indicated-string</property>
|
||||||
</chunk>
|
</chunk>
|
||||||
</chunks>
|
</chunks>
|
||||||
<transformations>
|
<transformations>
|
||||||
<transformation>
|
<transformation>
|
||||||
<type>x-shift</type>
|
<type>x-shift</type>
|
||||||
<offset>-34</offset>
|
<offset>-31</offset>
|
||||||
</transformation>
|
</transformation>
|
||||||
<transformation>
|
<transformation>
|
||||||
<type>y-shift</type>
|
<type>y-shift</type>
|
||||||
|
|
|
@ -544,6 +544,10 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
<gps>
|
<gps>
|
||||||
<serviceable type="bool" archive="y">true</serviceable>
|
<serviceable type="bool" archive="y">true</serviceable>
|
||||||
</gps>
|
</gps>
|
||||||
|
<clock>
|
||||||
|
<serviceable type="bool" archive="y">true</serviceable>
|
||||||
|
<offset-sec type="long" archive="y">0</offset-sec>
|
||||||
|
</clock>
|
||||||
</instrumentation>
|
</instrumentation>
|
||||||
|
|
||||||
<systems>
|
<systems>
|
||||||
|
|
Loading…
Reference in a new issue