Compare commits

..

6 Commits

Author SHA1 Message Date
Philipp_EndevourOS
db7e22f45d new file will be created when sd card is empty 2025-10-01 18:58:08 +02:00
Philipp_EndevourOS
c91f290c31 removed dummy data and pass read tally id 2025-10-01 18:56:37 +02:00
becdd43738 connect RFID reader with IDStore 2025-10-01 18:00:45 +02:00
Philipp
453b653ac5 updated enclousure top 3mf 2025-10-01 17:56:30 +02:00
cc3605b75d return sdcard from hardware init 2025-10-01 17:54:54 +02:00
57ccc0cc8b fixed missing await 2025-10-01 17:51:51 +02:00
20 changed files with 796 additions and 820 deletions

Binary file not shown.

Binary file not shown.

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"board": { "board": {
"active_layer": 6, "active_layer": 7,
"active_layer_preset": "", "active_layer_preset": "",
"auto_track_width": true, "auto_track_width": true,
"hidden_netclasses": [], "hidden_netclasses": [],
@@ -49,7 +49,11 @@
"conflict_shadows", "conflict_shadows",
"shapes" "shapes"
], ],
"visible_layers": "00000000_00000000_0fffffff_fffff8ef", <<<<<<< HEAD
"visible_layers": "00000000_00000000_0fffffff_fffff8aa",
=======
"visible_layers": "00000000_00000000_0fffffff_fffff8ab",
>>>>>>> 15c64e4 (updated enclousure top 3mf)
"zone_display_mode": 0 "zone_display_mode": 0
}, },
"git": { "git": {

View File

@@ -6157,7 +6157,7 @@
) )
) )
(symbol (symbol
(lib_id "power:+5V") (lib_id "power:+3.3V")
(at 158.75 95.25 270) (at 158.75 95.25 270)
(unit 1) (unit 1)
(exclude_from_sim no) (exclude_from_sim no)
@@ -6165,8 +6165,8 @@
(on_board yes) (on_board yes)
(dnp no) (dnp no)
(fields_autoplaced yes) (fields_autoplaced yes)
(uuid "2964c836-6055-454e-b889-14ec73d51d79") (uuid "2ae7a711-ee06-4c71-80b4-273d6f6d7ce6")
(property "Reference" "#PWR06" (property "Reference" "#PWR015"
(at 154.94 95.25 0) (at 154.94 95.25 0)
(effects (effects
(font (font
@@ -6175,7 +6175,7 @@
(hide yes) (hide yes)
) )
) )
(property "Value" "+5V" (property "Value" "+3.3V"
(at 162.56 95.2499 90) (at 162.56 95.2499 90)
(effects (effects
(font (font
@@ -6202,7 +6202,7 @@
(hide yes) (hide yes)
) )
) )
(property "Description" "Power symbol creates a global label with name \"+5V\"" (property "Description" "Power symbol creates a global label with name \"+3.3V\""
(at 158.75 95.25 0) (at 158.75 95.25 0)
(effects (effects
(font (font
@@ -6212,12 +6212,12 @@
) )
) )
(pin "1" (pin "1"
(uuid "4da695c4-c5ff-46c5-b130-7514e0da8e01") (uuid "04891225-ec31-465b-8d9c-5b738e413865")
) )
(instances (instances
(project "" (project "fw-anwesenheit"
(path "/ccbf1fda-befd-42da-bcb2-5d3829184012" (path "/ccbf1fda-befd-42da-bcb2-5d3829184012"
(reference "#PWR06") (reference "#PWR015")
(unit 1) (unit 1)
) )
) )

Binary file not shown.

View File

@@ -1,213 +1,213 @@
P CODE 00 P CODE 00
P UNITS CUST 0 P UNITS CUST 0
P arrayDim N P arrayDim N
317GND VIA MD0118PA00X+035433Y-045241X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+035433Y-045241X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+047750Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+047750Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046550Y-043700X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046550Y-043700X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046950Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046950Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+044450Y-033050X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+044450Y-033050X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043600Y-040300X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043600Y-040300X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050950Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050950Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038800Y-048850X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038800Y-048850X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+034150Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+034150Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+040550Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+040550Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+044550Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+044550Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+040120Y-047880X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+040120Y-047880X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048850Y-037100X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048850Y-037100X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+049500Y-036550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+049500Y-036550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+036500Y-038600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+036500Y-038600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+042300Y-042500X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+042300Y-042500X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+040900Y-042500X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+040900Y-042500X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048750Y-038400X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048750Y-038400X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041150Y-049250X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041150Y-049250X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038800Y-049100X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038800Y-049100X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+034850Y-040600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+034850Y-040600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+051100Y-045600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+051100Y-045600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+047150Y-036350X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+047150Y-036350X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048100Y-050150X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048100Y-050150X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+034950Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+034950Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+033051Y-044472X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+033051Y-044472X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043600Y-041800X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043600Y-041800X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+044650Y-036950X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+044650Y-036950X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046340Y-045450X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046340Y-045450X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038450Y-048600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038450Y-048600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+047750Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+047750Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+049600Y-045500X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+049600Y-045500X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050787Y-045776X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050787Y-045776X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+034050Y-039300X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+034050Y-039300X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+049350Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+049350Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038950Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038950Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+042850Y-047400X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+042850Y-047400X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038600Y-041300X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038600Y-041300X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050500Y-045950X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050500Y-045950X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048100Y-049850X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048100Y-049850X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050950Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050950Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+037200Y-048900X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+037200Y-048900X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+035750Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+035750Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038600Y-041800X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038600Y-041800X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+033200Y-049950X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+033200Y-049950X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+049950Y-038400X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+049950Y-038400X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050150Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050150Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+033350Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+033350Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+044550Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+044550Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043600Y-039800X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043600Y-039800X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043600Y-041300X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043600Y-041300X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+042950Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+042950Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+047250Y-039150X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+047250Y-039150X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046340Y-044709X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046340Y-044709X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041350Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041350Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041200Y-038450X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041200Y-038450X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048400Y-049850X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048400Y-049850X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+037350Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+037350Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+037350Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+037350Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050750Y-036850X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050750Y-036850X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+032550Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+032550Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+037550Y-046600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+037550Y-046600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+045450Y-036150X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+045450Y-036150X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046950Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046950Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048420Y-050150X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048420Y-050150X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038950Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038950Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043850Y-042500X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043850Y-042500X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038150Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038150Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+045350Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+045350Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046150Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046150Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038100Y-048600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038100Y-048600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046650Y-039000X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046650Y-039000X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043750Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043750Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048550Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048550Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+045350Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+045350Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043750Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043750Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050150Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050150Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+051100Y-045950X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+051100Y-045950X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+046150Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+046150Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038800Y-048600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038800Y-048600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048050Y-039000X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048050Y-039000X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043500Y-045350X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043500Y-045350X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048550Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048550Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+040550Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+040550Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+036550Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+036550Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+049350Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+049350Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050650Y-033050X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050650Y-033050X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041350Y-044650X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041350Y-044650X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+042150Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+042150Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038600Y-040300X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038600Y-040300X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+043600Y-040800X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+043600Y-040800X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038100Y-048850X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038100Y-048850X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038150Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038150Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041350Y-044300X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041350Y-044300X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+047250Y-046950X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+047250Y-046950X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+042950Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+042950Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041526Y-041339X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041526Y-041339X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+050500Y-045600X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+050500Y-045600X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048850Y-037400X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048850Y-037400X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+039750Y-031750X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+039750Y-031750X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+037645Y-038800X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+037645Y-038800X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+039750Y-050550X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+039750Y-050550X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038450Y-049100X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038450Y-049100X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038600Y-040800X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038600Y-040800X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+041640Y-047740X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+041640Y-047740X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038450Y-048850X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038450Y-048850X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+048228Y-046885X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+048228Y-046885X0177Y0000R000S-2119174445
317GND VIA MD0118PA00X+038100Y-049100X0177Y0000R000S1628436659 317GND VIA MD0118PA00X+038100Y-049100X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+050480Y-044960X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+050480Y-044960X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038820Y-050080X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038820Y-050080X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+050480Y-044600X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+050480Y-044600X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038460Y-050080X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038460Y-050080X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+051040Y-044620X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+051040Y-044620X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+047360Y-044720X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+047360Y-044720X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038160Y-049860X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038160Y-049860X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+037200Y-049500X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+037200Y-049500X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038820Y-049640X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038820Y-049640X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+034451Y-049801X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+034451Y-049801X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+051040Y-044980X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+051040Y-044980X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038820Y-049860X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038820Y-049860X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+047150Y-043700X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+047150Y-043700X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038460Y-049640X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038460Y-049640X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038460Y-049860X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038460Y-049860X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+049600Y-044900X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+049600Y-044900X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+050780Y-044780X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+050780Y-044780X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038160Y-050080X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038160Y-050080X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+038160Y-049640X0177Y0000R000S1628436659 317+5V VIA MD0118PA00X+038160Y-049640X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+041050Y-047400X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+041050Y-047400X0177Y0000R000S-2119174445
317+5V VIA MD0118PA00X+032874Y-036304X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+032874Y-036304X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+049606Y-040320X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+049606Y-040320X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038255Y-038800X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038255Y-038800X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+040400Y-037150X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+040400Y-037150X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+047244Y-047638X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+047244Y-047638X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+035595Y-038976X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+035595Y-038976X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048000Y-037450X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048000Y-037450X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+046457Y-040320X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+046457Y-040320X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+043350Y-048650X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+043350Y-048650X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+040450Y-048550X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+040450Y-048550X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038800Y-037150X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038800Y-037150X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+046350Y-048650X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+046350Y-048650X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048150Y-044050X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048150Y-044050X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+041300Y-047400X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+041300Y-047400X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048031Y-040320X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048031Y-040320X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038450Y-047600X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038450Y-047600X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048000Y-037100X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048000Y-037100X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+041300Y-047150X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+041300Y-047150X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+046600Y-048650X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+046600Y-048650X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038800Y-047850X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038800Y-047850X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+041050Y-047150X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+041050Y-047150X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048100Y-038400X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048100Y-038400X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+050394Y-040354X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+050394Y-040354X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+043650Y-048650X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+043650Y-048650X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038450Y-048100X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038450Y-048100X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038450Y-047850X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038450Y-047850X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038800Y-048100X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038800Y-048100X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+045669Y-040320X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+045669Y-040320X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+040350Y-038800X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+040350Y-038800X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+032750Y-043500X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+032750Y-043500X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+035595Y-038189X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+035595Y-038189X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048819Y-040320X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048819Y-040320X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+047244Y-040320X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+047244Y-040320X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038800Y-047600X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038800Y-047600X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038100Y-048100X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038100Y-048100X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048228Y-047603X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048228Y-047603X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038100Y-047850X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038100Y-047850X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+036100Y-050350X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+036100Y-050350X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+038100Y-047600X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+038100Y-047600X0177Y0000R000S-2119174445
317+3.3V VIA MD0118PA00X+048150Y-045550X0177Y0000R000S1628436659 317+3.3V VIA MD0118PA00X+048150Y-045550X0177Y0000R000S-2119174445
317NET-(R3-PAD1) VIA MD0118PA00X+035433Y-042948X0177Y0000R000S1628436659 317NET-(R3-PAD1) VIA MD0118PA00X+035433Y-042948X0177Y0000R000S-2119174445
317/SD_DECT VIA MD0118PA00X+050138Y-037264X0177Y0000R000S1628436659 317/SD_DECT VIA MD0118PA00X+050138Y-037264X0177Y0000R000S-2119174445
317/SD_DECT VIA MD0118PA00X+044800Y-049900X0177Y0000R000S1628436659 317/SD_DECT VIA MD0118PA00X+044800Y-049900X0177Y0000R000S-2119174445
317/MISO VIA MD0118PA00X+038450Y-045800X0177Y0000R000S1628436659 317/MISO VIA MD0118PA00X+038450Y-045800X0177Y0000R000S-2119174445
317/MISO VIA MD0118PA00X+049272Y-037264X0177Y0000R000S1628436659 317/MISO VIA MD0118PA00X+049272Y-037264X0177Y0000R000S-2119174445
317/SPI_SCL VIA MD0118PA00X+048400Y-037264X0177Y0000R000S1628436659 317/SPI_SCL VIA MD0118PA00X+048400Y-037264X0177Y0000R000S-2119174445
317/SPI_SCL VIA MD0118PA00X+038450Y-044900X0177Y0000R000S1628436659 317/SPI_SCL VIA MD0118PA00X+038450Y-044900X0177Y0000R000S-2119174445
317/SPI_SCL VIA MD0118PA00X+048031Y-039601X0177Y0000R000S1628436659 317/SPI_SCL VIA MD0118PA00X+048031Y-039601X0177Y0000R000S-2119174445
317/MOSI VIA MD0118PA00X+037500Y-044550X0177Y0000R000S1628436659 317/MOSI VIA MD0118PA00X+037500Y-044550X0177Y0000R000S-2119174445
317/MOSI VIA MD0118PA00X+047539Y-037264X0177Y0000R000S1628436659 317/MOSI VIA MD0118PA00X+047539Y-037264X0177Y0000R000S-2119174445
317/SPI_CS VIA MD0118PA00X+046250Y-046000X0177Y0000R000S1628436659 317/SPI_CS VIA MD0118PA00X+046250Y-046000X0177Y0000R000S-2119174445
317/SPI_CS VIA MD0118PA00X+047106Y-037264X0177Y0000R000S1628436659 317/SPI_CS VIA MD0118PA00X+047106Y-037264X0177Y0000R000S-2119174445
317/BUZZER VIA MD0118PA00X+044450Y-046650X0177Y0000R000S1628436659 317/BUZZER VIA MD0118PA00X+044450Y-046650X0177Y0000R000S-2119174445
317-GPIO16_D6_TX) VIA MD0118PA00X+036480Y-047320X0177Y0000R000S1628436659 317-GPIO16_D6_TX) VIA MD0118PA00X+036480Y-047320X0177Y0000R000S-2119174445
317-GPIO16_D6_TX) VIA MD0118PA00X+045700Y-046650X0177Y0000R000S1628436659 317-GPIO16_D6_TX) VIA MD0118PA00X+045700Y-046650X0177Y0000R000S-2119174445
317/I2C_SCL VIA MD0118PA00X+043000Y-038300X0177Y0000R000S1628436659 317/I2C_SCL VIA MD0118PA00X+043000Y-038300X0177Y0000R000S-2119174445
317/I2C_SCL VIA MD0118PA00X+045600Y-046100X0177Y0000R000S1628436659 317/I2C_SCL VIA MD0118PA00X+045600Y-046100X0177Y0000R000S-2119174445
317/I2C_SCL VIA MD0118PA00X+043225Y-043575X0177Y0000R000S1628436659 317/I2C_SCL VIA MD0118PA00X+043225Y-043575X0177Y0000R000S-2119174445
317/I2C_SCL VIA MD0118PA00X+034680Y-046240X0177Y0000R000S1628436659 317/I2C_SCL VIA MD0118PA00X+034680Y-046240X0177Y0000R000S-2119174445
317/I2C_SDA VIA MD0118PA00X+042900Y-044100X0177Y0000R000S1628436659 317/I2C_SDA VIA MD0118PA00X+042900Y-044100X0177Y0000R000S-2119174445
317/I2C_SDA VIA MD0118PA00X+042900Y-038800X0177Y0000R000S1628436659 317/I2C_SDA VIA MD0118PA00X+042900Y-038800X0177Y0000R000S-2119174445
317/I2C_SDA VIA MD0118PA00X+044812Y-045842X0177Y0000R000S1628436659 317/I2C_SDA VIA MD0118PA00X+044812Y-045842X0177Y0000R000S-2119174445
317/I2C_SDA VIA MD0118PA00X+033300Y-046050X0177Y0000R000S1628436659 317/I2C_SDA VIA MD0118PA00X+033300Y-046050X0177Y0000R000S-2119174445
317/DAT2 VIA MD0118PA00X+046673Y-037264X0177Y0000R000S1628436659 317/DAT2 VIA MD0118PA00X+046673Y-037264X0177Y0000R000S-2119174445
317/DAT1 VIA MD0118PA00X+049705Y-037264X0177Y0000R000S1628436659 317/DAT1 VIA MD0118PA00X+049705Y-037264X0177Y0000R000S-2119174445
317NET-(J1-PIN_1) VIA MD0118PA00X+047100Y-049800X0177Y0000R000S1628436659 317NET-(J1-PIN_1) VIA MD0118PA00X+047100Y-049800X0177Y0000R000S-2119174445
317NET-(J1-PIN_1) VIA MD0118PA00X+047100Y-050000X0177Y0000R000S1628436659 317NET-(J1-PIN_1) VIA MD0118PA00X+047100Y-050000X0177Y0000R000S-2119174445
317NET-(J1-PIN_1) VIA MD0118PA00X+047100Y-050200X0177Y0000R000S1628436659 317NET-(J1-PIN_1) VIA MD0118PA00X+047100Y-050200X0177Y0000R000S-2119174445
317ET-(U3-~{RST}) VIA MD0118PA00X+033850Y-038500X0177Y0000R000S1628436659 317ET-(U3-~{RST}) VIA MD0118PA00X+033850Y-038500X0177Y0000R000S-2119174445
317ET-(U3-~{RST}) VIA MD0118PA00X+037750Y-039800X0177Y0000R000S1628436659 317ET-(U3-~{RST}) VIA MD0118PA00X+037750Y-039800X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+042450Y-045000X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+042450Y-045000X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+045800Y-049600X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+045800Y-049600X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+042250Y-045000X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+042250Y-045000X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+042250Y-044750X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+042250Y-044750X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+042450Y-044450X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+042450Y-044450X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+046050Y-049350X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+046050Y-049350X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+042250Y-044450X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+042250Y-044450X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+045850Y-049400X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+045850Y-049400X0177Y0000R000S-2119174445
317NET-(JP1-A) VIA MD0118PA00X+042450Y-044750X0177Y0000R000S1628436659 317NET-(JP1-A) VIA MD0118PA00X+042450Y-044750X0177Y0000R000S-2119174445
327GND C5 -1 A01X+048730Y-038386X0354Y0374R180S2 327GND C5 -1 A01X+048730Y-038386X0354Y0374R180S2
327+3.3V C5 -2 A01X+048120Y-038386X0354Y0374R180S2 327+3.3V C5 -2 A01X+048120Y-038386X0354Y0374R180S2
327/LED_DIN J3 -1 A01X+050700Y-043800X0984Y0669R000S2 327/LED_DIN J3 -1 A01X+050700Y-043800X0984Y0669R000S2
@@ -239,7 +239,7 @@ P arrayDim N
327+3.3V U1 -24 A01X+041178Y-047266X0669Y0000R180S2 327+3.3V U1 -24 A01X+041178Y-047266X0669Y0000R180S2
327GND TP3 -1 A01X+032677Y-050197X0591Y0000R000S2 327GND TP3 -1 A01X+032677Y-050197X0591Y0000R000S2
327NET-(D2-K) D2 -1 A01X+032874Y-036924X0344Y0374R270S2 327NET-(D2-K) D2 -1 A01X+032874Y-036924X0344Y0374R270S2
327+5V D2 -2 A01X+032874Y-036304X0344Y0374R270S2 327+3.3V D2 -2 A01X+032874Y-036304X0344Y0374R270S2
327+3.3V R14 -1 A01X+047244Y-040320X0384Y0374R270S2 327+3.3V R14 -1 A01X+047244Y-040320X0384Y0374R270S2
327/MOSI R14 -2 A01X+047244Y-039601X0384Y0374R270S2 327/MOSI R14 -2 A01X+047244Y-039601X0384Y0374R270S2
327+3.3V R13 -1 A01X+048031Y-040320X0384Y0374R270S2 327+3.3V R13 -1 A01X+048031Y-040320X0384Y0374R270S2

View File

@@ -2,7 +2,7 @@ use embassy_time::{Duration, Timer};
use esp_hal::{Async, uart::Uart}; use esp_hal::{Async, uart::Uart};
use log::{debug, info}; use log::{debug, info};
use crate::TallyPublisher; use crate::{TallyPublisher, store::TallyID};
#[embassy_executor::task] #[embassy_executor::task]
pub async fn rfid_reader_task(mut uart_device: Uart<'static, Async>, chan: TallyPublisher) { pub async fn rfid_reader_task(mut uart_device: Uart<'static, Async>, chan: TallyPublisher) {
@@ -17,7 +17,7 @@ pub async fn rfid_reader_task(mut uart_device: Uart<'static, Async>, chan: Tally
core::fmt::Write::write_fmt(&mut hex_str, format_args!("{:02X} ", byte)).ok(); core::fmt::Write::write_fmt(&mut hex_str, format_args!("{:02X} ", byte)).ok();
} }
info!("Read {n} bytes from UART: {hex_str}"); info!("Read {n} bytes from UART: {hex_str}");
chan.publish([1, 0, 2, 5, 0, 8, 12, 15]).await; chan.publish(uart_buffer[..8].try_into().unwrap()).await;
} }
Err(e) => { Err(e) => {
log::error!("Error reading from UART: {e}"); log::error!("Error reading from UART: {e}");

View File

@@ -34,7 +34,7 @@ use log::{debug, error, info};
use crate::FEEDBACK_STATE; use crate::FEEDBACK_STATE;
use crate::init::network; use crate::init::network;
use crate::init::sd_card::setup_sdcard; use crate::init::sd_card::{setup_sdcard, SDCardPersistence};
use crate::init::wifi; use crate::init::wifi;
use crate::store::AttendanceDay; use crate::store::AttendanceDay;
use crate::store::persistence::Persistence; use crate::store::persistence::Persistence;
@@ -79,6 +79,7 @@ pub async fn hardware_init(
SmartLedsAdapterAsync<ConstChannelAccess<esp_hal::rmt::Tx, 0>, LED_BUFFER_SIZE>, SmartLedsAdapterAsync<ConstChannelAccess<esp_hal::rmt::Tx, 0>, LED_BUFFER_SIZE>,
GPIO21<'static>, GPIO21<'static>,
GPIO0<'static>, GPIO0<'static>,
SDCardPersistence,
) { ) {
let config = esp_hal::Config::default().with_cpu_clock(CpuClock::max()); let config = esp_hal::Config::default().with_cpu_clock(CpuClock::max());
let peripherals = esp_hal::init(config); let peripherals = esp_hal::init(config);
@@ -104,7 +105,7 @@ pub async fn hardware_init(
let i2c_device = setup_i2c(peripherals.I2C0, peripherals.GPIO22, peripherals.GPIO23); let i2c_device = setup_i2c(peripherals.I2C0, peripherals.GPIO22, peripherals.GPIO23);
let mut sd_det_gpio = peripherals.GPIO0; let sd_det_gpio = peripherals.GPIO0;
let spi_bus = setup_spi( let spi_bus = setup_spi(
peripherals.SPI2, peripherals.SPI2,
@@ -119,7 +120,7 @@ pub async fn hardware_init(
OutputConfig::default(), OutputConfig::default(),
); );
let mut vol_mgr = setup_sdcard(spi_bus, sd_cs_pin); let vol_mgr = setup_sdcard(spi_bus, sd_cs_pin);
let buzzer_gpio = peripherals.GPIO21; let buzzer_gpio = peripherals.GPIO21;
@@ -136,6 +137,7 @@ pub async fn hardware_init(
led, led,
buzzer_gpio, buzzer_gpio,
sd_det_gpio, sd_det_gpio,
vol_mgr,
) )
} }

View File

@@ -42,13 +42,16 @@ impl Persistence for SDCardPersistence {
async fn load_day(&mut self, day: crate::store::Date) -> Option<AttendanceDay> { async fn load_day(&mut self, day: crate::store::Date) -> Option<AttendanceDay> {
let mut vol_0 = self.vol_mgr.open_volume(VolumeIdx(0)).unwrap(); let mut vol_0 = self.vol_mgr.open_volume(VolumeIdx(0)).unwrap();
let mut root_dir = vol_0.open_root_dir().unwrap(); let mut root_dir = vol_0.open_root_dir().unwrap();
let mut file = root_dir let mut file = root_dir.open_file_in_dir("day.jsn", embedded_sdmmc::Mode::ReadOnly);
.open_file_in_dir("day.jsn", embedded_sdmmc::Mode::ReadOnly)
.unwrap(); if let Err(e) = file {
return None;
}
let mut open_file = file.unwrap();
let mut read_buffer: [u8; 1024] = [0; 1024]; let mut read_buffer: [u8; 1024] = [0; 1024];
let read = file.read(&mut read_buffer).unwrap(); let read = open_file.read(&mut read_buffer).unwrap();
file.close().unwrap(); open_file.close().unwrap();
let day: AttendanceDay = serde_json::from_slice(&read_buffer[..read]).unwrap(); let day: AttendanceDay = serde_json::from_slice(&read_buffer[..read]).unwrap();

View File

@@ -20,7 +20,7 @@ use esp_hal::{gpio::InputConfig, peripherals};
use log::{debug, info}; use log::{debug, info};
use static_cell::make_static; use static_cell::make_static;
use crate::store::TallyID; use crate::store::{IDStore, TallyID};
extern crate alloc; extern crate alloc;
@@ -37,7 +37,7 @@ type TallyPublisher = Publisher<'static, NoopRawMutex, TallyID, 8, 2, 1>;
#[esp_hal_embassy::main] #[esp_hal_embassy::main]
async fn main(mut spawner: Spawner) { async fn main(mut spawner: Spawner) {
let (uart_device, stack, _i2c, _led, buzzer_gpio, sd_det_gpio) = let (uart_device, stack, _i2c, _led, buzzer_gpio, sd_det_gpio, persistence_layer) =
init::hardware::hardware_init(&mut spawner).await; init::hardware::hardware_init(&mut spawner).await;
wait_for_stack_up(stack).await; wait_for_stack_up(stack).await;
@@ -71,23 +71,29 @@ async fn main(mut spawner: Spawner) {
debug!("everything spawned"); debug!("everything spawned");
FEEDBACK_STATE.signal(feedback::FeedbackState::Startup); FEEDBACK_STATE.signal(feedback::FeedbackState::Startup);
loop { let mut store = IDStore::new_from_storage(persistence_layer).await;
rtc.get_time().await;
info!("Current RTC time: {}", rtc.get_time().await);
Timer::after(Duration::from_millis(1000)).await;
// let wait_result = sub.next_message().await; loop {
// match wait_result { let wait_result = sub.next_message().await;
// Lagged(_) => debug!("Lagged"), match wait_result {
// Message(msg) => debug!("Got message: {msg:?}"), Lagged(_) => debug!("Lagged"),
// } Message(msg) => {
debug!("Got message: {msg:?}");
let added = store.add_id(msg).await;
if added {
FEEDBACK_STATE.signal(feedback::FeedbackState::Ack);
}
}
}
} }
} }
#[embassy_executor::task] #[embassy_executor::task]
async fn sd_detect_task(sd_det_gpio: peripherals::GPIO0<'static>) { async fn sd_detect_task(sd_det_gpio: peripherals::GPIO0<'static>) {
let mut sd_det = Input::new(sd_det_gpio, InputConfig::default()); let mut sd_det = Input::new(sd_det_gpio, InputConfig::default());
sd_det.wait_for(esp_hal::gpio::Event::AnyEdge); sd_det.wait_for(esp_hal::gpio::Event::AnyEdge).await;
loop { loop {
sd_det.wait_for_any_edge().await; sd_det.wait_for_any_edge().await;

View File

@@ -41,10 +41,10 @@ pub struct IDStore<T: Persistence> {
impl<T: Persistence> IDStore<T> { impl<T: Persistence> IDStore<T> {
pub async fn new_from_storage(mut persistence_layer: T) -> Self { pub async fn new_from_storage(mut persistence_layer: T) -> Self {
let mapping = match persistence_layer.load_mapping().await { // let mapping = match persistence_layer.load_mapping().await {
Some(map) => map, // Some(map) => map,
None => IDMapping::new(), // None => IDMapping::new(),
}; // };
let current_date: Date = 1; let current_date: Date = 1;
@@ -55,7 +55,7 @@ impl<T: Persistence> IDStore<T> {
Self { Self {
current_day: day, current_day: day,
mapping, mapping: IDMapping::new(),
persistence_layer, persistence_layer,
} }
} }