This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/Devices/Control/Firmware/lib/LightController/LightController.h

26 lines
675 B
C
Raw Normal View History

class LightController
{
protected:
__SIZE_TYPE__ bjtCount;
2022-02-05 20:50:33 +01:00
const int *bjtPins;
int *bjtState;
private:
void setAbsoluteState(const char data[], int index);
void parseRelativeState(const char data[], int index, int steps);
int clampState(int stateValue);
void commitState(int index);
2022-02-05 20:50:33 +01:00
void commitPinState(int index);
void initializeStateDefaultValues();
void restoreState();
void initializeState();
void initializePins();
public:
LightController(const int bjtPins[], __SIZE_TYPE__ bjtCount);
2022-02-05 20:50:33 +01:00
void updateState(const char data[], int steps);
int getBjtCount();
2022-02-05 20:50:33 +01:00
const int *getBjtPins();
int *getBjtState();
};