From: Bernhard Tittelbach Date: Fri, 4 Oct 2013 17:22:14 +0000 (+0000) Subject: grml parsing firmware X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=27f6ab20f2c9c62c3cf6accb18c3ff169b9d30ff;hp=5fd34fb01f672ea16f64eb7e4a136417f2e949f8;p=svn42.git grml parsing firmware --- 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)} } }