47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
/*
|
|
* ESP8266 RGBW controller
|
|
* Copyright 2020 (c) Mark van Renswoude
|
|
*
|
|
* https://git.x2software.net/pub/RGBWifi
|
|
*/
|
|
#ifndef __settingssystem
|
|
#define __settingssystem
|
|
|
|
#include <Arduino.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "../charproperties.h"
|
|
#include "./abstractjson.h"
|
|
|
|
|
|
class SystemSettings : public AbstractJsonSettings
|
|
{
|
|
private:
|
|
uint8_t mPinLEDAP = 4;
|
|
uint8_t mPinLEDSTA = 5;
|
|
uint8_t mPinAPButton = 2;
|
|
|
|
protected:
|
|
virtual const char* getFilename() { return SystemSettingsFile; };
|
|
virtual const char* getDebugPrefix() { return "SystemSettings"; };
|
|
|
|
public:
|
|
SystemSettings()
|
|
{
|
|
}
|
|
|
|
|
|
void toJson(Print &print);
|
|
bool fromJson(char* data, bool* changed);
|
|
|
|
uint8_t pinLEDAP() { return mPinLEDAP; }
|
|
void pinLEDAP(uint8_t value) { mPinLEDAP = value; }
|
|
|
|
uint8_t pinLEDSTA() { return mPinLEDSTA; }
|
|
void pinLEDSTA(uint8_t value) { mPinLEDSTA = value; }
|
|
|
|
uint8_t pinAPButton() { return mPinAPButton; }
|
|
void pinAPButton(uint8_t value) { mPinAPButton = value; }
|
|
};
|
|
|
|
#endif |