reworked CAN Stack

This commit is contained in:
2025-08-24 21:49:09 +02:00
parent 3e69485696
commit c6d65f50bf
11 changed files with 721 additions and 447 deletions

View File

@@ -0,0 +1,16 @@
#pragma once
#include <Arduino.h>
#include "can_hal.h"
// Initialisiert das OBD2-CAN-Profil:
// - setzt Masken/Filter für 0x7E8..0x7EF (ECU-Antworten)
// - Normal-Mode sicherstellen
// Voraussetzung: CAN_HAL_Init(...) hat zuvor true geliefert.
bool Init_CAN_OBD2();
// Polling-Prozess für OBD2 über CAN (non-blocking):
// - sendet zyklisch Requests (0x7DF) auf PID 0x0D (Fahrzeuggeschwindigkeit)
// - verarbeitet Antworten 0x7E8..0x7EF
// - integriert Millimeter über dt
// Rückgabe: seit letztem Aufruf addierte Millimeter (uint32_t)
uint32_t Process_CAN_OBD2_Speed();