Exemple #1
0
/*************************************************************************************************************************/
        public void flybywire(FlightCtrlState state)
        {
            entry temp_entry;

            FMRS.Log.Info("flybywire, state: " + state.ToString());
            if (!replay && !EOF)
            {
                start_replay();
            }

            while (true)
            {
                if (Throttle_Replay.Count < 10 && !EOF)
                {
                    read_throttle_values();
                }
                if (Throttle_Replay.Count < 1)
                {
                    EndReplay();
                    break;
                }
                temp_entry = Throttle_Replay.Dequeue();
                if (temp_entry.time < Planetarium.GetUniversalTime())
                {
                    continue;
                }
                state.mainThrottle = temp_entry.value;
                debug_message      = Math.Round(temp_entry.value, 2).ToString() + " : " + Math.Round(temp_entry.time, 2).ToString() + " @ " + Math.Round(Planetarium.GetUniversalTime(), 2).ToString() + " left " + Throttle_Replay.Count.ToString();
                break;
            }
        }