public ProgcomIO(ProgcomUnit pcu, int offset, IProgcomSerialBus bus)
        {
            mProgcom        = pcu;
            mOffset         = offset;
            mBus            = bus;
            mMonitor        = CreateMonitor();
            mMonitorTexture = mMonitor.GetMonitorTexture();

            Log("Cleared console.");
        }
        public ProgcomIO(ProgcomUnit pcu, int offset, IProgcomSerialBus bus)
        {
            mProgcom = pcu;
            mOffset = offset;
            mBus = bus;
            mMonitor = CreateMonitor();
            mMonitorTexture = mMonitor.GetMonitorTexture();

            Log("Cleared console.");
        }
Esempio n. 3
0
        private void Parse(String s)
        {
            ProgcomIO   io      = mFlightComputer.Progcom.IO;
            ProgcomUnit progcom = mFlightComputer.Progcom;

            if (String.IsNullOrEmpty(s))
            {
                return;
            }
            io.Log("> " + s);
            String[] split = s.Split(' ');
            switch (split[0])
            {
            default:
                io.Log("Parsing error.");
                break;

            case "upload":
                if (split.Length < 2)
                {
                    io.Log("Missing argument.");
                }
                else
                {
                    io.Upload(split[1]);
                }
                break;

            case "run":
                progcom.Run();
                io.Log("Running...");
                break;

            case "pause":
                progcom.Pause();
                io.Log("Stopping...");
                break;

            case "resume":
                io.Log("Resuming...");
                progcom.Resume();
                break;

            case "reset":
                io.Log("Resetting...");
                progcom.Reset();
                break;
            }
        }