--bugs
authorBernhard Tittelbach <xro@realraum.at>
Wed, 9 Oct 2013 22:32:50 +0000 (22:32 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Wed, 9 Oct 2013 22:32:50 +0000 (22:32 +0000)
go/r3-netstatus/webstatus.go
sensorvalues-to-json-zmq.py

index c3b3f2d..7bd292e 100644 (file)
@@ -106,7 +106,7 @@ func EventToWeb(ps *pubsub.PubSub) {
                 }
                spaceapidata.MergeInSensor(spaceapi.MakeTempCSensor(fmt.Sprintf("Temp%d",event.Sensorindex),tempsensorlocation, event.Value))
             case r3events.IlluminationSensorUpdate:
-                spaceapidata.MergeInSensor(spaceapi.MakeIlluminationSensor("Photodiode","MHR","1024V/5V", event.Value))
+                spaceapidata.MergeInSensor(spaceapi.MakeIlluminationSensor("Photodiode","HHL","1024V/5V", event.Value))
         }
        }
 }
index aec3fef..b6cd17c 100755 (executable)
@@ -255,6 +255,17 @@ if __name__ == "__main__":
         except Exception, e:
             logging.debug(e)
 
+
+    for k in set(sensor_store.keys()).difference(set(uwscfg.zmq_subscribe.split(" "))):
+      del sensor_store[k]  # del old sensordata of sensor we do not subscribe to
+
+    for k in sensor_store.keys():
+      try:
+       if len(sensor_store[k][0]) > 1:
+          sensor_cols_num_[k] = len(sensor_store[k][0]) -1
+      except:
+        pass
+
     while True:
       try:
         #Start zmq connection to publish / forward sensor data