Ejemplo n.º 1
0
        // Get AVRDUDE version
        private void GetVersion()
        {
            version = "";

            Launch("", CommandType.GET_VERSION, OutputTo.Log);
            WaitForExit();

            if (outputLog != null)
            {
                string log = outputLog;
                int    pos = log.IndexOf("avrdude version");
                if (pos > -1)
                {
                    log     = log.Substring(pos);
                    version = log.Substring(0, log.IndexOf(','));
                }
            }

            OnVersionChange?.Invoke(this, EventArgs.Empty);
        }
Ejemplo n.º 2
0
        private void GetVersion()
        {
            Version = "";

            Launch("-V", CommandType.GET_VERSION, OutputTo.Log);
            WaitForExit();

            if (outputLog != null)
            {
                string log = outputLog;
                int    pos = log.IndexOf(EXECUTABLE_NAME_DFU_UTIL);
                if (pos > -1)
                {
                    log     = log.Substring(pos);
                    Version = log.Substring(0, log.IndexOf("\r\n"));
                }
            }

            OnVersionChange?.Invoke(this, EventArgs.Empty);
        }