Initial commit: add stepper controller firmware

This commit is contained in:
toptah
2026-09-14 19:44:52 +02:00
commit f2d60303ee
19 changed files with 794 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
#pragma once
#include <Arduino.h>
struct DeviceConfig {
String name;
String hostname;
};
struct MotorConfig {
long stepsPerRevolution;
float maxSpeed;
float acceleration;
bool reverseDirection;
bool holdPosition;
};
struct WifiConfig {
String ssid;
String password;
String apName;
String apPassword;
};
struct LimitConfig {
bool enabled;
int leftPin;
int rightPin;
bool activeHigh;
};
struct AppConfig {
DeviceConfig device;
MotorConfig motor;
WifiConfig wifi;
LimitConfig limits;
};
class ConfigManager {
public:
bool begin();
bool load();
bool save();
void resetToDefaults();
const AppConfig& get() const;
AppConfig& mutableConfig();
private:
AppConfig config_;
};