示例#1
0
        public static async Task <bool> WriteEepromAsync(this ISerial serial, Eeprom eepromValue)
        {
            var ee = new EepromV1 {
                Values = eepromValue.Values
            };

            if (ee.IsValid)
            {
                eepromValue.WriteTo(ee);

                File.WriteAllLines(Environment.ExpandEnvironmentVariables(@"%TEMP%\EepromWrite.nc"), ee.ToGCode());

                await serial.WriteEepromValuesAsync(ee);

                return(true);
            }

            return(false);
        }