@@ -7,17 +7,17 @@ import (
7
7
)
8
8
9
9
var (
10
- name string
11
- buttonWidth uint
12
- buttonHeight uint
13
- imageReportPayloadLength uint
10
+ xlName string
11
+ xlButtonWidth uint
12
+ xlButtonHeight uint
13
+ xlImageReportPayloadLength uint
14
14
)
15
15
16
16
// GetImageHeaderXl returns the USB comms header for a button image for the XL
17
17
func GetImageHeaderXl (bytesRemaining uint , btnIndex uint , pageNumber uint ) []byte {
18
18
thisLength := uint (0 )
19
- if imageReportPayloadLength < bytesRemaining {
20
- thisLength = imageReportPayloadLength
19
+ if xlImageReportPayloadLength < bytesRemaining {
20
+ thisLength = xlImageReportPayloadLength
21
21
} else {
22
22
thisLength = bytesRemaining
23
23
}
@@ -38,20 +38,20 @@ func GetImageHeaderXl(bytesRemaining uint, btnIndex uint, pageNumber uint) []byt
38
38
}
39
39
40
40
func init () {
41
- name = "Streamdeck XL"
42
- buttonWidth = 96
43
- buttonHeight = 96
44
- imageReportPayloadLength = 1024
41
+ xlName = "Streamdeck XL"
42
+ xlButtonWidth = 96
43
+ xlButtonHeight = 96
44
+ xlImageReportPayloadLength = 1024
45
45
streamdeck .RegisterDevicetype (
46
- name , // Name
47
- image.Point {X : int (buttonWidth ), Y : int (buttonHeight )}, // Width/height of a button
48
- 0x6c , // USB productID
49
- []byte {'\x03' , '\x02' }, // Reset packet
50
- 32 , // Number of buttons
51
- []byte {'\x03' , '\x08' }, // Set brightness packet preamble
52
- 4 , // Button read offset
53
- "JPEG" , // Image format
54
- imageReportPayloadLength , // Amount of image payload allowed per USB packet
55
- GetImageHeaderXl , // Function to get the comms image header
46
+ xlName , // Name
47
+ image.Point {X : int (xlButtonWidth ), Y : int (xlButtonHeight )}, // Width/height of a button
48
+ 0x6c , // USB productID
49
+ []byte {'\x03' , '\x02' }, // Reset packet
50
+ 32 , // Number of buttons
51
+ []byte {'\x03' , '\x08' }, // Set brightness packet preamble
52
+ 4 , // Button read offset
53
+ "JPEG" , // Image format
54
+ xlImageReportPayloadLength , // Amount of image payload allowed per USB packet
55
+ GetImageHeaderXl , // Function to get the comms image header
56
56
)
57
57
}
0 commit comments