summaryrefslogtreecommitdiffstats
path: root/src/progs/pickit2v2/base
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-15 15:33:27 -0600
committerTimothy Pearson <[email protected]>2011-12-15 15:33:27 -0600
commit9d6927a7d6a543332f828bffedf65eecf6774c6d (patch)
tree9f8210096908fddb7d266b477152021c45fa1a00 /src/progs/pickit2v2/base
parent3534213800bd8d151759df307755f2bbd592dfa1 (diff)
downloadpiklab-9d6927a7d6a543332f828bffedf65eecf6774c6d.tar.gz
piklab-9d6927a7d6a543332f828bffedf65eecf6774c6d.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/progs/pickit2v2/base')
-rw-r--r--src/progs/pickit2v2/base/pickit2v2.cpp20
-rw-r--r--src/progs/pickit2v2/base/pickit2v2.h4
-rw-r--r--src/progs/pickit2v2/base/pickit2v2_prog.cpp14
3 files changed, 19 insertions, 19 deletions
diff --git a/src/progs/pickit2v2/base/pickit2v2.cpp b/src/progs/pickit2v2/base/pickit2v2.cpp
index 478a0f7..a79484b 100644
--- a/src/progs/pickit2v2/base/pickit2v2.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2.cpp
@@ -45,9 +45,9 @@ bool Pickit2V2::Hardware::setTarget()
return true;
}
-bool Pickit2V2::Hardware::readtqStatus(ushort &status)
+bool Pickit2V2::Hardware::readStatus(ushort &status)
{
- if ( !port().command(ReadtqStatus) ) return false;
+ if ( !port().command(ReadStatus) ) return false;
Array a;
if ( !port().receive(a) ) return false;
status = (a[1] << 8) + a[0];
@@ -68,7 +68,7 @@ bool Pickit2V2::Hardware::executeScript(uint i)
{
Q_ASSERT( i!=0 );
const ScriptData &sdata = SCRIPT_DATA[i-1];
- log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").tqarg(i).tqarg(sdata.name));
+ log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").arg(i).arg(sdata.name));
return sendScript(sdata.data, sdata.length);
}
@@ -78,7 +78,7 @@ bool Pickit2V2::Hardware::getScriptBufferChecksum(uint &checksum)
Array array;
if ( !port().receive(array) ) return false;
checksum = (array[0] << 24) + (array[1] << 16) + (array[2] << 8) + array[3];
- log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").tqarg(toHexLabel(checksum, 8)));
+ log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").arg(toHexLabel(checksum, 8)));
return true;
}
@@ -87,7 +87,7 @@ bool Pickit2V2::Hardware::downloadScript(ScriptType type, uint i)
if (i==0 ) return true; // empty script
const ScriptData &sdata = SCRIPT_DATA[i-1];
log(Log::DebugLevel::Max, TQString(" download script #%1 (\"%2\") at position #%3")
- .tqarg(i-1).tqarg(sdata.name).tqarg(toHexLabel(type, 2)));
+ .arg(i-1).arg(sdata.name).arg(toHexLabel(type, 2)));
Array cmd;
cmd[0] = DownloadScript;
cmd[1] = type;
@@ -168,7 +168,7 @@ bool Pickit2V2::Hardware::setVppVoltage(double value, double threshold)
bool Pickit2V2::Hardware::setVddOn(bool on)
{
- log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").tqarg(on).tqarg(_base.isTargetSelfPowered()));
+ log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").arg(on).arg(_base.isTargetSelfPowered()));
ushort script[2];
script[0] = (on ? VddGroundOff : VddOff);
if ( _base.isTargetSelfPowered() ) script[1] = (on ? VddOff : VddGroundOff);
@@ -215,7 +215,7 @@ bool Pickit2V2::Hardware::readVoltages(VoltagesData &voltagesData)
bool Pickit2V2::Hardware::downloadAddress(Address address)
{
- log(Log::DebugLevel::Max, TQString("download address %1").tqarg(toHexLabel(address, 6)));
+ log(Log::DebugLevel::Max, TQString("download address %1").arg(toHexLabel(address, 6)));
Array cmd;
cmd[0] = ClearDownloadBuffer;
cmd[1] = DownloadData;
@@ -229,7 +229,7 @@ bool Pickit2V2::Hardware::downloadAddress(Address address)
bool Pickit2V2::Hardware::runScript(ScriptType stype, uint repetitions, uint nbNoLens)
{
log(Log::DebugLevel::Max, TQString("run script %1: repetitions=%2 nbNoLen=%3")
- .tqarg(toHexLabel(stype, 2)).tqarg(repetitions).tqarg(nbNoLens));
+ .arg(toHexLabel(stype, 2)).arg(repetitions).arg(nbNoLens));
#if 0 // ALTERNATE METHOD
const Data &d = data(device().name());
for (uint i=0; i<repetitions; i++)
@@ -283,7 +283,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
{
uint nbWords = device().nbWords(otype);
data.resize(nbWords);
- log(Log::DebugLevel::Max, TQString("read %1 nbWords=%2").tqarg(otype.label()).tqarg(nbWords));
+ log(Log::DebugLevel::Max, TQString("read %1 nbWords=%2").arg(otype.label()).arg(nbWords));
uint nbBytesWord = device().nbBytesWord(otype);
// EEPROM is read like regular program memory in midrange
if ( !device().is18Family() && !device().is16bitFamily() && otype==Pic::MemoryRangeType::Eeprom ) nbBytesWord = 2;
@@ -322,7 +322,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
if ( !runScript(stype, nbRuns, nbReceive) ) return false;
if ( !port().receiveWords(nbBytesWord, nbReceive, words) ) return false;
}
- log(Log::DebugLevel::Max, TQString("nbRunWords=%1 readNbWords=%2 index=%3/%4").tqarg(nbRunWords).tqarg(words.count()).tqarg(i).tqarg(nbWords));
+ log(Log::DebugLevel::Max, TQString("nbRunWords=%1 readNbWords=%2 index=%3/%4").arg(nbRunWords).arg(words.count()).arg(i).arg(nbWords));
for (uint k=0; k<words.count(); k++) {
if ( i>=nbWords ) break;
data[i] = words[k];
diff --git a/src/progs/pickit2v2/base/pickit2v2.h b/src/progs/pickit2v2/base/pickit2v2.h
index d1bd567..f50adb1 100644
--- a/src/progs/pickit2v2/base/pickit2v2.h
+++ b/src/progs/pickit2v2/base/pickit2v2.h
@@ -18,7 +18,7 @@ namespace Pickit2V2
enum FirmwareCommand {
EnterBootloader = 0x42, NoOperation = 0x5A, FirmwareVersion = 0x76,
- SetVdd = 0xA0, SetVpp = 0xA1, ReadtqStatus = 0xA2, ReadVoltages = 0xA3,
+ SetVdd = 0xA0, SetVpp = 0xA1, ReadStatus = 0xA2, ReadVoltages = 0xA3,
DownloadScript = 0xA4, RunScript = 0xA5, ExecuteScript = 0xA6,
ClearDownloadBuffer = 0xA7, DownloadData = 0xA8, ClearUploadBuffer = 0xA9,
UploadData = 0xAA, ClearScriptBuffer = 0xAB, UploadDataNoLen = 0xAC,
@@ -94,7 +94,7 @@ public:
bool setTarget();
bool setFastProgramming(bool fast);
virtual bool readVoltages(VoltagesData &voltagesData);
- bool readtqStatus(ushort &status);
+ bool readStatus(ushort &status);
bool readMemory(Pic::MemoryRangeType type, ::Device::Array &data, const ::Programmer::VerifyData *vdata);
bool writeMemory(Pic::MemoryRangeType type, const ::Device::Array &data, bool force);
bool eraseAll();
diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.cpp b/src/progs/pickit2v2/base/pickit2v2_prog.cpp
index 67788e9..74b82b6 100644
--- a/src/progs/pickit2v2/base/pickit2v2_prog.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2_prog.cpp
@@ -59,7 +59,7 @@ bool Pickit2V2::Base::identifyDevice()
if ( !hardware().executeScript(fdata.progExitScript) ) return false;
uint rawId = (data[2]<<8) + data[1];
if (fdata.progMemShift) rawId >>= 1;
- log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").tqarg(fdata.architecture.key()).tqarg(toHexLabelAbs(rawId)));
+ log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").arg(fdata.architecture.key()).arg(toHexLabelAbs(rawId)));
TQMap<TQString, Device::IdData> ids;
::Group::Base::ConstIterator it;
for (it=group().begin(); it!=group().end(); ++it) {
@@ -69,9 +69,9 @@ bool Pickit2V2::Base::identifyDevice()
if ( data->matchId(rawId, idata) ) ids[it.key()] = idata;
}
if ( ids.count()!=0 ) {
- log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; ")));
+ log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; ")));
if ( ids.contains(device()->name()) ) return true;
- message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name());
+ message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name());
break;
}
}
@@ -79,7 +79,7 @@ bool Pickit2V2::Base::identifyDevice()
logUserAbort();
return false;
}
- log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name()));
+ log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name()));
return true;
}
@@ -92,13 +92,13 @@ bool Pickit2V2::Base::setTarget()
bool Pickit2V2::Base::selfTest(bool ask)
{
ushort status;
- if ( !hardware().readtqStatus(status) ) return false;
+ if ( !hardware().readStatus(status) ) return false;
TQString error;
if ( status & VppError ) error += i18n("Vpp voltage level error; ");
if ( status & VddError ) error += i18n("Vdd voltage level error; ");
if ( error.isEmpty() ) return true;
- log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(error));
- if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(error)) ) {
+ log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(error));
+ if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(error)) ) {
logUserAbort();
return false;
}