Fixed bug in Example 13
WindowShade was incorrectly sending repeated event notifications to HomeKit!
This commit is contained in:
parent
451a2885b1
commit
54f7928204
|
|
@ -107,7 +107,7 @@ struct DEV_WindowShade : Service::WindowCovering { // A motorized Window Sha
|
|||
|
||||
// Here we simulate a window shade that takes 5 seconds to move to its new target posiiton
|
||||
|
||||
if(target->timeVal()>5000){ // if 5 seconds have elapsed since the target-position was last modified...
|
||||
if(current->getVal()!=target->getVal() && target->timeVal()>5000){ // if 5 seconds have elapsed since the target-position was last modified...
|
||||
current->setVal(target->getVal()); // ...set the current position to equal the target position
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue