Skip to content

Commit

Permalink
Minor cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed Apr 17, 2017
1 parent 1041f96 commit 8036659
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
6 changes: 3 additions & 3 deletions art/art.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ func (i *Image) ParseKeyframe(version int, data []byte, resource bool) error {
colors[coords] = color
if color == -1 {
r, g, b, a := c.RGBA()
log.Infof("Unknown color in keyframe: %v:%v - %v:%v:%v:%v", x, y, r, g, b, a)
log.Infof("Unknown color in keyframe: %v:%v - %v,%v,%v,%v", x, y, r, g, b, a)
}
}
}
i.lock.Lock()
if i.version > version {
log.Infof("New image version is old! %v >= %v", i.version, version)
log.Infof("New image version is old! %v > %v", i.version, version)
}
i.version = version
i.colors = colors
Expand All @@ -144,7 +144,7 @@ func (i *Image) ParseKeyframe(version int, data []byte, resource bool) error {
func (i *Image) UpdatePixel(x, y, color, version int) {
i.lock.Lock()
if i.version > version {
log.Infof("New pixel version is old! %v >= %v", i.version, version)
log.Infof("New pixel version is old! %v > %v", i.version, version)
}
i.version = version
i.colors[x|(y<<16)] = color
Expand Down
16 changes: 0 additions & 16 deletions patriot.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,6 @@ func main() {
wg.Add(1)
go work.Work(wg)

/*
fmt.Println("Waiting for queue to be empty ...")
for {
queueLock.Lock()
if len(queue) > 0 {
fmt.Printf("Still have %v items in queue ..\n", len(queue))
} else {
queueLock.Unlock()
break
}
queueLock.Unlock()
time.Sleep(10 * time.Second)
}
fmt.Println("All done!")
*/

mainLoop:
for {
select {
Expand Down
2 changes: 1 addition & 1 deletion sp/sp.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var client = &http.Client{
}

func FetchImageFromFile() ([]byte, error) {
return ioutil.ReadFile("current.png")
return ioutil.ReadFile("snapshots/current1.png")
}

func FetchImage() ([]byte, int, error) {
Expand Down

0 comments on commit 8036659

Please sign in to comment.