Erste Vorbereitungen für Settings-Datei

This commit is contained in:
Bernhard Schräer
2026-01-20 07:33:02 +01:00
parent f91aee06c7
commit b5f7b5a45d
7 changed files with 87 additions and 32 deletions

View File

@@ -15,17 +15,13 @@
#include <linux/can.h>
#include <linux/can/raw.h>
#define MOTOR_COUNT 2
#define MAX_MOTOR_COUNT 2
// motor gear: 0x7C=reverse, 0x7D=neutral, 0x7E=forward
#define MOTOR_GEAR_REVERSE 0x7C
#define MOTOR_GEAR_NEUTRAL 0x7D
#define MOTOR_GEAR_FORWARD 0x7E
#define MOTOR_PWR_STEP_COUNT 7 // how many steps to set power
#define MOTOR_PWR_MIN_RAW 38
#define MOTOR_PWR_MAX_RAW 250 // max. raw power value for motor
struct MOTOR_CONTROL_DATA
{
char nDriveConnected;
@@ -36,7 +32,7 @@ struct MOTOR_CONTROL_DATA
unsigned char nSwitchState;
int iActualMotorPowerW;
};
extern struct MOTOR_CONTROL_DATA motctrl[MOTOR_COUNT];
extern struct MOTOR_CONTROL_DATA motctrl[MAX_MOTOR_COUNT];
struct CAN_INTERFACE_DATA
{