Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarff committed Jan 29, 2017
2 parents a966881 + 08ebf2e commit b57c2b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/neopixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __getitem__(self, pos):
# Handle if a slice of positions are passed in by grabbing all the values
# and returning them in a list.
if isinstance(pos, slice):
return [ws.ws2811_led_get(self.channel, n) for n in range(pos.indices(self.size))]
return [ws.ws2811_led_get(self.channel, n) for n in xrange(*pos.indices(self.size))]
# Else assume the passed in value is a number to the position.
else:
return ws.ws2811_led_get(self.channel, pos)
Expand All @@ -41,7 +41,7 @@ def __setitem__(self, pos, value):
# LED data values to the provided values.
if isinstance(pos, slice):
index = 0
for n in range(pos.indices(self.size)):
for n in xrange(*pos.indices(self.size)):
ws.ws2811_led_set(self.channel, n, value[index])
index += 1
# Else assume the passed in value is a number to the position.
Expand Down
10 changes: 10 additions & 0 deletions rpihw.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ static const rpi_hw_t rpi_hw_info[] = {
.videocore_base = VIDEOCORE_BASE_RPI2,
.desc = "Pi 3",
},
//
// Pi Compute Module 3
//
{
.hwver = 0xa020a0,
.type = RPI_HWVER_TYPE_PI2,
.periph_base = PERIPH_BASE_RPI2,
.videocore_base = VIDEOCORE_BASE_RPI2,
.desc = "Pi 3",
},

};

Expand Down

0 comments on commit b57c2b3

Please sign in to comment.