Example #1
0
        public static void M570SetFilamentUID(GCode gcode, FirmwareController connection)
        {
            EepromAddressInfo eepromInfo = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("FilamentUID");

            connection.AddManualCommandToFront("M618 S" + eepromInfo.EepromAddr + " P" + gcode.P + " T" + eepromInfo.Size);
            StandardVirtualCodes.SendOK(connection);
        }
Example #2
0
        public static void M682SetLimitingSpeed(GCode gcode, FirmwareController connection)
        {
            EepromAddressInfo eepromInfo1 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("SpeedLimitX");
            EepromAddressInfo eepromInfo2 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("SpeedLimitY");
            EepromAddressInfo eepromInfo3 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("SpeedLimitZ");
            EepromAddressInfo eepromInfo4 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("SpeedLimitEp");
            EepromAddressInfo eepromInfo5 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("SpeedLimitEn");

            if (gcode.HasX)
            {
                var num1 = (int)connection.WriteManualCommands("M618 S" + (int)eepromInfo1.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.X) + " T" + eepromInfo1.Size);
            }
            if (gcode.HasY)
            {
                var num2 = (int)connection.WriteManualCommands("M618 S" + (int)eepromInfo2.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.Y) + " T" + eepromInfo2.Size);
            }
            if (gcode.HasZ)
            {
                var num3 = (int)connection.WriteManualCommands("M618 S" + (int)eepromInfo3.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.Z) + " T" + eepromInfo3.Size);
            }
            if (gcode.HasE)
            {
                var num4 = (int)connection.WriteManualCommands("M618 S" + (int)eepromInfo4.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.E) + " T" + eepromInfo4.Size);
            }
            if (gcode.HasR)
            {
                var num5 = (int)connection.WriteManualCommands("M618 S" + (int)eepromInfo5.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.R) + " T" + eepromInfo5.Size);
            }
            StandardVirtualCodes.SendOK(connection);
        }
Example #3
0
        public static void M580SetBackLashSpeed(GCode gcode, FirmwareController connection)
        {
            connection.SetBacklashSpeed(gcode.X);
            EepromAddressInfo eepromInfo = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("BacklashSpeed");
            var num = (int)connection.WriteManualCommands("M618 S" + eepromInfo.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.X) + " T" + eepromInfo.Size);

            StandardVirtualCodes.SendOK(connection);
        }
Example #4
0
        public static void M571SetBacklashConstants(GCode gcode, FirmwareController connection)
        {
            EepromAddressInfo eepromInfo1 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("BacklashX");
            EepromAddressInfo eepromInfo2 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("BacklashY");

            connection.SetBacklash(gcode.X, gcode.Y);
            var num1 = (int)connection.WriteManualCommands("M618 S" + eepromInfo1.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.X) + " T" + eepromInfo1.Size);
            var num2 = (int)connection.WriteManualCommands("M618 S" + eepromInfo2.EepromAddr + " P" + EEPROMMapping.FloatToBinaryInt(gcode.Y) + " T" + eepromInfo2.Size);

            StandardVirtualCodes.SendOK(connection);
        }
Example #5
0
        public static void M577SetBedOffsets(GCode gcode, FirmwareController connection)
        {
            EepromAddressInfo eepromInfo1 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("ZCalibrationBLO");
            EepromAddressInfo eepromInfo2 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("ZCalibrationBRO");
            EepromAddressInfo eepromInfo3 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("ZCalibrationFRO");
            EepromAddressInfo eepromInfo4 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("ZCalibrationFLO");
            EepromAddressInfo eepromInfo5 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("ZCalibrationZO");
            var stringList = new List <string>();

            if (gcode.HasX && eepromInfo1 != null)
            {
                var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.X), 0);
                stringList.Add("M618 S" + eepromInfo1.EepromAddr + " P" + int32 + " T" + eepromInfo1.Size);
            }
            if (gcode.HasY && eepromInfo2 != null)
            {
                var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.Y), 0);
                stringList.Add("M618 S" + eepromInfo2.EepromAddr + " P" + int32 + " T" + eepromInfo2.Size);
            }
            if (gcode.HasZ && eepromInfo3 != null)
            {
                var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.Z), 0);
                stringList.Add("M618 S" + eepromInfo3.EepromAddr + " P" + int32 + " T" + eepromInfo3.Size);
            }
            if (gcode.HasE && eepromInfo4 != null)
            {
                var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.E), 0);
                stringList.Add("M618 S" + eepromInfo4.EepromAddr + " P" + int32 + " T" + eepromInfo4.Size);
            }
            if (gcode.hasF && eepromInfo5 != null)
            {
                var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.F), 0);
                stringList.Add("M618 S" + eepromInfo5.EepromAddr + " P" + int32 + " T" + eepromInfo5.Size);
            }
            if (connection.CalibrationDetails.UsesCalibrationOffset)
            {
                EepromAddressInfo eepromInfo6 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("CalibrationOffset");
                if (gcode.HasI && eepromInfo6 != null)
                {
                    var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.I), 0);
                    stringList.Add("M618 S" + eepromInfo6.EepromAddr + " P" + int32 + " T" + eepromInfo6.Size);
                }
            }
            if (stringList.Count > 0)
            {
                connection.AddManualCommandToFront(stringList.ToArray());
            }

            StandardVirtualCodes.SendOK(connection);
        }
Example #6
0
        public static void M575SetFilament(GCode gcode, FirmwareController connection)
        {
            EepromAddressInfo eepromInfo1 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("FilamentColorID");
            EepromAddressInfo eepromInfo2 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("FilamentTypeID");
            EepromAddressInfo eepromInfo3 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("FilamentTemperature");
            EepromAddressInfo eepromInfo4 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("FilamentAmount");
            var num1  = (int)connection.WriteManualCommands("M618 S" + eepromInfo1.EepromAddr + " P" + gcode.S + " T" + eepromInfo1.Size, "M618 S" + eepromInfo2.EepromAddr + " P" + gcode.P + " T" + eepromInfo2.Size, "M618 S" + eepromInfo3.EepromAddr + " P" + gcode.T + " T" + eepromInfo3.Size);
            var int32 = BitConverter.ToInt32(BitConverter.GetBytes(gcode.E), 0);
            var num2  = (int)connection.WriteManualCommands("M618 S" + eepromInfo4.EepromAddr + " P" + int32 + " T" + eepromInfo4.Size);
            EepromAddressInfo eepromInfo5 = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("FilamentSize");
            var num3 = (int)connection.WriteManualCommands("M618 S" + eepromInfo5.EepromAddr + " P" + gcode.I + " T" + eepromInfo5.Size);

            StandardVirtualCodes.SendOK(connection);
        }
Example #7
0
        public static void M582SetNozzleWidth(GCode gcode, FirmwareController connection)
        {
            EepromAddressInfo eepromInfo = connection.MyPrinterProfile.EEPROMConstants.GetEepromInfo("NozzleSizeExtrusionWidth");

            if (eepromInfo == null)
            {
                connection.WriteLog(string.Format(">> Error:Printer doesn't have adjustable nozzle."), Logger.TextType.Read);
            }
            else
            {
                connection.AddManualCommandToFront("M618 S" + eepromInfo.EepromAddr + " P" + gcode.S + " T" + eepromInfo.Size);
            }

            StandardVirtualCodes.SendOK(connection);
        }
Example #8
0
 public static void SetFanConstantsXinyujie(GCode gcode, FirmwareController connection)
 {
     StandardVirtualCodes.SendOK(connection);
     connection.SetFanConstants(FanConstValues.FanType.Xinyujie);
 }
Example #9
0
 public static void SetFanConstantsShinZoo(GCode gcode, FirmwareController connection)
 {
     StandardVirtualCodes.SendOK(connection);
     connection.SetFanConstants(FanConstValues.FanType.Shenzhew);
 }
Example #10
0
 public static void M304SetGantryClipsToOn(GCode gcode, FirmwareController connection)
 {
     connection.SetGantryClips(false);
     StandardVirtualCodes.SendOK(connection);
 }
Example #11
0
 public static void M1013StopwatchStart(GCode gcode, FirmwareController connection)
 {
     connection.VStopwatchReset();
     StandardVirtualCodes.SendOK(connection);
 }
Example #12
0
 public static void SetFanConstantsHeineken(GCode gcode, FirmwareController connection)
 {
     StandardVirtualCodes.SendOK(connection);
     connection.SetFanConstants(FanConstValues.FanType.HengLiXin);
 }
Example #13
0
 public static void SetExtruderCurrent660(GCode gcode, FirmwareController connection)
 {
     StandardVirtualCodes.SendOK(connection);
     connection.SetExtruderCurrent(660);
 }