[FL-1904] LFRFID: dedicated reading modes (#823)
* LFRFID: dedicated reading modes * LFRFID: normal and indala mode
This commit is contained in:
@@ -102,7 +102,7 @@ void RfidReader::stop() {
|
||||
stop_comparator();
|
||||
}
|
||||
|
||||
bool RfidReader::read(LfrfidKeyType* _type, uint8_t* data, uint8_t data_size) {
|
||||
bool RfidReader::read(LfrfidKeyType* _type, uint8_t* data, uint8_t data_size, bool switch_enable) {
|
||||
bool result = false;
|
||||
bool something_readed = false;
|
||||
|
||||
@@ -140,7 +140,7 @@ bool RfidReader::read(LfrfidKeyType* _type, uint8_t* data, uint8_t data_size) {
|
||||
}
|
||||
|
||||
// mode switching
|
||||
if(switch_timer_elapsed()) {
|
||||
if(switch_enable && switch_timer_elapsed()) {
|
||||
switch_mode();
|
||||
last_readed_count = 0;
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
void start();
|
||||
void start_forced(RfidReader::Type type);
|
||||
void stop();
|
||||
bool read(LfrfidKeyType* type, uint8_t* data, uint8_t data_size);
|
||||
bool read(LfrfidKeyType* type, uint8_t* data, uint8_t data_size, bool switch_enable = true);
|
||||
|
||||
bool detect();
|
||||
bool any_read();
|
||||
|
Reference in New Issue
Block a user