Skip to content

Commit

Permalink
Rename Reset to Clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyll committed Feb 22, 2017
1 parent 4fd15aa commit dc53cd8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if err != nil {
defer pad.Close()

// turn off all of the lights
pad.Reset()
pad.Clear()
~~~

### Coordinate system
Expand Down Expand Up @@ -67,7 +67,7 @@ if err != nil {
}
defer pad.Close()

pad.Reset()
pad.Clear()

ch := pad.Listen()
for {
Expand Down
4 changes: 3 additions & 1 deletion cmd/helloworld/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ func main() {
if err != nil {
log.Fatalf("error while openning connection to launchpad: %v", err)
}
pad.Reset()
defer pad.Close()

pad.Clear()

// Set <0,0> to yellow.
pad.Light(0, 0, 2, 2)
Expand Down
3 changes: 2 additions & 1 deletion launchpad.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ func (l *Launchpad) lightAutomap(x int, velocity int64) error {
return l.outputStream.WriteShort(176, int64(x+104), velocity)
}

func (l *Launchpad) Reset() error {
// Clear turns off all the LEDs on the Launchpad.
func (l *Launchpad) Clear() error {
return l.outputStream.WriteShort(0xb0, 0, 0)
}

Expand Down

0 comments on commit dc53cd8

Please sign in to comment.