Files
CanRtDriver/settings/settings.h
2026-01-24 18:56:30 +01:00

34 lines
964 B
C
Executable File

#if !defined(__SETTINGS_H__)
#define __SETTINGS_H__
#include <stdio.h>
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#define MAX_LINE_LENGTH 256
#define MAX_PATH 256
#define MAX_SHELLIES_COUNT 5
struct APP_SETTINGS
{
int iDebugLevel; // Level of debug messages
char sExePath[MAX_PATH]; // Path of the executable
int iCanSimu; // Simulate CAN if 1
int iMotorCount; // Number of used motors (1 or 2)
int iMotorPwrMinRaw; // Minimum power value for motor (raw value)
int iMotorPwrMaxRaw; // Maximum power value for motor (raw value)
int iMotorPwrStepCount; // Number of power steps
int iShellySupplyCount; // How many Shellies we have to switch the power supply
char sShellySupplyTopic[MAX_SHELLIES_COUNT][MAX_PATH];
};
extern struct APP_SETTINGS settings;
void Settings_InitDefaultValues();
void Settings_ReadConfFile();
#endif