diff options
Diffstat (limited to 'src/devices/pic/prog/pic_prog.cpp')
-rw-r--r-- | src/devices/pic/prog/pic_prog.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp index b134303..f0c917d 100644 --- a/src/devices/pic/prog/pic_prog.cpp +++ b/src/devices/pic/prog/pic_prog.cpp @@ -106,9 +106,9 @@ bool Programmer::PicBase::readVoltages() if ( !group().canReadVoltage(Pic::VoltageType(i)) ) continue; if ( _voltages[i].error==true ) { ok = false; - log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } else if ( _voltages[i].value!=UNKNOWN_VOLTAGE ) - log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } return ok; } @@ -136,10 +136,10 @@ bool Programmer::PicBase::initProgramming(Task) const Pic::VoltageData &tvpp = device()->voltage(Pic::Vpp); if ( vpp()<tvpp.min ) log(Log::LineType::Warning, i18n("Vpp (%1 V) is lower than the minimum required voltage (%2 V).") - .arg(vpp()).arg(tvpp.min)); + .tqarg(vpp()).tqarg(tvpp.min)); if ( vpp()>tvpp.max ) { TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vpp()).arg(tvpp.max); + .tqarg(vpp()).tqarg(tvpp.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -153,15 +153,15 @@ bool Programmer::PicBase::initProgramming(Task) if ( vdd()<tvdd.min ) { if ( type==Pic::VddBulkErase && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for high-voltage programming\n(piklab only supports high-voltage programming at the moment).\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else if ( type==Pic::VddRead && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for reading\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); } else if ( vdd()>tvdd.max ) { TQString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vdd()).arg(tvdd.max); + .tqarg(vdd()).tqarg(tvdd.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -178,7 +178,7 @@ bool Programmer::PicBase::initProgramming(Task) _hasProtectedCode = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); _hasProtectedEeprom = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Eeprom); log(Log::DebugLevel::Normal, TQString(" protected: code=%1 data=%2") - .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false")); + .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false")); // read calibration if ( !readCalibration() ) return false; } @@ -250,14 +250,14 @@ bool Programmer::PicBase::verifyDeviceId() { if ( !specific()->canReadRange(Pic::MemoryRangeType::DeviceId ) ) return true; if ( !device()->isReadable(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").tqarg(device()->name())); return true; } BitValue rawId = readDeviceId(); if ( hasError() ) return false; uint nbChars = device()->nbWords(Pic::MemoryRangeType::DeviceId) * device()->nbCharsWord(Pic::MemoryRangeType::DeviceId); if ( rawId==0x0 || rawId==device()->mask(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); return false; } TQMap<TQString, Device::IdData> ids; @@ -270,18 +270,18 @@ bool Programmer::PicBase::verifyDeviceId() } TQString message; if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); } else { - log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); message = i18n("Unknown device."); } if ( !askContinue(message) ) { logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } @@ -306,7 +306,7 @@ bool Programmer::PicBase::readCalibration() Device::Array data; if ( !specific()->read(Pic::MemoryRangeType::Cal, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::Cal, data); - log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").tqarg(prettyCalibration(data))); TQString message; if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); if ( device()->isReadable(Pic::MemoryRangeType::CalBackup) ) { @@ -316,7 +316,7 @@ bool Programmer::PicBase::readCalibration() } if ( !specific()->read(Pic::MemoryRangeType::CalBackup, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::CalBackup, data); - log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").tqarg(prettyCalibration(data))); if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); } } @@ -381,7 +381,7 @@ bool Programmer::PicBase::restoreBandGapBits() log(Log::LineType::Warning, i18n("Could not restore band gap bits because programmer does not support writing config bits.")); return true; } - log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").arg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); + log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); if ( !programRange(Pic::MemoryRangeType::Config, cdata) ) return false; if ( !specific()->read(Pic::MemoryRangeType::Config, data, 0) ) return false; if ( data==cdata ) log(Log::LineType::Information, i18n(" Band gap bits have been preserved.")); @@ -464,7 +464,7 @@ bool Programmer::PicBase::internalEraseRange(Pic::MemoryRangeType type) log(Log::LineType::SoftError, i18n("Cannot erase specified range because of programmer limitations.")); return false; } - if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").arg(type.label())) ) { + if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").tqarg(type.label())) ) { logUserAbort(); return false; } @@ -497,19 +497,19 @@ bool Programmer::PicBase::readRange(Pic::MemoryRangeType type, Pic::Memory *memo { if ( !device()->isReadable(type) ) return true; if ( !specific()->canReadRange(type) ) { - log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label())); + log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").tqarg(type.label())); return true; } VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0); if (vdata) { - log(Log::LineType::Information, i18n(" Verify memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label())); if ( !(vdata->actions & IgnoreProtectedVerify) ) { vdata->protectedRanges = static_cast<const Pic::Memory &>(vdata->memory).protectedRanges(Pic::Protection::ProgramProtected, type); if ( !vdata->protectedRanges.isEmpty() ) log(Log::LineType::Warning, i18n(" Part of device memory is protected (in %1) and cannot be verified.") - .arg(type.label())); + .tqarg(type.label())); } else vdata->protectedRanges.clear(); } else { - log(Log::LineType::Information, i18n(" Read memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label())); CRASH_ASSERT(memory); } Device::Array data; @@ -562,7 +562,7 @@ bool Programmer::PicBase::programSingle(Pic::MemoryRangeType type, const Pic::Me bool Programmer::PicBase::programRange(Pic::MemoryRangeType mtype, const Device::Array &data) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(mtype.label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(mtype.label())); bool only = ( readConfigEntry(Config::OnlyProgramNonMask).toBool() && (mtype==Pic::MemoryRangeType::Code || mtype==Pic::MemoryRangeType::Eeprom) ); return specific()->write(mtype, data, !only); @@ -672,15 +672,15 @@ bool Programmer::PicBase::checkProgramCalibration(const Device::Array &data) { TQString message, s = prettyCalibration(data); if ( !device()->checkCalibration(data, &message) ) { - sorry(i18n("The calibration word %1 is not valid.").arg(s), message); + sorry(i18n("The calibration word %1 is not valid.").tqarg(s), message); return false; } - return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s)); + return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s)); } bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); success = true; if ( !specific()->write(Pic::MemoryRangeType::Cal, data, true) ) return false; Device::Array read; @@ -691,7 +691,7 @@ bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool if ( device()->isWritable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; if ( device()->checkCalibration(read) ) return true; // do not overwrite correct backup value - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); if ( !specific()->write(Pic::MemoryRangeType::CalBackup, data, true) ) return false; if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; for (uint i=0; i<data.count(); i++) |