service: nfc: Start adapter communication on scan (#6671)

This commit is contained in:
Narr the Reg 2023-07-07 20:02:39 -06:00 committed by GitHub
parent cd3244f139
commit 26e3f96983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -218,7 +218,10 @@ ResultCode NfcDevice::StartDetection(TagProtocol allowed_protocol) {
return ResultInvalidOperation;
}
// TODO: Set console in search mode here
// Ensure external device is active
if (communication_state == CommunicationState::Idle) {
StartCommunication();
}
device_state = DeviceState::SearchingForTag;
allowed_protocols = allowed_protocol;