Skip to content

Commit 7010268

Browse files
Nathan HüskenNathan Huesken
authored andcommitted
Add # of buttons on device via GetNumButtonsOnDevice
1 parent 1181fb1 commit 7010268

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

comms.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ func (d* Device) GetButtonImageSize() image.Point {
137137
return d.deviceType.imageSize
138138
}
139139

140+
// GetNumButtonsOnDevice returns the number of button this device has
141+
func (d* Device) GetNumButtonsOnDevice() uint {
142+
return d.deviceType.numberOfButtons
143+
}
144+
140145
// ClearButtons writes a black square to all buttons
141146
func (d *Device) ClearButtons() {
142147
numButtons := int(d.deviceType.numberOfButtons)

0 commit comments

Comments
 (0)