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

@@ -33,12 +33,12 @@
#include "config.h"
#include "globals.h"
#include "debugger.h"
#include "can.h"
#include "gps.h"
#include "dtc.h"
#include "led_colors.h"
#include "obd2_kline.h"
#include "obd2_can.h"
#include "can_obd2.h"
#include "can_native.h"
#include "buttoncontrol.h"
#include "button_actions.h"
#include "ledcontrol.h"
@@ -102,6 +102,9 @@ void setup()
// Initialize and clear Diagnostic Trouble Code (DTC) storage
ClearAllDTC();
Wire.begin();
#ifdef FEATURE_ENABLE_WIFI_CLIENT
// Configure WiFi settings for client mode if enabled
WiFi.mode(WIFI_STA);
@@ -142,8 +145,8 @@ void setup()
switch (LubeConfig.SpeedSource)
{
case SOURCE_CAN:
Init_CAN();
wheelSpeedcapture = &Process_CAN_WheelSpeed;
Init_CAN_Native();
wheelSpeedcapture = &Process_CAN_Native_WheelSpeed;
Serial.print("\nCAN-Init done");
break;
case SOURCE_GPS:
@@ -163,8 +166,8 @@ void setup()
Serial.print("\nOBD2-KLine-Init done");
break;
case SOURCE_OBD2_CAN:
Init_OBD2_CAN();
wheelSpeedcapture = &Process_OBD2_CAN_Speed;
Init_CAN_OBD2();
wheelSpeedcapture = &Process_CAN_OBD2_Speed;
Serial.print("\nOBD2-CAN-Init done");
break;
default: