Change "FuriHalNfc Current state" trace to only log on change of state #1272
Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
parent
0d5d4c8688
commit
533f12af15
@ -61,6 +61,7 @@ bool furi_hal_nfc_detect(FuriHalNfcDevData* nfc_data, uint32_t timeout) {
|
||||
|
||||
rfalLowPowerModeStop();
|
||||
rfalNfcState state = rfalNfcGetState();
|
||||
rfalNfcState state_old = 0;
|
||||
if(state == RFAL_NFC_STATE_NOTINIT) {
|
||||
rfalNfcInitialize();
|
||||
}
|
||||
@ -83,11 +84,14 @@ bool furi_hal_nfc_detect(FuriHalNfcDevData* nfc_data, uint32_t timeout) {
|
||||
while(true) {
|
||||
rfalNfcWorker();
|
||||
state = rfalNfcGetState();
|
||||
if(state != state_old) {
|
||||
FURI_LOG_T(TAG, "State change %d -> %d", state_old, state);
|
||||
}
|
||||
state_old = state;
|
||||
if(state == RFAL_NFC_STATE_ACTIVATED) {
|
||||
detected = true;
|
||||
break;
|
||||
}
|
||||
FURI_LOG_T(TAG, "Current state %d", state);
|
||||
if(state == RFAL_NFC_STATE_POLL_ACTIVATION) {
|
||||
start = DWT->CYCCNT;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user