Files
overland-controller/firmware/esp32/overland-controller/app_config.h
T

45 lines
715 B
C

#pragma once
#include <Arduino.h>
#define MAX_RELAYS 2
#define MAX_TEMP_SENSORS 8
struct RelayConfig {
String id;
String name;
uint8_t pin;
bool enabled;
};
struct TempSensorConfig {
String id;
String name;
String address;
bool enabled;
bool weather;
};
struct BmsConfig {
bool enabled;
String name;
String address;
String addressType;
};
struct AppConfig {
String deviceName;
RelayConfig relays[MAX_RELAYS];
TempSensorConfig tempSensors[MAX_TEMP_SENSORS];
int tempSensorCount;
BmsConfig bms;
};
extern AppConfig appConfig;
void loadDefaultConfig();
void loadConfig();
void saveConfig();
void factoryResetConfig();
void printConfig();