diff --git a/TODO.md b/TODO.md index 9ec85da..c130a22 100644 --- a/TODO.md +++ b/TODO.md @@ -16,16 +16,17 @@ - [ ] card + PIN read - [x] timeout on keycode - [x] rework ACL as struct (with cards, timer, etc) - - [ ] Update other variants + - [ ] Update all variants - [ ] controller - - [ ] picow/wifi - - [ ] picow/wifi+usb + - [x] picow/base + - [x] picow/wifi + - [x] picow/wifi+usb - [ ] pico/base - [ ] pico/usb - [ ] universal - [x] picow/base - - [ ] picow/wifi - - [ ] picow/wifi+usb + - [x] picow/wifi + - [x] picow/wifi+usb - [ ] pico/base - [ ] pico/usb - [ ] Remove debug stuff diff --git a/pico/universal/pico/base/src/universal.c b/pico/universal/pico/base/src/universal.c index f9e654c..59c438b 100644 --- a/pico/universal/pico/base/src/universal.c +++ b/pico/universal/pico/base/src/universal.c @@ -110,27 +110,6 @@ int main() { free(b); } - if ((v & MSG) == MSG_CARD) { - on_card_read(v & 0x0fffffff); - - if (last_card.ok && ((mode == READER) || (mode == CONTROLLER))) { - enum ACCESS access; - - if ((access = acl_allowed(last_card.facility_code, last_card.card_number, "")) == GRANTED) { - last_card.access = GRANTED; - led_blink(1); - door_unlock(5000); - } else { - last_card.access = DENIED; - led_blink(3); - } - } - - char s[64]; - cardf(&last_card, s, sizeof(s), false); - logd_log(s); - } - if ((v & MSG) == MSG_LED) { led_event(v & 0x0fffffff); } diff --git a/pico/universal/pico/usb/src/universal.c b/pico/universal/pico/usb/src/universal.c index b8525b3..ce40c2e 100644 --- a/pico/universal/pico/usb/src/universal.c +++ b/pico/universal/pico/usb/src/universal.c @@ -111,27 +111,6 @@ int main() { free(b); } - if ((v & MSG) == MSG_CARD) { - on_card_read(v & 0x0fffffff); - - if (last_card.ok && ((mode == READER) || (mode == CONTROLLER))) { - enum ACCESS access; - - if ((access = acl_allowed(last_card.facility_code, last_card.card_number, "")) == GRANTED) { - last_card.access = GRANTED; - led_blink(1); - door_unlock(5000); - } else { - last_card.access = DENIED; - led_blink(3); - } - } - - char s[64]; - cardf(&last_card, s, sizeof(s), false); - logd_log(s); - } - if ((v & MSG) == MSG_LED) { led_event(v & 0x0fffffff); } diff --git a/pico/universal/picow/wifi+usb/src/universal.c b/pico/universal/picow/wifi+usb/src/universal.c index 12c7a1f..59dc132 100644 --- a/pico/universal/picow/wifi+usb/src/universal.c +++ b/pico/universal/picow/wifi+usb/src/universal.c @@ -118,27 +118,6 @@ int main() { free(b); } - if ((v & MSG) == MSG_CARD) { - on_card_read(v & 0x0fffffff); - - if (last_card.ok && ((mode == READER) || (mode == CONTROLLER))) { - enum ACCESS access; - - if ((access = acl_allowed(last_card.facility_code, last_card.card_number, "")) == GRANTED) { - last_card.access = GRANTED; - led_blink(1); - door_unlock(5000); - } else { - last_card.access = DENIED; - led_blink(3); - } - } - - char s[64]; - cardf(&last_card, s, sizeof(s), false); - logd_log(s); - } - if ((v & MSG) == MSG_LED) { led_event(v & 0x0fffffff); } diff --git a/pico/universal/picow/wifi/src/universal.c b/pico/universal/picow/wifi/src/universal.c index 7a409d3..26c140b 100644 --- a/pico/universal/picow/wifi/src/universal.c +++ b/pico/universal/picow/wifi/src/universal.c @@ -116,27 +116,6 @@ int main() { free(b); } - if ((v & MSG) == MSG_CARD) { - on_card_read(v & 0x0fffffff); - - if (last_card.ok && ((mode == READER) || (mode == CONTROLLER))) { - enum ACCESS access; - - if ((access = acl_allowed(last_card.facility_code, last_card.card_number, "")) == GRANTED) { - last_card.access = GRANTED; - led_blink(1); - door_unlock(5000); - } else { - last_card.access = DENIED; - led_blink(3); - } - } - - char s[64]; - cardf(&last_card, s, sizeof(s), false); - logd_log(s); - } - if ((v & MSG) == MSG_LED) { led_event(v & 0x0fffffff); }