Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
limited updates to 30fps
Browse files Browse the repository at this point in the history
  • Loading branch information
Laremere committed Dec 30, 2014
1 parent 750c6f9 commit e37649c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/Laremere/vrpn-webapp/vrpn"
"log"
"runtime"
"time"
)

var devices map[string]*Device
Expand All @@ -28,5 +29,6 @@ func main() {
d.Mainloop()
}
conn.Mainloop()
time.Sleep(time.Second / 30)
}
}
2 changes: 1 addition & 1 deletion webserv.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func handleWebsocket(c *websocket.Conn) {
splitCommand := strings.Split(command[0:len(command)-1], "@")
target, ok := devices[splitCommand[0]]
if ok {
target.Update(splitCommand[1:len(splitCommand)])
target.Update(splitCommand[1:])
} else {
log.Println("Uknown device: ", splitCommand[0])
}
Expand Down

0 comments on commit e37649c

Please sign in to comment.