Skip to content

Commit 8625a65

Browse files
committed
Added log messages for commands
1 parent 7ef8a6d commit 8625a65

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

qt/main_window.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,13 @@ void MainWindow::slotProgReadDeviceIdCompleted(int status)
236236
idStr.sprintf("0x%02X 0x%02X 0x%02X 0x%02X", chipId.makerId,
237237
chipId.deviceId, chipId.thirdId, chipId.fourthId);
238238
ui->deviceValueLabel->setText(idStr);
239+
240+
qInfo() << QString("ID ").append(idStr).toLatin1().data();
239241
}
240242

241243
void MainWindow::slotProgReadDeviceId()
242244
{
245+
qInfo() << "Reading chip ID ...";
243246
connect(prog, SIGNAL(readChipIdCompleted(int)), this,
244247
SLOT(slotProgReadDeviceIdCompleted(int)));
245248
prog->readChipId(&chipId);
@@ -265,6 +268,8 @@ void MainWindow::slotProgErase()
265268
return;
266269
}
267270

271+
qInfo() << "Erasing chip ...";
272+
268273
connect(prog, SIGNAL(eraseChipCompleted(int)), this,
269274
SLOT(slotProgEraseCompleted(int)));
270275

@@ -308,6 +313,8 @@ void MainWindow::slotProgRead()
308313
return;
309314
}
310315

316+
qInfo() << "Reading data ...";
317+
311318
connect(prog, SIGNAL(readChipCompleted(int)), this,
312319
SLOT(slotProgReadCompleted(int)));
313320

@@ -348,6 +355,8 @@ void MainWindow::slotProgWrite()
348355
return;
349356
}
350357

358+
qInfo() << "Writing data ...";
359+
351360
connect(prog, SIGNAL(writeChipCompleted(int)), this,
352361
SLOT(slotProgWriteCompleted(int)));
353362

@@ -365,6 +374,8 @@ void MainWindow::slotProgReadBadBlocksCompleted(int status)
365374

366375
void MainWindow::slotProgReadBadBlocks()
367376
{
377+
qInfo() << "Reading bad blocks ...";
378+
368379
connect(prog, SIGNAL(readChipBadBlocksCompleted(int)), this,
369380
SLOT(slotProgReadBadBlocksCompleted(int)));
370381

@@ -379,7 +390,7 @@ void MainWindow::slotProgSelectCompleted(int status)
379390
if (!status)
380391
{
381392
setUiStateSelected(true);
382-
qInfo() << "Chip has been selected successfully";
393+
qInfo() << "Programmer configured successfully";
383394
}
384395
else
385396
setUiStateSelected(false);
@@ -397,6 +408,8 @@ void MainWindow::slotSelectChip(int selectedChipNum)
397408
return;
398409
}
399410

411+
qInfo() << "Configuring programmer ...";
412+
400413
connect(prog, SIGNAL(confChipCompleted(int)), this,
401414
SLOT(slotProgSelectCompleted(int)));
402415

0 commit comments

Comments
 (0)