2019-05-10 05:17:29 +00:00
|
|
|
#include "Particle.h"
|
2021-03-28 01:19:55 +00:00
|
|
|
#include "../../../Figments/Figments.h"
|
2019-05-10 05:17:29 +00:00
|
|
|
|
|
|
|
class PhotonInput: public BufferedInputSource {
|
|
|
|
public:
|
|
|
|
PhotonInput() : BufferedInputSource("PhotonInput") {}
|
|
|
|
void onStart() override;
|
|
|
|
void handleEvent(const InputEvent &evt) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
char m_commandBuf[16];
|
|
|
|
|
|
|
|
void onConnected();
|
|
|
|
int reboot(String command);
|
|
|
|
int input(String command);
|
|
|
|
int setPattern(String command);
|
|
|
|
int setHue(String colorName);
|
|
|
|
int nextPattern(String command);
|
|
|
|
int previousPattern(String command);
|
|
|
|
int setPower(String command);
|
|
|
|
int setBrightness(String command);
|
2021-03-28 01:19:55 +00:00
|
|
|
int save(String command);
|
2019-05-10 05:17:29 +00:00
|
|
|
|
|
|
|
int startThing(String command);
|
|
|
|
int stopThing(String command);
|
|
|
|
|
|
|
|
static void onReset(system_event_t event, int param);
|
|
|
|
static void onButtonClick(system_event_t event, int param);
|
|
|
|
static void onFirmwareUpdate(system_event_t event, int param);
|
|
|
|
};
|