#Input scan and Panel/Sim Sync

1 messages · Page 1 of 1 (latest)

stuck crane
#

I have, as generally recommended, only used 1 input on the Arduino for 2-way switches and 2 inputs for 3-way switches and then used the ‘on release’ function to assign actions to the switch positions without a dedicated input. This all works fine until a switch is in the state that does not have an input at start-up for which Mobiflight does not know about until the switch is toggled, meaning that the sim and physical panel are not synchronised. Is there a routine that can be run automatically at start-up that scans the inputs (much like the standard one) but goes something like ‘if no input is detected for any switches, then they must be in the “on release” state, and action accordingly”

Thanks for any help

warped anchor
#

Mobiflight in fact does that for auto-retrigger, if the state of the switch is released, then the on-release event is sent to the simulator.

#

However, the preset code selected for this to work appropriately must be state-aware. That implies that either a command specific for the switch position is used, or if a toggle command is only available, the sim status must be checked to decide if the toggle action should be taken or not.

#

Auto-retrigger is by default on. Check in the Extras-Settings to see if it is on.

stuck crane
#

Jamie, Many Thanks for your guidance - I think its now sorted. Auto trigger was indeed 'ticked', but still the problem persisted as explained, but reading through your post again, got me thinking - I stopped and restarted MF, with various switches in their release state - and surprise, the sim reflected the correct switch positions. The problem I believe was, that I was using a batch process to run MF when the sim started, which was starting MF before any aircraft had loaded into the sim, by starting MF once in the cockpit all seems well - Thanks once again for the pointer and knowledge that the feature should work as desired