|
|
@@ -29,7 +29,7 @@ struct PacketStream {
|
|
|
|
|
|
class PacketFormatter {
|
|
|
public:
|
|
|
- PacketFormatter(const size_t packetLength, const size_t maxPackets = 1);
|
|
|
+ PacketFormatter(const MiLightRemoteType deviceType, const size_t packetLength, const size_t maxPackets = 1);
|
|
|
|
|
|
// Ideally these would be constructor parameters. We could accomplish this by
|
|
|
// wrapping PacketFormaters in a factory, as Settings and StateStore are not
|
|
|
@@ -43,6 +43,7 @@ public:
|
|
|
virtual bool canHandle(const uint8_t* packet, const size_t len);
|
|
|
|
|
|
void updateStatus(MiLightStatus status);
|
|
|
+ void toggleStatus();
|
|
|
virtual void updateStatus(MiLightStatus status, uint8_t groupId);
|
|
|
virtual void command(uint8_t command, uint8_t arg);
|
|
|
|
|
|
@@ -99,6 +100,7 @@ protected:
|
|
|
PacketStream packetStream;
|
|
|
GroupStateStore* stateStore = NULL;
|
|
|
const Settings* settings = NULL;
|
|
|
+ const MiLightRemoteType deviceType;
|
|
|
|
|
|
void pushPacket();
|
|
|
|