Skip to content

Commit 1dce2cc

Browse files
Rename ScreenSize to ScreenSizeBytes
1 parent 8902125 commit 1dce2cc

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

internal/remarkable/const.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const (
1010
// ScreenHeight of the remarkable 2
1111
ScreenHeight = 1404
1212

13-
ScreenSize = ScreenWidth * ScreenHeight * 2
13+
ScreenSizeBytes = ScreenWidth * ScreenHeight * 2
1414

1515
// These values are from Max values of /dev/input/event1 (ABS_X and ABS_Y)
1616
MaxXValue = 15725

internal/remarkable/const_arm64.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const (
1010
// ScreenHeight of the remarkable paper pro
1111
ScreenHeight = 2154
1212

13-
ScreenSize = ScreenWidth * ScreenHeight * 4
13+
ScreenSizeBytes = ScreenWidth * ScreenHeight * 4
1414

1515
// These values are from Max values of /dev/input/event2 (ABS_X and ABS_Y)
1616
MaxXValue = 11180

internal/remarkable/pointer_arm64.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func calculateFramePointer(pid string, startAddress int64) (int64, error) {
9292
// The memory header contains a length field (4 bytes) which we use to determine
9393
// how much memory to skip. We dynamically calculate the offset until the
9494
// buffer size (width x height x 4 bytes per pixel) is reached.
95-
for length < ScreenSize {
95+
for length < ScreenSizeBytes {
9696
offset += int64(length - 2)
9797

9898
// Seek to the start address plus offset and read the header

internal/rle/rle.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var encodedPool = sync.Pool{
1616

1717
var bufferPool = sync.Pool{
1818
New: func() any {
19-
return make([]byte, 0, remarkable.ScreenSize)
19+
return make([]byte, 0, remarkable.ScreenSizeBytes)
2020
},
2121
}
2222

@@ -50,7 +50,7 @@ func (rlewriter *RLE) Write(data []byte) (int, error) {
5050
current := data[0]
5151
count := uint8(0)
5252

53-
for i := 0; i < remarkable.ScreenSize; i += 2 {
53+
for i := 0; i < remarkable.ScreenSizeBytes; i += 2 {
5454
datum := data[i]
5555
if count < 254 && datum == current {
5656
count++

internal/stream/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var (
2020

2121
var rawFrameBuffer = sync.Pool{
2222
New: func() any {
23-
return make([]uint8, remarkable.ScreenSize) // Adjust the initial capacity as needed
23+
return make([]uint8, remarkable.ScreenSizeBytes) // Adjust the initial capacity as needed
2424
},
2525
}
2626

0 commit comments

Comments
 (0)