public static void M684PrintAllEepromValues(GCode gcode, FirmwareController connection) { SortedList <int, EepromAddressInfo> allData = connection.MyPrinterProfile.EEPROMConstants.GetAllData(); var text = ">> ok "; foreach (EepromAddressInfo eepromAddressInfo in allData.Values) { if (eepromAddressInfo.EepromAddr <= 512) { text = text + eepromAddressInfo.Name + ": "; if (eepromAddressInfo.Type.Equals(typeof(float))) { text = text + connection.FloatFromEEPROM(eepromAddressInfo.Name).ToString("0.00") + "\n"; } else if (eepromAddressInfo.Type.Equals(typeof(uint)) || eepromAddressInfo.Type.Equals(typeof(int)) || (eepromAddressInfo.Type.Equals(typeof(ushort)) || eepromAddressInfo.Type.Equals(typeof(short))) || eepromAddressInfo.Type.Equals(typeof(byte))) { text = text + connection.eeprom_mapping.GetUInt32(eepromAddressInfo.Name).ToString() + "\n"; } else { if (!eepromAddressInfo.Type.Equals(typeof(char))) { throw new Exception("Unexpected type"); } text = text + connection.eeprom_mapping.GetInt32(eepromAddressInfo.Name).ToString() + "\n"; } } } connection.WriteLog(text, Logger.TextType.Read); }
public static void M683GetLimitingSpeed(GCode gcode, FirmwareController connection) { var text = string.Format(">> ok X:{0} Y:{1} Z:{2} E:{3} R:{4}", connection.FloatFromEEPROM("SpeedLimitX").ToString("0.00"), connection.FloatFromEEPROM("SpeedLimitY").ToString("0.00"), connection.FloatFromEEPROM("SpeedLimitZ").ToString("0.00"), connection.FloatFromEEPROM("SpeedLimitEp").ToString("0.00"), connection.FloatFromEEPROM("SpeedLimitEn").ToString("0.00")); connection.WriteLog(text, Logger.TextType.Read); }