fix field LED in LF reading and in HF cloning

This commit is contained in:
Philippe Teuwen
2023-10-11 19:22:29 +02:00
parent ea6576c567
commit bac3552d85
4 changed files with 6 additions and 3 deletions
+1
View File
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Fixed field LED when LF reading and HF cloning (@doegox)
- Added renaming of slot into "cloned" when having cloned an ID/UID with a button (@doegox)
- Fixed spurious LED in battery level, assigned battery level to long press B (@doegox)
- Changed `hw slot list` to display LF ID & HF anticol data, and names in the --short version too (@doegox)
+3 -2
View File
@@ -672,13 +672,14 @@ static void btn_fn_copy_ic_uid(void) {
if (!is_reader_mode_now) {
// finish HF reader initialization
pcd_14a_reader_reset();
pcd_14a_reader_antenna_on();
bsp_delay_ms(8);
}
pcd_14a_reader_antenna_on();
bsp_delay_ms(8);
// select a tag
picc_14a_tag_t tag;
status = pcd_14a_reader_scan_auto(&tag);
pcd_14a_reader_antenna_off();
if (status == HF_TAG_OK) {
// copy uid
antres->size = tag.uid_len;
@@ -117,6 +117,7 @@ void lf_125khz_radio_uninit(void) {
*/
void start_lf_125khz_radio(void) {
nrf_drv_pwm_simple_playback(&m_pwm, &m_lf_125khz_pwm_seq_obj, 1, NRF_DRV_PWM_FLAG_LOOP);
TAG_FIELD_LED_ON();
}
/**
@@ -124,4 +125,5 @@ void start_lf_125khz_radio(void) {
*/
void stop_lf_125khz_radio(void) {
nrf_drv_pwm_stop(&m_pwm, true);
TAG_FIELD_LED_OFF();
}
@@ -20,7 +20,6 @@ uint32_t g_timeout_readem_ms = 500;
*/
uint8_t PcdScanEM410X(uint8_t *uid) {
uint8_t ret = EM410X_TAG_NO_FOUND;
init_em410x_hw();
if (em410x_read(uid, g_timeout_readem_ms) == 1) {
ret = LF_TAG_OK;
}