Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            label2.Text=
                "Return  Takeoff\n" +
                " Space  Motors OFF (be careful - drone falls out off the sky!!!)\n" +
                "     I  Fly forward\n"+
                "     ,  Fly backward\n"+
                "     J  Fly leftward\n"+
                "     L  Fly rightward\n"+
                "     K  Hover\n" +
                "     W  Fly 5cm higher\n"+
                "     S  Fly 5cm lower\n"+
                "     A  Rotate 5 degrees anticlockwise\n"+
                "     D  Rotate 5 degrees clockwise\n" +
                "\n" +
                "Note: All keypresses on this PC are captured, even if this window is not active!!!\n";
            lblState.Text = string.Format("Start 'fly' on the drone then press Space to connect...");
            label1.Text = string.Format("");
            lblPos.Text = string.Format("");

            log = new UdpLogger(7778, string.Format("{0:yyyyMMddHHmmss}_navlog.csv", DateTime.Now));
            timer1.Interval = 250;
            timer1.Enabled = true;

            InterceptKeys.Start(KeyDownCallback);
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            label2.Text =
                "Return  Takeoff\n" +
                " Space  Motors OFF (be careful - drone falls out off the sky!!!)\n" +
                "     I  Fly forward\n" +
                "     ,  Fly backward\n" +
                "     J  Fly leftward\n" +
                "     L  Fly rightward\n" +
                "     K  Hover\n" +
                "     W  Fly 5cm higher\n" +
                "     S  Fly 5cm lower\n" +
                "     A  Rotate 5 degrees anticlockwise\n" +
                "     D  Rotate 5 degrees clockwise\n" +
                "\n" +
                "Note: All keypresses on this PC are captured, even if this window is not active!!!\n";
            lblState.Text = string.Format("Start 'fly' on the drone then press Space to connect...");
            label1.Text   = string.Format("");
            lblPos.Text   = string.Format("");

            log             = new UdpLogger(7778, string.Format("{0:yyyyMMddHHmmss}_navlog.csv", DateTime.Now));
            timer1.Interval = 250;
            timer1.Enabled  = true;

            InterceptKeys.Start(KeyDownCallback);
        }
Exemplo n.º 3
0
        private void InitializeLogging()
        {
            if (Log.Instance == null)
            {
                var logger = new UdpLogger();
                logger.ExposeToApi(ApiController);

                Log.Instance = logger;
            }

            Log.Info("Starting...");
        }
Exemplo n.º 4
0
        private void SetupLogger()
        {
            if (Log.Instance != null)
            {
                return;
            }

            var udpLogger = new UdpLogger();

            udpLogger.Start();

            Log.Instance = udpLogger;
        }