added precompiled files, autorun service and changed tokyo buffer to one

This commit is contained in:
Philipp
2025-04-23 20:12:57 +02:00
parent ccd453cd59
commit de5487fc6d
12 changed files with 590 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
[Unit]
Description=Feuerwehr Anwesenheit Service
Requires=local-fs.target
After=local-fs.target
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
Type=simple
ExecStart=/home/pi/fw-anwesenheit
Restart=on-failure
RestartSec=5
User=root
Group=root
Environment="PM3_BIN=/home/pi/proxmark3/pm3"
RuntimeDirectory=/home/pi
[Install]
WantedBy=multi-user.target

View File

@@ -34,6 +34,7 @@ impl IDStore {
pub fn add_id(&mut self, id: TallyID) {
let day = self.get_current_day();
println!("id: {}", id.0);
day.add_id(id);
}

View File

@@ -12,7 +12,8 @@ mod webserver;
#[tokio::main]
async fn main() {
let (tx, mut rx) = mpsc::channel::<String>(32);
println!("Heeeeeeeeeeeelllllllooooooo start!");
let (tx, mut rx) = mpsc::channel::<String>(1);
tokio::spawn(async move {
match run_pm3(tx).await {

View File

@@ -29,8 +29,10 @@ pub async fn run_pm3(tx: mpsc::Sender<String>) -> Result<(), Box<dyn Error>> {
for line_result in reader.lines() {
match line_result {
Ok(line) => {
println!("line: {}", line);
let parse_result = super::parser::parse_line(&line);
if let Some(uid) = parse_result {
println!("uid {}", uid);
match tx.send(uid).await {
Ok(()) => {}
Err(e) => {