If I have systems.cfg:
circuit.30 = …
how to I set that circuit to ON and OFF in model xml RPN ?
1 (>CIRCUIT ON:30,bool) won’t work to enable the circuit because that simvar is read only
30 (>K:ELECTRICAL_CIRCUIT_TOGGLE) kinda works but that means to SET the circuit ON requires first reading the CIRCUIT ON simvar and deciding whether to toggle the circuit or not which seems an oddly convoluted way to set something, i.e. SET is
(A:CIRCUIT ON:30, boolean) 0 == if{
30 (>K:ELECTRICAL_CIRCUIT_TOGGLE)
}
100 30 (>K:ELECTRICAL_CIRCUIT_POWER_SETTING_SET) didn’t set the circuit on for me but maybe I messed that up somehow.
The SDK “Aircraft Electrical Events” doesn’t have a section for Circuits although it does list a lot of events and the SDK “Electrical Systems” tutorial seems to target “systems.cfg” (via the SDK UI) and doesn’t provide examples in any of the SDK languages to control the “Electrical System”.
I think the ‘circuits’ are a great idea as an intermediate layer between sources and consumers of electrical power so theoretically a “device X” could be on “circuit Y” and we wouldn’t need a custom “turn_device_x_on” keyevent, just the more general “turn on circuit:Y” but somehow I missed the info on how to do the latter.