n4gix
Resource contributor
- Messages
- 11,674
- Country

This routine is supposed to preserve the condition of the aircraft's light settings so that they will go OFF when master battery is OFF, and then be restored when master battery power is ON again...
The lights do indeed switch off, but when power is restored the previous settings are lost. What did I do wrong?
The lights do indeed switch off, but when power is restored the previous settings are lost. What did I do wrong?

Code:
(A:ELECTRICAL MASTER BATTERY,bool) ! (L:LightsState,bool) ! and
if{
(L:SwitchFLTLts,enum) (>L:SwitchFLTLts_Prev,enum) 0 (>L:SwitchFLTLts,enum)
(L:SwitchPNLLts,enum) (>L:SwitchPNLLts_Prev,enum) 0 (>L:SwitchPNLLts,enum)
(L:SwitchEngLts,enum) (>L:SwitchEngLts_Prev,enum) 0 (>L:SwitchEngLts,enum)
1 (L:LightsState,bool)
}
(A:ELECTRICAL MASTER BATTERY,bool) (L:LightsState,bool) and
if{
(L:SwitchFLTLts_Prev,enum) (>L:SwitchFLTLts,enum)
(L:SwitchPNLLts_Prev,enum) (>L:SwitchPNLLts,enum)
(L:SwitchEngLts_Prev,enum) (>L:SwitchEngLts,enum)
0 (L:LightsState,bool)
}

