From 27f6ab20f2c9c62c3cf6accb18c3ff169b9d30ff Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Fri, 4 Oct 2013 17:22:14 +0000 Subject: [PATCH 1/1] grml parsing firmware --- go/r3-eventbroker_zmq/sockettoevent.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/go/r3-eventbroker_zmq/sockettoevent.go b/go/r3-eventbroker_zmq/sockettoevent.go index 2445c78..6c245b4 100644 --- a/go/r3-eventbroker_zmq/sockettoevent.go +++ b/go/r3-eventbroker_zmq/sockettoevent.go @@ -29,19 +29,19 @@ var ( func parseSocketInputLine_State(lines [][]byte, ps *pubsub.PubSub, ts int64) { switch string(lines[0]) { - case "closed,": + case "closed": ps.Pub(r3events.DoorLockUpdate{0, true, ts}, "door") - case "opened,": + case "opened": ps.Pub(r3events.DoorLockUpdate{0, false, ts}, "door") case "manual": //movement - case "error,": - case "reset,": + case "error": + case "reset": ps.Pub(r3events.DoorLockUpdate{0, true, ts}, "door") case "timeout": //after open | after close - case "opening,": - case "closing,": + case "opening": + case "closing": default: - log.Print("parseSocketInputLine_State: Unexpected State:", lines) + if Syslog_ != nil {Syslog_.Print("parseSocketInputLine_State: Unexpected State:", lines)} } } -- 1.7.10.4