- Messages
- 1,468
- Country

I'm sorry chaps, but yet again I'm having a problem with (P:local time,seconds).
The intention is to inhibit the light on for a period of time. Here are the two codes that set it up. The second being the lamp. The part of interest is in red. The problem is that (L:gear_delay,number) continues to count so will never be less than (P:local time, seconds). I can't see what's wrong as surely (L:gear_delay,number) should receive a single value and stay there until exceeded by (P:local time, seconds).
I have many other instances of this and they all work so I can't see what's wrong this time! (L:gear_delay,number) starts off as zero and stays there until the first code's conditions are met but instead of a single value it continues to count.
The intention is to inhibit the light on for a period of time. Here are the two codes that set it up. The second being the lamp. The part of interest is in red. The problem is that (L:gear_delay,number) continues to count so will never be less than (P:local time, seconds). I can't see what's wrong as surely (L:gear_delay,number) should receive a single value and stay there until exceeded by (P:local time, seconds).
I have many other instances of this and they all work so I can't see what's wrong this time! (L:gear_delay,number) starts off as zero and stays there until the first code's conditions are met but instead of a single value it continues to count.
Code:
<Element>
<Select>
<Value>(L:gear_cycled2,bool) 1 == (A:Gear handle position,percent) 50 > and [COLOR="Red"]if{ (P:local time, seconds) 30.00 + (>L:gear_delay,number) }[/COLOR]</Value>
</Select>
</Element>
Code:
<Value>(A:Gear center position,percent) 90 > (L:filament_burnt_out,number) 0 == and (L:BUS_SWITCH,number) (P:local time, seconds) < and [COLOR="Red"](L:gear_delay,number) (P:local time, seconds) < and[/COLOR] </Value>
Last edited:



