projects
/
smartthings-infrastructure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
84ff0e5
)
Fixing a bug in ContactSensor.
author
rtrimana
<rtrimana@uci.edu>
Thu, 1 Aug 2019 19:25:05 +0000
(12:25 -0700)
committer
rtrimana
<rtrimana@uci.edu>
Thu, 1 Aug 2019 19:25:05 +0000
(12:25 -0700)
ContactSensor/ContactSensor.groovy
patch
|
blob
|
history
diff --git
a/ContactSensor/ContactSensor.groovy
b/ContactSensor/ContactSensor.groovy
index b4ed62906771be1655f70bcedfdffe17966a6687..141faf2b7ef3ec33f3af12f7dc1de4c13a04b31a 100644
(file)
--- a/
ContactSensor/ContactSensor.groovy
+++ b/
ContactSensor/ContactSensor.groovy
@@
-29,11
+29,11
@@
public class ContactSensor {
this.contactState = value
this.currentContact = value
this.latestValue = value
this.contactState = value
this.currentContact = value
this.latestValue = value
- this.events.add(eventDataMap)
- this.timeOfEvents.add(System.currentTimeMillis())
+
//
this.events.add(eventDataMap)
+
//
this.timeOfEvents.add(System.currentTimeMillis())
}
}
- def eventsSince(Date dateObj) {
+
/*
def eventsSince(Date dateObj) {
def List happenedEvents = []
def sinceThen = dateObj.time
for (int i = 0;i < timeOfEvents.size();i++) {
def List happenedEvents = []
def sinceThen = dateObj.time
for (int i = 0;i < timeOfEvents.size();i++) {
@@
-41,7
+41,7
@@
public class ContactSensor {
happenedEvents.add(events[i])
}
return happenedEvents
happenedEvents.add(events[i])
}
return happenedEvents
- }
+ }
*/
def on() {
println("the contact sensor with id:$id is armed!")
def on() {
println("the contact sensor with id:$id is armed!")