Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/rebble
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ fi
export PHONESIM_PATH="$PYTHONHOME/bin/pypkjs"

source "$PEBBLE_PATH/.env/bin/activate"
python "$PEBBLE_PATH/pebble.py" "$@"
"$PYTHON_BIN" "$PEBBLE_PATH/pebble.py" "$@"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ virtualenv==20.29.1
websocket-client==1.8.0
wheel==0.45.1
sh==2.2.1
freetype-py==2.5.1

# custom-modified versions of libpebble2 and pypkjs for Rebble
# https://github.com/richinfante/pypkjs
Expand Down
14 changes: 12 additions & 2 deletions sdk.patch
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,12 @@ index 56b0d51..3469599 100644
x = x_offset + column
if (x < x_max):
pixel = pixels[x]
@@ -178,9 +178,9 @@ class PebbleBitmap(object):
@@ -176,17 +176,17 @@ class PebbleBitmap(object):

src_pixels = self._im_pixels
out_pixels = []
row_size_words = self.row_size_bytes() / 4
- row_size_words = self.row_size_bytes() / 4
+ row_size_words = int(self.row_size_bytes() / 4)

- for row in xrange(self.y, self.y + self.h):
+ for row in range(self.y, self.y + self.h):
Expand All @@ -517,6 +520,13 @@ index 56b0d51..3469599 100644
x_offset = self.x + column_word * 32
out_pixels.append(pack_pixels_to_bitblt_word(src_pixels[row],
x_offset,
x_max))

- return ''.join(out_pixels)
+ return b''.join(out_pixels)

def image_bits_color(self):
"""
@@ -200,10 +200,10 @@ class PebbleBitmap(object):

assert self.bitdepth is not None
Expand Down