Add debug output for account request
This commit is contained in:
parent
414dda009e
commit
1467530e3c
@ -152,10 +152,21 @@ void ATBDeviceControllerPlugin::private_startAccount()
|
||||
// it is not defined which one is the latest account
|
||||
hw->log_getHoldAccountNumbers(&nrOfVals, backupedAccNumbers);
|
||||
|
||||
// DEBUG
|
||||
qCritical() << "Start account: ";
|
||||
qCritical() << " nrOfVals = " << nrOfVals;
|
||||
for (int i=0; i<nrOfVals; ++i) {
|
||||
qCritical() << " backupedAccNumbers[" << i << "] = " << backupedAccNumbers[0];
|
||||
}
|
||||
|
||||
qsort( backupedAccNumbers, nrOfVals, sizeof (uint16_t), Utils::compare );
|
||||
|
||||
uint16_t latestAccountNumber = backupedAccNumbers[nrOfVals-1];
|
||||
|
||||
|
||||
// DEBUG
|
||||
qCritical() << " latestAccountNumber = " << latestAccountNumber;
|
||||
|
||||
hw->log_selectVaultRecord(latestAccountNumber);
|
||||
|
||||
this->accountCheckCounter = 0;
|
||||
@ -164,6 +175,9 @@ void ATBDeviceControllerPlugin::private_startAccount()
|
||||
|
||||
void ATBDeviceControllerPlugin::private_checkAccountData()
|
||||
{
|
||||
// DEBUG
|
||||
qCritical() << " --> private_checkAccountData()";
|
||||
|
||||
if (hw->log_chkIfVaultRecordAvailable()) {
|
||||
this->private_getAccountData();
|
||||
}
|
||||
@ -184,6 +198,9 @@ void ATBDeviceControllerPlugin::private_checkAccountData()
|
||||
|
||||
void ATBDeviceControllerPlugin::private_getAccountData()
|
||||
{
|
||||
// DEBUG
|
||||
qCritical() << " --> private_getAccountData()";
|
||||
|
||||
struct T_vaultRecord retVR;
|
||||
|
||||
hw->log_getVaultRecord(&retVR);
|
||||
@ -195,6 +212,10 @@ void ATBDeviceControllerPlugin::private_getAccountData()
|
||||
for (uint i = 0; i < sizeof(retVR.coinsInVault); ++i) {
|
||||
accountData.insert("COIN_" + QString::number(i) + "_Quantity", retVR.coinsInVault[i]);
|
||||
accountData.insert("COIN_" + QString::number(i) + "_Value", retVR.coinDenomination[i]);
|
||||
|
||||
// DEBUG
|
||||
qCritical() << "COIN_" + QString::number(i) + "_Quantity = " << accountData["COIN_" + QString::number(i) + "_Quantity"];
|
||||
qCritical() << "COIN_" + QString::number(i) + "_Value = " << accountData["COIN_" + QString::number(i) + "_Value"];
|
||||
}
|
||||
|
||||
emit requestAccountResponse(accountData);
|
||||
|
Loading…
Reference in New Issue
Block a user