Erste Vorbereitungen für Settings-Datei
This commit is contained in:
23
settings/settings.c
Normal file
23
settings/settings.c
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#include <main.h>
|
||||
#include <settings/settings.h>
|
||||
|
||||
struct APP_SETTINGS settings;
|
||||
|
||||
void Settings_InitDefaultValues()
|
||||
{
|
||||
// #define LOG_EMERG 0 /* system is unusable */
|
||||
// #define LOG_ALERT 1 /* action must be taken immediately */
|
||||
// #define LOG_CRIT 2 /* critical conditions */
|
||||
// #define LOG_ERR 3 /* error conditions */
|
||||
// #define LOG_WARNING 4 /* warning conditions */
|
||||
// #define LOG_NOTICE 5 /* normal but significant condition */
|
||||
// #define LOG_INFO 6 /* informational */
|
||||
// #define LOG_DEBUG 7 /* debug-level messages */
|
||||
settings.iDebugLevel = LOG_INFO;
|
||||
|
||||
settings.iMotorCount = 1;
|
||||
settings.iMotorPwrMinRaw = 38;
|
||||
settings.iMotorPwrMaxRaw = 250;
|
||||
settings.iMotorPwrStepCount = 7;
|
||||
}
|
||||
17
settings/settings.h
Normal file
17
settings/settings.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#if !defined(__SETTINGS_H__)
|
||||
#define __SETTINGS_H__
|
||||
|
||||
struct APP_SETTINGS
|
||||
{
|
||||
int iDebugLevel; // Level of debug messages
|
||||
|
||||
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
|
||||
};
|
||||
extern struct APP_SETTINGS settings;
|
||||
|
||||
void Settings_InitDefaultValues();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user