Skip to content

Commit

Permalink
Update Fan+Light.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
etwmc committed Jun 16, 2015
1 parent 58d2ee9 commit 55cff70
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Example Accessory Configuration/Fan+Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
int lightStength = 0;
int fanSpeedVal = 0;

void lightIdentify(bool oldValue, bool newValue) {
printf("Start Identify Light\n");
}

void fanIdentify(bool oldValue, bool newValue) {
printf("Start Identify Fan\n");
}

AccessorySet *accSet;

void initAccessorySet() {
Expand All @@ -18,7 +26,6 @@ void initAccessorySet() {
Accessory *lightAcc = new Accessory();

//Add Light
accSet = new AccessorySet();
accSet = &AccessorySet::getInstance();
addInfoServiceToAccessory(lightAcc, "Light 1", "ET", "Light", "12345678", &lightIdentify);
accSet->addAccessory(lightAcc);
Expand Down

0 comments on commit 55cff70

Please sign in to comment.