Merge pull request #14390 from jordan-woyak/triforce-mag-card-cleaning

MagneticCardReader: Automatically insert a blank card when Command_A0_Clean is received.
This commit is contained in:
JMC47 2026-02-16 20:44:31 -05:00 committed by GitHub
commit 9323074ada
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -409,24 +409,22 @@ void MagneticCardReader::Command_A0_Clean()
switch (m_current_step)
{
case 2:
if (!IsCardPresent())
// TODO: How is this command supposed to behave if a card is already in the machine ?
if (!IsCardLoaded())
{
m_status.s = S::WAITING_FOR_CARD;
--m_current_step;
break;
NOTICE_LOG_FMT(SERIALINTERFACE_CARD, "Inserting cleaning card.");
Core::DisplayMessage("Inserting cleaning card", 4000);
MoveCard(R::THERMAL_HEAD);
}
break;
case 3:
MoveCard(R::THERMAL_HEAD);
break;
case 4:
EjectCard();
break;
default:
break;
}
if (m_current_step >= 4)
if (m_current_step >= 3)
FinishCommand();
}