/* Calculates new state of logical switches for mixerCurrentFlightMode.  */
void evalLogicalSwitches(bool isCurrentFlightmode)
/* Calculates new state of logical switches for mixerCurrentFlightMode.  */
void evalLogicalSwitches(bool isCurrentFlightmode)
{
  for (unsigned int idx=0; idx<MAX_LOGICAL_SWITCHES; idx++) {
    LogicalSwitchContext & context = lswFm[mixerCurrentFlightMode].lsw[idx];
    bool result = getLogicalSwitch(idx);
    if (isCurrentFlightmode) {
      if (result) {
        if (!context.state) PLAY_LOGICAL_SWITCH_ON(idx);
      }
      else {
        if (context.state) PLAY_LOGICAL_SWITCH_OFF(idx);
      }
    }
    context.state = result;
  }
}