projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
06ab21d
)
temp sensor location names
author
Bernhard Tittelbach
<xro@realraum.at>
Wed, 9 Oct 2013 21:52:28 +0000
(21:52 +0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Wed, 9 Oct 2013 21:52:28 +0000
(21:52 +0000)
go/r3-netstatus/webstatus.go
patch
|
blob
|
history
diff --git
a/go/r3-netstatus/webstatus.go
b/go/r3-netstatus/webstatus.go
index
537b5ab
..
c3b3f2d
100644
(file)
--- a/
go/r3-netstatus/webstatus.go
+++ b/
go/r3-netstatus/webstatus.go
@@
-9,6
+9,7
@@
import (
"net/http"
"net/url"
"time"
"net/http"
"net/url"
"time"
+ "fmt"
r3events "svn.spreadspace.org/realraum/go.svn/r3events"
)
r3events "svn.spreadspace.org/realraum/go.svn/r3events"
)
@@
-94,9
+95,18
@@
func EventToWeb(ps *pubsub.PubSub) {
spaceapidata.AddSpaceEvent("BoreDOOMButton", "check-in", "The button has been pressed")
publishStateToWeb()
case r3events.TempSensorUpdate:
spaceapidata.AddSpaceEvent("BoreDOOMButton", "check-in", "The button has been pressed")
publishStateToWeb()
case r3events.TempSensorUpdate:
- spaceapidata.MergeInSensor(spaceapi.MakeTempCSensor("Temp0","Decke", event.Value))
+ var tempsensorlocation string
+ switch event.Sensorindex {
+ case 0:
+ tempsensorlocation = "HHL"
+ case 1:
+ tempsensorlocation = "Gang"
+ default:
+ tempsensorlocation = "Sonstwo"
+ }
+ spaceapidata.MergeInSensor(spaceapi.MakeTempCSensor(fmt.Sprintf("Temp%d",event.Sensorindex),tempsensorlocation, event.Value))
case r3events.IlluminationSensorUpdate:
case r3events.IlluminationSensorUpdate:
- spaceapidata.MergeInSensor(spaceapi.MakeIlluminationSensor("Photodiode","Decke","1024V/5V", event.Value))
+ spaceapidata.MergeInSensor(spaceapi.MakeIlluminationSensor("Photodiode","MHR","1024V/5V", event.Value))
}
}
}
}
}
}