Exemplo n.º 1
0
        public override void SetExtruderCurrent(ushort current)
        {
            var eepromMapping1 = new EEPROMMapping(m_oBootloaderConnection.ReadAllReadableEEPROM(), MyPrinterProfile.EEPROMConstants);

            if (eepromMapping1.GetUInt16("ExtruderCurrent") == current)
            {
                return;
            }

            m_oBootloaderConnection.WriteToEEPROM(GetEEPROMDataLocation("ExtruderCurrent"), BitConverter.GetBytes(current));
            var eepromMapping2 = new EEPROMMapping(m_oBootloaderConnection.ReadAllReadableEEPROM(), MyPrinterProfile.EEPROMConstants);

            if (eepromMapping1.GetUInt16("ExtruderCurrent") == current)
            {
                WriteLog(">> ok", Logger.TextType.Read);
            }
            else
            {
                WriteLog(">> failed", Logger.TextType.Read);
            }
        }
Exemplo n.º 2
0
        private void CheckEEPROMValuesAfterUpdate()
        {
            var eepromMapping = new EEPROMMapping(m_oBootloaderConnection.ReadAllReadableEEPROM(), MyPrinterProfile.EEPROMConstants);
            var uint32        = (int)eepromMapping.GetUInt32("FirmwareVersion");

            byte[] bytes = new byte[4];
            if (eepromMapping.GetUInt16("SavedZState") != 0)
            {
                return;
            }

            m_oBootloaderConnection.WriteToEEPROM(GetEEPROMDataLocation("LastRecordedZValue"), bytes);
        }