Completing Lifx driver that uses Particle cloud; Particle phone app provides a nice...
[iotcloud.git] / version2 / src / RPi / LifxLightBulb.h
index 216a47a726603f9911fecfc8bf2eaaf8fae8c07c..f2852b4df3aab68b303305f6e60a9fb206edbf63 100644 (file)
@@ -36,10 +36,6 @@ using namespace std;
 // Driver LifxLightBulb
 // Implemented based on LightBulb virtual class (interface)
 
-//std::atomic
-//std::atomic<bool> didAlreadyInit(false);
-//std::atomic<bool> didGetBulbVersion(false);
-
 class LifxLightBulb : public LightBulb
 {
        private:
@@ -50,7 +46,6 @@ class LifxLightBulb : public LightBulb
                IoTUDP *communicationSocket;
                char bulbMacAddress[8];
                //TODO:
-               //static Semaphore socketMutex = new Semaphore(1);
                bool sendSocketFlag = false;
 
                // Current Bulb Values
@@ -60,11 +55,8 @@ class LifxLightBulb : public LightBulb
                int currentTemperature = 9000;
                bool bulbIsOn = false;
 
-               //std::atomic
-               //atomic<bool> didAlreadyInit;
-               bool didAlreadyInit;
-               //atomic<bool> didGetBulbVersion;
-               bool didGetBulbVersion;
+               bool didAlreadyInit = false;
+               bool didGetBulbVersion = false;
 
                // Mutex locks
                mutex socketMutex;
@@ -95,9 +87,7 @@ class LifxLightBulb : public LightBulb
 
                // Constructor
                LifxLightBulb();
-               LifxLightBulb(uint8_t* ipAddress, string macAddress, int srcPort);
-               //LifxLightBulb(IoTSet<IoTDeviceAddress*>* _devAddress, string macAddress);
-               LifxLightBulb(IoTSet<void*>* _devAddress, string macAddress);
+               LifxLightBulb(IPAddress ipAddress, char* macAddress, int srcPort);
                ~LifxLightBulb();
                // Initialize the lightbulb
                void init();